diff --git a/dist/Info.plist b/dist/Info.plist
index 66285e8df..1f010329e 100644
--- a/dist/Info.plist
+++ b/dist/Info.plist
@@ -30,9 +30,9 @@
LSRequiresCarbon
- NSHumanReadableCopyright
-
SUFeedURL
http://clementine-player.appspot.com/sparkle
+ SUPublicDSAKeyFile
+ sparkle_pub.pem
diff --git a/dist/qt.conf b/dist/qt.conf
new file mode 100644
index 000000000..64d729736
--- /dev/null
+++ b/dist/qt.conf
@@ -0,0 +1,2 @@
+[Paths]
+Plugins = PlugIns
diff --git a/macdeploy.py b/macdeploy.py
index 839d8480d..d04456ce5 100755
--- a/macdeploy.py
+++ b/macdeploy.py
@@ -141,7 +141,7 @@ if len(sys.argv) < 2:
bundle_dir = sys.argv[1]
-bundle_name = bundle_dir.split('.')[0]
+bundle_name = os.path.basename(bundle_dir).split('.')[0]
commands = []
@@ -362,15 +362,10 @@ print 'Would run %d commands:' % len(commands)
for command in commands:
print ' '.join(command)
-print 'OK?'
-raw_input()
+if len(sys.argv) <= 2:
+ print 'OK?'
+ raw_input()
for command in commands:
p = subprocess.Popen(command)
os.waitpid(p.pid, 0)
-
-qtconf = open(os.path.join(resources_dir, 'qt.conf'), 'w')
-qtconf.write('''[Paths]
-Plugins = PlugIns
-''')
-qtconf.close()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index be389e043..a584f1878 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -384,10 +384,29 @@ add_executable(clementine
target_link_libraries(clementine clementine_lib)
set_target_properties(clementine PROPERTIES
- MACOSX_BUNDLE_INFO_STRING "Clementine 0.2"
- MACOSX_BUNDLE_ICON_FILE "clementine"
- MACOSX_BUNDLE_SHORT_VERSION_STRING "0.2"
+ MACOSX_BUNDLE_INFO_PLIST "../dist/Info.plist"
)
+if (APPLE)
+ configure_file(
+ ../dist/clementine.icns
+ ${PROJECT_BINARY_DIR}/clementine.app/Contents/Resources/clementine.icns
+ COPY_ONLY)
+ configure_file(
+ ../dist/qt.conf
+ ${PROJECT_BINARY_DIR}/clementine.app/Contents/Resources/qt.conf
+ COPY_ONLY)
+ configure_file(
+ ../dist/sparkle_pub.pem
+ ${PROJECT_BINARY_DIR}/clementine.app/Contents/Resources/sparkle_pub.pem
+ COPY_ONLY)
+ add_custom_target(bundle
+ ${CMAKE_CURRENT_SOURCE_DIR}/../macdeploy.py ${PROJECT_BINARY_DIR}/clementine.app -f
+ DEPENDS clementine
+ )
+ add_custom_target(dmg
+ macdeployqt ${PROJECT_BINARY_DIR}/clementine.app -dmg
+ DEPENDS clementine)
+endif (APPLE)
install(TARGETS clementine
BUNDLE DESTINATION bin
@@ -402,3 +421,4 @@ install(FILES ../dist/clementine_64.png
install(FILES ../dist/clementine.desktop
DESTINATION share/applications
)
+