mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-12 16:50:46 +00:00
windows batch commands - added ability to skip the installation.
This commit is contained in:
parent
ef3e74f75e
commit
9c90d6d084
@ -177,6 +177,7 @@ set skipCompile=0
|
|||||||
set skipDeploy=0
|
set skipDeploy=0
|
||||||
set requestQtPath=
|
set requestQtPath=
|
||||||
set toggleEcho="off"
|
set toggleEcho="off"
|
||||||
|
set skipInstallCommand=
|
||||||
:parseLoop
|
:parseLoop
|
||||||
IF "%1"=="" GOTO :exitParseLoop
|
IF "%1"=="" GOTO :exitParseLoop
|
||||||
set arg=%1
|
set arg=%1
|
||||||
@ -191,6 +192,9 @@ IF /I "%arg:~0,5%"=="SKIPC" (
|
|||||||
GOTO :endLoop )
|
GOTO :endLoop )
|
||||||
IF /I "%arg:~0,2%"=="OU" (set doOutSide=1 & GOTO :endLoop )
|
IF /I "%arg:~0,2%"=="OU" (set doOutSide=1 & GOTO :endLoop )
|
||||||
echo windows cmd.exe workaround 1>nul
|
echo windows cmd.exe workaround 1>nul
|
||||||
|
IF /I "%arg:~0,5%"=="SKIPI" (
|
||||||
|
set skipInstallCommand=skipInstall
|
||||||
|
GOTO :endLoop )
|
||||||
IF /I "%arg:~0,2%"=="re" (set useExistingBuild=1 & GOTO :endLoop )
|
IF /I "%arg:~0,2%"=="re" (set useExistingBuild=1 & GOTO :endLoop )
|
||||||
IF /I "%arg:~0,2%"=="ve" ( echo on & GOTO :endLoop )
|
IF /I "%arg:~0,2%"=="ve" ( echo on & GOTO :endLoop )
|
||||||
IF exist %arg%\Tools\nul IF exist %arg%\Licenses\nul (
|
IF exist %arg%\Tools\nul IF exist %arg%\Licenses\nul (
|
||||||
@ -338,7 +342,7 @@ mingw32-make.exe -j8 >make.log 2>&1 || (
|
|||||||
if %skipDeploy%==1 goto :endBuildOne
|
if %skipDeploy%==1 goto :endBuildOne
|
||||||
|
|
||||||
echo Deploying and Creating Installation Exec in %cd%
|
echo Deploying and Creating Installation Exec in %cd%
|
||||||
call "%~dp0\deploy.bat"
|
call "%~dp0\deploy.bat" %skipInstallCommand%
|
||||||
set buildErrorLevel=%ERRORLEVEL%
|
set buildErrorLevel=%ERRORLEVEL%
|
||||||
|
|
||||||
|
|
||||||
@ -383,3 +387,6 @@ echo _
|
|||||||
echo ^<Anything^> Displays invalid parameter message and help message then exits.
|
echo ^<Anything^> Displays invalid parameter message and help message then exits.
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,18 @@
|
|||||||
::: additional files, run WinDeployQt, and create an installer.
|
::: additional files, run WinDeployQt, and create an installer.
|
||||||
:::
|
:::
|
||||||
@echo off
|
@echo off
|
||||||
|
echo Executing %~nx0 %*
|
||||||
setlocal
|
setlocal
|
||||||
|
set doSkipInstall=0
|
||||||
|
set suffixParam=%1
|
||||||
|
if "%1"=="skipInstall" (
|
||||||
|
set doSkipInstall=1
|
||||||
|
set suffixParam=%2
|
||||||
|
) else (
|
||||||
|
if "%2"=="skipInstall" set doSkipInstall=1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo doSkipInstall = %doSkipInstall%
|
||||||
set errDescription=
|
set errDescription=
|
||||||
set errvalue=0
|
set errvalue=0
|
||||||
::: Current Directory is the shadowBuildDir
|
::: Current Directory is the shadowBuildDir
|
||||||
@ -36,7 +47,7 @@ set toolDir=%parentDir%\OSCAR-code\Building\Windows
|
|||||||
set sourceDir=%parentDir%\OSCAR-code\oscar
|
set sourceDir=%parentDir%\OSCAR-code\oscar
|
||||||
|
|
||||||
echo tooldir is %toolDir%
|
echo tooldir is %toolDir%
|
||||||
::echo parentDir is %parentDir%
|
::echo p arentDir is %parentDir%
|
||||||
:: echo sourceDir is %sourceDir%
|
:: echo sourceDir is %sourceDir%
|
||||||
echo shadowBuildDir is %shadowBuildDir%
|
echo shadowBuildDir is %shadowBuildDir%
|
||||||
if NOT exist %shadowBuildDir%\OSCAR.exe (
|
if NOT exist %shadowBuildDir%\OSCAR.exe (
|
||||||
@ -68,7 +79,7 @@ set path=%git:~0,-1%\usr\bin;%path%
|
|||||||
|
|
||||||
::: Now have gawk. -- do not delete this line.
|
::: Now have gawk. -- do not delete this line.
|
||||||
::: Now copy the base installation control file
|
::: Now copy the base installation control file
|
||||||
copy %toolDir%\buildInstall.iss %shadowBuildDir% 1>nul
|
copy %toolDir%\buildInstall.iss %shadowBuildDir% 1>nul
|
||||||
if NOT %ERRORLEVEL%==0 (
|
if NOT %ERRORLEVEL%==0 (
|
||||||
call :err 45 %ERRORLEVEL% failure to copy %toolDir%\buildInstall.iss to %shadowBuildDir%
|
call :err 45 %ERRORLEVEL% failure to copy %toolDir%\buildInstall.iss to %shadowBuildDir%
|
||||||
goto :endProgram
|
goto :endProgram
|
||||||
@ -95,7 +106,7 @@ if NOT %ERRORLEVEL%==0 (
|
|||||||
echo %shadowBuildDir% | gawk -f %toolDir%\getBuildInfo.awk >>%shadowBuildDir%\buildInfo.iss
|
echo %shadowBuildDir% | gawk -f %toolDir%\getBuildInfo.awk >>%shadowBuildDir%\buildInfo.iss
|
||||||
if NOT %ERRORLEVEL%==0 (
|
if NOT %ERRORLEVEL%==0 (
|
||||||
call :err 63 & goto :endProgram)
|
call :err 63 & goto :endProgram)
|
||||||
echo #define MySuffix "%1" >>%shadowBuildDir%\buildinfo.iss
|
echo #define MySuffix "%suffixParam%" >>%shadowBuildDir%\buildinfo.iss
|
||||||
if NOT %ERRORLEVEL%==0 (
|
if NOT %ERRORLEVEL%==0 (
|
||||||
call :err 64 & goto :endProgram)
|
call :err 64 & goto :endProgram)
|
||||||
:::echo #define MySourceDir "%sourcedir%" >>%shadowBuildDir%\buildinfo.iss
|
:::echo #define MySourceDir "%sourcedir%" >>%shadowBuildDir%\buildinfo.iss
|
||||||
@ -142,9 +153,11 @@ windeployqt.exe --force --compiler-runtime --no-translations --verbose 1 OSCAR.e
|
|||||||
::::For unknown reasons, Win64 build copies the .ts files into the release dir/ectory, while Win32 does not
|
::::For unknown reasons, Win64 build copies the .ts files into the release dir/ectory, while Win32 does not
|
||||||
if exist Translations\*.ts del /q Translations\*.ts
|
if exist Translations\*.ts del /q Translations\*.ts
|
||||||
|
|
||||||
|
|
||||||
::: Create installer
|
::: Create installer
|
||||||
echo Creating OSCAR Installation Exec
|
|
||||||
cd ..
|
cd ..
|
||||||
|
IF %doSkipInstall%==1 goto :endProgram
|
||||||
|
echo Creating OSCAR Installation Exec
|
||||||
"%ProgramFiles(x86)%\Inno Setup 6\iscc" /Q BuildInstall.iss || (call :err 88 & goto :endProgram)
|
"%ProgramFiles(x86)%\Inno Setup 6\iscc" /Q BuildInstall.iss || (call :err 88 & goto :endProgram)
|
||||||
if NOT exist %shadowBuildDir%\Installer\OSCAR*.exe (call :err 89 & goto :endProgram)
|
if NOT exist %shadowBuildDir%\Installer\OSCAR*.exe (call :err 89 & goto :endProgram)
|
||||||
:endProgram
|
:endProgram
|
||||||
@ -167,7 +180,9 @@ exit /b %errvalue%
|
|||||||
where gawk > temp.txt 2>nul
|
where gawk > temp.txt 2>nul
|
||||||
set er=%errorlevel%
|
set er=%errorlevel%
|
||||||
set gawk=<temp.txt
|
set gawk=<temp.txt
|
||||||
if %er%==0 (del temp.txt && goto :eof)
|
if %er%==0 (
|
||||||
|
del temp.txt
|
||||||
|
goto :eof)
|
||||||
:: get location of Git command - then find where Git was downloaded.
|
:: get location of Git command - then find where Git was downloaded.
|
||||||
where Git > temp.txt 2>nul
|
where Git > temp.txt 2>nul
|
||||||
set er=%errorlevel%
|
set er=%errorlevel%
|
||||||
|
Loading…
Reference in New Issue
Block a user