Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set MINGW-ROOT=C:\MinGW
- set PATH=%PATH%;C:\Program Files\7-Zip;%~dp0
- if not exist "%MINGW-ROOT%" mkdir "%MINGW-ROOT%"
- if not exist "%MINGW-ROOT%" goto error-notroot
- if exist "%MINGW-ROOT%\bin" goto skip-extracting
- 7z.exe x -o"%MINGW-ROOT%" "%~dp0\mingw32-4.6.2.zip"
- if not exist "%MINGW-ROOT%\bin" goto error-no7z
- :skip-extracting
- "%MINGW-ROOT%\bin\mingw-get.exe" install "gcc-c++=4.6.2-1"
- "%MINGW-ROOT%\bin\mingw-get.exe" install "mingw32-make=3.82.90-2"
- if not exist "%MINGW-ROOT%\bin\g++.exe" goto error-nogcc
- if not exist "%MINGW-ROOT%\bin\mingw32-make.exe" goto error-nomake
- echo installation successfully complete
- echo add %MINGW-ROOT%\bin to PATH environment variable (advanced tab on system settings dialog)
- echo create environment variable MAKE_COMMAND=mingw32-make -j4
- sysdm.cpl
- goto end
- :error-notroot
- echo ERROR: have no rights to create directory %MINGW-ROOT%, run script as admin, please
- goto end
- :error-no7z
- echo ERROR: can't see 7z.exe around, install 7z, please
- goto end
- :error-nogcc
- echo ERROR: g++ was not installed
- goto end
- :error-nomake
- echo ERROR: make was not installed
- goto end
- :end
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement