File: dmg.py

package info (click to toggle)
glob2 0.9.4.4-2.3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 34,452 kB
  • ctags: 10,285
  • sloc: cpp: 89,684; python: 868; ansic: 259; makefile: 62; sh: 49
file content (25 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os

def create_dmg( target, source, env) :
	volume = str(target[0]).replace('.dmg', '')
#really need to rewrite this later to use the variables and not be hardcoded
	os.system( "rm Glob2-0.9.3.dmg" )
	os.system( "rm -rf DMG" )
	os.system( "mkdir DMG" )
	os.system( "cp -r %s DMG"%source )
	os.system( "hdiutil create -srcfolder DMG -volname %s %s"%(volume, target) )
	os.system( "rm -rf DMG" )

def create_dmg_message( target, source, env):
	return "Creating DMG package"

def generate(env) :
	"""Add Builders and construction variables for qt to an Environment."""
	print "Lodading dmg tool..."
	env.Append( BUILDERS={'Dmg' : 
			env.Builder( action=env.Action(create_dmg, create_dmg_message ))
		} )

def exists(env) :
	return True