Changeset - r9680:2c69c1ec1eeb
[Not reviewed]
master
0 2 1
skidd13 - 16 years ago 2008-07-22 17:18:53
skidd13@openttd.org
(svn r13785) -Add: support for freedesktop.org desktop entry files
3 files changed with 80 insertions and 2 deletions:
0 comments (0 inline, 0 general)
Makefile.in
Show inline comments
 
# Auto-generated file -- DO NOT EDIT
 

	
 
# Check if we want to show what we are doing
 
ifdef VERBOSE
 
	Q =
 
else
 
	Q = @
 
endif
 

	
 
include Makefile.am
 

	
 
SOURCE_LIST = !!SOURCE_LIST!!
 
CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
 
CONFIGURE_FILES = !!CONFIGURE_FILES!!
 
LIPO = !!LIPO!!
 
BIN_DIR = !!BIN_DIR!!
 
MENU_DIR = !!MENU_DIR!!
 
SRC_DIR = !!SRC_DIR!!
 
ROOT_DIR = !!ROOT_DIR!!
 
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
 
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
 
INSTALL_DIR = !!INSTALL_DIR!!
 
INSTALL_BINARY_DIR = "$(INSTALL_DIR)/"!!BINARY_DIR!!
 
INSTALL_MENU_DIR = "$(INSTALL_DIR)/$(MENU_DIR)"
 
INSTALL_ICON_DIR = "$(INSTALL_DIR)/"!!ICON_DIR!!
 
INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
 
TTD = !!TTD!!
 
TTDS = $(SRC_DIRS:%=%/$(TTD))
 
OS = !!OS!!
 
OSXAPP = !!OSXAPP!!
 
REVISION = !!REVISION!!
 
AWK = !!AWK!!
 
DISTCC = !!DISTCC!!
 

	
 
