]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/mac_bundles.bkl
update minimum GTK2 version requirement to 2.6
[wxWidgets.git] / build / bakefiles / mac_bundles.bkl
CommitLineData
425c0d76
VS
1<?xml version="1.0" ?>
2<!-- $Id$ -->
3
4<makefile>
5
6 <!--
77ffb593 7 Support for application bundles, for wxWidgets samples.
425c0d76
VS
8 -->
9
10 <!--
11 Nasty hack: use $(srcdir) to obtain usable CFBundleIdentifier suffix;
12 converts $(srcdir) like "../../samples/minimal" to "samples.minimal".
13 -->
14 <set var="BUNDLE_IDENTIFIER">
15 `echo $(DOLLAR)(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`
16 </set>
17
a0b10e1b 18 <set var="BUNDLE_PLIST" overwrite="0">
732c71cf 19 $(TOP_SRCDIR)src/osx/carbon/Info.plist.in
425c0d76 20 </set>
78a9167e 21 <set var="BUNDLE_ICON" overwrite="0">
732c71cf 22 $(TOP_SRCDIR)src/osx/carbon/wxmac.icns
425c0d76 23 </set>
78a9167e 24 <set var="BUNDLE_RESOURCES" overwrite="0"></set>
425c0d76
VS
25
26 <define-tag name="wx-mac-app-bundle" rules="exe">
27
28 <!-- bundle directory: -->
29 <set var="BUNDLE">$(id).app/Contents</set>
54eba47d 30 <set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set>
0e6450e1 31 <set var="BUNDLE_TGT_REF">
2ea057f9 32 <!-- TODO Remove Mac -->
0e6450e1 33 <if cond="TOOLKIT=='MAC'">$(BUNDLE)/PkgInfo</if>
2ea057f9
SC
34 <if cond="TOOLKIT=='OSX_CARBON'">$(BUNDLE)/PkgInfo</if>
35 <if cond="TOOLKIT=='OSX_COCOA'">$(BUNDLE)/PkgInfo</if>
36 <if cond="TOOLKIT=='OSX_IPHONE'">$(BUNDLE)/PkgInfo</if>
0e6450e1
VS
37 <if cond="TOOLKIT=='COCOA'">$(BUNDLE)/PkgInfo</if>
38 </set>
b6460890
VS
39
40 <add-target target="$(BUNDLE_TGT)" type="action"
41 cond="target and PLATFORM_MACOSX=='1'"/>
54eba47d 42 <modify-target target="$(BUNDLE_TGT)">
425c0d76
VS
43 <!-- required data: -->
44 <depends>$(id)</depends>
45 <depends-on-file>$(BUNDLE_PLIST)</depends-on-file>
78a9167e
SC
46 <depends-on-file>$(BUNDLE_ICON)</depends-on-file>
47 <depends-on-file>$(BUNDLE_RESOURCES)</depends-on-file>
425c0d76
VS
48
49 <command>
50 <!-- create the directories: -->
51 mkdir -p $(BUNDLE)
52 mkdir -p $(BUNDLE)/MacOS
53 mkdir -p $(BUNDLE)/Resources
54
55 <!-- Info.plist: -->
56 sed -e "s/IDENTIFIER/$(BUNDLE_IDENTIFIER)/" \
57 -e "s/EXECUTABLE/$(id)/" \
58 -e "s/VERSION/$(WX_VERSION)/" \
59 $(BUNDLE_PLIST) >$(BUNDLE)/Info.plist
60
61 <!-- PkgInfo: -->
b02dd122 62 /bin/echo "APPL????" >$(BUNDLE)/PkgInfo
425c0d76 63
8588ab38 64 <!-- move the binary: -->
6247d6ac 65 ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id)
425c0d76 66
78a9167e
SC
67 <!-- copy the application icon: -->
68 cp -f $(BUNDLE_ICON) $(BUNDLE)/Resources/wxmac.icns
69 </command>
70 <if cond="BUNDLE_RESOURCES!=''">
71 <command>
72 <!-- copy all other bundle resources: -->
73 cp -f $(BUNDLE_RESOURCES) $(BUNDLE)/Resources
74 </command>
75 </if>
76
425c0d76
VS
77 </modify-target>
78
79 <!-- add pseudo target id_bundle: -->
80 <add-target target="$(id)_bundle" type="phony"
b6460890 81 cond="target and PLATFORM_MACOSX=='1'"/>
425c0d76
VS
82 <modify-target target="$(id)_bundle">
83 <dependency-of>all</dependency-of>
0e6450e1 84 <depends>$(BUNDLE_TGT_REF)</depends>
425c0d76
VS
85 </modify-target>
86
87 <!-- "make clean" should delete the bundle: -->
88 <modify-target target="clean">
89 <command>rm -rf $(id).app</command>
90 </modify-target>
91
92 </define-tag>
93
94</makefile>