diff options
| author | Remko Tronçon <git@el-tramo.be> | 2009-11-27 23:37:37 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2009-11-27 23:37:37 (GMT) |
| commit | 91570ab79252b37afeae3b230cb6023c5b52547a (patch) | |
| tree | 011d77857557a28671a63a444dcf8e10db64ab3f /BuildTools | |
| parent | ba717874781a33ea40a1aea1ad8b9efce3580fc2 (diff) | |
| download | swift-91570ab79252b37afeae3b230cb6023c5b52547a.zip swift-91570ab79252b37afeae3b230cb6023c5b52547a.tar.bz2 | |
Integrated Sparkle auto-updater.
Diffstat (limited to 'BuildTools')
| -rw-r--r-- | BuildTools/SCons/Tools/AppBundle.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BuildTools/SCons/Tools/AppBundle.py b/BuildTools/SCons/Tools/AppBundle.py index 2849435..3d06e97 100644 --- a/BuildTools/SCons/Tools/AppBundle.py +++ b/BuildTools/SCons/Tools/AppBundle.py @@ -1,45 +1,49 @@ import SCons.Util def generate(env) : - def createAppBundle(env, bundle, version = "1.0", resources = [], info = {}) : + def createAppBundle(env, bundle, version = "1.0", resources = [], frameworks = [], info = {}) : bundleContentsDir = bundle + ".app" + "/Contents" resourcesDir = bundleContentsDir + "/Resources" + frameworksDir = bundleContentsDir + "/Frameworks" env.Install(bundleContentsDir + "/MacOS", bundle) env.WriteVal(bundleContentsDir + "/PkgInfo", env.Value("APPL\77\77\77\77")) infoDict = { "CFBundleDevelopmentRegion" : "English", "CFBundleExecutable" : bundle, "CFBundleIdentifier" : "im.swift." + bundle, "CFBundleInfoDictionaryVersion" : "6.0", "CFBundleName" : bundle, "CFBundlePackageType" : "APPL", "CFBundleSignature": "\77\77\77\77", "CFBundleVersion" : version, "CFBundleIconFile" : bundle, "NSPrincipalClass" : "NSApplication", "NSHumanReadableCopyright" : unichr(0xA9) + " 2009 Swift Development Team.\nAll Rights Reserved." } infoDict.update(info) plist = """<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> """ for key, value in infoDict.items() : plist += "<key>" + key + "</key>\n" plist += "<string>" + value.encode("utf-8") + "</string>\n" plist += """</dict> </plist> """ env.WriteVal(bundleContentsDir + "/Info.plist", env.Value(plist)) for resource in resources : env.Install(resourcesDir, resource) + for framework in frameworks : + env.Install(frameworksDir, framework) + env.AddMethod(createAppBundle, "AppBundle") def exists(env) : return env["PLATFORM"] == "darwin" |
Swift