RES := $(shell if ! [ -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST)`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
 

	
 
all: config.cache
 
ifdef DISTCC
 
	@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
 
endif
 
	@for dir in $(DIRS); do \
 
		$(MAKE) -C $$dir all; \
 
	done
 
ifdef LIPO
 
# Lipo is an OSX thing. If it is defined, it means we are building for universal,
 
# and so we have have to combine the binaries into one big binary
 

	
 
# Remove the last binary made by the last compiled target
 
@@ -86,48 +88,49 @@ else
 
	@echo "----------------"
 
	@echo "Have not found a configuration, please run configure first."
 
	@echo "----------------"
 
	@exit 1
 
endif
 

	
 
clean:
 
	@for dir in $(DIRS); do \
 
		$(MAKE) -C $$dir clean; \
 
	done
 
	$(Q)rm -rf $(BUNDLE_TARGET)
 

	
 
lang:
 
	@for dir in $(LANG_DIRS); do \
 
		$(MAKE) -C $$dir all; \
 
	done
 

	
 
mrproper:
 
	@for dir in $(DIRS); do \
 
		$(MAKE) -C $$dir mrproper; \
 
		rm -f $$dir/Makefile; \
 
	done
 
	$(Q)rm -rf objs
 
	$(Q)rm -f Makefile Makefile.am
 
	$(Q)rm -f media/openttd.desktop
 
	$(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.log
 
	$(Q)rm -rf $(BUNDLE_DIR)
 
	$(Q)rm -rf $(BUNDLES_DIR)
 

	
 
depend:
 
	@for dir in $(SRC_DIRS); do \
 
		$(MAKE) -C $$dir depend; \
 
	done
 

	
 
run: all
 
	$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS)
 

	
 
run-gdb: all
 
	$(Q)cd !!BIN_DIR!! && gdb --ex run --args ./!!TTD!! $(OPENTTD_ARGS)
 

	
 
run-prof: all
 
	$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS) && gprof !!TTD!! | less
 

	
 
%.o:
 
	@for dir in $(SRC_DIRS); do \
 
		$(MAKE) -C $$dir $(@:src/%=%); \
 
	done
 

	
 
%.lng:
 
@@ -182,48 +185,51 @@ bundle: all
 
	$(Q)mkdir -p "$(TTD_DIR)"
 
	$(Q)mkdir -p "$(DATA_DIR)"
 
	$(Q)mkdir -p "$(LANG_DIR)"
 
ifdef OSXAPP
 
	$(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources"
 
	$(Q)echo "APPL????" >                                          "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo"
 
	$(Q)cp    "$(ROOT_DIR)/os/macosx/openttd.icns"                 "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns"
 
	$(Q)$(ROOT_DIR)/os/macosx/plistgen.sh                          "${BUNDLE_DIR}/$(OSXAPP)" "$(REV)"
 
	$(Q)cp    "$(ROOT_DIR)/docs/OSX_install_instructions.txt"      "$(BUNDLE_DIR)/docs/"
 
	$(Q)cp    "$(ROOT_DIR)/os/macosx/splash.png"                   "$(DATA_DIR)"
 
endif
 
	$(Q)cp "$(BIN_DIR)/$(TTD)"                "$(TTD_DIR)/"
 
	$(Q)cp "$(BIN_DIR)/data/"*.grf            "$(DATA_DIR)/"
 
	$(Q)cp "$(BIN_DIR)/data/opntitle.dat"     "$(DATA_DIR)/"
 
	$(Q)cp "$(BIN_DIR)/lang/"*.lng            "$(LANG_DIR)/"
 
	$(Q)cp "$(ROOT_DIR)/readme.txt"           "$(BUNDLE_DIR)/"
 
	$(Q)cp "$(ROOT_DIR)/COPYING"              "$(BUNDLE_DIR)/"
 
	$(Q)cp "$(ROOT_DIR)/known-bugs.txt"       "$(BUNDLE_DIR)/docs/"
 
	$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
 
	$(Q)cp "$(ROOT_DIR)/docs/32bpp.txt"       "$(BUNDLE_DIR)/docs/"
 
	$(Q)cp "$(ROOT_DIR)/changelog.txt"        "$(BUNDLE_DIR)/docs/"
 
	$(Q)cp "$(ROOT_DIR)/media/openttd.64.png" "$(BUNDLE_DIR)/media/"
 
	$(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/"
 
	$(Q)cp "$(ROOT_DIR)/media/openttd.32.bmp" "$(BUNDLE_DIR)/media/"
 
ifdef MENU_DIR
 
	$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
 
endif
 
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/\"*.scn 2> /dev/null`"; then echo 1; fi), 1)
 
	$(Q)cp "$(BIN_DIR)/scenario/"*.scn        "$(BUNDLE_DIR)/scenario/"
 
endif
 
ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/heightmaps/\"* 2>/dev/null`"; then echo 1; fi), 1)
 
	$(Q)cp "$(BIN_DIR)/scenario/heightmaps/"* "$(BUNDLE_DIR)/scenario/heightmap/"
 
endif
 
ifeq ($(TTD), openttd.exe)
 
	$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING"
 
endif
 

	
 
### Packing the current bundle into several compressed file formats ###
 
#
 
# Zips & dmgs do not contain a root folder, i.e. they have files in the root of the zip/dmg.
 
# gzip, bzip2 and lha archives have a root folder, with the same name as the bundle.
 
#
 
# One can supply a custom name by adding BUNDLE_NAME:=<name> to the make command.
 
#
 
bundle_zip: bundle
 
	@echo '[BUNDLE] Creating $(BUNDLE_NAME).zip'
 
	$(Q)mkdir -p "$(BUNDLES_DIR)"
 
	$(Q)cd "$(BUNDLE_DIR)" && zip -r $(shell if test -z "$(VERBOSE)"; then echo '-q'; fi) "$(BUNDLES_DIR)/$(BUNDLE_NAME).zip" .
 

	
 
bundle_gzip: bundle
 
	@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.gz'
 
@@ -248,27 +254,33 @@ bundle_lha: bundle
 

	
 
