summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SConscript47
-rw-r--r--src/shared/SConscript15
2 files changed, 21 insertions, 41 deletions
diff --git a/src/SConscript b/src/SConscript
index cb0c1922..2eeb869e 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,4 +1,5 @@
import os
+import subprocess
Import('qt_env')
@@ -27,23 +28,13 @@ else:
'Declarative'
]
-env.EnableQt4Modules(['Qt' + n for n in modules],
- debug = env['CONFIG'] == 'debug')
+env.EnableQtModules(*modules)
-env.Uic4(Glob('*.ui'))
+env.Uic4(env.Glob('*.ui'))
-env.AppendUnique(LIBPATH = [
- '..\\uibase',
- '..\\shared',
- '..\\bsatk',
- '..\\esptk'
-])
+env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk')
env.AppendUnique(LIBS = [
- 'uibase',
- 'mo_shared',
- 'bsatk',
- 'esptk',
'shell32',
'user32',
'ole32',
@@ -59,20 +50,14 @@ env.AppendUnique(LIBS = [
other_sources = env.AddExtraMoc(env.Glob('*.h'))
for file in env.Glob('*.rc'):
- if str(file).endswith('version.rc'):
+ if file.name == 'version.rc':
continue
other_sources.append(env.RES(file))
-# FIXME Add the translate in here too
-
# Note the order of this is important, or you can pick up the wrong report.h...
# Doing appendunique seems to throw the moc code into a tizzy
env['CPPPATH'] += [
- '../shared',
'../archive',
- '../uibase',
- '../bsatk',
- '../esptk',
'../boss_modified/boss-api',
'.', # Why is this necessary?
'${BOOSTPATH}',
@@ -89,11 +74,6 @@ env.AppendUnique(CPPDEFINES = [
# 'NDEBUG'
])
-# Umf. This changes everytime you do something with your repository.
-# I don't think this is necessary with scons
-# hgid = subprocess.check_output(['hg', 'id', '-i'])
-# env.AppendUnique(CPPDEFINES = [ 'HGID="%s"' % hgid ])
-
env.AppendUnique(CPPFLAGS = [ '-wd4100', '-wd4127', '-wd4512', '-wd4189' ])
env.AppendUnique(LINKFLAGS = [
@@ -102,7 +82,16 @@ env.AppendUnique(LINKFLAGS = [
])
# modeltest is optional and it doesn't compile anyway...
-cpp_files = [ x for x in Glob('*.cpp') if not str(x).endswith('modeltest.cpp') ]
+cpp_files = [
+ x for x in Glob('*.cpp')
+ if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp'
+]
+
+about_env = env.Clone()
+hgid = subprocess.check_output(['hg', 'id', '-i']).rstrip()
+# FIXME: It'd be much easier to stringify this in the source code
+about_env.AppendUnique(CPPDEFINES = [ 'HGID=\\"%s\\"' % hgid ])
+other_sources.append(about_env.StaticObject('aboutdialog.cpp'))
prog = env.Program('ModOrganizer',
cpp_files + env.Glob('*.qrc') + other_sources)
@@ -113,6 +102,8 @@ for subdir in ('tutorials', 'stylesheets'):
env.Install(os.path.join(env['INSTALL_PATH'], subdir),
env.Glob(os.path.join(subdir, '*')))
+# FIXME Sort the translations. Except they don't exist on the 1.2 branch
+
"""
CONFIG(debug, debug|release) {
} else {
@@ -126,7 +117,3 @@ TRANSLATIONS = organizer_en.ts
QMAKE_POST_LINK += xcopy /y /s /I $$quote($$BASEDIR\\*.qm) $$quote($$DSTDIR)\\translations $$escape_expand(\\n)
"""
-
-"""
-/IC:\Apps\Qt\4.8.6\include (twice)
-"""
diff --git a/src/shared/SConscript b/src/shared/SConscript
index daf8f2da..35c65d73 100644
--- a/src/shared/SConscript
+++ b/src/shared/SConscript
@@ -1,18 +1,8 @@
-import os.path
-
Import('qt_env')
env = qt_env.Clone()
-modules = [
- 'Core',
- 'Gui'
-]
-
-env.EnableQt4Modules(['Qt' + n for n in modules],
- debug = env['CONFIG'] == 'debug')
-
-env.StaticLibrary('mo_shared', env.Glob('*.cpp'))
+env.EnableQtModules('Core', 'Gui')
env.AppendUnique(CPPDEFINES = [
'UNICODE',
@@ -27,3 +17,6 @@ env.AppendUnique(CPPPATH = [
'${BOOSTPATH}',
'.' # Seriously!
])
+
+# Not sure if renaming this helps much as it's static
+env.StaticLibrary('mo_shared', env.Glob('*.cpp'))