Merge branch 'linux' into merge_linux

This commit is contained in:
Michael Bonfils
2018-02-08 20:36:46 +01:00
128 changed files with 1618 additions and 29 deletions

1
.gitignore vendored
View File

@@ -82,6 +82,7 @@ test/junk/*.map
*.boes
# Misc
*~
oldstructs.txt
src/tools/gitrev.hpp
rsrc/**/scenario

View File

@@ -7,5 +7,5 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew install scons sfml
else
sudo apt-get update -qq
sudo apt-get install -qq libsfml-dev libboost-dev
sudo apt-get install -qq libsfml-dev libboost-dev libboost-filesystem-dev libboost-thread-dev
fi

View File

@@ -9,8 +9,6 @@ compiler:
- clang
matrix:
allow_failures:
- os: linux
include:
- os: linux
sudo: required

View File

@@ -8,11 +8,11 @@ toolset = ARGUMENTS.get('toolset', 'default')
sixty_four = ARGUMENTS.get('64bit', False)
arch = 'x86_64' if sixty_four else 'x86'
if str(platform) not in ("darwin", "win32"):
if str(platform) not in ("darwin", "win32", "posix"):
print "Sorry, your platform is not supported."
print "Platform is:", platform
print "Specify OS=<your-platform> if you believe this is incorrect."
print "(Supported platforms are: darwin, win32)"
print "(Supported platforms are: darwin, win32, posix)"
Exit(1)
print 'Building for:', platform
@@ -25,6 +25,10 @@ else:
env.VariantDir('#build/obj', 'src')
env.VariantDir('#build/obj/test', 'test')
debug = ARGUMENTS.get('debug', 0)
if int(debug):
env.Append(CCFLAGS = '-g')
# This command generates the header with git revision information
def gen_gitrev(env, target, source):
revid = subprocess.check_output(["git", "rev-parse", "HEAD"]);
@@ -50,6 +54,15 @@ else:
echo -e "\n#define GIT_REVISION \"\"\n#define GIT_TAG \"\"\n#define GIT_TAG_REVISION \"\"\n" > #TARGET
""")
if str(platform) == "posix":
env.Append(CXXFLAGS="-std=c++11 -stdlib=libstdc++")
env["CC"] = 'clang'
env["CXX"] = 'clang++'
env.Append(LIBPATH=Split("""
/usr/lib
"""), CPPPATH=Split("""
/usr/include
"""))
if str(platform) == "darwin":
env.Append(CXXFLAGS="-std=c++11 -stdlib=libc++ -include global.hpp", RPATH='../Frameworks')
env["CC"] = 'clang'
@@ -156,6 +169,9 @@ elif str(platform) == "win32":
env.Append(CXXFLAGS="-include global.hpp")
def build_app_package(env, source, build_dir, info):
env.Install(build_dir, source)
elif str(platform) == "posix":
def build_app_package(env, source, build_dir, info):
env.Install(build_dir, source)
env.AddMethod(build_app_package, "Package")
@@ -259,7 +275,7 @@ if not env.GetOption('clean'):
print " If you're sure it's installed, try passing INCLUDEPATH=..."
Exit(1)
boost_versions = ['-1_55', '-1_56', '-1_57', '-1_58'] # This is a bit of a hack. :(
boost_versions = ['-1_54', '-1_55', '-1_56', '-1_57', '-1_58'] # This is a bit of a hack. :(
bundled_libs = []
check_header('boost/lexical_cast.hpp', 'Boost.LexicalCast')
@@ -293,10 +309,15 @@ if str(platform) == "darwin":
OpenGL
Cocoa
"""))
else:
elif str(platform) == "win32":
env.Append(LIBS=Split("""
opengl32
"""))
elif str(platform) == "posix":
env.Append(LIBS=Split("""
GL
X11
"""))
Export("env platform")

View File

@@ -2,7 +2,8 @@
from __future__ import print_function
import os.path as path
import subprocess, tarfile
from os import walk as walk_dir
import os
walk_dir = os.walk
Import("env platform data_dir install_dir")
@@ -12,7 +13,7 @@ env.Install(path.join(data_dir, "cursors"), Glob("cursors/*.gif"))
env.Install(path.join(data_dir, "dialogs"), Glob("dialogs/*.xml"))
env.Install(path.join(data_dir, "fonts"), Glob("fonts/*.ttf"))
env.Install(path.join(data_dir, "graphics"), Glob("graphics/*.png"))
env.Install(path.join(data_dir, "sounds"), Glob("sounds/*.WAV"))
env.Install(path.join(data_dir, "sounds"), Glob("sounds/*.wav"))
env.Install(path.join(data_dir, "strings"), Glob("strings/*.txt"))
env.Install(path.join(data_dir, "shaders"), Glob("#src/gfx/mask.*"))
@@ -46,7 +47,9 @@ env.Install(path.join(install_dir, "Blades of Exile Base"), Glob("#build/rsrc/ba
have_xmllint = False
if ((str(platform) != "win32" and subprocess.call(['which', '-s', 'xmllint']) == 0) or
nulldev = open(os.devnull, 'w')
if ((str(platform) != "win32" and subprocess.call(['which', 'xmllint'], stdout=nulldev, stderr=nulldev) == 0) or
(str(platform) == "win32" and subprocess.call(['where', '/Q', 'xmllint'])) == 0):
have_xmllint = True
xmllint_command = ('xmllint', '--nonet', '--noout', '--schema', '../schemas/dialog.xsd')

Some files were not shown because too many files have changed in this diff Show More