mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-08 01:10:28 +00:00
(svn r21194) -Add: Configure option for compiling OpenTTD as a console application under MinGW.
This commit is contained in:
parent
6433ce5f6c
commit
c370f56bf3
30
config.lib
30
config.lib
@ -55,6 +55,7 @@ set_default() {
|
|||||||
enable_static="1"
|
enable_static="1"
|
||||||
enable_translator="0"
|
enable_translator="0"
|
||||||
enable_unicode="1"
|
enable_unicode="1"
|
||||||
|
enable_console="1";
|
||||||
enable_assert="1"
|
enable_assert="1"
|
||||||
enable_strip="0"
|
enable_strip="0"
|
||||||
enable_universal="1"
|
enable_universal="1"
|
||||||
@ -128,6 +129,7 @@ set_default() {
|
|||||||
enable_static
|
enable_static
|
||||||
enable_translator
|
enable_translator
|
||||||
enable_unicode
|
enable_unicode
|
||||||
|
enable_console
|
||||||
enable_assert
|
enable_assert
|
||||||
enable_strip
|
enable_strip
|
||||||
enable_universal
|
enable_universal
|
||||||
@ -305,6 +307,9 @@ detect_params() {
|
|||||||
--disable-unicode) enable_unicode="0";;
|
--disable-unicode) enable_unicode="0";;
|
||||||
--enable-unicode) enable_unicode="2";;
|
--enable-unicode) enable_unicode="2";;
|
||||||
--enable-unicode=*) enable_unicode="$optarg";;
|
--enable-unicode=*) enable_unicode="$optarg";;
|
||||||
|
--disable-console) enable_console="0";;
|
||||||
|
--enable-console) enable_console="2";;
|
||||||
|
--enable-console=*) enable_console="$optarg";;
|
||||||
|
|
||||||
--disable-cocoa-quartz) enable_cocoa_quartz="0";;
|
--disable-cocoa-quartz) enable_cocoa_quartz="0";;
|
||||||
--enable-cocoa-quartz) enable_cocoa_quartz="2";;
|
--enable-cocoa-quartz) enable_cocoa_quartz="2";;
|
||||||
@ -718,6 +723,20 @@ check_params() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
|
||||||
|
log 1 "checking console application... not Windows, skipping"
|
||||||
|
elif [ "$enable_console" = "1" ] && [ "$enable_dedicated" != "0" ]; then
|
||||||
|
log 1 "checking console application... dedicated server, enabled"
|
||||||
|
enable_console="2"
|
||||||
|
elif [ "$enable_console" = "1" ]; then
|
||||||
|
log 1 "checking console application... disabled (only used when forced)"
|
||||||
|
enable_console="0"
|
||||||
|
elif [ "$enable_console" = "0" ]; then
|
||||||
|
log 1 "checking console application... disabled"
|
||||||
|
else
|
||||||
|
log 1 "checking console application... enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then
|
if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then
|
||||||
log 1 "checking network... DOS, skipping"
|
log 1 "checking network... DOS, skipping"
|
||||||
enable_network=0
|
enable_network=0
|
||||||
@ -1334,7 +1353,13 @@ make_cflags_and_ldflags() {
|
|||||||
fi
|
fi
|
||||||
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
|
||||||
flags="$flags -mno-cygwin"
|
flags="$flags -mno-cygwin"
|
||||||
LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,windows"
|
|
||||||
|
if [ "$enable_console" != "0" ]; then
|
||||||
|
LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,console"
|
||||||
|
else
|
||||||
|
LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,windows"
|
||||||
|
fi
|
||||||
|
|
||||||
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
|
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
|
||||||
|
|
||||||
if [ $cc_version -ge 44 ]; then
|
if [ $cc_version -ge 44 ]; then
|
||||||
@ -3298,6 +3323,9 @@ showhelp() {
|
|||||||
echo " --disable-cocoa-quickdraw disable the quickdraw 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 " --disable-unicode disable unicode support to build win9x"
|
||||||
echo " version (Win32 ONLY)"
|
echo " version (Win32 ONLY)"
|
||||||
|
echo " --enable-console compile as a console application instead of as a GUI application."
|
||||||
|
echo " If this setting is active, debug output will appear in the same"
|
||||||
|
echo " console instead of opening a new window. (Win32 ONLY)"
|
||||||
echo " --disable-network disable network support"
|
echo " --disable-network disable network support"
|
||||||
echo " --disable-assert disable asserts (continue on errors)"
|
echo " --disable-assert disable asserts (continue on errors)"
|
||||||
echo " --enable-strip enable any possible stripping"
|
echo " --enable-strip enable any possible stripping"
|
||||||
|
Loading…
Reference in New Issue
Block a user