Generate Mac bundle for helpview

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-03-30 11:32:39 +00:00
parent f7570f5771
commit 1fc1bbfc68
2 changed files with 40 additions and 3 deletions

View File

@@ -36,11 +36,14 @@ EXTRALIBS = @EXTRALIBS@
EXTRALIBS_HTML = @EXTRALIBS_HTML@ EXTRALIBS_HTML = @EXTRALIBS_HTML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@ EXTRALIBS_GUI = @EXTRALIBS_GUI@
HOST_SUFFIX = @HOST_SUFFIX@ HOST_SUFFIX = @HOST_SUFFIX@
SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
SAMPLES_RPATH_POSTLINK = @SAMPLES_RPATH_POSTLINK@
### Variables: ### ### Variables: ###
DESTDIR = DESTDIR =
WX_RELEASE = 2.7 WX_RELEASE = 2.7
WX_VERSION = $(WX_RELEASE).0
LIBDIRNAME = $(top_builddir)lib LIBDIRNAME = $(top_builddir)lib
HELPVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ HELPVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
@@ -93,6 +96,11 @@ COND_PLATFORM_OS2_1___helpview___os2_emxbindcmd = $(NM) helpview$(EXEEXT) | if \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME) @COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
@COND_PLATFORM_OS2_1@__helpview_os2_lib_res = \ @COND_PLATFORM_OS2_1@__helpview_os2_lib_res = \
@COND_PLATFORM_OS2_1@ $(top_srcdir)/include/wx/os2/wx.res @COND_PLATFORM_OS2_1@ $(top_srcdir)/include/wx/os2/wx.res
@COND_PLATFORM_MACOSX_1@__helpview_bundle___depname = helpview_bundle
@COND_TOOLKIT_COCOA@____helpview_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_COCOA@ helpview.app/Contents/PkgInfo
@COND_TOOLKIT_MAC@____helpview_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ helpview.app/Contents/PkgInfo
@COND_PLATFORM_WIN32_1@__helpview___win32rc = helpview_helpview_rc.o @COND_PLATFORM_WIN32_1@__helpview___win32rc = helpview_helpview_rc.o
COND_MONOLITHIC_0___WXLIB_HTML_p = \ COND_MONOLITHIC_0___WXLIB_HTML_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX) -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
@@ -136,7 +144,7 @@ COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(REZ) -d __DARWIN__ -t APPL -d \
### Targets: ### ### Targets: ###
all: helpview$(EXEEXT) data all: helpview$(EXEEXT) $(__helpview_bundle___depname) data
install: all install_helpview install: all install_helpview
@@ -149,15 +157,39 @@ clean:
rm -rf ./.deps ./.pch rm -rf ./.deps ./.pch
rm -f ./*.o rm -f ./*.o
rm -f helpview$(EXEEXT) rm -f helpview$(EXEEXT)
rm -rf helpview.app
distclean: clean distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
helpview$(EXEEXT): $(HELPVIEW_OBJECTS) $(__helpview___win32rc) helpview$(EXEEXT): $(HELPVIEW_OBJECTS) $(__helpview___win32rc)
$(CXX) -o $@ $(HELPVIEW_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI) $(CXX) -o $@ $(HELPVIEW_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI)
$(__helpview___mac_rezcmd) $(__helpview___mac_rezcmd)
$(__helpview___mac_setfilecmd) $(__helpview___mac_setfilecmd)
$(__helpview___os2_emxbindcmd) $(__helpview___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
helpview.app/Contents/PkgInfo: helpview$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
mkdir -p helpview.app/Contents
mkdir -p helpview.app/Contents/MacOS
mkdir -p helpview.app/Contents/Resources
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/helpview/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/carbon/Info.plist.in >helpview.app/Contents/Info.plist
echo -n "APPL????" >helpview.app/Contents/PkgInfo
ln -f helpview$(EXEEXT) helpview.app/Contents/MacOS/helpview
cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns helpview.app/Contents/Resources/wxmac.icns
@COND_PLATFORM_MACOSX_1@helpview_bundle: $(____helpview_BUNDLE_TGT_REF_DEP)
install_helpview: install_helpview:
$(INSTALL_DIR) $(DESTDIR)$(bindir) $(INSTALL_DIR) $(DESTDIR)$(bindir)
@@ -185,4 +217,4 @@ helpview_helpview_rc.o: $(srcdir)/helpview.rc
# Include dependency info, if present: # Include dependency info, if present:
@IF_GNU_MAKE@-include .deps/*.d @IF_GNU_MAKE@-include .deps/*.d
.PHONY: all install uninstall clean distclean install_helpview data .PHONY: all install uninstall clean distclean helpview_bundle install_helpview data

View File

@@ -6,6 +6,11 @@
<include file="../../../build/bakefiles/common_samples.bkl"/> <include file="../../../build/bakefiles/common_samples.bkl"/>
<exe id="helpview" template="wx_util" template_append="wx_append"> <exe id="helpview" template="wx_util" template_append="wx_append">
<if cond="FORMAT=='autoconf'">
<wx-mac-app-bundle/>
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
</if>
<sources> <sources>
helpview.cpp helpview.cpp
</sources> </sources>