191 |
193 |
192 --personal-dir) prevp_p="personal-dir";; |
194 --personal-dir) prevp_p="personal-dir";; |
193 --personal-dir=*) personal_dir="$optarg";; |
195 --personal-dir=*) personal_dir="$optarg";; |
194 --without-personal-dir) personal_dir="";; |
196 --without-personal-dir) personal_dir="";; |
195 |
197 |
|
198 --shared-dir) prevp_p="shared-dir";; |
|
199 --shared-dir=*) shared_dir="$optarg";; |
|
200 --without-shared-dir) shared_dir="";; |
|
201 |
196 --install-dir) prevp_p="install-dir";; |
202 --install-dir) prevp_p="install-dir";; |
197 --install-dir=*) install_dir="$optarg";; |
203 --install-dir=*) install_dir="$optarg";; |
198 |
204 |
199 |
205 |
200 |
206 |
812 else |
818 else |
813 personal_dir=".openttd" |
819 personal_dir=".openttd" |
814 fi |
820 fi |
815 fi |
821 fi |
816 |
822 |
|
823 if [ "$shared_dir" = "1" ]; then |
|
824 # we are using default values |
|
825 if [ "$os" = "OSX" ]; then |
|
826 shared_dir='/Library/Application\\ Support/OpenTTD' |
|
827 else |
|
828 shared_dir="" |
|
829 fi |
|
830 fi |
|
831 |
817 if [ -n "$personal_dir" ] |
832 if [ -n "$personal_dir" ] |
818 then |
833 then |
819 log 1 "personal home directory... $personal_dir" |
834 log 1 "personal home directory... $personal_dir" |
820 else |
835 else |
821 log 1 "personal home directory... none" |
836 log 1 "personal home directory... none" |
|
837 fi |
|
838 |
|
839 if [ -n "$shared_dir" ] |
|
840 then |
|
841 log 1 "shared data directory... $shared_dir" |
|
842 else |
|
843 log 1 "shared data directory... none" |
822 fi |
844 fi |
823 |
845 |
824 if [ -n "$install_dir" ] |
846 if [ -n "$install_dir" ] |
825 then |
847 then |
826 log 1 "installation directory... $install_dir" |
848 log 1 "installation directory... $install_dir" |
1177 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
1199 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$with_osx_sysroot.sdk" |
1178 fi |
1200 fi |
1179 |
1201 |
1180 if [ -n "$personal_dir" ]; then |
1202 if [ -n "$personal_dir" ]; then |
1181 CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" |
1203 CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" |
|
1204 fi |
|
1205 |
|
1206 if [ -n "$shared_dir" ]; then |
|
1207 CFLAGS="$CFLAGS -DWITH_SHARED_DIR -DSHARED_DIR=\\\\\"$shared_dir\\\\\"" |
1182 fi |
1208 fi |
1183 |
1209 |
1184 CFLAGS="$CFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" |
1210 CFLAGS="$CFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" |
1185 |
1211 |
1186 log 1 "using CFLAGS... $CFLAGS $CC_CFLAGS" |
1212 log 1 "using CFLAGS... $CFLAGS $CC_CFLAGS" |
2149 s#!!TTD!!#$TTD#g; |
2175 s#!!TTD!!#$TTD#g; |
2150 s#!!BINARY_DIR!!#$prefix_dir/$binary_dir#g; |
2176 s#!!BINARY_DIR!!#$prefix_dir/$binary_dir#g; |
2151 s#!!DATA_DIR!!#$prefix_dir/$data_dir#g; |
2177 s#!!DATA_DIR!!#$prefix_dir/$data_dir#g; |
2152 s#!!ICON_DIR!!#$prefix_dir/$icon_dir#g; |
2178 s#!!ICON_DIR!!#$prefix_dir/$icon_dir#g; |
2153 s#!!PERSONAL_DIR!!#$personal_dir#g; |
2179 s#!!PERSONAL_DIR!!#$personal_dir#g; |
|
2180 s#!!SHARED_DIR!!#$shared_dir#g; |
2154 s#!!INSTALL_DIR!!#$install_dir#g; |
2181 s#!!INSTALL_DIR!!#$install_dir#g; |
2155 s#!!STRGEN!!#$STRGEN#g; |
2182 s#!!STRGEN!!#$STRGEN#g; |
2156 s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g; |
2183 s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g; |
2157 s#!!ENDIAN_FORCE!!#$endian#g; |
2184 s#!!ENDIAN_FORCE!!#$endian#g; |
2158 s#!!STAGE!!#$STAGE#g; |
2185 s#!!STAGE!!#$STAGE#g; |
2289 echo " --data-dir=dir location of data files (lang, data, gm)." |
2316 echo " --data-dir=dir location of data files (lang, data, gm)." |
2290 echo " Will be prefixed with the prefix-dir" |
2317 echo " Will be prefixed with the prefix-dir" |
2291 echo " [share/games/openttd]" |
2318 echo " [share/games/openttd]" |
2292 echo " --icon-dir=dir location of icons. Will be prefixed" |
2319 echo " --icon-dir=dir location of icons. Will be prefixed" |
2293 echo " with the prefix-dir [share/pixmaps]" |
2320 echo " with the prefix-dir [share/pixmaps]" |
2294 echo " --personal-dir=dir location of the personal directory [.openttd]" |
2321 echo " --personal-dir=dir location of the personal directory" |
|
2322 echo " [os-dependent default]" |
|
2323 echo " --shared-dir=dir location of shared data files" |
|
2324 echo " [os-dependent default]" |
2295 echo " --install-dir=dir specifies the root to install to." |
2325 echo " --install-dir=dir specifies the root to install to." |
2296 echo " Useful to install into jails [/]" |
2326 echo " Useful to install into jails [/]" |
2297 echo "" |
2327 echo "" |
2298 echo "Features and packages:" |
2328 echo "Features and packages:" |
2299 echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)" |
2329 echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)" |