Browse Source

OSX: Generate a SnowLeopard/Lion DMG and a Leopard DMG.

pull/7/merge
shypike 14 years ago
committed by ShyPike
parent
commit
a7724069b5
  1. BIN
      osx/image/sabnzbd.png
  2. BIN
      osx/image/sabnzbd_leopard.png
  3. BIN
      osx/image/sabnzbd_lion.png
  4. 16
      package.py

BIN
osx/image/sabnzbd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
osx/image/sabnzbd_leopard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 64 KiB

BIN
osx/image/sabnzbd_lion.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

16
package.py

@ -382,16 +382,18 @@ if target == 'app':
# Select OSX version specific background image
# Take care to preserve the special attributes of the background image file
if [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 7, 0]:
# Lion and higher
f = open('osx/image/sabnzbd_lion.png', 'rb')
# Lion and higher: generates SnowLeopard/Lion DMG
f = open('osx/image/sabnzbd.png', 'rb')
png = f.read()
f.close()
f = open('/Volumes/SABnzbd/sabnzbd.png', 'wb')
f.write(png)
f.close()
else:
# Snow Leopard and lower
pass
# Snow Leopard and lower: generates Leopard DMG
f = open('osx/image/sabnzbd_leopard.png', 'rb')
png = f.read()
f.close()
f = open('/Volumes/SABnzbd/sabnzbd.png', 'wb')
f.write(png)
f.close()
# Rename the volume
fp = open('mount.log', 'r')

Loading…
Cancel
Save