mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
make a dmg
This commit is contained in:
parent
e4cb7fe829
commit
3657156990
@ -96,7 +96,8 @@ def makeBundle(startDir):
|
|||||||
optDir = optDirs[0]
|
optDir = optDirs[0]
|
||||||
|
|
||||||
# Generate the bundle directory structure
|
# Generate the bundle directory structure
|
||||||
bundleFilename = Filename(fstartDir, 'nppanda3d.plugin')
|
rootFilename = Filename(fstartDir, 'bundle')
|
||||||
|
bundleFilename = Filename(rootFilename, 'nppanda3d.plugin')
|
||||||
plistFilename = Filename(bundleFilename, 'Contents/Info.plist')
|
plistFilename = Filename(bundleFilename, 'Contents/Info.plist')
|
||||||
plistFilename.makeDir()
|
plistFilename.makeDir()
|
||||||
exeFilename = Filename(bundleFilename, 'Contents/MacOS/nppanda3d')
|
exeFilename = Filename(bundleFilename, 'Contents/MacOS/nppanda3d')
|
||||||
@ -129,6 +130,18 @@ def makeBundle(startDir):
|
|||||||
bundleFilename.touch()
|
bundleFilename.touch()
|
||||||
print bundleFilename.toOsSpecific()
|
print bundleFilename.toOsSpecific()
|
||||||
|
|
||||||
|
def buildDmg(startDir):
|
||||||
|
fstartDir = Filename.fromOsSpecific(startDir)
|
||||||
|
rootFilename = Filename(fstartDir, 'bundle')
|
||||||
|
output = Filename(fstartDir, 'nppanda3d.dmg')
|
||||||
|
cmd = 'hdiutil create -fs HFS+ -srcfolder "%(dir)s" -volname "%(volname)s" "%(output)s"' % {
|
||||||
|
'dir' : rootFilename.toOsSpecific(),
|
||||||
|
'volname' : 'nppanda3d',
|
||||||
|
'output' : output.toOsSpecific(),
|
||||||
|
}
|
||||||
|
os.system(cmd)
|
||||||
|
shutil.rmtree(rootFilename.toOsSpecific())
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], 'h')
|
opts, args = getopt.getopt(sys.argv[1:], 'h')
|
||||||
@ -144,4 +157,5 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
startDir = os.path.split(sys.argv[0])[0]
|
startDir = os.path.split(sys.argv[0])[0]
|
||||||
makeBundle(startDir)
|
makeBundle(startDir)
|
||||||
|
buildDmg(startDir)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user