diff --git a/.gitignore b/.gitignore index b1d79c71..fb861c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ Makefile* *.qmlproject.user *.qmlproject.user.* +#Remnants of editors etc. +.vscode +*.bak diff --git a/Building/Windows/BUILD-WIN.md b/Building/Windows/BUILD-WIN.md index b3cb811a..a48cc617 100644 --- a/Building/Windows/BUILD-WIN.md +++ b/Building/Windows/BUILD-WIN.md @@ -150,6 +150,11 @@ Now you should be able to build the OSCAR project from the QT Build menu. To make 32-bit or 64-bit builds, just make sure the correct Build item is selected in the Build & Run section on the left. +If you prefer to build from the command line and not use QT Creator, a +batch script buildall.bat will build and create installers for both 32-bit +and 64-bit versions of Windows. This script has some hard-coded paths, so +will need to be modified for your system configuration. + **The Deploy.BAT file** The deployment batch file creates two folders inside the shadow build folder: diff --git a/Building/Windows/Use Legacy Graphics.reg b/Building/Windows/Use Legacy Graphics.reg new file mode 100644 index 00000000..557a8347 Binary files /dev/null and b/Building/Windows/Use Legacy Graphics.reg differ diff --git a/Building/Windows/buildall.bat b/Building/Windows/buildall.bat new file mode 100644 index 00000000..a6c8332e --- /dev/null +++ b/Building/Windows/buildall.bat @@ -0,0 +1,59 @@ +setlocal +:::@echo off +set qtpath=E:\Qt +set qtVersion=5.12.2 + +::: +::: Build 32- and 64-bit versions of OSCAR for Windows. +::: Includes code to build BrokenGL (LegacyGFX) versions, but that option is not currently used +::: Uses Timer 4.0 - Command Line Timer - www.Gammadyne.com - to show time it takes to compile. This could be removed. +timer /nologo + +:::call :buildone 32 brokengl + +call :buildone 64 + +call :buildone 32 + +:::call :buildone 64 brokengl +timer /s /nologo +goto :eof + +::: Subroutine to build one version +:buildone +setlocal +timer /nologo +set QTDIR=%qtpath%\%qtversion%\mingw73_%1 +echo QTDIR is %qtdir% +set path=%qtpath%\Tools\mingw730_%1\bin;%qtpath%\%qtversion%\mingw73_%1\bin;%qtpath%\Tools\mingw730_%1\bin;%PATH% +set savedir=%cd% +: Construct name of our build directory +set dirname=build-oscar-win_%1_bit +if "%2"=="brokengl" ( + set dirname=%dirname%-LegacyGFX + set extraparams=DEFINES+=BrokenGL +) +echo Build directory is %dirname% + +set basedir=..\.. +if exist %basedir%\%dirname%\nul rmdir /s /q %basedir%\%dirname% +mkdir %basedir%\%dirname% +cd %basedir%\%dirname% + +%qtpath%\%qtversion%\mingw73_%1\bin\qmake.exe ..\oscar\OSCAR.pro -spec win32-g++ %extraparams% >qmake.log 2>&1 && %qtpath%/Tools/mingw730_%1/bin/mingw32-make.exe qmake_all >>qmake.log 2>&1 +mingw32-make.exe -j8 >make.log 2>&1 || goto :makefail + +call ..\Building\Windows\deploy.bat + +timer /s /nologo +echo === MAKE %1 %2 SUCCESSFUL === +cd %savedir% +endlocal +exit /b + +:makefail +endlocal +timer /s /nologo +echo *** MAKE %1 %2 FAILED *** +pause +exit /b \ No newline at end of file diff --git a/Building/Windows/deploy.bat b/Building/Windows/deploy.bat index cc7f94fc..4a24cafd 100644 --- a/Building/Windows/deploy.bat +++ b/Building/Windows/deploy.bat @@ -12,7 +12,7 @@ ::: Inno Setup - http://www.jrsoftware.org/isinfo.php, installed to default Program Files (x86) location ::: gawk - somewhere in the PATH or in Git for Windows installed in its default lolcation ::: -::: Deploy.bat resides in .../OSCAR-code/Installers/Windows, along with +::: Deploy.bat resides in .../OSCAR-code/Nuilding/Windows, along with ::: buildinstall.iss -- script for Inno Setup to create installer ::: getBuildInfo.awk -- gawk script for extracting version fields from various files ::: setup.ico -- Icon to be used for the installer. @@ -44,6 +44,7 @@ echo shadowBuildDir is %shadowBuildDir% copy %toolDir%buildInstall.iss %shadowBuildDir% || exit 45 copy %toolDir%setup.ico %shadowBuildDir% || exit 46 +copy %toolDir%use*.reg %shadowBuildDir% || exit 47 ::: ::: If gawk.exe is in the PATH, use it. If not, add Git mingw tools (awk) to path. They cannot @@ -69,6 +70,7 @@ if exist %shadowBuildDir%\Release\*.* rmdir /s /q %shadowBuildDir%\Release mkdir %shadowBuildDir%\Release cd %shadowBuildDir%\Release copy %shadowBuildDir%\oscar.exe . || exit 71 +copy %shadowBuildDir%\use*.reg . || exit 72 ::: Now in Release subdirectory ::: If QT created a help directory, copy it. But it might not have if "helpless" option was set