From 4e0d6417402bc410e6918a2f41a9db43568c23ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 9 Aug 2009 22:50:57 +0200 Subject: Added quick'n dirty OS X bundle generation. diff --git a/Swift/QtUI/.gitignore b/Swift/QtUI/.gitignore new file mode 100644 index 0000000..c1390ab --- /dev/null +++ b/Swift/QtUI/.gitignore @@ -0,0 +1 @@ +Swift diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index b07f1de..a5993be 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -15,6 +15,15 @@ def generateDefaultTheme(env, target, source) : output.write("") output.write("") +def createBundle(env, target, source) : + target = target[0].abspath + source = source[0].abspath + os.makedirs(target + "/Contents/MacOS") + Execute(Copy(target + "/Contents/MacOS", source)) + pkgInfo = open(target + "/Contents/PkgInfo", "w") + pkgInfo.write("APPL\77\77\77\77") + pkgInfo.close() + Import("env") myenv = env.Clone() @@ -68,7 +77,14 @@ sources = [ if env["PLATFORM"] == "win32" : sources += ["../resources/Windows/Swift.rc"] -myenv.Program("swift", sources) +if env["PLATFORM"] == "darwin" or env["PLATFORM"] == "win32" : + myenv.Program("Swift", sources) +else : + myenv.Program("swift", sources) + myenv.Uic4("QtJoinMUCDialog.ui") myenv.Qrc("DefaultTheme.qrc") myenv.Qrc("Swift.qrc") + +if env["PLATFORM"] == "darwin" : + myenv.Command("Swift.app", "Swift", createBundle) -- cgit v0.10.2-6-g49f6