From 2d20185e77113fa1707af121dd2df22742899fa3 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Sat, 14 Mar 2015 14:59:52 +0000 Subject: More sconscripts set up --- .hgignore | 2 ++ 1 file changed, 2 insertions(+) (limited to '.hgignore') diff --git a/.hgignore b/.hgignore index d53a7793..e04a39ce 100644 --- a/.hgignore +++ b/.hgignore @@ -34,3 +34,5 @@ html syntax: regexp Makefile\.(Debug|Release) source/.*/debug/.* +scons_configure.py +scons-ModOrganizer-* -- cgit v1.3.1 From 4b1059f5a118b70b2c8dfeb8fbecefc7852c6589 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Sun, 15 Mar 2015 16:26:41 +0000 Subject: Building cleanly without patched versions. Doesn't do the plugins yet --- .hgignore | 4 ++-- README.txt | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to '.hgignore') diff --git a/.hgignore b/.hgignore index e04a39ce..19772d32 100644 --- a/.hgignore +++ b/.hgignore @@ -1,4 +1,6 @@ syntax: glob +scons_configure.py +scons-ModOrganizer-* ModOrganizer-build-desktop* outputd/* output/* @@ -34,5 +36,3 @@ html syntax: regexp Makefile\.(Debug|Release) source/.*/debug/.* -scons_configure.py -scons-ModOrganizer-* diff --git a/README.txt b/README.txt index 168e1726..cbb571c3 100644 --- a/README.txt +++ b/README.txt @@ -243,11 +243,16 @@ Building with scons 2) Download QT4 (and/or QT5) from https://bitbucket.org/dirkbaechle/scons_qt4 and https://bitbucket.org/dirkbaechle/scons_qt5. Install as per instructions 3) Copy scons_configure_template.py to scons_configure.py. Edit to point to your - boost/python/zlib paths as appropriate + boost/python/zlib/7zip paths as appropriate 4) Create build kits as follows: Custom Process step: Command: \Scripts\scons.bat - Arguments: -u + Arguments: -u . + Working directory: %{sourcedir} + + Clean Custom Process step: + Command: \Scripts\scons.bat + Arguments: -c -u . Working directory: %{sourcedir} For the release build, add 'CONFIG=release' to the arguments. @@ -255,7 +260,12 @@ Building with scons If you want to do parallel builds, add -j and a number to the arguments. However you may need to install pywin32 (but it seems to work OK for me). - You can do this in the main project (probably should), but if you want to build just - a particular subproject, you can do it in the subproject instead (or as well). + Note. If you want to build a sub project separately, it seems to be better + to open the subproject, set that up with the scons kit and build that as a + project. + + Please note: the generated (runnable) output files end up in the build directory, + in the '_ModOrganizer' subdirectory (not at the top level). Named like that + so you can see it! -This isn't complete by any means but.. \ No newline at end of file +This isn't complete by any means but.. -- cgit v1.3.1 From a9cec9e5e230dbd56d62ae6dd517ae10252125ae Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Fri, 20 Mar 2015 10:34:30 +0000 Subject: Fixed Scons build for existing bits. Changed pynedit.pro to fetch from 'standard' install location Changed saveas code to use organizer report rather than uibase - this way it's not dependant on the vagaries of the include path, and works the same as the rest of the organiser directory --- .hgignore | 68 ++++++++++++++++++++++++------------------------ src/SConscript | 23 +++++++++------- src/savetextasdialog.cpp | 4 +-- src/shared/SConscript | 3 +++ 4 files changed, 52 insertions(+), 46 deletions(-) (limited to '.hgignore') diff --git a/.hgignore b/.hgignore index 819b6f4d..f67264ff 100644 --- a/.hgignore +++ b/.hgignore @@ -1,46 +1,46 @@ syntax: glob scons_configure.py scons-ModOrganizer-* -#ModOrganizer-build-desktop* +ModOrganizer-build-desktop* outputd/* output/* build-ModOrganizer-* -#source/NCC/*/bin -#source/NCC/*/obj -#source/NCC/bin +source/NCC/*/bin +source/NCC/*/obj +source/NCC/bin *.orig -#source/plugins/proxyPython/build -#staging/* -#source - Copy/* -#ModOrganizer-build-* -#pdbs/* -#source/NCC/BossDummy.x/* -#*.ts -#staging_prepare/* -#staging_trans/* -#tools/python_zip/* -#Makefile -#html -#*.vcxproj -#*.pdb -#*.dll -#*.exp -#*.tlog +source/plugins/proxyPython/build +staging/* +source - Copy/* +ModOrganizer-build-* +pdbs/* +source/NCC/BossDummy.x/* +*.ts +staging_prepare/* +staging_trans/* +tools/python_zip/* +Makefile +html +*.vcxproj +*.pdb +*.dll +*.exp +*.tlog *.user -#*.obj -#*.suo -#*.sln -#*.log -#*.filters -#*.lib -#source/organizer/resources/contents/icons -#source/plugins/build-* -#*/GeneratedFiles/* -#translations/* +*.obj +*.suo +*.sln +*.log +*.filters +*.lib +source/organizer/resources/contents/icons +source/plugins/build-* +*/GeneratedFiles/* +translations/* source/LocalPaths.pri -#source/*/Win32/Debug/* -#source/plugins/*/Win32/Debug/* -#*~ +source/*/Win32/Debug/* +source/plugins/*/Win32/Debug/* +*~ syntax: regexp Makefile\.(Debug|Release) source/.*/debug/.* diff --git a/src/SConscript b/src/SConscript index 2eeb869e..3dd5d450 100644 --- a/src/SConscript +++ b/src/SConscript @@ -13,20 +13,16 @@ modules = [ 'Sql', 'WebKit', 'Xml', - 'XmlPatterns' + 'XmlPatterns', + 'Declarative' ] if env['QT_MAJOR_VERSION'] > 4: modules += [ 'Widgets', 'Qml', - 'Quick', 'WebKitWidgets' ] -else: - modules += [ - 'Declarative' - ] env.EnableQtModules(*modules) @@ -34,6 +30,7 @@ env.Uic4(env.Glob('*.ui')) env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk') + env.AppendUnique(LIBS = [ 'shell32', 'user32', @@ -58,8 +55,10 @@ for file in env.Glob('*.rc'): # Doing appendunique seems to throw the moc code into a tizzy env['CPPPATH'] += [ '../archive', - '../boss_modified/boss-api', +# '../boss_modified/boss-api', + '../plugins/gamefeatures', '.', # Why is this necessary? + '${LOOTPATH}', '${BOOSTPATH}', ] @@ -69,9 +68,7 @@ env.AppendUnique(CPPDEFINES = [ '_SCL_SECURE_NO_WARNINGS', 'NOMINMAX', 'BOOST_DISABLE_ASSERTS', -# Although the .pro file says it adds this, the compile line doesn't seem to -# have it (unless it's in the annoying '@' file -# 'NDEBUG' + 'NDEBUG' ]) env.AppendUnique(CPPFLAGS = [ '-wd4100', '-wd4127', '-wd4512', '-wd4189' ]) @@ -93,6 +90,9 @@ hgid = subprocess.check_output(['hg', 'id', '-i']).rstrip() about_env.AppendUnique(CPPDEFINES = [ 'HGID=\\"%s\\"' % hgid ]) other_sources.append(about_env.StaticObject('aboutdialog.cpp')) +env.AppendUnique(LIBPATH = "${ZLIBPATH}/build") +env.AppendUnique(LIBS = 'zlibstatic') + prog = env.Program('ModOrganizer', cpp_files + env.Glob('*.qrc') + other_sources) @@ -104,6 +104,9 @@ for subdir in ('tutorials', 'stylesheets'): # FIXME Sort the translations. Except they don't exist on the 1.2 branch +res = env['QT_USED_MODULES'] +Return('res') + """ CONFIG(debug, debug|release) { } else { diff --git a/src/savetextasdialog.cpp b/src/savetextasdialog.cpp index 1f23356f..1a940094 100644 --- a/src/savetextasdialog.cpp +++ b/src/savetextasdialog.cpp @@ -1,6 +1,6 @@ #include "savetextasdialog.h" #include "ui_savetextasdialog.h" -#include +#include "report.h" #include #include @@ -37,7 +37,7 @@ void SaveTextAsDialog::on_saveAsBtn_clicked() if (!fileName.isEmpty()) { QFile file(fileName); if (!file.open(QIODevice::WriteOnly)) { - MOBase::reportError(tr("failed to open \"%1\" for writing").arg(fileName)); + reportError(tr("failed to open \"%1\" for writing").arg(fileName)); return; } diff --git a/src/shared/SConscript b/src/shared/SConscript index 35c65d73..69a95289 100644 --- a/src/shared/SConscript +++ b/src/shared/SConscript @@ -20,3 +20,6 @@ env.AppendUnique(CPPPATH = [ # Not sure if renaming this helps much as it's static env.StaticLibrary('mo_shared', env.Glob('*.cpp')) + +res = env['QT_USED_MODULES'] +Return('res') -- cgit v1.3.1