New build_windows.cmd
Change names of build scripts
This commit is contained in:
@@ -53,6 +53,14 @@ IF EXIST %NSIS_LOC% (
|
||||
|
||||
ECHO %current_activity%: All required build environment values are set.
|
||||
|
||||
IF DEFINED BUILD_DEBUG (
|
||||
ECHO %current_activity%: BUILD_DEBUG var set. NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS.
|
||||
ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS.
|
||||
ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS.
|
||||
ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS.
|
||||
EXIT /B %exit_code_failure_build_apps%
|
||||
)
|
||||
|
||||
ECHO %current_activity%: Running 7zip:
|
||||
%ZIP_LOC% a %project_dir%\%output_dir%\AdvancedSettings.zip %project_dir%\%output_dir%\AdvancedSettings\*
|
||||
ECHO %current_activity%: 7zip done.
|
||||
+25
-19
@@ -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.
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
echo on
|
||||
|
||||
SET project_dir="%cd%"
|
||||
|
||||
cd %project_dir%\bin\win64\
|
||||
|
||||
echo Copying project files for archival...
|
||||
copy "%project_dir%\Readme.md" "AdvancedSettings\Readme.md"
|
||||
copy "%project_dir%\LICENSE" "AdvancedSettings\LICENSE.txt"
|
||||
xcopy /Y /E /I "%project_dir%\src\res" "AdvancedSettings\res\"
|
||||
copy "%project_dir%\src\restartvrserver.bat" "AdvancedSettings\restartvrserver.bat"
|
||||
copy "%project_dir%\src\startdesktopmode.bat" "AdvancedSettings\startdesktopmode.bat"
|
||||
copy "%project_dir%\src\qt.conf" "AdvancedSettings\qt.conf"
|
||||
copy "%project_dir%\src\manifest.vrmanifest" "AdvancedSettings\manifest.vrmanifest"
|
||||
copy "%project_dir%\third-party\openvr\bin\win64\openvr_api.dll" "AdvancedSettings\openvr_api.dll"
|
||||
|
||||
echo Packaging portable archive...
|
||||
7z a AdvancedSettings.zip AdvancedSettings
|
||||
|
||||
echo Creating installer...
|
||||
cd %project_dir%/installer
|
||||
makensis installer.nsi
|
||||
Reference in New Issue
Block a user