Mercurial > fife-parpg
changeset 384:621b062e752d
Modified the code blocks project files to fit with the new build system. Code blocks now uses scons to build each of the configurations. The python configurations build properly but fail during link with a bunch of undefined references insides of the swig generated dll, not sure why. Also updated the win32-config.py so that it no longer relies on variables defined outside of itself, this was causing code blocks to not be able to build. Updated a couple of the batch scripts so they run properly.
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 20 Jan 2010 05:56:18 +0000 |
parents | 12ca54931880 |
children | fa1373b9fa16 |
files | build/win32-config.py build/win32/build_environments/code_blocks/engine_template.xml build/win32/create_documentation.bat build/win32/update_project_files.bat build/win32/update_swig_files.bat engine/SConscript |
diffstat | 6 files changed, 110 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/build/win32-config.py Tue Jan 19 17:45:49 2010 +0000 +++ b/build/win32-config.py Wed Jan 20 05:56:18 2010 +0000 @@ -5,13 +5,16 @@ #a hack to stop passing the -nologo flag to mingw env['CCFLAGS'] = SCons.Util.CLVar('') - path = os.environ['_'] - win32_swig_dir = os.environ['_SWIG'] + path = os.getcwd() + + swigdir = os.path.join(path, 'build', 'win32', 'applications', 'swigwin-1.3.40') + mingwbindir = os.path.join(path, 'build', 'win32', 'applications', 'mingw', 'bin') - env.AppendENVPath('PATH', win32_swig_dir) + env.AppendENVPath('PATH', swigdir) + env.AppendENVPath('PATH', mingwbindir) - includepath = os.path.join(path, '..', '..', 'includes') - staticlibpath = os.path.join(path, '..', '..', 'static_libs','mingw') + includepath = os.path.join(path, 'build', 'win32', 'includes') + staticlibpath = os.path.join(path, 'build', 'win32', 'static_libs', 'mingw') env.Append(CPPPATH = [includepath + '\\libogg', includepath + '\\openal', includepath + '\\sdl_image', includepath + '\\zlib', includepath + '\\libguichan', includepath + '\\boost_1_38_0', includepath + '\\libvorbis', includepath + '\\libpng', includepath + '\\sdl_ttf', includepath + '\\sdl', includepath + '\\python26', includepath + '\\unittest++']) env.Append(LIBPATH = [staticlibpath, staticlibpath + '\\python26'])
--- a/build/win32/build_environments/code_blocks/engine_template.xml Tue Jan 19 17:45:49 2010 +0000 +++ b/build/win32/build_environments/code_blocks/engine_template.xml Wed Jan 20 05:56:18 2010 +0000 @@ -2,68 +2,116 @@ <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> - <Option title="_fife.pyd" /> - <Option pch_mode="0" /> - <Option compiler="gcc" /> + <Option title="fife" /> + <Option makefile="SConstruct" /> + <Option makefile_is_custom="1" /> + <Option pch_mode="2" /> + <Option compiler="msvc8" /> + <MakeCommands> + <Build command="" /> + <CompileFile command="" /> + <Clean command="" /> + <DistClean command="" /> + </MakeCommands> <Build> - <Target title="default"> - <Option output="..\..\..\..\engine\swigwrappers\python\_fife.pyd" prefix_auto="0" extension_auto="0" /> + <Target title="Debug_python"> + <Option output="fife.cbp" prefix_auto="1" extension_auto="0" /> + <Option object_output="obj\Debug\" /> <Option type="3" /> - <Option compiler="gcc" /> + <Option compiler="msvc8" /> <Option createDefFile="1" /> <Compiler> - <Add option="-DHAVE_OPENGL" /> - <Add option="-DHAVE_ZIP" /> - <Add option="-DLOG_ENABLED" /> - <Add directory="..\..\..\..\engine" /> - <Add directory="..\..\..\..\engine\core" /> - <Add directory="..\..\includes\boost_1_38_0" /> - <Add directory="..\..\includes\libguichan" /> - <Add directory="..\..\includes\libogg" /> - <Add directory="..\..\includes\libpng" /> - <Add directory="..\..\includes\libvorbis" /> - <Add directory="..\..\includes\openal" /> - <Add directory="..\..\includes\python26" /> - <Add directory="..\..\includes\sdl" /> - <Add directory="..\..\includes\sdl_image" /> - <Add directory="..\..\includes\sdl_ttf" /> - <Add directory="..\..\includes\zlib" /> + <Add option="/Zi /D_DEBUG" /> + <Add option="/Zi" /> + <Add option="/D_DEBUG" /> </Compiler> <Linker> - <Add library="..\..\static_libs\mingw\libguichan_opengl.a" /> - <Add library="..\..\static_libs\mingw\libguichan_sdl.a" /> - <Add library="..\..\static_libs\mingw\libguichan.a" /> - <Add library="..\..\applications\mingw\lib\libmingw32.a" /> - <Add library="..\..\static_libs\mingw\libzlib.a" /> - <Add library="..\..\static_libs\mingw\libvorbis.a" /> - <Add library="..\..\static_libs\mingw\libogg.a" /> - <Add library="..\..\static_libs\mingw\libvorbisfile.a" /> - <Add library="..\..\static_libs\mingw\libpng.a" /> - <Add library="..\..\static_libs\mingw\SDL_image.lib" /> - <Add library="..\..\static_libs\mingw\libSDLmain.a" /> - <Add library="..\..\static_libs\mingw\libSDL.dll.a" /> - <Add library="..\..\static_libs\mingw\OpenAl32.lib" /> - <Add library="..\..\static_libs\mingw\SDL_ttf.lib" /> - <Add library="..\..\static_libs\mingw\libboost_filesystem.a" /> - <Add library="..\..\static_libs\mingw\libboost_regex.a" /> - <Add library="..\..\static_libs\mingw\libboost_system.a" /> - <Add library="..\..\applications\mingw\lib\libopengl32.a" /> - <Add library="..\..\applications\mingw\lib\libglu32.a" /> - <Add library="..\..\static_libs\mingw\python26\libpython26.a" /> + <Add option="/DEBUG" /> </Linker> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile --enable-debug install-python" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug install-python" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug install-python" /> + </MakeCommands> + </Target> + <Target title="Release_python"> + <Option output="bin\Release\fife" prefix_auto="1" extension_auto="1" /> + <Option object_output="obj\Release\" /> + <Option type="3" /> + <Option compiler="msvc8" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="/Ox" /> + <Add option="/DNDEBUG" /> + </Compiler> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile install-python" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c install-python" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c install-python" /> + </MakeCommands> + </Target> + <Target title="Debug_static"> + <Option output="fife" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option type="2" /> + <Option compiler="msvc8" /> + <Option createDefFile="1" /> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile --enable-debug fife-static" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug fife-static" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug fife-static" /> + </MakeCommands> + </Target> + <Target title="Debug_shared"> + <Option output="fife" prefix_auto="1" extension_auto="1" /> + <Option type="3" /> + <Option compiler="msvc8" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile --enable-debug fife-shared" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug fife-shared" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c --enable-debug fife-shared" /> + </MakeCommands> + </Target> + <Target title="Release_static"> + <Option output="fife" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option type="2" /> + <Option compiler="msvc8" /> + <Option createDefFile="1" /> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile fife-static" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c fife-static" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c fife-static" /> + </MakeCommands> + </Target> + <Target title="Release_shared"> + <Option output="fife" prefix_auto="1" extension_auto="1" /> + <Option type="3" /> + <Option compiler="msvc8" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <MakeCommands> + <Build command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile fife-shared" /> + <CompileFile command="" /> + <Clean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c fife-shared" /> + <DistClean command="python ../../applications/scons/scons.py -C ../../../../ -f $makefile -c fife-shared" /> + </MakeCommands> </Target> </Build> - <VirtualTargets> - <Add alias="All" targets="default;" /> - </VirtualTargets> <Compiler> - <Add option="-O3" /> - <Add option="-Wall" /> + <Add option="/W3" /> </Compiler> __FILE_INSERTION_POINT__ <Extensions> <code_completion /> - <envvars /> <debugger /> </Extensions> </Project>
--- a/build/win32/create_documentation.bat Tue Jan 19 17:45:49 2010 +0000 +++ b/build/win32/create_documentation.bat Wed Jan 20 05:56:18 2010 +0000 @@ -12,7 +12,7 @@ :: Goto TRUNK and call SCons cd \ cd %_%\..\.. -scons docs=1 >> "%_%\doxygen_log.txt" 2>&1 +python build\win32\applications\scons\scons.py docs >> "%_%\doxygen_log.txt" 2>&1 :: Return us to the directory we started from cd %_%
--- a/build/win32/update_project_files.bat Tue Jan 19 17:45:49 2010 +0000 +++ b/build/win32/update_project_files.bat Wed Jan 20 05:56:18 2010 +0000 @@ -8,14 +8,14 @@ :: Delete old generated project files to ensure that they get generated from scratch again cd %_%\build_environments -del code_blocks\fife_engine.cbp +del code_blocks\fife.cbp del visual_studio_8\fife.vcproj del visual_studio_9\fife.vcproj :: Goto TRUNK and call SCons cd \ cd "%_%\..\..\" -python build\win32\applications\scons\scons.py --release projects +python build\win32\applications\scons\scons.py projects :: Return us to the directory we started from cd %_%
--- a/build/win32/update_swig_files.bat Tue Jan 19 17:45:49 2010 +0000 +++ b/build/win32/update_swig_files.bat Wed Jan 20 05:56:18 2010 +0000 @@ -9,7 +9,7 @@ :: Goto TRUNK and call SCons cd \ cd "%_%\..\..\" -python build\win32\applications\scons\scons.py --release fife-swig +python build\win32\applications\scons\scons.py fife-swig :: Return us to the directory we started from cd %_%
--- a/engine/SConscript Tue Jan 19 17:45:49 2010 +0000 +++ b/engine/SConscript Wed Jan 20 05:56:18 2010 +0000 @@ -75,8 +75,8 @@ msvcproj = env.MSVCProject(os.path.join('..', '..','..', builders.msvcbuildpath, 'fife'), projectfiles) msvcproj9 = env.MSVCProject9(os.path.join('..', '..','..', builders.msvcbuildpath9, 'fife'), projectfiles) -cbproj_win32 = env.CodeblocksProjectWin32(os.path.join('..', '..','..', builders.cbbuildpath_win32, 'fife_engine'), projectfiles) -cbproj_linux = env.CodeblocksProjectLinux(os.path.join('..', '..','..', builders.cbbuildpath_linux, 'fife_engine'), projectfiles) +cbproj_win32 = env.CodeblocksProjectWin32(os.path.join('..', '..','..', builders.cbbuildpath_win32, 'fife'), projectfiles) +cbproj_linux = env.CodeblocksProjectLinux(os.path.join('..', '..','..', builders.cbbuildpath_linux, 'fife'), projectfiles) #**************************************************************************