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