1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 14:28:24 +01:00

Fix OSX deployment

This commit is contained in:
Dominik Schmidt 2016-01-06 21:36:29 +01:00
parent acdd0e3b9f
commit 4b7f8929fd
5 changed files with 56 additions and 48 deletions

View File

@ -5,23 +5,23 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>Tomahawk</string> <string>@TOMAHAWK_APPLICATION_NAME@</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.tomahawk-player.Tomahawk</string> <string>@TOMAHAWK_APPLICATION_PACKAGE_NAME@</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>TOMAHAWK_VERSION</string> <string>@TOMAHAWK_VERSION@</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>TOMAHAWK_VERSION</string> <string>@TOMAHAWK_VERSION@</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>tomahawk</string> <string>@TOMAHAWK_BASE_TARGET_NAME@</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>Tomahawk.icns</string> <string>@TOMAHAWK_APPLICATION_NAME@.icns</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>Tomahawk</string> <string>@TOMAHAWK_APPLICATION_NAME@</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.7.0</string> <string>10.7.0</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
@ -29,7 +29,7 @@
<key>NSHighResolutionCapable</key> <key>NSHighResolutionCapable</key>
<true /> <true />
<key>SUFeedURL</key> <key>SUFeedURL</key>
<string>http://download.tomahawk-player.org/sparkle/update.php</string> <string>@TOMAHAWK_SPARKLE_UPDATE_URL@</string>
<key>SUPublicDSAKeyFile</key> <key>SUPublicDSAKeyFile</key>
<string>sparkle_pub.pem</string> <string>sparkle_pub.pem</string>
<key>SUEnableSystemProfiling</key> <key>SUEnableSystemProfiling</key>

View File

