From 2af771d2d2172295edcb1ab43779587452a52db2 Mon Sep 17 00:00:00 2001 From: GijsR Date: Thu, 3 Jul 2025 04:56:21 +0200 Subject: [PATCH 1/3] Add NodeJS to build script --- build.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.ps1 b/build.ps1 index f17804d3f..615d7283b 100755 --- a/build.ps1 +++ b/build.ps1 @@ -172,6 +172,26 @@ if ($null -ne $packageType) { $BuildToolsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC" & $rustup default stable + + ## Test if Node is installed + if (!(Get-Command 'node' -ErrorAction Ignore)) { + Write-Verbose -Verbose "Node.js not found, installing..." + if (!$IsWindows) { + if (Get-Command 'brew' -ErrorAction Ignore) { + brew install node@24 + } else { + Write-Warning "Homebrew not found, please install Node.js manually" + } + } + else { + if (Get-Command 'winget' -ErrorAction Ignore) { + Write-Verbose -Verbose "Using winget to install Node.js" + & winget install OpenJS.NodeJS --accept-source-agreements --accept-package-agreements --source winget + } else { + Write-Warning "winget not found, please install Node.js manually" + } + } + } } if (!$SkipBuild -and !$SkipLinkCheck -and $IsWindows -and !(Get-Command 'link.exe' -ErrorAction Ignore)) { From e9e39585c2e8e0ba64a02cc9e3ee1cb71a64c5f8 Mon Sep 17 00:00:00 2001 From: GijsR Date: Thu, 3 Jul 2025 04:58:06 +0200 Subject: [PATCH 2/3] Add remark --- build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build.ps1 b/build.ps1 index 615d7283b..576ebebc0 100755 --- a/build.ps1 +++ b/build.ps1 @@ -174,6 +174,7 @@ if ($null -ne $packageType) { & $rustup default stable ## Test if Node is installed + ## Skipping upgrade as users may have a specific version they want to use if (!(Get-Command 'node' -ErrorAction Ignore)) { Write-Verbose -Verbose "Node.js not found, installing..." if (!$IsWindows) { From c68c44e0a0d655c43d2bcb1797d0cde13c3c26a1 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Fri, 4 Jul 2025 07:25:22 +0200 Subject: [PATCH 3/3] Ampersand --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 576ebebc0..08df26a9a 100755 --- a/build.ps1 +++ b/build.ps1 @@ -187,7 +187,7 @@ if ($null -ne $packageType) { else { if (Get-Command 'winget' -ErrorAction Ignore) { Write-Verbose -Verbose "Using winget to install Node.js" - & winget install OpenJS.NodeJS --accept-source-agreements --accept-package-agreements --source winget + winget install OpenJS.NodeJS --accept-source-agreements --accept-package-agreements --source winget --silent } else { Write-Warning "winget not found, please install Node.js manually" }