You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/08/15 20:46:35 UTC
(couchdb-glazier) 01/01: Update build tools
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch update-build-tools
in repository https://gitbox.apache.org/repos/asf/couchdb-glazier.git
commit 77306c680e440e49f03bf6a2f2a7589fab820898
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Thu Aug 15 22:43:24 2024 +0200
Update build tools
- Update build tools
- Install tools into tools directory (default: c:\tools)
---
bin/install_dependencies.ps1 | 39 ++++++++++++++++++++++-----------------
bin/shell.ps1 | 10 +++++-----
bin/variables.ps1 | 30 ++++++++++++++++++------------
3 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/bin/install_dependencies.ps1 b/bin/install_dependencies.ps1
index bbe7828..e44c9bf 100644
--- a/bin/install_dependencies.ps1
+++ b/bin/install_dependencies.ps1
@@ -8,41 +8,46 @@
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
-# the License.
+# the License.#
# Sourcing variable definitions
. ${PSScriptRoot}\variables.ps1
+if (-not (Test-Path -Path $toolsDir)) {
+ New-Item -Path $toolsDir -ItemType Directory
+}
+
# Exclude c:\relax from MS defender to speed up things
Add-MpPreference -ExclusionPath "C:\relax"
+Add-MpPreference -ExclusionPath "${toolsDir}"
# Install build tools - requires English language pack installed
choco install visualstudio2022buildtools "--passive --locale en-US"
choco install visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.Redist.MSM --add Microsoft.Net.Component.4.8.TargetingPack"
choco install make nssm vswhere gnuwin32-coreutils.portable
-choco install wixtoolset --version=3.11.2
-choco install nodejs --version=18.18.2
-choco install python --version=3.11.6
+choco install wixtoolset --version=3.14.1
+choco install nodejs --version=18.20.3
+choco install python --version=3.11.9
choco install archiver --version=3.1.0
-choco install msys2 --version=20240113.0.0
+choco install msys2 --version=20240727.0.0
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
-Install-Module VSSetup -Scope CurrentUser -Force
+Install-Module VSSetup -Scope CurrentUser -Force
# Explicit workaround that refresnenv is working for this powershell shell
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
-refreshenv
+refreshenv
Write-Output " ***** Setting up MSYS ******* "
msys2_shell.cmd -defterm -no-start -ucrt64 -lc 'pacman -Syu'
msys2_shell.cmd -defterm -no-start -ucrt64 -lc 'pacman -S --noconfirm --needed base-devel make mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-dlfcn'
-Write-Output " ******** Finished setting up MSYS ********"
+Write-Output " ******** Finished setting up MSYS ********"#
+# Upgrade pip
python -m pip install --upgrade pip
-pip install --upgrade sphinx sphinxcontrib-httpdomain sphinx_rtd_theme pygments nose2 hypothesis
# Hide the Download-StatusBar and improve download speed of wget-Cmdlet
$ProgressPreference = 'SilentlyContinue'
@@ -52,7 +57,7 @@ Write-Output "Downloading Erlang ..."
Invoke-WebRequest -Uri $erlBuildUri -OutFile $erlBuildFile
Write-Output "Installing Erlang ..."
Start-Process -Wait -Filepath "$erlBuildFile" -ArgumentList "/S /D=${erlInstallPath}"
-
+
# Download and install Elixir
Write-Output "Downloading Elixir ..."
Invoke-WebRequest -Uri $elxBuildUri -OutFile $elxBuildFile
@@ -64,7 +69,7 @@ Write-Output "Downloading VCPkg ..."
Invoke-WebRequest -Uri $vcpkgUri -OutFile $vcpkgFile
Write-Output "Installing VCPkg ..."
arc unarchive $vcpkgFile
-copy -Recurse -Force "vcpkg-${vcpkgVersion}" $vcpkgInstallPath
+Copy-Item -Recurse -Force "vcpkg-${vcpkgVersion}" $vcpkgInstallPath
& "${vcpkgInstallPath}\bootstrap-vcpkg.bat" -disableMetrics
$vcpkg = "${vcpkgInstallPath}\vcpkg"
& $vcpkg integrate install --triplet x64-windows
@@ -80,19 +85,19 @@ Write-Output "Downloading SpiderMonkey ..."
Invoke-WebRequest -Uri $smBuildUri -OutFile $smBuildFile
Write-Output "Installing SpiderMonkey ..."
arc unarchive $smBuildFile
-copy -Recurse -Force "$smBuild\*" $vcpkgBase
+Copy-Item -Recurse -Force "$smBuild\*" $vcpkgBase
# Download and install Java 8
Write-Output "Downloading OpenJDK 8 ..."
Invoke-WebRequest -Uri $java8BuildUri -OutFile $java8BuildFile
Write-Output "Installing OpenJDK 8 ..."
-arc unarchive $java8BuildFile "C:\tools"
+arc unarchive $java8BuildFile "${toolsDir}"
# Download and install Java 11
-Write-Output "Downloading OpenJDK 11 ..."
-Invoke-WebRequest -Uri $java11BuildUri -OutFile $java11BuildFile
-Write-Output "Installing OpenJDK 11 ..."
-arc unarchive $java11BuildFile "C:\tools"
+Write-Output "Downloading OpenJDK 21 ..."
+Invoke-WebRequest -Uri $java21BuildUri -OutFile $java21BuildFile
+Write-Output "Installing OpenJDK 21 ..."
+arc unarchive $java21BuildFile "${toolsDir}"
# we know what we are doing (, do we really?)
Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
diff --git a/bin/shell.ps1 b/bin/shell.ps1
index e7d7ce1..f89fae4 100644
--- a/bin/shell.ps1
+++ b/bin/shell.ps1
@@ -31,13 +31,13 @@ $env:VCPKG_BIN = "${vcpkgBase}\bin"
$env:PATH += ";${erlInstallPath}\bin"
$env:PATH += ";${elxInstallPath}\bin"
$env:PATH += ";${vcpkgBase}\bin"
-$env:PATH += ";C:\Program Files (x86)\WiX Toolset v3.11\bin"
-$env:PATH += ";C:\tools\${java11Build}\bin"
-$env:PATH += ";C:\tools\msys64;C:\tools\msys64\ucrt64\bin"
+$env:PATH += ";C:\Program Files (x86)\WiX Toolset v3.14\bin"
+$env:PATH += ";${toolsDir}\${java21Build}\bin"
+$env:PATH += ";${toolsDir}\msys64;${toolsDir}\msys64\ucrt64\bin"
$env:LIB = "${vcpkgBase}\lib;" + $env:LIB
$env:INCLUDE = "${vcpkgBase}\include;" + $env:INCLUDE
$env:LIBPATH = "${vcpkgBase}\lib;" + $env:LIBPATH
-$env:JAVA_HOME = "C:\tools\${java11Build}"
-$env:CLOUSEAU_JAVA_HOME = "C:\tools\${java8Build}"
+$env:JAVA_HOME = "${toolsDir}\${java21Build}"
+$env:CLOUSEAU_JAVA_HOME = "${toolsDir}\${java8Build}"
diff --git a/bin/variables.ps1 b/bin/variables.ps1
index 8284738..74f9054 100644
--- a/bin/variables.ps1
+++ b/bin/variables.ps1
@@ -10,38 +10,44 @@
# License for the specific language governing permissions and limitations under
# the License.
+# Installation directory for build tools
+$toolsDir = "C:\tools"
+
# VCPKG SETTINGS
# Download location of Vcpkg for Windows
-$vcpkgVersion = "2023.10.19"
+$vcpkgVersion = "2024.07.12"
$vcpkgUri = "https://github.com/microsoft/vcpkg/archive/refs/tags/${vcpkgVersion}.zip"
$vcpkgFile = Split-Path $vcpkgUri -Leaf
-$vcpkgInstallPath = "C:\tools\vcpkg"
+$vcpkgInstallPath = "${toolsDir}\vcpkg"
$vcpkgBase = "${vcpkgInstallPath}\installed\x64-windows"
# ERLANG BUILD SETTINGS
# Download location of the Erlang/OTP Environment for Windows (x64)
-$erlVersion = "25.3.2.12"
+$erlVersion = "25.3.2.13"
$erlBuildUri = "https://github.com/erlang/otp/releases/download/OTP-${erlVersion}/otp_win64_${erlVersion}.exe"
$erlBuildFile = Split-Path $erlBuildUri -Leaf
$erlDir = "erl-${erlVersion}"
-$erlInstallPath = "C:\tools\${erlDir}"
+$erlInstallPath = "${toolsDir}\${erlDir}"
# ERLANG BUILD SETTINGS
# Download location of the Elixir binaries for Windows (x64)
-$elxBuildUri = "https://github.com/elixir-lang/elixir/releases/download/v1.15.7/elixir-otp-25.zip"
+$elxVersion = "1.15.7"
+$elxBuildUri = "https://github.com/elixir-lang/elixir/releases/download/v${elxVersion}/elixir-otp-25.zip"
$elxBuildFile = Split-Path $elxBuildUri -Leaf
-$elxInstallPath = "C:\relax\elixir"
+$elxDir = "elixir-${elxVersion}"
+$elxInstallPath = "${toolsDir}\${elxDir}"
# SPIDERMONKEY SETTINGS
-# Donwload location of the SpiderMonkey development files for Windows (x64)
+# Download location of the pre-build SpiderMonkey development files for Windows (x64)
$smBuild = "Windows-mozjs-91"
-$smBuildUri = "https://github.com/big-r81/couchdb-sm/releases/download/v0.0.3/$smBuild.tar.xz"
+$smBuildVersion = "0.0.5"
+$smBuildUri = "https://github.com/big-r81/couchdb-sm/releases/download/v${smBuildVersion}/${smBuild}.tar.xz"
$smBuildFile = Split-Path $smBuildUri -Leaf
-$smInstallPath = "C:\relax\vcpkg\installed\x64-windows"
+$smInstallPath = "${vcpkgBase}"
# JAVA 8 SETTINGS
@@ -53,6 +59,6 @@ $java8BuildFile = Split-Path $java8BuildUri -Leaf
# JAVA 11 SETTINGS
# Donwload location of OpenJDK 11 for Windows (x64)
-$java11Build = "zulu11.74.15-ca-jdk11.0.24-win_x64"
-$java11BuildUri = "https://cdn.azul.com/zulu/bin/$java11Build.zip"
-$java11BuildFile = Split-Path $java11BuildUri -Leaf
+$java21Build = "zulu21.36.17-ca-jdk21.0.4-win_x64"
+$java21BuildUri = "https://cdn.azul.com/zulu/bin/$java21Build.zip"
+$java21BuildFile = Split-Path $java21BuildUri -Leaf
\ No newline at end of file