From: Francesco M. <fr...@us...> - 2006-12-22 20:45:13
|
Update of /cvsroot/wxlua/wxLua/build/bakefiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28891/build/bakefiles Modified Files: wxluabase.bkl Added Files: mac_bundles.bkl Log Message: added Mac-bundling support (mostly a copy and paste of wxWidgets' mac bundling support code) Index: wxluabase.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/bakefiles/wxluabase.bkl,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxluabase.bkl 19 Dec 2006 21:11:59 -0000 1.30 --- wxluabase.bkl 22 Dec 2006 20:45:07 -0000 1.31 *************** *** 157,161 **** - <!-- ================================================================== --> <!-- TEMPLATES --> --- 157,160 ---- *************** *** 268,270 **** --- 267,278 ---- </template> + + + <!-- ================================================================== --> + <!-- TAGS --> + <!-- ================================================================== --> + + <!-- defines the <wx-mac-app-bundle> tag --> + <include file="mac_bundles.bkl" once="1"/> + </makefile> --- NEW FILE: mac_bundles.bkl --- <?xml version="1.0" ?> <!-- $Id: mac_bundles.bkl,v 1.1 2006/12/22 20:45:07 frm Exp $ --> <makefile> <if cond="FORMAT=='autoconf'"> <!-- =============================================================== --> <!-- project-specific mac-bundle stuff: --> <!-- =============================================================== --> <set var="BUNDLE_DIR"> $(top_srcdir)/distrib/macbundle </set> <set var="BUNDLE_ICONS_FILENAME"> wxLua.icns </set> <set var="BUNDLE_PLIST"> $(BUNDLE_DIR)/Info.plist.in </set> <set var="BUNDLE_ICONS"> $(BUNDLE_PLIST)/$(BUNDLE_ICONS_FILENAME) </set> <!-- =============================================================== --> <!-- DO NOT TOUCH THE FOLLOWING: --> <!-- =============================================================== --> <!-- Support for application bundles, for wxWidgets samples. --> <!-- Nasty hack: use $(srcdir) to obtain usable CFBundleIdentifier suffix; converts $(srcdir) like "../../samples/minimal" to "samples.minimal". --> <set var="BUNDLE_IDENTIFIER"> `echo $(DOLLAR)(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'` </set> <define-tag name="wx-mac-app-bundle" rules="exe"> <!-- bundle directory: --> <set var="BUNDLE">$(id).app/Contents</set> <set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set> <set var="BUNDLE_TGT_REF"> $(BUNDLE)/PkgInfo </set> <add-target target="$(BUNDLE_TGT)" type="action"/> <modify-target target="$(BUNDLE_TGT)"> <!-- required data: --> <depends>$(id)</depends> <depends-on-file>$(BUNDLE_PLIST)</depends-on-file> <depends-on-file>$(BUNDLE_ICONS)</depends-on-file> <command> <!-- create the directories: --> mkdir -p $(BUNDLE) mkdir -p $(BUNDLE)/MacOS mkdir -p $(BUNDLE)/Resources <!-- Info.plist: --> sed -e "s/IDENTIFIER/$(BUNDLE_IDENTIFIER)/" \ -e "s/EXECUTABLE/$(id)/" \ -e "s/VERSION/$(WX_VERSION)/" \ $(BUNDLE_PLIST) >$(BUNDLE)/Info.plist <!-- PkgInfo: --> echo -n "APPL????" >$(BUNDLE)/PkgInfo <!-- make a hardlink to the binary: --> ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id) <!-- ditto resources and icons: --> cp -f $(BUNDLE_ICONS) $(BUNDLE)/Resources/$(BUNDLE_ICONS_FILENAME) </command> </modify-target> <!-- add pseudo target id_bundle: --> <add-target target="$(id)_bundle" type="phony" cond="PLATFORM_MACOSX=='1'"/> <modify-target target="$(id)_bundle"> <dependency-of>all</dependency-of> <depends>$(BUNDLE_TGT_REF)</depends> </modify-target> <!-- "make clean" should delete the bundle: --> <modify-target target="clean"> <command>rm -rf $(id).app</command> </modify-target> </define-tag> </if> <if cond="FORMAT!='autoconf'"> <define-tag name="wx-mac-app-bundle" rules="exe"/> </if> </makefile> |