Add BUNDLE_FONT_RESOURCES and use it in font sample
Allow copying font files to the Fonts subdirectory of the app bundle, private fonts can only be loaded from there under macOS currently.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
$(TOP_SRCDIR)src/osx/carbon/wxmac.icns
|
||||
</set>
|
||||
<set var="BUNDLE_RESOURCES" overwrite="0"></set>
|
||||
<set var="BUNDLE_FONT_RESOURCES" overwrite="0"></set>
|
||||
|
||||
<define-tag name="wx-mac-app-bundle" rules="exe">
|
||||
|
||||
@@ -44,6 +45,7 @@
|
||||
<depends-on-file>$(BUNDLE_PLIST)</depends-on-file>
|
||||
<depends-on-file>$(BUNDLE_ICON)</depends-on-file>
|
||||
<depends-on-file>$(BUNDLE_RESOURCES)</depends-on-file>
|
||||
<depends-on-file>$(BUNDLE_FONT_RESOURCES)</depends-on-file>
|
||||
|
||||
<command>
|
||||
<!-- create the directories: -->
|
||||
@@ -72,6 +74,16 @@
|
||||
cp -f $(BUNDLE_RESOURCES) $(BUNDLE)/Resources
|
||||
</command>
|
||||
</if>
|
||||
<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>
|
||||
|
||||
</modify-target>
|
||||
|
||||
|
Reference in New Issue
Block a user