added some simple windows build scripts to make building on windows from powershell or command prompt easier added build_rive.bat and build_rive.ps1 to build from the command prompt and PowerShell respectively. also added some setup scripts to the scripts folder to auto-set the path to the correct location Diffs= fb7756072 added some simple windows build scripts to make building on windows from powershell or command prompt easier (#7800) Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
diff --git a/.rive_head b/.rive_head index ac7db82..b4f79f3 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -ed56d2de61afb05abd99e8bab6775b63ab89f1a3 +fb7756072f7c28fff774e536b6bbbca664a35664
diff --git a/build/build_rive.bat b/build/build_rive.bat new file mode 100644 index 0000000..a0d7a19 --- /dev/null +++ b/build/build_rive.bat
@@ -0,0 +1,10 @@ +@echo off +REM we could check where vs is install via the registery like stated here https://superuser.com/questions/539666/how-to-get-the-visual-studio-installation-path-in-a-batch-file but i think that is overkill +if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" +else ( + if exist CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" + else echo "Visual Studio 2022 does not appear to be installed, please install visual studio to C:\Program Files\Microsoft Visual Studio" +) + +cd %CD% +sh build_rive.sh %*
diff --git a/build/build_rive.ps1 b/build/build_rive.ps1 new file mode 100644 index 0000000..b223f9c --- /dev/null +++ b/build/build_rive.ps1
@@ -0,0 +1,15 @@ +# requires Set-ExecutionPolicy Bypass -Scope CurrentUser +$CWD = Get-Location +if (Test-Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" -PathType Leaf) { + & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" +} else { + if ("C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1") { + & 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' + } + else { + Write-Error "Visual Studio 2022 does not appear to be installed, please install visual studio to C:\Program Files\Microsoft Visual Studio" + exit + } +} +Set-Location $CWD +sh build_rive.sh $args \ No newline at end of file
diff --git a/build/build_rive.sh b/build/build_rive.sh index cb1a305..30ad087 100755 --- a/build/build_rive.sh +++ b/build/build_rive.sh
@@ -80,9 +80,6 @@ MINGW*|MSYS*) HOST_MACHINE="windows" NUM_CORES=$NUMBER_OF_PROCESSORS - # Try to find MSBuild.exe - export PATH="$PATH:$PROGRAMFILES/Microsoft Visual Studio/2022/Enterprise/Msbuild/Current/Bin" - export PATH="$PATH:$PROGRAMFILES/Microsoft Visual Studio/2022/Community/Msbuild/Current/Bin" ;; Linux*) HOST_MACHINE="linux"