summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorTanninOne <seppleviathan@gmx.de>2016-02-10 18:37:28 +0100
committerTanninOne <seppleviathan@gmx.de>2016-02-10 18:37:28 +0100
commitba8464f01f5cd5340feea7163b9e51492c16fa8a (patch)
treef900f46ac4f14f8635533279bd434b06e6f3a94e /SConstruct
parent5adb3b377ecd50a75dd034a49582a1da91b67e1c (diff)
parent0e9a86ebfc1a97742d0812a7b6ae8bb7f4662673 (diff)
Merge pull request #456 from ThosRTanner/issue/418
Refactor save game code into plugins
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct41
1 files changed, 31 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct
index 013375b7..c7248251 100644
--- a/SConstruct
+++ b/SConstruct
@@ -431,16 +431,24 @@ msvs_version = int(env['MSVS_VERSION'].split('.')[0]) + 2000
if msvs_version > 2010:
msvs_version += 1
-# Need more work on the qt version stuff
-#build-ModOrganizer-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Debug
-build_dir = 'scons-ModOrganizer-QT_%s_for_MSVS%d_32bit-%s' % (
- #os.path.basename(env['QTDIR']).replace('.', '_'),
- '5_4_1_OpenGL',
+# Read the QT version info
+with open(os.path.join(env['QTDIR'], 'mkspecs', 'qconfig.pri')) as qtinfo:
+ for line in qtinfo:
+ info = re.split(r'\s*=\s*', line.rstrip())
+ if info[0] == 'QT_VERSION':
+ env[info[0]] = info[1]
+ elif '_VERSION' in info[0]:
+ env[info[0]] = int(info[1])
+
+build_dir = 'scons-ModOrganizer-QT_%s_%sfor_MSVS%d_32bit-%s' % (
+ env['QT_VERSION'].replace('.', '_'),
+ 'OpenGL_' if 'opengl' in env['QTDIR'] else '',
msvs_version,
config.title())
# Put the sconsign file somewhere sane
env.SConsignFile(os.path.join(build_dir, '.sconsign.dblite'))
+env.CacheDir(os.path.join(build_dir, '.cache'))
#this doesn't seem to work
#env.VariantDir('build/$CONFIG', 'source')
@@ -531,9 +539,6 @@ qt_env = env.Clone()
if qt_env['CONFIG'] != 'debug':
qt_env.AppendUnique(CPPDEFINES = [ 'QT_NO_DEBUG' ])
-# Better way of working this out
-qt_env['QT_MAJOR_VERSION'] = 5 #int(os.path.basename(env['QTDIR']).split('.')[0])
-
qt_env.Tool('qt%d' % qt_env['QT_MAJOR_VERSION'])
# FIXME See if I can work out how to get official scons qt to work. Appears
@@ -618,6 +623,20 @@ if qt_env['QT_MAJOR_VERSION'] > 4:
]
# Finally, set up rules to install the DLLs.
+# use windeployqt.exe to install all required libraries
+#SET(windeploy_parameters --no-translations --no-plugins --libdir dlls --release-with-debug-info --no-compiler-runtime)
+#INSTALL(
+# CODE
+# "EXECUTE_PROCESS(
+# COMMAND
+# ${qt5bin}/windeployqt.exe ModOrganizer.exe ${windeploy_parameters}
+# COMMAND
+# ${qt5bin}/windeployqt.exe uibase.dll ${windeploy_parameters}
+# WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
+# )"
+#)
+# this should probably be a rule though it seems to produce an awful lot of
+# Stuff(TM). or a postaction
dll_path = os.path.join('$INSTALL_PATH', 'DLLs')
@@ -648,8 +667,10 @@ if 'WebKit' in libs_to_install and qt_env['QT_MAJOR_VERSION'] == 4:
if qt_env['QT_MAJOR_VERSION'] > 4:
# Guesswork a bit.
dlls_to_install += [
- os.path.join(env['QTDIR'], 'bin', 'icu%s53.dll' % lib)
- for lib in ('dt','in', 'uc')
+ os.path.join(env['QTDIR'],
+ 'bin',
+ 'icu%s%d%d.dll' % (lib, qt_env['QT_MAJOR_VERSION'], qt_env['QT_MINOR_VERSION'] - 1))
+ for lib in ('dt','in', 'uc')
]
platform_dlls = []