Created
August 21, 2019 16:47
-
-
Save platomav/62aa8e8816db7d501ec1fa005e3beebe to your computer and use it in GitHub Desktop.
UEFITool Compile Script for Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo ----------------------- | |
echo UEFITool Compile Script | |
echo ----------------------- | |
echo. | |
echo Checking requirements... | |
for %%R in (mingw49_32_release_static, mingw492_32, UEFITool-new_engine) do ( | |
if not exist %%R ( | |
echo. | |
echo %%R not found! | |
echo. | |
pause | |
exit /b 1 | |
) | |
) | |
set QtStcDir=%cd%\mingw49_32_release_static | |
set MingwDir=%cd%\mingw492_32 | |
set UTSrcDir=%cd%\UEFITool-new_engine | |
PATH = %QtStcDir%\bin;%MingwDir%\bin; | |
echo. | |
echo Building Make file... | |
qmake %UTSrcDir%\UEFITool\uefitool.pro QMAKE_CXXFLAGS="-static -flto -Os" QMAKE_LFLAGS="-static -flto -Os" CONFIG+=optimize_size CONFIG+=staticlib CONFIG+=static | |
echo. | |
echo Compiling sources... | |
mingw32-make -s -f Makefile.release | |
copy /b /y release\UEFITool.exe %cd%\UEFITool.exe > nul | |
echo. | |
echo Cleaning up... | |
mingw32-make -s distclean 2> nul | |
for %%F in (object_script.UEFITool.Release, object_script.UEFITool.Debug) do if exist %%F del %%F > nul | |
for %%D in (release, debug) do if exist %%D rmdir /q /s %%D > nul | |
echo. | |
echo Done! | |
echo. | |
pause | |
exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment