summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-13 11:50:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-13 12:24:29 (GMT)
commit1f6119ec3e29e27442eaf623f3b1d091cf6ef5ec (patch)
treeb3ac9189d0b7cfe0efa0bcaa4b4100feaa05edb9 /Slimber/Cocoa
parentb6374b7ae064e689924a88b398ca3eb9ed0a379e (diff)
downloadswift-contrib-1f6119ec3e29e27442eaf623f3b1d091cf6ef5ec.zip
swift-contrib-1f6119ec3e29e27442eaf623f3b1d091cf6ef5ec.tar.bz2
Add Mac App bundle creation tool.
Diffstat (limited to 'Slimber/Cocoa')
-rw-r--r--Slimber/Cocoa/Makefile.inc47
-rw-r--r--Slimber/Cocoa/SConscript13
2 files changed, 13 insertions, 47 deletions
diff --git a/Slimber/Cocoa/Makefile.inc b/Slimber/Cocoa/Makefile.inc
deleted file mode 100644
index cdb19b7..0000000
--- a/Slimber/Cocoa/Makefile.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-SLIMBER_COCOA_TARGET = Slimber/Cocoa/Slimber.app
-SLIMBER_COCOA_BINARY = \
- Slimber/Cocoa/Slimber
-SLIMBER_COCOA_SOURCES = \
- Slimber/Cocoa/main.mm \
- Slimber/Cocoa/CocoaController.mm \
- Slimber/Cocoa/CocoaMenulet.mm \
- Slimber/Cocoa/CocoaAction.mm
-SLIMBER_COCOA_XIBS = \
- Slimber/Cocoa/MainMenu.xib
-SLIMBER_COCOA_RESOURCES = \
- Slimber/Resources/Slimber.icns \
- Slimber/Resources/Credits.html \
- Slimber/Resources/Online.png \
- Slimber/Resources/Offline.png \
- Slimber/Resources/UsersOnline.png \
- Slimber/Resources/UsersOffline.png
-
-TARGETS += $(SLIMBER_COCOA_TARGET)
-SLIMBER_TARGETS += $(SLIMBER_COCOA_TARGET)
-SLIMBER_COCOA_NIBS = \
- $(SLIMBER_COCOA_XIBS:.xib=.nib)
-SLIMBER_COCOA_OBJECTS = \
- $(patsubst %.m,%.o,$(patsubst %.mm,%.o,$(patsubst %.cpp,%.o, $(SLIMBER_COCOA_SOURCES))))
-CLEANFILES += \
- Slimber/Cocoa/PkgInfo \
- $(SLIMBER_COCOA_NIBS) \
- $(SLIMBER_COCOA_TARGET) \
- $(SLIMBER_COCOA_BINARY)
-DEPS += \
- $(patsubst %.m, %.dep, $(patsubst %.mm, %.dep, $(SLIMBER_COCOA_SOURCES)))
-
-.PHONY: slimber-cocoa
-slimber-cocoa: $(SLIMBER_COCOA_TARGET)
-
-$(SLIMBER_COCOA_TARGET): $(SLIMBER_COCOA_BINARY) $(SLIMBER_COCOA_NIBS) Slimber/Cocoa/Info.plist Slimber/Cocoa/PkgInfo
- -rm -rf $(SLIMBER_COCOA_TARGET)
- mkdir -p $(SLIMBER_COCOA_TARGET)/Contents/Resources
- mkdir -p $(SLIMBER_COCOA_TARGET)/Contents/MacOS
- cp -r Slimber/Cocoa/Info.plist $(SLIMBER_COCOA_TARGET)/Contents
- cp -r Slimber/Cocoa/PkgInfo $(SLIMBER_COCOA_TARGET)/Contents
- cp $(SLIMBER_COCOA_BINARY) $(SLIMBER_COCOA_TARGET)/Contents/MacOS
- cp $(SLIMBER_COCOA_NIBS) $(SLIMBER_COCOA_TARGET)/Contents/Resources
- cp $(SLIMBER_COCOA_RESOURCES) $(SLIMBER_COCOA_TARGET)/Contents/Resources
-
-$(SLIMBER_COCOA_BINARY): $(SLIMBER_COCOA_OBJECTS) $(SWIFTEN_TARGET) $(SLIMBER_TARGET)
- $(QUIET_LINK)$(CXX) -o $@ $(SLIMBER_COCOA_OBJECTS) $(LDFLAGS) $(SLIMBER_TARGET) $(SWIFTEN_TARGET) $(LIBS) -framework Cocoa
diff --git a/Slimber/Cocoa/SConscript b/Slimber/Cocoa/SConscript
index 3e04273..25d7579 100644
--- a/Slimber/Cocoa/SConscript
+++ b/Slimber/Cocoa/SConscript
@@ -15,3 +15,16 @@ myenv.Program("Slimber", [
])
myenv.Nib("MainMenu")
+
+myenv.AppBundle("Slimber", resources = [
+ "MainMenu.nib",
+ "../Resources/Slimber.icns",
+ "../Resources/Credits.html",
+ "../Resources/Online.png",
+ "../Resources/Offline.png",
+ "../Resources/UsersOnline.png",
+ "../Resources/UsersOffline.png"
+ ], info = {
+ "NSMainNibFile" : "MainMenu",
+ "LSUIElement" : "1",
+ })