bundle_dmg: bundle
 
	@echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg'
 
	$(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(REV)"
 
	$(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(REV)"
 
	$(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg"
 
	$(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)"
 

	
 
ifdef OSXAPP
 
install:
 
	@echo '[INSTALL] Cannot install the OSX Application Bundle'
 
else
 
install: bundle
 
	@echo '[INSTALL] Installing OpenTTD'
 
	$(Q)install -d "$(INSTALL_BINARY_DIR)"
 
	$(Q)install -d "$(INSTALL_ICON_DIR)"
 
	$(Q)install -d "$(INSTALL_DATA_DIR)/gm"
 
	$(Q)install -d "$(INSTALL_DATA_DIR)/data"
 
	$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
 
	$(Q)install -d "$(INSTALL_DATA_DIR)/docs"
 
	$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DATA_DIR)/docs"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/media/"* "$(INSTALL_ICON_DIR)"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_DIR)"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.bmp" "$(INSTALL_ICON_DIR)"
 
ifdef MENU_DIR
 
	$(Q)install -d "$(INSTALL_MENU_DIR)"
 
	$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)"
 
endif
 
	$(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
 
endif # OSXAPP
config.lib
Show inline comments
 
@@ -8,124 +8,130 @@ set_default() {
 
	released_version=""
 

	
 
	ignore_extra_parameters="0"
 
	# We set all kinds of defaults for params. Later on the user can override
 
	# most of them; but if they don't, this default is used.
 
	build=""
 
	host=""
 
	cc_build=""
 
	cc_host=""
 
	cxx_build=""
 
	cxx_host=""
 
	windres=""
 
	strip=""
 
	lipo=""
 
	awk="awk"
 
	os="DETECT"
 
	endian="AUTO"
 
	cpu_type="DETECT"
 
	revision=""
 
	config_log="config.log"
 
	prefix_dir="/usr/local"
 
	binary_dir="games"
 
	data_dir="share/games/openttd"
 
	icon_dir="share/pixmaps"
 
	menu_dir="share/applications"
 
	personal_dir="1"
 
	shared_dir="1"
 
	install_dir="/"
 
	menu_group="Game;"
 
	enable_debug="0"
 
	enable_desync_debug="0"
 
	enable_profiling="0"
 
	enable_dedicated="0"
 
	enable_network="1"
 
	enable_static="1"
 
	enable_translator="0"
 
	enable_unicode="1"
 
	enable_assert="1"
 
	enable_strip="0"
 
	enable_universal="1"
 
	enable_osx_g5="0"
 
	enable_cocoa_quartz="1"
 
	enable_cocoa_quickdraw="1"
 
	with_osx_sysroot="1"
 
	with_application_bundle="1"
 
	with_menu_entry="1"
 
	with_sdl="1"
 
	with_cocoa="1"
 
	with_zlib="1"
 
	with_png="1"
 
	with_makedepend="1"
 
	with_direct_music="1"
 
	with_sort="1"
 
	with_iconv="1"
 
	with_midi=""
 
	with_midi_arg=""
 
	with_libtimidity="1"
 
	with_freetype="1"
 
	with_fontconfig="1"
 
	with_psp_config="1"
 
	with_threads="1"
 
	with_distcc="1"
 
	with_ccache="1"
 

	
 
	save_params_array="
 
		build
 
		host
 
		cc_build
 
		cc_host
 
		cxx_build
 
		cxx_host
 
		windres
 
		strip
 
		lipo
 
		awk
 
		os
 
		endian
 
		cpu_type
 
		revision
 
		config_log
 
		prefix_dir
 
		binary_dir
 
		data_dir
 
		icon_dir
 
		menu_dir
 
		personal_dir
 
		shared_dir
 
		install_dir
 
		menu_group
 
		enable_debug
 
		enable_desync_debug
 
		enable_profiling
 
		enable_dedicated
 
		enable_network
 
		enable_static
 
		enable_translator
 
		enable_unicode
 
		enable_assert
 
		enable_strip
 
		enable_universal
 
		enable_osx_g5
 
		enable_cocoa_quartz
 
		enable_cocoa_quickdraw
 
		with_osx_sysroot
 
		with_application_bundle
 
		with_menu_entry
 
		with_sdl
 
		with_cocoa
 
		with_zlib
 
		with_png
 
		with_makedepend
 
		with_direct_music
 
		with_sort
 
		with_iconv
 
		with_midi
 
		with_midi_arg
 
		with_libtimidity
 
		with_freetype
 
		with_fontconfig
 
		with_psp_config
 
		with_threads
 
		with_distcc
 
		with_ccache
 
	CC CXX CFLAGS LDFLAGS"
 
}
 

	
 
detect_params() {
 
	# Walk over all params from the user and override any default settings if
 
	#  needed. This also handles any invalid option.
 
	for p in "$@"; do
 
@@ -170,61 +176,72 @@ detect_params() {
 
			--awk)                        prevp_p="awk";;
 
			--awk=*)                      awk="$optarg";;
 
			--strip)                      prevp_p="strip";;
 
			--strip=*)                    strip="$optarg";;
 
			--lipo)                       prevp_p="lipo";;
 
			--lipo=*)                     lipo="$optarg";;
 

	
 
			--endian)                     prev_p="endian";;
 
			--endian=*)                   endian="$optarg";;
 

	
 

	
 

	
 
			--prefix-dir)                 prevp_p="prefix-dir";;
 
			--prefix-dir=*)               prefix_dir="$optarg";;
 

	
 
			--binary-dir)                 prevp_p="binary-dir";;
 
			--binary-dir=*)               binary_dir="$optarg";;
 

	
 
			--data-dir)                   prevp_p="data-dir";;
 
			--data-dir=*)                 data_dir="$optarg";;
 

	
 
			--icon-dir)                   prevp_p="icon-dir";;
 
			--icon-dir=*)                 icon_dir="$optarg";;
 

	
 
			--menu-dir)                   prevp_p="menu_dir";;
 
			--menu-dir=*)                 menu_dir="$optarg";;
 

	
 
			--personal-dir)               prevp_p="personal-dir";;
 
			--personal-dir=*)             personal_dir="$optarg";;
 
			--without-personal-dir)       personal_dir="";;
 

	
 
			--shared-dir)                 prevp_p="shared-dir";;
 
			--shared-dir=*)               shared_dir="$optarg";;
 
			--without-shared-dir)         shared_dir="";;
 

	
 
			--install-dir)                prevp_p="install-dir";;
 
			--install-dir=*)              install_dir="$optarg";;
 

	
 

	
 

	
 
			--with-menu-entry)            with_menu_entry="1";;
 
			--without-menu-entry)         with_menu_entry="0";;
 

	
 
			--menu_group)                 prevp_p="menu_group";;
 
			--menu_group=*)               menu_group="$optarg";;
 

	
 

	
 

	
 
			--enable-debug)               enable_debug="1";;
 
			--enable-debug=*)             enable_debug="$optarg";;
 
			--enable-desync-debug)        enable_desync_debug="1";;
 
			--enable-desync-debug=*)      enable_desync_debug="$optarg";;
 
			--enable-profiling)           enable_profiling="1";;
 
			--enable-profiling=*)         enable_profiling="$optarg";;
 
			--enable-dedicated)           enable_dedicated="1";;
 
			--enable-dedicated=*)         enable_dedicated="$optarg";;
 
			--enable-network=*)           enable_network="$optarg";;
 
			--disable-network)            enable_network="0";;
 
			--disable-static)             enable_static="0";;
 
			--enable-static)              enable_static="2";;
 
			--enable-static=*)            enable_static="$optarg";;
 
			--disable-translator)         enable_translator="0";;
 
			--enable-translator)          enable_translator="2";;
 
			--enable-translator=*)        enable_translator="$optarg";;
 
			--disable-assert)             enable_assert="0";;
 
			--enable-assert)              enable_assert="2";;
 
			--enable-assert=*)            enable_assert="$optarg";;
 
			--disable-strip)              enable_strip="0";;
 
			--enable-strip)               enable_strip="2";;
 
			--enable-strip=*)             enable_strip="$optarg";;
 
			--disable-universal)          enable_universal="0";;
 
			--enable-universal)           enable_universal="2";;
 
