wscript: try to fix windres searching for game_launch, fix osx 32 bit compiling

This commit is contained in:
Alibek Omarov 2018-11-19 01:19:24 +03:00
parent 81e142936d
commit 776d1cb52c
8 changed files with 25 additions and 18 deletions

View File

@ -27,10 +27,11 @@ git:
submodules: true
jdk:
- oraclejdk8
os:
- linux
- osx
# - windows
matrix:
include:
- os: linux
dist: xenial
- os: osx
before_script:
- sh scripts/travis_common_deps.sh
- sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh

View File

@ -55,6 +55,7 @@ def configure(conf):
conf.check( lib='gdi32' )
conf.check( lib='advapi32' )
conf.check( lib='dbghelp' )
conf.check( lib='psapi' )
conf.env.append_unique('DEFINES', 'DBGHELP')
def get_subproject_name(ctx):
@ -74,10 +75,10 @@ def build(bld):
# basic build: dedicated only, no dependencies
if bld.env.DEST_OS != 'win32':
libs += [ 'DL', 'M', 'PTHREAD' ]
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', 'PSAPI']
source += bld.path.ant_glob(['platform/win32/*.c'])
if bld.env.DEST_OS == 'linux':

View File

@ -18,6 +18,7 @@ def configure(conf):
# check for dedicated server build
if not conf.env.DEDICATED:
if conf.env.DEST_OS == 'win32':
conf.load('winres')
conf.check(lib='user32')
conf.check(lib='shell32')
@ -34,13 +35,11 @@ def build(bld):
source = ['game.cpp']
includes = '. ../common'
libs = []
if bld.env.DEST_OS != 'win32':
libs += [ 'DL' ]
else:
# compile resource on Windows
bld.load('winres')
libs += ['user32', 'shell32']
libs += ['USER32', 'SHELL32']
source += ['game.rc']
bld(

2
mainui

@ -1 +1 @@
Subproject commit 177e49ca640a4a695df92106c211e5a47a838c8b
Subproject commit 792072b73e3b2d9d6e0da1b9521959663973c98c

View File

@ -3,6 +3,8 @@
# Build engine
cd $TRAVIS_BUILD_DIR
export CC="/usr/bin/clang"
export CXX="/usr/bin/clang++"
export CFLAGS="-m32"
export CXXFLAGS="-m32"
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug

View File

@ -1,4 +1,4 @@
brew install python
# brew install python
curl -s https://www.libsdl.org/release/SDL2-$SDL_VERSION.dmg > SDL2.dmg
hdiutil attach SDL2.dmg
cd /Volumes/SDL2

View File

@ -63,7 +63,7 @@ def build(bld):
# basic build: dedicated only, no dependencies
if bld.env.DEST_OS != 'win32':
libs = [ 'DL', 'M' ]
libs += ['DL','M']
libs.append('VGUI')

14
wscript
View File

@ -105,10 +105,14 @@ def configure(conf):
if(conf.env.DEST_64BIT):
if(not conf.options.ALLOW64):
conf.env.append_value('LINKFLAGS', ['-m32'])
conf.env.append_value('CFLAGS', ['-m32'])
conf.env.append_value('CXXFLAGS', ['-m32'])
Logs.info('NOTE: will build engine with 64-bit toolchain using -m32')
flag = '-m32'
# Think different.
if(conf.env.DEST_OS == 'darwin'):
flag = '-arch i386'
conf.env.append_value('LINKFLAGS', [flag])
conf.env.append_value('CFLAGS', [flag])
conf.env.append_value('CXXFLAGS', [flag])
Logs.info('NOTE: will build engine with 64-bit toolchain using %s' % flag)
else:
Logs.warn('WARNING: 64-bit engine may be unstable')
@ -169,7 +173,7 @@ def configure(conf):
git_version = get_git_version()
conf.end_msg(git_version)
conf.env.append_unique('DEFINES', 'XASH_BUILD_COMMIT="' + git_version + '"')
for i in SUBDIRS:
conf.setenv(i, conf.env) # derive new env from global one
conf.env.ENVNAME = i