Skip to content

Commit

Permalink
Builder|OS X: Skip apps disk packaging on Snow Leopard
Browse files Browse the repository at this point in the history
This would need a larger disk image.
  • Loading branch information
skyjake committed Apr 29, 2014
1 parent ddde675 commit 7ecc7d8
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions distrib/platform_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,25 +277,26 @@ def fw_codesign(app):
print 'Signing Doomsday Shell.app...'
codesign("Doomsday Shell.app")

print 'Packaging apps onto a disk image...'
templateFile = 'appdisk.sparseimage'
os.system('bunzip2 -k -c %s > %s' % (os.path.join(SNOWBERRY_DIR, 'template-image/template.sparseimage.bz2'),
templateFile))
remkdir('imaging')
os.system('hdiutil attach %s -noautoopen -quiet -mountpoint imaging' % templateFile)
if mac_os_version() != '10.6':
print 'Packaging apps onto a disk image...'
templateFile = 'appdisk.sparseimage'
os.system('bunzip2 -k -c %s > %s' % (os.path.join(SNOWBERRY_DIR, 'template-image/template.sparseimage.bz2'),
templateFile))
remkdir('imaging')
os.system('hdiutil attach %s -noautoopen -quiet -mountpoint imaging' % templateFile)

remove('imaging/Doomsday.pkg') # included in bzipped image
duptree('Doomsday Engine.app', 'imaging/Doomsday Engine.app')
duptree('Doomsday Shell.app', 'imaging/Doomsday Shell.app')
shutil.copy(os.path.join(DOOMSDAY_DIR, "doc/output/Read Me.rtf"), 'imaging/Read Me.rtf')
remove('imaging/Doomsday.pkg') # included in bzipped image
duptree('Doomsday Engine.app', 'imaging/Doomsday Engine.app')
duptree('Doomsday Shell.app', 'imaging/Doomsday Shell.app')
shutil.copy(os.path.join(DOOMSDAY_DIR, "doc/output/Read Me.rtf"), 'imaging/Read Me.rtf')

volumeName = "Doomsday Engine " + DOOMSDAY_VERSION_FULL
os.system('/usr/sbin/diskutil rename ' + os.path.abspath('imaging') + ' "' + volumeName + '"')
volumeName = "Doomsday Engine " + DOOMSDAY_VERSION_FULL
os.system('/usr/sbin/diskutil rename ' + os.path.abspath('imaging') + ' "' + volumeName + '"')

os.system('hdiutil detach -quiet imaging')
os.system('hdiutil convert %s -format UDZO -imagekey zlib-level=9 -o "../releases/%s"' % (
templateFile, output_filename('_apps-' + mac_osx_suffix() + '.dmg')))
remove(templateFile)
os.system('hdiutil detach -quiet imaging')
os.system('hdiutil convert %s -format UDZO -imagekey zlib-level=9 -o "../releases/%s"' % (
templateFile, output_filename('_apps-' + mac_osx_suffix() + '.dmg')))
remove(templateFile)

print 'Creating disk:', target
os.system('osascript /Users/jaakko/Dropbox/Doomsday/package-installer.applescript')
Expand Down

0 comments on commit 7ecc7d8

Please sign in to comment.