Compile the wxWidgets source – batch script
When setting up a development environment for wxWidgets, it’s usually necessary to compile your own binaries from the source. This can be a tedious task, so I threw together a simple batch script which simplifies the whole process.
Note: As of 2.9.5, it is possible to download pre-built binaries for Visual C++ users.
[batch]@ECHO OFF
REM Prompt the user to enter the path to MinGW compiler
ECHO Please enter the path to MinGW (NOTE: It should not contain spaces.
ECHO If it does, it is recommended that you put it in the root of your C drive
ECHO (example, C:\MinGW\bin)
REM Get the input
SET /p PATH=
REM Prompt the user to enter the path to wxWidgets
ECHO Please enter the installation path of wxWidgets
ECHO (example, C:\wxWidgets-2.8.9)
REM Get the input
SET /p WX=
ECHO Executing… Go get a coffee, this may take a while ;)
REM Move into the WX directory
cd %WX%\build\msw
REM First we need to clean the source
@ECHO ON
%PATH%\mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
REM Now compile it
%PATH%\mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
ECHO Aaaaand… we’re done. Did you enjoy your coffee? :)
ECHO Press any key to exit
PAUSE>NUL[/batch]