mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 06:18:17 +01:00
Fix OSX deployment
This commit is contained in:
parent
acdd0e3b9f
commit
4b7f8929fd
@ -5,23 +5,23 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.tomahawk-player.Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_PACKAGE_NAME@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<string>@TOMAHAWK_VERSION@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<string>@TOMAHAWK_VERSION@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>tomahawk</string>
|
||||
<string>@TOMAHAWK_BASE_TARGET_NAME@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Tomahawk.icns</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
@ -29,7 +29,7 @@
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true />
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://download.tomahawk-player.org/sparkle/update.php</string>
|
||||
<string>@TOMAHAWK_SPARKLE_UPDATE_URL@</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>sparkle_pub.pem</string>
|
||||
<key>SUEnableSystemProfiling</key>
|
||||
|
@ -4,8 +4,9 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
TARGET_NAME="Tomahawk"
|
||||
|
||||
set -e
|
||||
|
||||
function header {
|
||||
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"
|
||||
$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
|
||||
|
||||
# header "Copying Sparkle framework"
|
||||
# cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
header "Fixing fonts"
|
||||
mkdir "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
|
||||
cp -R $ROOT/../data/fonts/*.ttf "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
|
||||
|
||||
header "Signing bundle"
|
||||
# codesign -s "Developer ID Application: $CERT_SIGNER" -f -v ./Tomahawk.app
|
||||
|
||||
cd ..
|
||||
if [ -f ~/sign_step.sh ];
|
||||
then
|
||||
~/sign_step.sh "$CERT_SIGNER" "Tomahawk.app" || true
|
||||
~/sign_step.sh "$CERT_SIGNER" "${TARGET_NAME}.app" || true
|
||||
fi
|
||||
|
||||
$ROOT/../admin/mac/create-dmg.sh Tomahawk.app
|
||||
mv Tomahawk.dmg Tomahawk-$VERSION.dmg
|
||||
header "Creating DMG"
|
||||
$ROOT/../admin/mac/create-dmg.sh "${TARGET_NAME}.app"
|
||||
mv "${TARGET_NAME}.dmg" "${TARGET_NAME}-$VERSION.dmg"
|
||||
|
||||
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!"
|
||||
|
@ -43,7 +43,7 @@ ln -s /Applications "$TMP/Applications"
|
||||
cp -R "$IN" "$TMP"
|
||||
|
||||
# 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"
|
||||
|
||||
# cleanup
|
||||
|
@ -22,6 +22,8 @@ import commands
|
||||
import sys
|
||||
import glob
|
||||
|
||||
TARGET_NAME="tomahawk"
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
'/Library/Frameworks',
|
||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||
@ -206,26 +208,26 @@ SNORE_PLUGINS = [
|
||||
]
|
||||
|
||||
TOMAHAWK_PLUGINS = [
|
||||
'libtomahawk_account_xmpp.dylib',
|
||||
'libtomahawk_account_google.so',
|
||||
'libtomahawk_account_zeroconf.so',
|
||||
'libtomahawk_account_hatchet.so',
|
||||
'libtomahawk_infoplugin_adium.so',
|
||||
'libtomahawk_infoplugin_charts.so',
|
||||
'libtomahawk_infoplugin_discogs.so',
|
||||
'libtomahawk_infoplugin_echonest.so',
|
||||
'libtomahawk_infoplugin_hypem.so',
|
||||
'libtomahawk_infoplugin_musicbrainz.so',
|
||||
'libtomahawk_infoplugin_musixmatch.so',
|
||||
'libtomahawk_infoplugin_newreleases.so',
|
||||
'libtomahawk_infoplugin_rovi.so',
|
||||
'libtomahawk_infoplugin_snorenotify.so',
|
||||
'libtomahawk_infoplugin_spotify.so',
|
||||
'libtomahawk_viewpage_dashboard.so',
|
||||
# 'libtomahawk_viewpage_networkactivity.so',
|
||||
'libtomahawk_viewpage_charts.so',
|
||||
'libtomahawk_viewpage_newreleases.so',
|
||||
'libtomahawk_viewpage_whatsnew_0_8.so',
|
||||
#'lib%s_account_xmpp.dylib' % TARGET_NAME,
|
||||
#'lib%s_account_google.so' % TARGET_NAME,
|
||||
'lib%s_account_zeroconf.so' % TARGET_NAME,
|
||||
'lib%s_account_hatchet.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_adium.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_charts.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_discogs.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_echonest.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_hypem.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_musicbrainz.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_musixmatch.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_newreleases.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_rovi.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_snorenotify.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_spotify.so' % TARGET_NAME,
|
||||
#'lib%s_viewpage_dashboard.so' % TARGET_NAME,
|
||||
# 'lib%s_viewpage_networkactivity.so' % TARGET_NAME,
|
||||
#'lib%s_viewpage_charts.so' % TARGET_NAME,
|
||||
#'lib%s_viewpage_newreleases.so' % TARGET_NAME,
|
||||
'lib%s_viewpage_whatsnew_0_8.so' % TARGET_NAME,
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
@ -247,6 +249,8 @@ class CouldNotFindQtPluginErrorFindFrameworkError(Error):
|
||||
class InstallNameToolError(Error):
|
||||
pass
|
||||
|
||||
class CouldNotFindFrameworkError(Error):
|
||||
pass
|
||||
|
||||
class CouldNotFindQtPluginError(Error):
|
||||
pass
|
||||
@ -332,6 +336,11 @@ def FindFramework(path):
|
||||
if os.path.exists(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)
|
||||
|
||||
def FindLibrary(path):
|
||||
@ -579,9 +588,9 @@ for plugin in SNORE_PLUGINS:
|
||||
FixPlugin(FindSnorePlugin(plugin), '../lib/plugins/libsnore-qt5')
|
||||
|
||||
try:
|
||||
FixPlugin('tomahawk_crash_reporter', '../MacOS')
|
||||
FixPlugin('%s_crash_reporter' % TARGET_NAME, '../MacOS')
|
||||
except:
|
||||
print 'Failed to find tomahawk_crash_reporter'
|
||||
print 'Failed to find %s_crash_reporter' % TARGET_NAME
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
@ -6,9 +6,9 @@ if ARGV.length < 2
|
||||
exit
|
||||
end
|
||||
|
||||
tarball = "tomahawk-#{ARGV[0]}.tar.bz2"
|
||||
tarball = "#{ARGV[0].downcase}-#{ARGV[1]}.tar.bz2"
|
||||
puts "Zipping: #{tarball}..."
|
||||
`tar jcvf "#{tarball}" Tomahawk.app`
|
||||
`tar jcvf "#{tarball}" #{ARGV[0]}.app`
|
||||
|
||||
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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user