differentiate fremantle/harmattan desktop files
authorLuciano Montanaro <mikelima@cirulla.net>
Mon, 11 Jul 2011 07:30:13 +0000 (09:30 +0200)
committerLuciano Montanaro <mikelima@cirulla.net>
Tue, 27 Dec 2011 22:16:42 +0000 (23:16 +0100)
application/application.pro
application/quandoparte.desktop [deleted file]
application/resources/fremantle/applications/quandoparte.desktop [new file with mode: 0644]
application/resources/harmattan/applications/quandoparte.desktop [new file with mode: 0644]

index 9fc9de2..f17119b 100644 (file)
@@ -11,17 +11,18 @@ maemo5 {
 }
 
 harmattan {
-    message(Compiling for the Harmattan platform)
+    PLATFORM = harmattan
 }
 maemo5 {
-    message(Compiling for the Fremantle platform)
+    PLATFORM = fremantle
 }
 symbian {
-    message(Compiling for the Symbian platform)
+    PLATFORM = symbian
 }
 !harmattan:!maemo5:!symbian {
-    message(Compiling for the Desktop platform)
+    PLATFORM = desktop
 }
+message(Compiling for the $$PLATFORM platform)
 
 CONFIG += qt webkit mobility
 MOBILITY = location
@@ -33,7 +34,7 @@ VERSION_STRING = '\\"$${VERSION}\\"'
 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
 
 !debug {
-    DEFINES += QT_NO_DEBUG_OUTPUT
+#    DEFINES += QT_NO_DEBUG_OUTPUT
 }
 
 TRANSLATIONS = resources/i18n/quandoparte_it.ts
@@ -68,7 +69,8 @@ symbian {
 }
 
 OTHER_FILES += \
-    quandoparte.desktop \
+    resources/harmattan/applications/quandoparte.desktop \
+    resources/fremantle/applications/quandoparte.desktop \
     icons/48x48/quandoparte.png \
     icons/64x64/quandoparte.png \
     icons/scalable/quandoparte.svg \
@@ -85,12 +87,16 @@ unix {
     isEmpty(PREFIX) {
         maemo5 {
             PREFIX=/opt/usr
-            DESKTOPDIR=/usr/share/applications/hildon
         } else {
             PREFIX=/usr/local
-            DESKTOPDIR=$$PREFIX/share/applications
         }
     }
+    maemo5 {
+        DESKTOPDIR=/usr/share/applications/hildon
+    } else {
+        DESKTOPDIR=$$PREFIX/share/applications
+    }
+
     BINDIR=$$PREFIX/bin
     DESKTOPDIR=$$PREFIX/share/applications
     DATADIR=$$PREFIX/share/apps/$${TARGET}
@@ -105,7 +111,7 @@ unix:!symbian {
 }
 
 unix:!symbian {
-    desktopfile.files = $${TARGET}.desktop
+    desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
     desktopfile.path = $$DESKTOPDIR
     INSTALLS += desktopfile
 }
@@ -134,13 +140,3 @@ unix:!symbian {
     INSTALLS += i18n
     INSTALLS += stations
 }
-
-unix {
-    desktopfile.files = $${TARGET}.desktop
-    maemo5 {
-        desktopfile.path = /usr/share/applications/hildon
-    } else {
-        desktopfile.path = $$DATADIR/applications
-    }
-    INSTALLS += desktopfile
-}
diff --git a/application/quandoparte.desktop b/application/quandoparte.desktop
deleted file mode 100644 (file)
index e35e23d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=Quando Parte
-Exec=/opt/usr/bin/quandoparte
-Icon=quandoparte
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/application/resources/fremantle/applications/quandoparte.desktop b/application/resources/fremantle/applications/quandoparte.desktop
new file mode 100644 (file)
index 0000000..e35e23d
--- /dev/null
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Quando Parte
+Exec=/opt/usr/bin/quandoparte
+Icon=quandoparte
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/application/resources/harmattan/applications/quandoparte.desktop b/application/resources/harmattan/applications/quandoparte.desktop
new file mode 100644 (file)
index 0000000..90d265e
--- /dev/null
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Quando Parte
+Exec=invoker --single-instance --type=d /usr/bin/quandoparte
+Icon=/usr/share/icons/hicolor/scalable/apps/quandoparte.svg
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable