X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/425c0d76be2f47b66f300014446e437531c605c2..218e641ac2c38b4e81873d314ea3841b0314f5b8:/build/bakefiles/mac_bundles.bkl diff --git a/build/bakefiles/mac_bundles.bkl b/build/bakefiles/mac_bundles.bkl index 586c72f229..470cd19a89 100644 --- a/build/bakefiles/mac_bundles.bkl +++ b/build/bakefiles/mac_bundles.bkl @@ -4,7 +4,7 @@ <makefile> <!-- - Support for application bundles, for wxWindows samples. + Support for application bundles, for wxWidgets samples. --> <!-- @@ -15,28 +15,36 @@ `echo $(DOLLAR)(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'` </set> - <set var="BUNDLE_PLIST"> - $(TOP_SRCDIR)src/mac/Info.plist.in + <set var="BUNDLE_PLIST" overwrite="0"> + $(TOP_SRCDIR)src/osx/carbon/Info.plist.in </set> - <set var="BUNDLE_RESOURCE"> - $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).rsrc - </set> - <set var="BUNDLE_ICONS"> - $(TOP_SRCDIR)src/mac/wxmac.icns + <set var="BUNDLE_ICON" overwrite="0"> + $(TOP_SRCDIR)src/osx/carbon/wxmac.icns </set> + <set var="BUNDLE_RESOURCES" overwrite="0"></set> <define-tag name="wx-mac-app-bundle" rules="exe"> <!-- bundle directory: --> <set var="BUNDLE">$(id).app/Contents</set> - - <add-target target="$(BUNDLE)" type="action"/> - <modify-target target="$(BUNDLE)"> + <set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set> + <set var="BUNDLE_TGT_REF"> + <!-- TODO Remove Mac --> + <if cond="TOOLKIT=='MAC'">$(BUNDLE)/PkgInfo</if> + <if cond="TOOLKIT=='OSX_CARBON'">$(BUNDLE)/PkgInfo</if> + <if cond="TOOLKIT=='OSX_COCOA'">$(BUNDLE)/PkgInfo</if> + <if cond="TOOLKIT=='OSX_IPHONE'">$(BUNDLE)/PkgInfo</if> + <if cond="TOOLKIT=='COCOA'">$(BUNDLE)/PkgInfo</if> + </set> + + <add-target target="$(BUNDLE_TGT)" type="action" + cond="target and PLATFORM_MACOSX=='1'"/> + <modify-target target="$(BUNDLE_TGT)"> <!-- required data: --> <depends>$(id)</depends> <depends-on-file>$(BUNDLE_PLIST)</depends-on-file> - <depends-on-file>$(BUNDLE_RESOURCE)</depends-on-file> - <depends-on-file>$(BUNDLE_ICONS)</depends-on-file> + <depends-on-file>$(BUNDLE_ICON)</depends-on-file> + <depends-on-file>$(BUNDLE_RESOURCES)</depends-on-file> <command> <!-- create the directories: --> @@ -51,23 +59,29 @@ $(BUNDLE_PLIST) >$(BUNDLE)/Info.plist <!-- PkgInfo: --> - echo -n "APPL????" >$(BUNDLE)/PkgInfo + /bin/echo "APPL????" >$(BUNDLE)/PkgInfo - <!-- make a hardlink to the binary: --> + <!-- move the binary: --> ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id) - <!-- ditto wxWindows resources and icons: --> - ln -f $(BUNDLE_RESOURCE) $(BUNDLE)/Resources/$(id).rsrc - ln -f $(BUNDLE_ICONS) $(BUNDLE)/Resources/wxmac.icns - </command> + <!-- copy the application icon: --> + cp -f $(BUNDLE_ICON) $(BUNDLE)/Resources/wxmac.icns + </command> + <if cond="BUNDLE_RESOURCES!=''"> + <command> + <!-- copy all other bundle resources: --> + cp -f $(BUNDLE_RESOURCES) $(BUNDLE)/Resources + </command> + </if> + </modify-target> <!-- add pseudo target id_bundle: --> <add-target target="$(id)_bundle" type="phony" - cond="PLATFORM_MACOSX=='1'"/> + cond="target and PLATFORM_MACOSX=='1'"/> <modify-target target="$(id)_bundle"> <dependency-of>all</dependency-of> - <depends>$(BUNDLE)</depends> + <depends>$(BUNDLE_TGT_REF)</depends> </modify-target> <!-- "make clean" should delete the bundle: -->