diff options
| author | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-03-18 14:16:04 +0000 |
|---|---|---|
| committer | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-03-18 14:16:04 +0000 |
| commit | 39dd67f22f236d9f962657abe5b619f2b338f2fc (patch) | |
| tree | c55aaeb8fb882171482d401630d63b0e9c4c38d8 /src/SConscript | |
| parent | de79d15980aec5771a3e850f248c1094a3c72f22 (diff) | |
Refactoring and cleanup.
Diffstat (limited to 'src/SConscript')
| -rw-r--r-- | src/SConscript | 47 |
1 files changed, 17 insertions, 30 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)
-"""
|
