diff options
author | bjarni <bjarni@openttd.org> | 2005-12-03 13:43:54 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-12-03 13:43:54 +0000 |
commit | 8277a0651e8a9b74187bfbc8a83a80bc90600345 (patch) | |
tree | 29aa772fac1659530576fd4f4b351f5838ce5a9e | |
parent | b860d1194d553e96678f438ea206b68b8d6db539 (diff) | |
download | openttd-8277a0651e8a9b74187bfbc8a83a80bc90600345.tar.xz |
(svn r3257) -Codechange: [OSX] removed the dynamic lib in bundle option (introduced in rev 3230)
it caused way more problems than it solved
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | os/macosx/Makefile | 52 |
2 files changed, 10 insertions, 53 deletions
@@ -73,9 +73,6 @@ # do `make install', the game won't be able to find it's files (so you should # also define all the following paths before building). # -# OSX specific paths are set in os/macosx/Makefile -# MAKEMOVEABLE moves the dynamic libs into the bundle to make the app independent from end user's libs (OSX only) -# # So, the following paths should be defined if INSTALL is defined. # None of these paths have to end with / # PREFIX: Normally /usr/local @@ -200,6 +197,14 @@ endif endif endif +ifdef OSX +ifdef RELEASE +# all OSX releases needs to be static +# end users don't tend to have the dynamic libs installed +$(warning Compiling a dynamic release. It should be static unless you really know what you are doing!!!) +endif +endif + # Force SDL on UNIX platforms ifndef WITH_SDL ifdef UNIX diff --git a/os/macosx/Makefile b/os/macosx/Makefile index d93b3266d..9ce03f573 100644 --- a/os/macosx/Makefile +++ b/os/macosx/Makefile @@ -2,40 +2,6 @@ # This makefile is not a standalone makefile, but is called from the general one # it contains targets specific to MacOS X -# it's possible to link OpenTTD dynamically and move the needed libs into the bundle -# this way it's possible to move the app around without thinking about libs on the computer it runs on -# dynamic linking is recommended for several reasons, specially because static linking makes issues with OpenTTD -# to setup the lib paths, a few flags needs to be set (default setup should work if the libs were installed with fink) -# -# OSX_LIB_PATH: this is the path to where the lib files are located on the compiling computer. (default /sw/lib/) -# OSX_LOCAL_LIB_PATH: is the path that the binary will use to search for the libs. -# it's always an absolute path except when the keyword @executable_path is used, then it's the binary -# it's important to remember that it's the binary and not the bundle, so to get the bundle path, use @executable_path/../../../ - - -ifdef RELEASE - CONVERT_LIB_PATH:=convert_OSX_lib_path -endif - -ifdef OSX_CHANGE_LIB_PATH - CONVERT_LIB_PATH:=convert_OSX_lib_path -endif - -ifndef OSX_LIB_PATH - OSX_LIB_PATH:=/sw/lib/ -endif - -ifndef OSX_LOCAL_LIB_PATH - OSX_LOCAL_LIB_PATH:=@executable_path/../lib/ -endif - -ifdef MAKEMOVEABLE - CONVERT_LIB_PATH:=convert_OSX_lib_path - OSX_LOCAL_LIB_PATH:=@executable_path/../lib/ - MOVE_LIB_INTO_BUNDLE:=move_lib_into_bundle -endif - -# the rest is the targets. If more than one is called, they need to be called in the order they are written # build the bundle. OSX wants to keep apps in bundles, so we will give it one # the good thing about bundles is that you can keep extra files in them, so we keep lng files and a data dir in it @@ -52,20 +18,6 @@ build_OSX_bundle: $(TTD) $(Q)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/ $(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD) - -# set the path that OpenTTD will use to search for dynamic libraries -$(CONVERT_LIB_PATH): - $(Q)install_name_tool -change $(OSX_LIB_PATH)libSDL-1.2.0.dylib $(OSX_LOCAL_LIB_PATH)libSDL-1.2.0.dylib "$(OSXAPP)"/Contents/MacOS/$(TTD) - $(Q)install_name_tool -change $(OSX_LIB_PATH)libpng12.0.dylib $(OSX_LOCAL_LIB_PATH)libpng12.0.dylib "$(OSXAPP)"/Contents/MacOS/$(TTD) - - -# copies the lib files into the bundle. This way you can move the bundle around like if it were statically linked -$(MOVE_LIB_INTO_BUNDLE): - $(Q)mkdir -p "$(OSXAPP)"/Contents/lib/ - $(Q)cp -RH $(OSX_LIB_PATH)libSDL-1.2.0.dylib "$(OSXAPP)"/Contents/lib/libSDL-1.2.0.dylib - $(Q)cp -RH $(OSX_LIB_PATH)libpng12.0.dylib "$(OSXAPP)"/Contents/lib/libpng12.0.dylib - - # make the release disk image. Should only be used with releases and is a good and fast way to make sure to remember all the needed files release: all $(Q)mkdir -p "OpenTTD $(RELEASE)" @@ -85,6 +37,6 @@ release: all $(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(RELEASE)" openttd-"$(RELEASE)"-osx.dmg $(Q)rm -fr "OpenTTD $(RELEASE)" -$(OSX): $(TTD) build_OSX_bundle $(CONVERT_LIB_PATH) +$(OSX): $(TTD) build_OSX_bundle -.PHONY: release $(CONVERT_LIB_PATH) $(MOVE_LIB_INTO_BUNDLE) build_OSX_bundle +.PHONY: release build_OSX_bundle |