Skip to content

Commit

Permalink
added some simple windows build scripts to make building on windows f…
Browse files Browse the repository at this point in the history
…rom 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 <[email protected]>
  • Loading branch information
csmartdalton and blakdragan7 committed Aug 15, 2024
1 parent f450f95 commit a57a234
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ed56d2de61afb05abd99e8bab6775b63ab89f1a3
fb7756072f7c28fff774e536b6bbbca664a35664
10 changes: 10 additions & 0 deletions build/build_rive.bat
Original file line number Diff line number Diff line change
@@ -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 %*
15 changes: 15 additions & 0 deletions build/build_rive.ps1
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions build/build_rive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ case "$(uname -s)" in
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"
Expand Down

0 comments on commit a57a234

Please sign in to comment.