summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-13 10:04:58 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-13 10:04:58 (GMT)
commitb6374b7ae064e689924a88b398ca3eb9ed0a379e (patch)
tree8c3bc87f1b006e223563f3d2274b16f710e0e8e4
parentba1aa621f0441f20b1ed2885832fce9cb15e4e15 (diff)
downloadswift-contrib-b6374b7ae064e689924a88b398ca3eb9ed0a379e.zip
swift-contrib-b6374b7ae064e689924a88b398ca3eb9ed0a379e.tar.bz2
Add Nib build tool.
-rw-r--r--BuildTools/SCons/Tools/Nib.py12
-rw-r--r--SConstruct8
-rw-r--r--Slimber/Cocoa/SConscript17
-rw-r--r--Swiften/SConscript2
4 files changed, 39 insertions, 0 deletions
diff --git a/BuildTools/SCons/Tools/Nib.py b/BuildTools/SCons/Tools/Nib.py
new file mode 100644
index 0000000..ccfd884
--- /dev/null
+++ b/BuildTools/SCons/Tools/Nib.py
@@ -0,0 +1,12 @@
+import SCons.Util
+
+def generate(env) :
+ env["IBTOOL"] = "ibtool"
+ env["BUILDERS"]["Nib"] = SCons.Builder.Builder(
+ action = SCons.Action.Action("$IBTOOL --errors --warnings --notices --output-format human-readable-text --compile $TARGET $SOURCE", cmdstr = "$NIBCOMSTR"),
+ suffix = ".nib",
+ src_suffix = ".xib",
+ single_source = True)
+
+def exists(env) :
+ return env["PLATFORM"] == "darwin"
diff --git a/SConstruct b/SConstruct
index 3d8df43..ab9cf5e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -25,9 +25,15 @@ vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept))
################################################################################
env = Environment(CPPPATH = "#", ENV = {'PATH' : os.environ['PATH']}, variables = vars)
+
Help(vars.GenerateHelpText(env))
+
env.Alias("dist", ["."])
+# Default custom tools
+if env["PLATFORM"] == "darwin" :
+ env.Tool("Nib", toolpath = ["#/BuildTools/SCons/Tools"])
+
# Default compiler flags
if env["optimize"] :
env.Append(CCFLAGS = "-O2")
@@ -109,6 +115,7 @@ if int(ARGUMENTS.get("V", 0)) == 0:
env["GENCOMSTR"] = " \033[0;34;140mGEN\033[0m $TARGET"
env["RCCOMSTR"] = " \033[0;34;140mRC\033[0m $TARGET"
env["BUNDLECOMSTR"] = " \033[0;34;140mBUNDLE\033[0m $TARGET"
+ env["NIBCOMSTR"] = " \033[0;34;140mNIB\033[0m $TARGET"
#Progress( " \033[0;35;140mDEP\033[0m $TARGET\n")
else :
env["CCCOMSTR"] = " CC $TARGET"
@@ -123,6 +130,7 @@ if int(ARGUMENTS.get("V", 0)) == 0:
env["GENCOMSTR"] = " GEN $TARGET"
env["RCCOMSTR"] = " RC $TARGET"
env["BUNDLECOMSTR"] = " BUNDLE $TARGET"
+ env["NIBCOMSTR"] = " NIB $TARGET"
#Progress(' DEP $TARGET\n')
if env["PLATFORM"] == "win32" :
diff --git a/Slimber/Cocoa/SConscript b/Slimber/Cocoa/SConscript
new file mode 100644
index 0000000..3e04273
--- /dev/null
+++ b/Slimber/Cocoa/SConscript
@@ -0,0 +1,17 @@
+Import("env")
+
+myenv = env.Clone()
+myenv.MergeFlags(env["SLIMBER_FLAGS"])
+myenv.MergeFlags(env["SWIFTEN_FLAGS"])
+myenv.MergeFlags(env["LIBIDN_FLAGS"])
+myenv.MergeFlags(env["BOOST_FLAGS"])
+myenv.Append(FRAMEWORKS = "Cocoa")
+
+myenv.Program("Slimber", [
+ "main.mm",
+ "CocoaController.mm",
+ "CocoaMenulet.mm",
+ "CocoaAction.mm"
+ ])
+
+myenv.Nib("MainMenu")
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 60f2fbc..1c2c8cc 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -38,6 +38,8 @@ sources = [
"EventLoop/EventOwner.cpp",
"EventLoop/MainEventLoop.cpp",
"EventLoop/SimpleEventLoop.cpp",
+ "EventLoop/Cocoa/CocoaEventLoop.mm",
+ "EventLoop/Cocoa/CocoaEvent.mm",
"History/HistoryManager.cpp",
"History/SQLiteHistoryManager.cpp",
"JID/JID.cpp",