diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-20 08:20:50 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-20 08:21:55 (GMT) |
commit | 6c3332037513e8044671faa1d8195f3c0dbdf25a (patch) | |
tree | 009cbdee2c7da1acaf0232fd4461753a38691549 | |
parent | fa9a1b5e78c3af94f9a69f52aef0b666c0d5cf8c (diff) | |
download | swift-contrib-6c3332037513e8044671faa1d8195f3c0dbdf25a.zip swift-contrib-6c3332037513e8044671faa1d8195f3c0dbdf25a.tar.bz2 |
Roll our own Cocoa builds.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | Slimber/Cocoa/.gitignore | 1 | ||||
-rw-r--r-- | Slimber/Cocoa/English.lproj/InfoPlist.strings | bin | 92 -> 0 bytes | |||
-rw-r--r-- | Slimber/Cocoa/Info.plist | 8 | ||||
-rw-r--r-- | Slimber/Cocoa/MainMenu.xib (renamed from Slimber/Cocoa/English.lproj/MainMenu.xib) | 0 | ||||
-rw-r--r-- | Slimber/Cocoa/Makefile.inc | 33 | ||||
-rw-r--r-- | Slimber/Cocoa/PkgInfo | 1 | ||||
-rw-r--r-- | Slimber/Cocoa/Slimber.xcodeproj/TemplateIcon.icns | bin | 52318 -> 0 bytes | |||
-rw-r--r-- | Slimber/Cocoa/Slimber.xcodeproj/project.pbxproj | 282 | ||||
-rw-r--r-- | Slimber/Makefile.inc | 4 |
11 files changed, 57 insertions, 289 deletions
@@ -8,6 +8,7 @@ *.a *.pdb *.swp +*.nib *.exe *.dll *.lib @@ -17,12 +17,14 @@ QUIET_CC = @echo " " "CC " $@; QUIET_CXX = @echo " " "CXX " $@; QUIET_AR = @echo " " "AR " $@; QUIET_LINK = @echo " " "LINK" $@; +QUIET_NIB = @echo " " "NIB " $@; else QUIET_MM = @echo " $(shell tput setaf 5)MM$(shell tput sgr0) " $@; QUIET_CC = @echo " $(shell tput setaf 3)CC$(shell tput sgr0) " $@; QUIET_CXX = @echo " $(shell tput setaf 2)CXX$(shell tput sgr0) " $@; QUIET_AR = @echo " $(shell tput setaf 1)AR$(shell tput sgr0) " $@; QUIET_LINK = @echo " $(shell tput setaf 6)LINK$(shell tput sgr0)" $@; +QUIET_NIB = @echo " $(shell tput setaf 4)NIB$(shell tput sgr0) " $@; endif endif endif @@ -84,6 +86,9 @@ ifeq (,$(findstring clean-deps, $(MAKECMDGOALS))) endif endif +%/PkgInfo: + echo -n -e "APPL\x3f\x3f\x3f\x3f" > $@ + %.dep: %.cpp $(QUIET_MM)$(MM) -MM -MG -MT $(basename $@).o $(CPPFLAGS) $(filter-out -arch armv6 -arch i386 -arch ppc,$(CXXFLAGS)) $< > $@ @@ -91,7 +96,10 @@ endif $(QUIET_MM)$(MM) -MM -MG -MT $(basename $@).o $(CPPFLAGS) $(filter-out -arch armv6 -arch i386 -arch ppc,$(CFLAGS)) $< > $@ %.dep: %.mm - $(QUIET_MM)$(CC) -MM -MG -MT $(basename $@).o $(CPPFLAGS) $(filter-out -arch armv6 -arch i386 -arch ppc,$(CXXFLAGS)) $< > $@ + $(QUIET_MM)$(MM) -MM -MG -MT $(basename $@).o $(CPPFLAGS) $(filter-out -arch armv6 -arch i386 -arch ppc,$(CXXFLAGS)) $< > $@ + +%.dep: %.m + $(QUIET_MM)$(MM) -MM -MG -MT $(basename $@).o $(CPPFLAGS) $(filter-out -arch armv6 -arch i386 -arch ppc,$(CFLAGS)) $< > $@ %.o: %.c $(QUIET_CC)$(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS) @@ -101,3 +109,9 @@ endif %.o: %.mm $(QUIET_CC)$(CC) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS) + +%.o: %.m + $(QUIET_CC)$(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS) + +%.nib: %.xib + $(QUIET_NIB)/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile $@ $< diff --git a/Slimber/Cocoa/.gitignore b/Slimber/Cocoa/.gitignore index 8a0c164..51d15c3 100644 --- a/Slimber/Cocoa/.gitignore +++ b/Slimber/Cocoa/.gitignore @@ -1,3 +1,4 @@ build *.mode1v3 *.pbxuser +Slimber diff --git a/Slimber/Cocoa/English.lproj/InfoPlist.strings b/Slimber/Cocoa/English.lproj/InfoPlist.strings Binary files differdeleted file mode 100644 index dea12de..0000000 --- a/Slimber/Cocoa/English.lproj/InfoPlist.strings +++ /dev/null diff --git a/Slimber/Cocoa/Info.plist b/Slimber/Cocoa/Info.plist index 612b7da..6d66144 100644 --- a/Slimber/Cocoa/Info.plist +++ b/Slimber/Cocoa/Info.plist @@ -5,15 +5,13 @@ <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIconFile</key> - <string></string> + <string>Slimber</string> <key>CFBundleIdentifier</key> - <string>com.yourcompany.${PRODUCT_NAME:identifier}</string> + <string>im.swift.Slimber</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> + <string>Slimber</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> diff --git a/Slimber/Cocoa/English.lproj/MainMenu.xib b/Slimber/Cocoa/MainMenu.xib index 5959306..5959306 100644 --- a/Slimber/Cocoa/English.lproj/MainMenu.xib +++ b/Slimber/Cocoa/MainMenu.xib diff --git a/Slimber/Cocoa/Makefile.inc b/Slimber/Cocoa/Makefile.inc new file mode 100644 index 0000000..39ece3a --- /dev/null +++ b/Slimber/Cocoa/Makefile.inc @@ -0,0 +1,33 @@ +SLIMBER_COCOA_TARGET = Slimber/Cocoa/Slimber.app +SLIMBER_COCOA_BINARY = \ + Slimber/Cocoa/Slimber +SLIMBER_COCOA_SOURCES = \ + Slimber/Cocoa/main.m \ + Slimber/Cocoa/Menulet.m +SLIMBER_COCOA_XIBS = \ + Slimber/Cocoa/MainMenu.xib + +SLIMBER_COCOA_NIBS = \ + $(SLIMBER_COCOA_XIBS:.xib=.nib) +SLIMBER_COCOA_OBJECTS = \ + $(SLIMBER_COCOA_SOURCES:.m=.o) +CLEANFILES += \ + $(SLIMBER_COCOA_OBJECTS) \ + $(SLIMBER_COCOA_TARGET) \ + $(SLIMBER_COCOA_BINARY) +DEPS += \ + $(SLIMBER_COCOA_SOURCES:.m=.dep) \ + +.PHONY: slimber-cocoa +slimber-cocoa: $(SLIMBER_COCOA_TARGET) + +$(SLIMBER_COCOA_TARGET): $(SLIMBER_COCOA_BINARY) $(SLIMBER_COCOA_NIBS) Slimber/Cocoa/Info.plist Slimber/Cocoa/PkgInfo + mkdir -p $(SLIMBER_COCOA_TARGET)/Resources + mkdir -p $(SLIMBER_COCOA_TARGET)/MacOS + cp -r Slimber/Cocoa/Info.plist $(SLIMBER_COCOA_TARGET) + cp -r Slimber/Cocoa/PkgInfo $(SLIMBER_COCOA_TARGET) + cp $(SLIMBER_COCOA_BINARY) $(SLIMBER_COCOA_TARGET)/MacOS + cp $(SLIMBER_COCOA_NIBS) $(SLIMBER_COCOA_TARGET)/Resources + +$(SLIMBER_COCOA_BINARY): $(SLIMBER_COCOA_OBJECTS) + $(QUIET_LINK)$(CXX) -o $@ $(SLIMBER_COCOA_OBJECTS) $(LDFLAGS) $(SWIFTEN_TARGET) $(LIBS) -framework Cocoa diff --git a/Slimber/Cocoa/PkgInfo b/Slimber/Cocoa/PkgInfo new file mode 100644 index 0000000..4f6b1f5 --- /dev/null +++ b/Slimber/Cocoa/PkgInfo @@ -0,0 +1 @@ +-n -e APPL???? diff --git a/Slimber/Cocoa/Slimber.xcodeproj/TemplateIcon.icns b/Slimber/Cocoa/Slimber.xcodeproj/TemplateIcon.icns Binary files differdeleted file mode 100644 index 62cb701..0000000 --- a/Slimber/Cocoa/Slimber.xcodeproj/TemplateIcon.icns +++ /dev/null diff --git a/Slimber/Cocoa/Slimber.xcodeproj/project.pbxproj b/Slimber/Cocoa/Slimber.xcodeproj/project.pbxproj deleted file mode 100644 index bdf844d..0000000 --- a/Slimber/Cocoa/Slimber.xcodeproj/project.pbxproj +++ /dev/null @@ -1,282 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 445287981013C6AD0098B1D2 /* Menulet.m in Sources */ = {isa = PBXBuildFile; fileRef = 445287971013C6AD0098B1D2 /* Menulet.m */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; - 32CA4F630368D1EE00C91783 /* Slimber_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slimber_Prefix.pch; sourceTree = "<group>"; }; - 445287961013C6AD0098B1D2 /* Menulet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Menulet.h; sourceTree = "<group>"; }; - 445287971013C6AD0098B1D2 /* Menulet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Menulet.m; sourceTree = "<group>"; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D1107320486CEB800E47090 /* Slimber.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Slimber.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - ); - name = Classes; - sourceTree = "<group>"; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = "<group>"; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = "<group>"; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* Slimber.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - 29B97314FDCFA39411CA2CEA /* Slimber */ = { - isa = PBXGroup; - children = ( - 445287961013C6AD0098B1D2 /* Menulet.h */, - 445287971013C6AD0098B1D2 /* Menulet.m */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = Slimber; - sourceTree = "<group>"; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* Slimber_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = "<group>"; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = "<group>"; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* Slimber */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Slimber" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Slimber; - productInstallPath = "$(HOME)/Applications"; - productName = Slimber; - productReference = 8D1107320486CEB800E47090 /* Slimber.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Slimber" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 29B97314FDCFA39411CA2CEA /* Slimber */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* Slimber */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072D0486CEB800E47090 /* main.m in Sources */, - 445287981013C6AD0098B1D2 /* Menulet.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = "<group>"; - }; - 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 1DDD58150DA1D0A300B32029 /* English */, - ); - name = MainMenu.xib; - sourceTree = "<group>"; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Slimber_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = Slimber; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Slimber_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = Slimber; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Slimber" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Slimber" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/Slimber/Makefile.inc b/Slimber/Makefile.inc index 045ef17..904bc83 100644 --- a/Slimber/Makefile.inc +++ b/Slimber/Makefile.inc @@ -2,7 +2,7 @@ SLIMBER_TARGET = Slimber/slimber SLIMBER_SOURCES = \ Slimber/main.cpp SLIMBER_OBJECTS = \ - $(SLIMBER_SOURCES:.cpp=.o) \ + $(SLIMBER_SOURCES:.cpp=.o) .PHONY: slimber slimber: $(SLIMBER_TARGET) @@ -14,3 +14,5 @@ $(SLIMBER_TARGET): $(SWIFTEN_TARGET) $(SLIMBER_OBJECTS) CLEANFILES += $(SLIMBER_OBJECTS) DEPS += \ $(SLIMBER_SOURCES:.cpp=.dep) \ + +include Slimber/Cocoa/Makefile.inc |