diff options
| -rw-r--r-- | BuildTools/SCons/Tools/AppBundle.py | 5 | ||||
| -rw-r--r-- | Swift/QtUI/.gitignore | 1 | ||||
| -rw-r--r-- | Swift/QtUI/SConscript | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/BuildTools/SCons/Tools/AppBundle.py b/BuildTools/SCons/Tools/AppBundle.py index 3d06e97..12667f0 100644 --- a/BuildTools/SCons/Tools/AppBundle.py +++ b/BuildTools/SCons/Tools/AppBundle.py @@ -1,11 +1,12 @@ import SCons.Util def generate(env) : def createAppBundle(env, bundle, version = "1.0", resources = [], frameworks = [], info = {}) : - bundleContentsDir = bundle + ".app" + "/Contents" + bundleDir = bundle + ".app" + bundleContentsDir = bundleDir + "/Contents" resourcesDir = bundleContentsDir + "/Resources" frameworksDir = bundleContentsDir + "/Frameworks" env.Install(bundleContentsDir + "/MacOS", bundle) env.WriteVal(bundleContentsDir + "/PkgInfo", env.Value("APPL\77\77\77\77")) infoDict = { @@ -39,11 +40,13 @@ def generate(env) : for resource in resources : env.Install(resourcesDir, resource) for framework in frameworks : env.Install(frameworksDir, framework) + return env.Dir(bundleDir) + env.AddMethod(createAppBundle, "AppBundle") def exists(env) : return env["PLATFORM"] == "darwin" diff --git a/Swift/QtUI/.gitignore b/Swift/QtUI/.gitignore index b776b0d..379d4f5 100644 --- a/Swift/QtUI/.gitignore +++ b/Swift/QtUI/.gitignore @@ -1,2 +1,3 @@ Swift BuildVersion.h +Swift-*.dmg diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index b7eefaf..77bc8f8 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -104,13 +104,18 @@ myenv.Qrc("DefaultTheme.qrc") myenv.Qrc("Swift.qrc") if env["PLATFORM"] == "darwin" : frameworks = [] if env["HAVE_SPARKLE"] : frameworks.append(env["SPARKLE_FRAMEWORK"]) - myenv.AppBundle("Swift", version = env["SWIFT_VERSION"], resources = ["../resources/MacOSX/Swift.icns"], frameworks = frameworks) + app = myenv.AppBundle("Swift", version = env["SWIFT_VERSION"], resources = ["../resources/MacOSX/Swift.icns"], frameworks = frameworks) + if "dist" in COMMAND_LINE_TARGETS : + myenv.Command(["Swift-${SWIFT_VERSION}.dmg"], [app], [ + "$QTDIR/bin/macdeployqt $SOURCE -dmg", + Move("$TARGET", "$SOURCE.dir/Swift.dmg") + ]) if env.get("SWIFT_INSTALLDIR", "") : env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "bin"), swiftProgram) if env["PLATFORM"] == "win32" : if "dist" in COMMAND_LINE_TARGETS or env.GetOption("clean") : |
Swift