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:
parent
4f5f4af3b1
commit
5d134711a1
7 changed files with 22 additions and 6 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ font$(EXEEXT): $(FONT_OBJECTS) $(__font___win32rc)
|
|||
$(CXX) -o $@ $(FONT_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
|
||||
$(__font___os2_emxbindcmd)
|
||||
|
||||
@COND_PLATFORM_MACOSX_1@font.app/Contents/PkgInfo: font$(EXEEXT) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
|
||||
@COND_PLATFORM_MACOSX_1@font.app/Contents/PkgInfo: font$(EXEEXT) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns $(srcdir)/wxprivate.ttf
|
||||
@COND_PLATFORM_MACOSX_1@ mkdir -p font.app/Contents
|
||||
@COND_PLATFORM_MACOSX_1@ mkdir -p font.app/Contents/MacOS
|
||||
@COND_PLATFORM_MACOSX_1@ mkdir -p font.app/Contents/Resources
|
||||
|
|
@ -168,6 +168,8 @@ font$(EXEEXT): $(FONT_OBJECTS) $(__font___win32rc)
|
|||
@COND_PLATFORM_MACOSX_1@
|
||||
@COND_PLATFORM_MACOSX_1@
|
||||
@COND_PLATFORM_MACOSX_1@ cp -f $(top_srcdir)/src/osx/carbon/wxmac.icns font.app/Contents/Resources/wxmac.icns
|
||||
@COND_PLATFORM_MACOSX_1@ mkdir -p font.app/Contents/Resources/Fonts
|
||||
@COND_PLATFORM_MACOSX_1@ cp -f $(srcdir)/wxprivate.ttf font.app/Contents/Resources/Fonts
|
||||
|
||||
@COND_PLATFORM_MACOSX_1@font_bundle: $(____font_BUNDLE_TGT_REF_DEP)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" ?>
|
||||
<makefile>
|
||||
|
||||
<set var="BUNDLE_FONT_RESOURCES">$(SRCDIR)/wxprivate.ttf</set>
|
||||
|
||||
<include file="../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<exe id="font" template="wx_sample" template_append="wx_append">
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ data:
|
|||
|
||||
data_doc:
|
||||
@mkdir -p ./doc
|
||||
@for f in aindex.html down.gif dxxgifs.tex HIER.html icon1.gif icon2.gif index.html logo.gif wx204.htm wx34.htm wxExtHelpController.html wxhelp.map wx.htm; do \
|
||||
@for f in aindex.html ClassGraph.class ClassGraphPanel.class ClassLayout.class down.gif dxxgifs.tex HIER.html HIERjava.html icon1.gif icon2.gif index.html logo.gif NavigatorButton.class USE_HELP.html wx204.htm wx34.htm wxExtHelpController.html wxhelp.map wx.htm; do \
|
||||
if test ! -f ./doc/$$f -a ! -d ./doc/$$f ; \
|
||||
then x=yep ; \
|
||||
else x=`find $(srcdir)/doc/$$f -newer ./doc/$$f -print` ; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue