Browse Source

wscript: use lower-case win32 libraries names for crosscompiling from Linux

pull/2/head
Alibek Omarov 6 years ago
parent
commit
81e142936d
  1. 14
      engine/wscript
  2. 6
      game_launch/wscript
  3. 2
      mainui
  4. 1
      scripts/build_mingw_engine.sh
  5. 1
      scripts/build_osx_engine.sh

14
engine/wscript

@ -50,11 +50,11 @@ def configure(conf): @@ -50,11 +50,11 @@ def configure(conf):
conf.env.append_unique('DEFINES', 'SUPPORT_BSP2_FORMAT')
if conf.env.DEST_OS == 'win32':
conf.check( lib='USER32' )
conf.check( lib='SHELL32' )
conf.check( lib='GDI32' )
conf.check( lib='ADVAPI32' )
conf.check( lib='DBGHELP' )
conf.check( lib='user32' )
conf.check( lib='shell32' )
conf.check( lib='gdi32' )
conf.check( lib='advapi32' )
conf.check( lib='dbghelp' )
conf.env.append_unique('DEFINES', 'DBGHELP')
def get_subproject_name(ctx):
@ -77,7 +77,7 @@ def build(bld): @@ -77,7 +77,7 @@ def build(bld):
libs += [ 'DL', 'M', 'PTHREAD' ]
source += bld.path.ant_glob(['platform/posix/*.c'])
else:
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP']
libs += ['user32', 'shell32', 'gdi32', 'advapi32', 'dbghelp']
source += bld.path.ant_glob(['platform/win32/*.c'])
if bld.env.DEST_OS == 'linux':
@ -94,7 +94,7 @@ def build(bld): @@ -94,7 +94,7 @@ def build(bld):
else:
if(bld.env.DEST_OS == 'linux'):
libs.append('RT')
includes = ['common', 'server', 'client', 'client/vgui', '.', '../common', '../pm_shared' ]
if(bld.env.SINGLE_BINARY):

6
game_launch/wscript

@ -18,8 +18,8 @@ def configure(conf): @@ -18,8 +18,8 @@ def configure(conf):
# check for dedicated server build
if not conf.env.DEDICATED:
if conf.env.DEST_OS == 'win32':
conf.check(lib='USER32')
conf.check(lib='SHELL32')
conf.check(lib='user32')
conf.check(lib='shell32')
def get_subproject_name(ctx):
return os.path.basename(os.path.realpath(str(ctx.path)))
@ -40,7 +40,7 @@ def build(bld): @@ -40,7 +40,7 @@ def build(bld):
else:
# compile resource on Windows
bld.load('winres')
libs += ['USER32', 'SHELL32']
libs += ['user32', 'shell32']
source += ['game.rc']
bld(

2
mainui

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit bc99e055d5648aeb032f571943641edc8ced53dd
Subproject commit 177e49ca640a4a695df92106c211e5a47a838c8b

1
scripts/build_mingw_engine.sh

@ -7,6 +7,7 @@ export CC="ccache i686-w64-mingw32-gcc" @@ -7,6 +7,7 @@ export CC="ccache i686-w64-mingw32-gcc"
export CXX="ccache i686-w64-mingw32-g++"
export CFLAGS="-static-libgcc -no-pthread"
export CXXFLAGS="-static-libgcc -static-libstdc++"
export WINRC="i686-w64-mingw32-windres"
./waf configure -o build-mingw --sdl2=$TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32/ --no-vgui --build-type=debug # can't compile VGUI support on MinGW, due to differnet C++ ABI
./waf build -o build-mingw -j2
# cp SDL2/SDL2-2.0.7/i686-w64-mingw32/bin/SDL2.dll . # Install SDL2

1
scripts/build_osx_engine.sh

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
# Build engine
cd $TRAVIS_BUILD_DIR
mkdir -p osx-build && cd osx-build
export CFLAGS="-m32"
export CXXFLAGS="-m32"
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug

Loading…
Cancel
Save