@@ -716,49 +733,49 @@ check_params() {
 
			with_application_bundle="0"
 

	
 
			log 1 "checking OSX application bundle... not OSX, skipping"
 
		else
 
			log 1 "configure: error: --with-application-bundle only works if OSX is the target"
 
			exit 1
 
		fi
 
	fi
 

	
 
	if [ "$os" = "OSX" ] && [ "$with_application_bundle" = "1" ]; then
 
		OSXAPP="OpenTTD.app"
 
	else
 
		OSXAPP=""
 
	fi
 

	
 
	if [ "$os" = "OSX" ]; then
 
		# Test on G5
 

	
 
		if [ "$enable_osx_g5" != "0" ]; then
 
			log 1 "detecting G5... yes (forced)"
 
		else
 
			# First, are we a real OSX system, else we can't detect it
 
			native=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | grep darwin`
 
			# If $host doesn't match $build , we are cross-compiling
 
			if [ -n "$native" ] && [ "$build" == "$host" ]; then
 
			if [ -n "$native" ] && [ "$build" = "$host" ]; then
 
				$cxx_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
 
				res=`./G5_detector`
 
				rm -f G5_detector
 
				if [ -n "$res" ]; then
 
					# This is G5, add flags for it
 
					enable_osx_g5="2"
 

	
 
					log 1 "detecting G5... yes"
 
				else
 
					enable_osx_g5="0"
 

	
 
					log 1 "detecting G5... no"
 
				fi
 
			else
 
				enable_osx_g5="0"
 

	
 
				log 1 "detecting G5... no (cross-compiling)"
 
			fi
 
		fi
 
	else
 
		if [ "$enable_osx_g5" != "0" ]; then
 
			log 1 "configure: error: OSX G5 selected, but not compiling for OSX"
 
			log 1 "configure: error: either select OSX as OS, or deselect OSX G5"
 

	
 
@@ -828,48 +845,55 @@ check_params() {
 
			shared_dir=""
 
		fi
 
	fi
 

	
 
	if [ -n "$personal_dir" ]
 
	then
 
		log 1 "personal home directory... $personal_dir"
 
	else
 
		log 1 "personal home directory... none"
 
	fi
 

	
 
	if [ -n "$shared_dir" ]
 
	then
 
		log 1 "shared data directory... $shared_dir"
 
	else
 
		log 1 "shared data directory... none"
 
	fi
 

	
 
	if [ -n "$install_dir" ]
 
	then
 
		log 1 "installation directory... $install_dir"
 
	else
 
		log 1 "installation directory... none"
 
	fi
 

	
 
	if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ] || [ "$os" = "OS2" ] || [ "$os" = "WINCE" ] || [ "$os" = "PSP" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ]; then
 
		# Don't create a .desktop file
 
		with_menu_entry="0"
 
		menu_dir=""
 
		menu_group=""
 
	fi
 
}
 

	
 
make_cflags_and_ldflags() {
 
	# General CFlags for BUILD
 
	CFLAGS_BUILD=""
 
	# General CFlags for HOST
 
	CFLAGS="$CFLAGS -D$os"
 
	# CFlags for HOST and C-Compiler
 
	CC_FLAGS=""
 
	# Libs to compile. In fact this is just LDFLAGS
 
	LIBS="-lstdc++"
 
	# LDFLAGS used for HOST
 
	LDFLAGS="$LDFLAGS"
 

	
 
	if [ $enable_debug = 0 ]; then
 
		# No debug, add default stuff
 
		OBJS_SUBDIR="release"
 
		if [ "$os" = "OSX" ]; then
 
			# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
 
			CFLAGS="-O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic $CFLAGS"
 
		else
 
			if [ "$os" = "MORPHOS" ]; then
 
				CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
 
				LDFLAGS="$LDFLAGS -noixemul"
 
@@ -2206,64 +2230,87 @@ make_sed() {
 
		s#!!ENDIAN_FORCE!!#$endian#g;
 
		s#!!STAGE!!#$STAGE#g;
 
		s#!!MAKEDEPEND!!#$makedepend#g;
 
		s#!!CFLAGS_MAKEDEP!!#$cflags_makedep#g;
 
		s#!!SORT!!#$sort#g;
 
		s#!!CONFIG_CACHE_COMPILER!!#config.cache.compiler#g;
 
		s#!!CONFIG_CACHE_LINKER!!#config.cache.linker#g;
 
		s#!!CONFIG_CACHE_ENDIAN!!#config.cache.endian#g;
 
		s#!!CONFIG_CACHE_SOURCE!!#config.cache.source#g;
 
		s#!!CONFIG_CACHE_VERSION!!#config.cache.version#g;
 
		s#!!CONFIG_CACHE_SOURCE_LIST!!#config.cache.source.list#g;
 
		s#!!LANG_SUPPRESS!!#$lang_suppress#g;
 
		s#!!OBJS_C!!#$OBJS_C#g;
 
		s#!!OBJS_CPP!!#$OBJS_CPP#g;
 
		s#!!OBJS_MM!!#$OBJS_MM#g;
 
		s#!!OBJS_RC!!#$OBJS_RC#g;
 
		s#!!SRCS!!#$SRCS#g;
 
		s#!!OS!!#$os#g;
 
		s#!!CONFIGURE_FILES!!#$CONFIGURE_FILES#g;
 
		s#!!REVISION!!#$revision#g;
 
		s#!!AWK!!#$awk#g;
 
		s#!!GCC295!!#$gcc295#g;
 
		s#!!DISTCC!!#$distcc#g;
 
	"
 

	
 
	if [ "$with_menu_entry" = "1" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MENU_DIR!!#$prefix_dir/$menu_dir#g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MENU_DIR!!##g;
 
		"
 
	fi
 
}
 

	
 
generate_menu_item() {
 
	MENU_REPLACE="
 
		s#!!TTD!!#$TTD#g;
 
		s#!!MENU_GROUP!!#$menu_group#g
 
	"
 
	echo "Generating menu item..."
 
	< $ROOT_DIR/media/openttd.desktop.in sed "$MENU_REPLACE" > media/openttd.desktop
 
}
 

	
 
generate_main() {
 
	STAGE="[MAIN]"
 

	
 
	make_sed
 

	
 
	# Create the main Makefile
 
	echo "Generating Makefile..."
 
	< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" > Makefile
 
	echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am
 
	echo >> Makefile.am
 
	# Make the copy of the source-list, so we don't trigger an unwanted recompile
 
	cp $SOURCE_LIST config.cache.source.list
 
	# Make sure config.cache is OLDER then config.cache.source.list
 
	touch config.cache
 

	
 
	if [ "$with_menu_entry" = "1" ]; then
 
		generate_menu_item
 
	fi
 
}
 

	
 
generate_lang() {
 
	STAGE="[LANG]"
 

	
 
	make_sed
 

	
 
	# Create the language file
 
	mkdir -p $LANG_OBJS_DIR
 

	
 
	echo "Generating lang/Makefile..."
 
	< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
 
	echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am
 
	echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am
 
}
 

	
 
generate_src_normal() {
 
	STAGE=$1
 

	
 
	make_sed
 

	
 
	# Create the source file
 
	mkdir -p $SRC_OBJS_DIR
 

	
 
@@ -2320,76 +2367,82 @@ showhelp() {
 
	echo "  --host=HOST                    cross-compile to build programs to run"
 
	echo "                                 on HOST [BUILD]"
 
	echo "  --windres=WINDRES              the windres to use [HOST-windres]"
 
	echo "  --strip=STRIP                  the strip to use [HOST-strip]"
 
	echo "  --awk=AWK                      the awk to use in configure [awk]"
 
	echo "  --lipo=LIPO                    the lipo to use (OSX ONLY) [HOST-lipo]"
 
	echo "  --os=OS                        the OS we are compiling for [DETECT]"
 
	echo "                                 DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
 
	echo "                                 MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
 
	echo "                                 WINCE/PSP"
 
	echo "  --endian=ENDIAN                set the endian of the HOST (AUTO/LE/BE)"
 
	echo "  --revision=rXXXX               overwrite the revision detection."
 
	echo "                                 Use with care!"
 
	echo ""
 
	echo "Paths:"
 
	echo "  --prefix-dir=dir               specifies the prefix for all installed"
 
	echo "                                 files [/usr/local]"
 
	echo "  --binary-dir=dir               location of the binary. Will be prefixed"
 
	echo "                                 with the prefix-dir [games]"
 
	echo "  --data-dir=dir                 location of data files (lang, data, gm)."
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [share/games/openttd]"
 
	echo "  --icon-dir=dir                 location of icons. Will be prefixed"
 
	echo "                                 with the prefix-dir [share/pixmaps]"
 
	echo "  --menu-dir=dir                 location of the menu item. (UNIX only, except OSX)"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [share/applications]"
 
	echo "  --personal-dir=dir             location of the personal directory"
 
	echo "                                 [os-dependent default]"
 
	echo "  --shared-dir=dir               location of shared data files"
 
	echo "                                 [os-dependent default]"
 
	echo "  --install-dir=dir              specifies the root to install to."
 
	echo "                                 Useful to install into jails [/]"
 
	echo ""
 
	echo "Features and packages:"
 
	echo "  --enable-debug[=LVL]           enable debug-mode (LVL=[0123], 0 is release)"
 
	echo "  --enable_desync_debug=[LVL]    enable desync debug options (LVL=[012], 0 is none"
 
	echo "  --enable-profiling             enables profiling"
 
	echo "  --enable-dedicated             compile a dedicated server (without video)"
 
	echo "  --enable-static                enable static compile (doesn't work for"
 
	echo "                                 all HOSTs)"
 
	echo "  --enable-translator            enable extra output for translators"
 
	echo "  --enable-universal             enable universal builds (OSX ONLY)"
 
	echo "  --enable-osx-g5                enables optimalizations for G5 (OSX ONLY)"
 
	echo "  --disable-cocoa-quartz         disable the quartz window mode driver for Cocoa (OSX ONLY)"
 
	echo "  --disable-cocoa-quickdraw      disable the quickdraw window mode driver for Cocoa (OSX ONLY)"
 
	echo "  --disable-unicode              disable unicode support to build win9x"
 
	echo "                                 version (Win32 ONLY)"
 
	echo "  --disable-network              disable network support"
 
	echo "  --disable-assert               disable asserts (continue on errors)"
 
	echo "  --enable-strip                 enable any possible stripping"
 
	echo "  --without-osx-sysroot          disable the automatic adding of sysroot "
 
	echo "                                 (OSX ONLY)"
 
	echo "  --without-application-bundle   disable generation of application bundle"
 
	echo "                                 (OSX ONLY)"
 
	echo "  --with-menu-entry              Generate a menu item on for UNIX desktops (Except OSX)"
 
	echo "  --without-menu-entry           Don't generate a menu item"
 
	echo "  --menu_group=group             Category in which the menu item will be placed (UNIX only, except OSX)"
 
	echo "  --with-direct-music            enable direct music support (Win32 ONLY)"
 
	echo "  --with-sort=sort               define a non-default location for sort"
 
	echo "  --with-midi=midi               define which midi-player to use"
 
	echo "  --with-midi-arg=arg            define which args to use for the"
 
	echo "                                 midi-player"
 
	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
 
	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
 
	echo "  --with-zlib[=zlib.a]           enables zlib support"
 
	echo "  --with-png[=libpng-config]     enables libpng support"
 
	echo "  --with-freetype[=freetype-config]"
 
	echo "                                 enables libfreetype support"
 
	echo "  --with-fontconfig[=pkg-config fontconfig]"
 
	echo "                                 enables fontconfig support"
 
	echo "  --with-iconv[=iconv-path]      enables iconv support"
 
	echo "  --with-psp-config[=psp-config] enables psp-config support (PSP ONLY)"
 
	echo "  --with-makedepend[=makedepend] enables makedepend support"
 
	echo ""
 
	echo "Some influential environment variables:"
 
	echo "  CC                             C compiler command"
 
	echo "  CXX                            C++ compiler command"
 
	echo "  CFLAGS                         C compiler flags"
 
	echo "  WINDRES                        windres command"
 
	echo "  LDFLAGS                        linker flags, e.g. -L<lib dir> if you"
 
	echo "                                 have libraries in a nonstandard"
media/openttd.desktop.in
Show inline comments
 
new file 100644
 
# $Id$
 
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html
 
[Desktop Entry]
 
Encoding=UTF-8
 
Type=Application
 
Version=1.1
 
Name=OpenTTD
 
GenericName=A clone of Transport Tycoon Deluxe
 
Comment=A business simulation game
 
Icon=openttd
 
Exec=!!TTD!!
 
Terminal=false
 
Categories=!!MENU_GROUP!!
0 comments (0 inline, 0 general)