New build_windows.cmd

Change names of build scripts
This commit is contained in:
Vasily
2018-12-26 18:21:02 +01:00
parent 8bec43d01e
commit eee7148c00
5 changed files with 33 additions and 41 deletions
+25 -19
View File
@@ -1,25 +1,31 @@
echo on
@echo off
REM Echo off to avoid spam.
SET project_dir="%cd%"
REM Used for echos.
SET top_level_activity=MASTER
echo Set up environment...
set original_path=%PATH%
set PATH=%QT%\bin\;C:\Qt\Tools\QtCreator\bin\;C:\Qt\QtIFW2.0.1\bin\;C:\Program Files (x86)\NSIS\;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
REM If scripts are chain called the original dirs should not be overwritten.
IF NOT DEFINED original_dir (
SET original_dir=%CD%
)
IF NOT DEFINED project_dir (
REM Arg 0 (called %0) is the full path to the file.
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters
REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only.
SET folder_path=%~dp0
REM Project dir is up two dirs from the file.
SET project_dir=%folder_path%\..\..\
)
cd "%project_dir%
echo Building AdvancedSettings...
qmake -spec win32-msvc CONFIG+=x86_64 CONFIG-=debug CONFIG+=release
nmake
ECHO %top_level_activity%: Calling build script.
CALL %project_dir%\build_scripts\win\build_windows.cmd
echo Packaging...
mkdir %project_dir%\bin\win64\
cd %project_dir%\bin\win64\
windeployqt --dir AdvancedSettings\qtdata --libdir AdvancedSettings --plugindir AdvancedSettings\qtdata\plugins --no-system-d3d-compiler --no-opengl-sw --release --qmldir ..\..\src\res\qml\ AdvancedSettings\AdvancedSettings.exe
ECHO %top_level_activity%: Calling deployment script.
CALL %project_dir%\build_scripts\win\deploy_windows.cmd
rd /s /q AdvancedSettings\moc\
rd /s /q AdvancedSettings\obj\
rd /s /q AdvancedSettings\qrc\
ECHO %top_level_activity%: Calling packaging script.
CALL %project_dir%\build_scripts\win\package_windows.cmd
set PATH=%original_path%
cd %project_dir%
CD %original_dir%
ECHO %top_level_activity%: MASTER DONE.