2009-07-10 21:32:55 +08:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
REM Retrieve the SFML path
|
2009-07-10 22:17:39 +08:00
|
|
|
set SFML="%CD%\..\..\.."
|
2010-01-28 00:02:45 +08:00
|
|
|
set TMPDIR="%CD%\temp"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
REM Add the Code::Blocks path to the PATH
|
2009-07-10 22:17:39 +08:00
|
|
|
set PATH=%PATH%;"%CD%"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
REM Compile the SFML libraries
|
|
|
|
cd %SFML%\build\codeblocks
|
|
|
|
|
2010-01-14 23:01:43 +08:00
|
|
|
echo Compiling sfml-main...
|
|
|
|
codeblocks -na -nd -ns --build sfml-main.cbp --target="Debug_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-main.cbp --target="Release_Win32"
|
|
|
|
|
2009-07-10 21:32:55 +08:00
|
|
|
echo Compiling debug static libraries...
|
|
|
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Debug static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Debug static_Win32"
|
2010-01-14 22:57:20 +08:00
|
|
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Debug static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Debug static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Debug static_Win32"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
echo Compiling debug dynamic libraries...
|
|
|
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Debug DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Debug DLL_Win32"
|
2010-01-14 22:57:20 +08:00
|
|
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Debug DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Debug DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Debug DLL_Win32"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
echo Compiling release static libraries...
|
|
|
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Release static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Release static_Win32"
|
2010-01-14 22:57:20 +08:00
|
|
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Release static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Release static_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Release static_Win32"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
echo Compiling release dynamic libraries...
|
|
|
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Release DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Release DLL_Win32"
|
2010-01-14 22:57:20 +08:00
|
|
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Release DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Release DLL_Win32"
|
|
|
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Release DLL_Win32"
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
REM Copy the SFML static libraries into a temporary folder
|
2010-01-28 00:02:45 +08:00
|
|
|
IF NOT EXIST %TMPDIR% mkdir %TMPDIR%
|
2009-07-10 21:32:55 +08:00
|
|
|
cd %SFML%\lib\mingw
|
2010-01-28 00:02:45 +08:00
|
|
|
xcopy libsfml-*-s-d.a %TMPDIR%/q /y
|
|
|
|
xcopy libsfml-*-s.a %TMPDIR%/q /y
|
|
|
|
cd %TMPDIR%
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
REM Add external libraries to sfml-window
|
|
|
|
echo Adding external libraries to libsfml-window-s...
|
2009-07-10 22:17:39 +08:00
|
|
|
ar x %SFML%\build\codeblocks\batch-build\libgdi32.a
|
|
|
|
ar x %SFML%\build\codeblocks\batch-build\libopengl32.a
|
|
|
|
ar x %SFML%\build\codeblocks\batch-build\libwinmm.a
|
2009-07-10 21:32:55 +08:00
|
|
|
ar rs libsfml-window-s.a *.o
|
|
|
|
ar rs libsfml-window-s-d.a *.o
|
|
|
|
del *.o /f /q
|
|
|
|
|
|
|
|
REM Add external libraries to sfml-graphics
|
|
|
|
echo Adding external libraries to libsfml-graphics-s...
|
|
|
|
ar x %SFML%\extlibs\libs-mingw\libfreetype.a
|
2010-04-06 03:04:49 +08:00
|
|
|
ar x %SFML%\extlibs\libs-mingw\libglew.a
|
|
|
|
ar x %SFML%\extlibs\libs-mingw\libjpeg.a
|
2009-07-10 21:32:55 +08:00
|
|
|
ar rs libsfml-graphics-s.a *.o
|
|
|
|
ar rs libsfml-graphics-s-d.a *.o
|
|
|
|
del *.o /f /q
|
|
|
|
|
|
|
|
REM Add external libraries to sfml-audio
|
|
|
|
echo Adding external libraries to libsfml-audio-s...
|
|
|
|
ar x %SFML%\extlibs\libs-mingw\libopenal32.a
|
|
|
|
ar x %SFML%\extlibs\libs-mingw\libsndfile.a
|
|
|
|
ar rs libsfml-audio-s.a *.o
|
|
|
|
ar rs libsfml-audio-s-d.a *.o
|
|
|
|
del *.o /f /q
|
|
|
|
|
2010-01-14 22:57:20 +08:00
|
|
|
REM Add external libraries to sfml-network
|
|
|
|
echo Adding external libraries to libsfml-network-s...
|
|
|
|
ar x %SFML%\build\codeblocks\batch-build\libws2_32.a
|
|
|
|
ar rs libsfml-network-s.a *.o
|
|
|
|
ar rs libsfml-network-s-d.a *.o
|
|
|
|
del *.o /f /q
|
|
|
|
|
2009-07-10 21:32:55 +08:00
|
|
|
REM Copy the SFML libraries to their final location
|
|
|
|
echo Cleaning up...
|
|
|
|
xcopy *.a %SFML%\lib\mingw /q /y
|
|
|
|
del *.a /f /q
|
|
|
|
|
|
|
|
REM Remove the temporary directory we've just created
|
2010-01-28 00:02:45 +08:00
|
|
|
cd ..
|
|
|
|
rmdir %TMPDIR% /s /q
|
2009-07-10 21:32:55 +08:00
|
|
|
|
|
|
|
echo Done
|