2003-08-10 17:21:23 -04:00
|
|
|
<?xml version="1.0" ?>
|
|
|
|
|
|
|
|
<makefile>
|
|
|
|
|
|
|
|
<!--
|
2004-05-23 10:56:36 -04:00
|
|
|
Support for application bundles, for wxWidgets samples.
|
2003-08-10 17:21:23 -04:00
|
|
|
-->
|
2021-08-15 10:11:21 -04:00
|
|
|
|
2008-08-05 07:49:26 -04:00
|
|
|
<set var="BUNDLE_PLIST" overwrite="0">
|
2008-06-11 16:46:47 -04:00
|
|
|
$(TOP_SRCDIR)src/osx/carbon/Info.plist.in
|
2003-08-10 17:21:23 -04:00
|
|
|
</set>
|
2008-08-13 11:20:57 -04:00
|
|
|
<set var="BUNDLE_ICON" overwrite="0">
|
2008-06-11 16:46:47 -04:00
|
|
|
$(TOP_SRCDIR)src/osx/carbon/wxmac.icns
|
2003-08-10 17:21:23 -04:00
|
|
|
</set>
|
2008-08-13 11:20:57 -04:00
|
|
|
<set var="BUNDLE_RESOURCES" overwrite="0"></set>
|
2017-11-13 09:22:27 -05:00
|
|
|
<set var="BUNDLE_FONT_RESOURCES" overwrite="0"></set>
|
2003-08-10 17:21:23 -04:00
|
|
|
|
|
|
|
<define-tag name="wx-mac-app-bundle" rules="exe">
|
|
|
|
|
|
|
|
<!-- bundle directory: -->
|
|
|
|
<set var="BUNDLE">$(id).app/Contents</set>
|
2003-08-23 17:51:13 -04:00
|
|
|
<set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set>
|
2004-04-15 17:53:36 -04:00
|
|
|
<set var="BUNDLE_TGT_REF">
|
2008-09-07 11:59:51 -04:00
|
|
|
<!-- TODO Remove Mac -->
|
2004-04-15 17:53:36 -04:00
|
|
|
<if cond="TOOLKIT=='MAC'">$(BUNDLE)/PkgInfo</if>
|
2008-09-07 11:59:51 -04:00
|
|
|
<if cond="TOOLKIT=='OSX_CARBON'">$(BUNDLE)/PkgInfo</if>
|
|
|
|
<if cond="TOOLKIT=='OSX_COCOA'">$(BUNDLE)/PkgInfo</if>
|
|
|
|
<if cond="TOOLKIT=='OSX_IPHONE'">$(BUNDLE)/PkgInfo</if>
|
2004-04-15 17:53:36 -04:00
|
|
|
<if cond="TOOLKIT=='COCOA'">$(BUNDLE)/PkgInfo</if>
|
|
|
|
</set>
|
2008-06-02 06:39:10 -04:00
|
|
|
|
|
|
|
<add-target target="$(BUNDLE_TGT)" type="action"
|
|
|
|
cond="target and PLATFORM_MACOSX=='1'"/>
|
2003-08-23 17:51:13 -04:00
|
|
|
<modify-target target="$(BUNDLE_TGT)">
|
2003-08-10 17:21:23 -04:00
|
|
|
<!-- required data: -->
|
|
|
|
<depends>$(id)</depends>
|
|
|
|
<depends-on-file>$(BUNDLE_PLIST)</depends-on-file>
|
2008-08-13 11:20:57 -04:00
|
|
|
<depends-on-file>$(BUNDLE_ICON)</depends-on-file>
|
|
|
|
<depends-on-file>$(BUNDLE_RESOURCES)</depends-on-file>
|
2017-11-13 09:22:27 -05:00
|
|
|
<depends-on-file>$(BUNDLE_FONT_RESOURCES)</depends-on-file>
|
2003-08-10 17:21:23 -04:00
|
|
|
|
|
|
|
<command>
|
|
|
|
<!-- create the directories: -->
|
|
|
|
mkdir -p $(BUNDLE)
|
|
|
|
mkdir -p $(BUNDLE)/MacOS
|
|
|
|
mkdir -p $(BUNDLE)/Resources
|
|
|
|
|
|
|
|
<!-- Info.plist: -->
|
2021-08-15 10:32:42 -04:00
|
|
|
sed -e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_GUI_IDENTIFIER}/org.wxwidgets.$(id)/" \
|
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_EXECUTABLE_NAME}/$(id)/" \
|
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_BUNDLE_NAME}/$(id)/" \
|
2023-01-02 22:15:08 -05:00
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_COPYRIGHT}/Copyright 2002-2023 wxWidgets/" \
|
2021-08-15 10:32:42 -04:00
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_BUNDLE_VERSION}/$(WX_VERSION)/" \
|
2023-01-02 22:15:08 -05:00
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_INFO_STRING}/$(id) version $(WX_VERSION), (c) 2002-2023 wxWidgets/" \
|
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_LONG_VERSION_STRING}/$(WX_VERSION), (c) 2002-2023 wxWidgets/" \
|
2021-08-15 10:32:42 -04:00
|
|
|
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_SHORT_VERSION_STRING}/$(WX_RELEASE)/" \
|
2003-08-10 17:21:23 -04:00
|
|
|
$(BUNDLE_PLIST) >$(BUNDLE)/Info.plist
|
|
|
|
|
|
|
|
<!-- PkgInfo: -->
|
2012-02-28 17:48:39 -05:00
|
|
|
/bin/echo "APPL????" >$(BUNDLE)/PkgInfo
|
2003-08-10 17:21:23 -04:00
|
|
|
|
2009-03-13 01:23:07 -04:00
|
|
|
<!-- move the binary: -->
|
2009-04-25 22:01:25 -04:00
|
|
|
ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id)
|
2003-08-10 17:21:23 -04:00
|
|
|
|
2008-08-13 11:20:57 -04:00
|
|
|
<!-- copy the application icon: -->
|
|
|
|
cp -f $(BUNDLE_ICON) $(BUNDLE)/Resources/wxmac.icns
|
2021-08-15 10:11:21 -04:00
|
|
|
</command>
|
2008-08-13 11:20:57 -04:00
|
|
|
<if cond="BUNDLE_RESOURCES!=''">
|
|
|
|
<command>
|
|
|
|
<!-- copy all other bundle resources: -->
|
|
|
|
cp -f $(BUNDLE_RESOURCES) $(BUNDLE)/Resources
|
|
|
|
</command>
|
|
|
|
</if>
|
2017-11-13 09:22:27 -05:00
|
|
|
<if cond="BUNDLE_FONT_RESOURCES!=''">
|
|
|
|
<!--
|
|
|
|
Special case of font resources, which must be copied into
|
|
|
|
the Fonts subdirectory used in src/osx/carbon/Info.plist.in file.
|
|
|
|
-->
|
|
|
|
<command>
|
|
|
|
mkdir -p $(BUNDLE)/Resources/Fonts
|
|
|
|
cp -f $(BUNDLE_FONT_RESOURCES) $(BUNDLE)/Resources/Fonts
|
|
|
|
</command>
|
|
|
|
</if>
|
2021-08-15 10:11:21 -04:00
|
|
|
|
2003-08-10 17:21:23 -04:00
|
|
|
</modify-target>
|
2021-08-15 10:11:21 -04:00
|
|
|
|
2003-08-10 17:21:23 -04:00
|
|
|
<!-- add pseudo target id_bundle: -->
|
|
|
|
<add-target target="$(id)_bundle" type="phony"
|
2008-06-02 06:39:10 -04:00
|
|
|
cond="target and PLATFORM_MACOSX=='1'"/>
|
2003-08-10 17:21:23 -04:00
|
|
|
<modify-target target="$(id)_bundle">
|
|
|
|
<dependency-of>all</dependency-of>
|
2004-04-15 17:53:36 -04:00
|
|
|
<depends>$(BUNDLE_TGT_REF)</depends>
|
2003-08-10 17:21:23 -04:00
|
|
|
</modify-target>
|
|
|
|
|
|
|
|
<!-- "make clean" should delete the bundle: -->
|
|
|
|
<modify-target target="clean">
|
|
|
|
<command>rm -rf $(id).app</command>
|
|
|
|
</modify-target>
|
2021-08-15 10:11:21 -04:00
|
|
|
|
2003-08-10 17:21:23 -04:00
|
|
|
</define-tag>
|
|
|
|
|
|
|
|
</makefile>
|