@ -4,8 +4,9 @@
# #
################################################################################ ################################################################################
set -e TARGET_NAME="Tomahawk"
set -e
function header { function header {
echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m" echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m"
@ -31,30 +32,28 @@ CERT_SIGNER=$2
################################################################################ ################################################################################
header "Fixing and copying libraries" header "Fixing and copying libraries"
$ROOT/../admin/mac/macdeploy.py Tomahawk.app quiet $ROOT/../admin/mac/macdeploy.py "${TARGET_NAME}.app" quiet
cd Tomahawk.app cd "${TARGET_NAME}.app"
cp $ROOT/../admin/mac/qt.conf Contents/Resources/qt.conf cp $ROOT/../admin/mac/qt.conf Contents/Resources/qt.conf
# header "Copying Sparkle framework" header "Fixing fonts"
# cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks mkdir "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
cp -R $ROOT/../data/fonts/*.ttf "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
header "Creating DMG"
cd ..
header "Signing bundle" header "Signing bundle"
# codesign -s "Developer ID Application: $CERT_SIGNER" -f -v ./Tomahawk.app cd ..
if [ -f ~/sign_step.sh ]; if [ -f ~/sign_step.sh ];
then then
~/sign_step.sh "$CERT_SIGNER" "Tomahawk.app" || true ~/sign_step.sh "$CERT_SIGNER" "${TARGET_NAME}.app" || true
fi fi
$ROOT/../admin/mac/create-dmg.sh Tomahawk.app header "Creating DMG"
mv Tomahawk.dmg Tomahawk-$VERSION.dmg $ROOT/../admin/mac/create-dmg.sh "${TARGET_NAME}.app"
mv "${TARGET_NAME}.dmg" "${TARGET_NAME}-$VERSION.dmg"
header "Creating signed Sparkle update" header "Creating signed Sparkle update"
$ROOT/../admin/mac/sign_bundle.rb $VERSION ~/tomahawk_sparkle_privkey.pem # $ROOT/../admin/mac/sign_bundle.rb "${TARGET_NAME}" $VERSION ~/tomahawk_sparkle_privkey.pem
header "Done!" header "Done!"

View File

@ -43,7 +43,7 @@ ln -s /Applications "$TMP/Applications"
cp -R "$IN" "$TMP" cp -R "$IN" "$TMP"
# create # create
hdiutil makehybrid -hfs -hfs-volume-name Tomahawk -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg hdiutil makehybrid -hfs -hfs-volume-name "$NAME" -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT" hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT"
# cleanup # cleanup

View File

@ -22,6 +22,8 @@ import commands
import sys import sys
import glob import glob
TARGET_NAME="tomahawk"
FRAMEWORK_SEARCH_PATH=[ FRAMEWORK_SEARCH_PATH=[
'/Library/Frameworks', '/Library/Frameworks',
os.path.join(os.environ['HOME'], 'Library/Frameworks') os.path.join(os.environ['HOME'], 'Library/Frameworks')
@ -206,26 +208,26 @@ SNORE_PLUGINS = [
] ]
TOMAHAWK_PLUGINS = [ TOMAHAWK_PLUGINS = [
'libtomahawk_account_xmpp.dylib', #'lib%s_account_xmpp.dylib' % TARGET_NAME,
'libtomahawk_account_google.so', #'lib%s_account_google.so' % TARGET_NAME,
'libtomahawk_account_zeroconf.so', 'lib%s_account_zeroconf.so' % TARGET_NAME,
'libtomahawk_account_hatchet.so', 'lib%s_account_hatchet.so' % TARGET_NAME,
'libtomahawk_infoplugin_adium.so', 'lib%s_infoplugin_adium.so' % TARGET_NAME,
'libtomahawk_infoplugin_charts.so', 'lib%s_infoplugin_charts.so' % TARGET_NAME,
'libtomahawk_infoplugin_discogs.so', # 'lib%s_infoplugin_discogs.so' % TARGET_NAME,
'libtomahawk_infoplugin_echonest.so', 'lib%s_infoplugin_echonest.so' % TARGET_NAME,
'libtomahawk_infoplugin_hypem.so', 'lib%s_infoplugin_hypem.so' % TARGET_NAME,
'libtomahawk_infoplugin_musicbrainz.so', # 'lib%s_infoplugin_musicbrainz.so' % TARGET_NAME,
'libtomahawk_infoplugin_musixmatch.so', 'lib%s_infoplugin_musixmatch.so' % TARGET_NAME,
'libtomahawk_infoplugin_newreleases.so', 'lib%s_infoplugin_newreleases.so' % TARGET_NAME,
'libtomahawk_infoplugin_rovi.so', # 'lib%s_infoplugin_rovi.so' % TARGET_NAME,
'libtomahawk_infoplugin_snorenotify.so', 'lib%s_infoplugin_snorenotify.so' % TARGET_NAME,
'libtomahawk_infoplugin_spotify.so', 'lib%s_infoplugin_spotify.so' % TARGET_NAME,
'libtomahawk_viewpage_dashboard.so', #'lib%s_viewpage_dashboard.so' % TARGET_NAME,
# 'libtomahawk_viewpage_networkactivity.so', # 'lib%s_viewpage_networkactivity.so' % TARGET_NAME,
'libtomahawk_viewpage_charts.so', #'lib%s_viewpage_charts.so' % TARGET_NAME,
'libtomahawk_viewpage_newreleases.so', #'lib%s_viewpage_newreleases.so' % TARGET_NAME,
'libtomahawk_viewpage_whatsnew_0_8.so', 'lib%s_viewpage_whatsnew_0_8.so' % TARGET_NAME,
] ]
QT_PLUGINS_SEARCH_PATH=[ QT_PLUGINS_SEARCH_PATH=[
@ -247,6 +249,8 @@ class CouldNotFindQtPluginErrorFindFrameworkError(Error):
class InstallNameToolError(Error): class InstallNameToolError(Error):
pass pass
class CouldNotFindFrameworkError(Error):
pass
class CouldNotFindQtPluginError(Error): class CouldNotFindQtPluginError(Error):
pass pass
@ -332,6 +336,11 @@ def FindFramework(path):
if os.path.exists(abs_path): if os.path.exists(abs_path):
return abs_path return abs_path
# replace rpath with /Library/Frameworks for Sparkle
abs_path = path.replace("@rpath/", "/Library/Frameworks/")
if os.path.exists(abs_path):
return abs_path
raise CouldNotFindFrameworkError(path) raise CouldNotFindFrameworkError(path)
def FindLibrary(path): def FindLibrary(path):
@ -579,9 +588,9 @@ for plugin in SNORE_PLUGINS:
FixPlugin(FindSnorePlugin(plugin), '../lib/plugins/libsnore-qt5') FixPlugin(FindSnorePlugin(plugin), '../lib/plugins/libsnore-qt5')
try: try:
FixPlugin('tomahawk_crash_reporter', '../MacOS') FixPlugin('%s_crash_reporter' % TARGET_NAME, '../MacOS')
except: except:
print 'Failed to find tomahawk_crash_reporter' print 'Failed to find %s_crash_reporter' % TARGET_NAME
for plugin in QT_PLUGINS: for plugin in QT_PLUGINS:
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin)) FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))

View File

@ -6,9 +6,9 @@ if ARGV.length < 2
exit exit
end end
tarball = "tomahawk-#{ARGV[0]}.tar.bz2" tarball = "#{ARGV[0].downcase}-#{ARGV[1]}.tar.bz2"
puts "Zipping: #{tarball}..." puts "Zipping: #{tarball}..."
`tar jcvf "#{tarball}" Tomahawk.app` `tar jcvf "#{tarball}" #{ARGV[0]}.app`
puts "Signing..." puts "Signing..."
puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[1]}" | openssl enc -base64` puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[2]}" | openssl enc -base64`