BathyScapheのデフォルトWebブラウザを変更するプラグイン
Revision | e3ae65444f4015e73ecb669cc7922ad9737240d2 (tree) |
---|---|
Zeit | 2013-01-17 22:06:52 |
Autor | masakih <masakih@user...> |
Commiter | masakih |
Makefileを追加
@@ -1,2 +1,3 @@ | ||
1 | 1 | /HMWebBrowserChanger.xcodeproj/project.xcworkspace/ |
2 | -/HMWebBrowserChanger.xcodeproj/xcuserdata/ | |
\ No newline at end of file | ||
2 | +/HMWebBrowserChanger.xcodeproj/xcuserdata/ | |
3 | +/build/ | |
\ No newline at end of file |
@@ -15,6 +15,7 @@ | ||
15 | 15 | /* End PBXBuildFile section */ |
16 | 16 | |
17 | 17 | /* Begin PBXFileReference section */ |
18 | + F417502516A82A84001239BC /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; }; | |
18 | 19 | F41801EC169EF1C3004C7E62 /* HMWebBrowserChanger.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HMWebBrowserChanger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; |
19 | 20 | F41801EF169EF1C3004C7E62 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; |
20 | 21 | F41801F2169EF1C3004C7E62 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; |
@@ -48,6 +49,7 @@ | ||
48 | 49 | F41801E1169EF1C3004C7E62 = { |
49 | 50 | isa = PBXGroup; |
50 | 51 | children = ( |
52 | + F417502516A82A84001239BC /* Makefile */, | |
51 | 53 | F4180202169EF234004C7E62 /* BSPreviewPluginInterface.h */, |
52 | 54 | F4180201169EF20F004C7E62 /* PSPreviewerInterface.h */, |
53 | 55 | F41801F5169EF1C3004C7E62 /* HMWebBrowserChanger */, |
@@ -214,9 +216,9 @@ | ||
214 | 216 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
215 | 217 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
216 | 218 | GCC_WARN_UNUSED_VARIABLE = YES; |
217 | - MACOSX_DEPLOYMENT_TARGET = 10.8; | |
219 | + MACOSX_DEPLOYMENT_TARGET = 10.7; | |
218 | 220 | ONLY_ACTIVE_ARCH = YES; |
219 | - SDKROOT = macosx; | |
221 | + SDKROOT = macosx10.7; | |
220 | 222 | }; |
221 | 223 | name = Debug; |
222 | 224 | }; |
@@ -237,8 +239,8 @@ | ||
237 | 239 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
238 | 240 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
239 | 241 | GCC_WARN_UNUSED_VARIABLE = YES; |
240 | - MACOSX_DEPLOYMENT_TARGET = 10.8; | |
241 | - SDKROOT = macosx; | |
242 | + MACOSX_DEPLOYMENT_TARGET = 10.7; | |
243 | + SDKROOT = macosx10.7; | |
242 | 244 | }; |
243 | 245 | name = Release; |
244 | 246 | }; |
@@ -287,6 +289,7 @@ | ||
287 | 289 | F4180200169EF1C3004C7E62 /* Release */, |
288 | 290 | ); |
289 | 291 | defaultConfigurationIsVisible = 0; |
292 | + defaultConfigurationName = Release; | |
290 | 293 | }; |
291 | 294 | /* End XCConfigurationList section */ |
292 | 295 | }; |
@@ -21,7 +21,7 @@ | ||
21 | 21 | <key>CFBundleSignature</key> |
22 | 22 | <string>????</string> |
23 | 23 | <key>CFBundleVersion</key> |
24 | - <string>1</string> | |
24 | + <string>%%%%REVISION%%%%</string> | |
25 | 25 | <key>NSPrincipalClass</key> |
26 | 26 | <string>HMWebBrowserChanger</string> |
27 | 27 | </dict> |
@@ -0,0 +1,46 @@ | ||
1 | +// encoding=utf-8 | |
2 | +PRODUCT_NAME=HMWebBrowserChanger | |
3 | +PRODUCT_EXTENSION=bundle | |
4 | +BUILD_PATH=./build | |
5 | +DEPLOYMENT=Release | |
6 | +APP_BUNDLE=$(PRODUCT_NAME).$(PRODUCT_EXTENSION) | |
7 | +APP=$(BUILD_PATH)/$(DEPLOYMENT)/$(APP_BUNDLE) | |
8 | +APP_NAME=$(BUILD_PATH)/$(DEPLOYMENT)/$(PRODUCT_NAME) | |
9 | +INFO_PLIST=HMWebBrowserChanger/HMWebBrowserChanger-Info.plist | |
10 | + | |
11 | +VER_CMD=grep -A1 'CFBundleShortVersionString' $(INFO_PLIST) | tail -1 | tr -d "'\t</string>" | |
12 | +VERSION=$(shell $(VER_CMD)) | |
13 | + | |
14 | +LocalizeFiles= | |
15 | + | |
16 | +all: | |
17 | + @echo do nothig. | |
18 | + | |
19 | +Localizable: ${LocalizeFiles} | |
20 | + genstrings -o English.lproj $^ | |
21 | + (cd English.lproj; ${MAKE} $@;) | |
22 | + genstrings -o Japanese.lproj $^ | |
23 | + (cd Japanese.lproj; ${MAKE} $@;) | |
24 | + | |
25 | +checkLocalizable: | |
26 | + (cd English.lproj; ${MAKE} $@;) | |
27 | + (cd Japanese.lproj; ${MAKE} $@;) | |
28 | + | |
29 | +release: updateRevision | |
30 | + xcodebuild -configuration $(DEPLOYMENT) | |
31 | + $(MAKE) restorInfoPlist | |
32 | + | |
33 | +package: release | |
34 | + REV=`git show | head -1 | awk '{printf("%.7s\n", $$2)}'`; \ | |
35 | + ditto -ck -rsrc --keepParent $(APP) $(APP_NAME)-$(VERSION)-$${REV}.zip | |
36 | + | |
37 | +updateRevision: | |
38 | + if [ ! -f $(INFO_PLIST).bak ] ; then cp $(INFO_PLIST) $(INFO_PLIST).bak ; fi ; \ | |
39 | + REV=`git show | head -1 | awk '{printf("%.7s\n", $$2)}'` ; \ | |
40 | + sed -e "s/%%%%REVISION%%%%/$${REV}/" $(INFO_PLIST) > $(INFO_PLIST).r ; \ | |
41 | + mv -f $(INFO_PLIST).r $(INFO_PLIST) ; \ | |
42 | + | |
43 | +restorInfoPlist: | |
44 | + if [ -f $(INFO_PLIST).bak ] ; then mv -f $(INFO_PLIST).bak $(INFO_PLIST) ; fi | |
45 | + | |
46 | + |