mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
wscript: try to fix windres searching for game_launch, fix osx 32 bit compiling
This commit is contained in:
parent
81e142936d
commit
776d1cb52c
@ -27,10 +27,11 @@ git:
|
|||||||
submodules: true
|
submodules: true
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- oraclejdk8
|
||||||
os:
|
matrix:
|
||||||
- linux
|
include:
|
||||||
- osx
|
- os: linux
|
||||||
# - windows
|
dist: xenial
|
||||||
|
- os: osx
|
||||||
before_script:
|
before_script:
|
||||||
- sh scripts/travis_common_deps.sh
|
- sh scripts/travis_common_deps.sh
|
||||||
- sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh
|
- sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh
|
||||||
|
@ -55,6 +55,7 @@ def configure(conf):
|
|||||||
conf.check( lib='gdi32' )
|
conf.check( lib='gdi32' )
|
||||||
conf.check( lib='advapi32' )
|
conf.check( lib='advapi32' )
|
||||||
conf.check( lib='dbghelp' )
|
conf.check( lib='dbghelp' )
|
||||||
|
conf.check( lib='psapi' )
|
||||||
conf.env.append_unique('DEFINES', 'DBGHELP')
|
conf.env.append_unique('DEFINES', 'DBGHELP')
|
||||||
|
|
||||||
def get_subproject_name(ctx):
|
def get_subproject_name(ctx):
|
||||||
@ -74,10 +75,10 @@ def build(bld):
|
|||||||
|
|
||||||
# basic build: dedicated only, no dependencies
|
# basic build: dedicated only, no dependencies
|
||||||
if bld.env.DEST_OS != 'win32':
|
if bld.env.DEST_OS != 'win32':
|
||||||
libs += [ 'DL', 'M', 'PTHREAD' ]
|
libs += [ 'DL' , 'M', 'PTHREAD' ]
|
||||||
source += bld.path.ant_glob(['platform/posix/*.c'])
|
source += bld.path.ant_glob(['platform/posix/*.c'])
|
||||||
else:
|
else:
|
||||||
libs += ['user32', 'shell32', 'gdi32', 'advapi32', 'dbghelp']
|
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP', 'PSAPI']
|
||||||
source += bld.path.ant_glob(['platform/win32/*.c'])
|
source += bld.path.ant_glob(['platform/win32/*.c'])
|
||||||
|
|
||||||
if bld.env.DEST_OS == 'linux':
|
if bld.env.DEST_OS == 'linux':
|
||||||
|
@ -18,6 +18,7 @@ def configure(conf):
|
|||||||
# check for dedicated server build
|
# check for dedicated server build
|
||||||
if not conf.env.DEDICATED:
|
if not conf.env.DEDICATED:
|
||||||
if conf.env.DEST_OS == 'win32':
|
if conf.env.DEST_OS == 'win32':
|
||||||
|
conf.load('winres')
|
||||||
conf.check(lib='user32')
|
conf.check(lib='user32')
|
||||||
conf.check(lib='shell32')
|
conf.check(lib='shell32')
|
||||||
|
|
||||||
@ -34,13 +35,11 @@ def build(bld):
|
|||||||
source = ['game.cpp']
|
source = ['game.cpp']
|
||||||
includes = '. ../common'
|
includes = '. ../common'
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
if bld.env.DEST_OS != 'win32':
|
if bld.env.DEST_OS != 'win32':
|
||||||
libs += [ 'DL' ]
|
libs += [ 'DL' ]
|
||||||
else:
|
else:
|
||||||
# compile resource on Windows
|
libs += ['USER32', 'SHELL32']
|
||||||
bld.load('winres')
|
|
||||||
libs += ['user32', 'shell32']
|
|
||||||
source += ['game.rc']
|
source += ['game.rc']
|
||||||
|
|
||||||
bld(
|
bld(
|
||||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
|||||||
Subproject commit 177e49ca640a4a695df92106c211e5a47a838c8b
|
Subproject commit 792072b73e3b2d9d6e0da1b9521959663973c98c
|
@ -3,6 +3,8 @@
|
|||||||
# Build engine
|
# Build engine
|
||||||
|
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
|
export CC="/usr/bin/clang"
|
||||||
|
export CXX="/usr/bin/clang++"
|
||||||
export CFLAGS="-m32"
|
export CFLAGS="-m32"
|
||||||
export CXXFLAGS="-m32"
|
export CXXFLAGS="-m32"
|
||||||
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug
|
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
brew install python
|
# brew install python
|
||||||
curl -s https://www.libsdl.org/release/SDL2-$SDL_VERSION.dmg > SDL2.dmg
|
curl -s https://www.libsdl.org/release/SDL2-$SDL_VERSION.dmg > SDL2.dmg
|
||||||
hdiutil attach SDL2.dmg
|
hdiutil attach SDL2.dmg
|
||||||
cd /Volumes/SDL2
|
cd /Volumes/SDL2
|
||||||
|
@ -63,7 +63,7 @@ def build(bld):
|
|||||||
|
|
||||||
# basic build: dedicated only, no dependencies
|
# basic build: dedicated only, no dependencies
|
||||||
if bld.env.DEST_OS != 'win32':
|
if bld.env.DEST_OS != 'win32':
|
||||||
libs = [ 'DL', 'M' ]
|
libs += ['DL','M']
|
||||||
|
|
||||||
libs.append('VGUI')
|
libs.append('VGUI')
|
||||||
|
|
||||||
|
14
wscript
14
wscript
@ -105,10 +105,14 @@ def configure(conf):
|
|||||||
|
|
||||||
if(conf.env.DEST_64BIT):
|
if(conf.env.DEST_64BIT):
|
||||||
if(not conf.options.ALLOW64):
|
if(not conf.options.ALLOW64):
|
||||||
conf.env.append_value('LINKFLAGS', ['-m32'])
|
flag = '-m32'
|
||||||
conf.env.append_value('CFLAGS', ['-m32'])
|
# Think different.
|
||||||
conf.env.append_value('CXXFLAGS', ['-m32'])
|
if(conf.env.DEST_OS == 'darwin'):
|
||||||
Logs.info('NOTE: will build engine with 64-bit toolchain using -m32')
|
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:
|
else:
|
||||||
Logs.warn('WARNING: 64-bit engine may be unstable')
|
Logs.warn('WARNING: 64-bit engine may be unstable')
|
||||||
|
|
||||||
@ -169,7 +173,7 @@ def configure(conf):
|
|||||||
git_version = get_git_version()
|
git_version = get_git_version()
|
||||||
conf.end_msg(git_version)
|
conf.end_msg(git_version)
|
||||||
conf.env.append_unique('DEFINES', 'XASH_BUILD_COMMIT="' + git_version + '"')
|
conf.env.append_unique('DEFINES', 'XASH_BUILD_COMMIT="' + git_version + '"')
|
||||||
|
|
||||||
for i in SUBDIRS:
|
for i in SUBDIRS:
|
||||||
conf.setenv(i, conf.env) # derive new env from global one
|
conf.setenv(i, conf.env) # derive new env from global one
|
||||||
conf.env.ENVNAME = i
|
conf.env.ENVNAME = i
|
||||||
|
Loading…
x
Reference in New Issue
Block a user