diff --git a/src/proxy/SConscript b/src/proxy/SConscript new file mode 100644 index 0000000..e67376c --- /dev/null +++ b/src/proxy/SConscript @@ -0,0 +1,48 @@ +import os + +Import('qt_env') + +env = qt_env.Clone() + +modules = [ + 'Core', + 'Gui', +] + +if env['QT_MAJOR_VERSION'] > 4: + modules += [ 'Widgets' ] + +env.EnableQt4Modules(['Qt' + n for n in modules], + debug = env['CONFIG'] == 'debug') + +env.AppendUnique(CPPDEFINES = [ + 'PROXYPYTHON_LIBRARY', + # suppress a few warnings caused by boost vs vc++ paranoia + '_SCL_SECURE_NO_WARNINGS' +]) + +env.RequireLibraries('uibase') + +env.AppendUnique(CPPPATH = [ + '${BOOSTPATH}', + '..\\..\\pythonRunner' +]) + +env.AppendUnique(LIBS = 'shell32') +print env['RCFLAGS'] + +runner = env.File(os.path.join('..', '..', 'pythonRunner', 'pythonRunner.dll')) + +# Seriously, this is horrible +env.AppendUnique(RCFLAGS = [ + '-DSCONS_VARIANT="\\"%s\\""' % runner.abspath +]) + +# Make sure we have the proper dependencies so it gets built +env.Depends('embedrunner.res', runner) + +# There's a whole load of unused C++ files in here. +lib = env.SharedLibrary('proxyPython', + [ 'proxypython.cpp' ] + env.RES(env.Glob('*.rc'))) + +env.InstallPlugin(lib) diff --git a/src/proxy/embedrunner.rc b/src/proxy/embedrunner.rc index 4215150..a1d547f 100644 --- a/src/proxy/embedrunner.rc +++ b/src/proxy/embedrunner.rc @@ -1,7 +1,11 @@ #include "resource.h" +#ifdef SCONS_VARIANT +IDR_LOADER_DLL BINARY MOVEABLE PURE SCONS_VARIANT +#else #ifdef _DEBUG IDR_LOADER_DLL BINARY MOVEABLE PURE "..\\..\\pythonRunner\\debug\\pythonRunner.dll" #else // _DEBUG IDR_LOADER_DLL BINARY MOVEABLE PURE "..\\..\\pythonRunner\\release\\pythonRunner.dll" #endif // _DEBUG +#endif diff --git a/src/proxy/proxyPython.pro b/src/proxy/proxyPython.pro index f1a0f86..e0bd9bd 100644 --- a/src/proxy/proxyPython.pro +++ b/src/proxy/proxyPython.pro @@ -29,7 +29,8 @@ HEADERS += proxypython.h \ OTHER_FILES += \ proxypython.json \ - embedrunner.rc + embedrunner.rc\ + SConscript RC_FILE += \ embedrunner.rc diff --git a/src/runner/SConscript b/src/runner/SConscript index bf5b382..7d69c0b 100644 --- a/src/runner/SConscript +++ b/src/runner/SConscript @@ -1,5 +1,3 @@ -import os - Import('qt_env') env = qt_env.Clone() @@ -21,18 +19,12 @@ env.AppendUnique(CPPDEFINES = [ 'HAVE_ROUND' ]) -#CONFIG(debug, debug|release) { -# LIBS += -L$$OUT_PWD/../uibase/debug -#} else { -# LIBS += -L$$OUT_PWD/../uibase/release # QMAKE_CXXFLAGS += /Zi # QMAKE_LFLAGS += /DEBUG -#} -# # AppendUnique appears not to work with QT4 env['CPPPATH'] += [ - '${BOOST_PATH}', + '${BOOSTPATH}', '${PYTHONPATH}\\include', '..\\uibase' ] @@ -56,6 +48,6 @@ cpp_files = [ x for x in Glob('*.cpp') if not str(x).endswith('pythontoolwrapper.cpp') ] -lib = env.SharedLibrary('pythonrunner', cpp_files + targets) +lib = env.SharedLibrary('pythonRunner', cpp_files + targets) env.InstallModule(lib)