2021-02-02 20:23:51 +03:00
# What ?
2023-04-05 12:07:50 +03:00
This document describes the steps to build the `windows 64bits hurl binary` with Powershell 7.
2022-05-20 09:46:22 +03:00
All command have been launched with `admin` privileges on `c:\` root dir and executed sequentially. *(If you don't want to use `c:\` as installation path and git clone path, please replace all its references before executing commands )*
All the steps have been tested on a `blank` Windows 10 64bits and total operation time is about `30 minutes` with a xdsl connection (5mb/sec).
2021-02-02 20:23:51 +03:00
You just have to follow each chapter sequentially until you get a windows installer allowing the native installation of hurl on your favorite windows 64bits computer.
2022-05-20 09:46:22 +03:00
# Build requirements
2022-12-29 15:55:10 +03:00
Install vs_buildtools
2023-04-05 12:07:50 +03:00
```pwsh
2022-05-20 09:46:22 +03:00
cd c:\
Invoke-WebRequest -UseBasicParsing https://aka.ms/vs/17/release/vs_buildtools.exe -Outfile vs_buildtools.exe
Start-Process -Wait -PassThru -FilePath .\vs_buildtools.exe -ArgumentList "--addProductLang", "En-us", "--add", "Microsoft.VisualStudio.Workload.VCTools", "--includeRecommended", "--passive", "--norestart", "--nocache", "--wait"
2022-12-29 15:55:10 +03:00
```
Install chocolatey
2023-04-05 12:07:50 +03:00
```pwsh
2022-05-20 09:46:22 +03:00
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
2022-12-29 15:55:10 +03:00
```
Install git, llvm, nsis and python3
2023-04-05 12:07:50 +03:00
```pwsh
2022-12-29 15:55:10 +03:00
choco install --confirm --no-progress git winlibs-llvm-free nsis
2023-03-22 15:30:30 +03:00
choco install --confirm --no-progress python3 --version "3.9.13"
2023-01-05 10:19:55 +03:00
python -m pip install --upgrade pip --quiet
2022-12-29 15:55:10 +03:00
```
Install rust
2023-04-05 12:07:50 +03:00
```pwsh
2022-05-20 09:46:22 +03:00
Invoke-WebRequest -UseBasicParsing -OutFile "c:\rustup-init.exe" "https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe"
c:\rustup-init.exe -y --default-toolchain stable-x86_64-pc-windows-msvc
Set-ItemProperty -Path HKCU:\Environment -Name RUST_BACKTRACE -Value "full"
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
2022-12-29 15:55:10 +03:00
```
Install vcpkg
2023-04-05 12:07:50 +03:00
```pwsh
2022-12-29 13:36:05 +03:00
git.exe config --global core.autocrlf false
git.exe config --global core.eol lf
2022-05-20 09:46:22 +03:00
git.exe clone https://github.com/microsoft/vcpkg
c:\vcpkg\bootstrap-vcpkg.bat
$oldpath = Get-ItemProperty -Path HKCU:\Environment -Name Path
$newpath = $oldpath.Path += ";c:\vcpkg"
Set-ItemProperty -Path HKCU:\Environment -Name Path -Value $newpath
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
2022-12-29 15:55:10 +03:00
```
2022-05-20 09:46:22 +03:00
# Clone hurl project
2023-04-05 12:07:50 +03:00
```pwsh
2022-05-20 09:46:22 +03:00
cd c:\
2022-12-29 13:36:05 +03:00
git.exe clone https://github.com/Orange-OpenSource/hurl.git
2022-05-20 09:46:22 +03:00
```
2023-10-20 11:32:57 +03:00
# Build
2022-05-20 09:46:22 +03:00
2023-04-05 12:07:50 +03:00
```pwsh
2022-12-29 13:36:05 +03:00
cd c:\hurl
2023-10-20 11:32:57 +03:00
.\bin\install_prerequisites_windows.ps1
.\bin\release\release.ps1
2022-05-20 09:46:22 +03:00
```
# Create a simple zip package
2023-04-05 12:07:50 +03:00
```pwsh
2022-12-29 13:36:05 +03:00
cd c:\hurl
.\bin\release\create_windows64_zip_package.ps1
2022-05-20 09:46:22 +03:00
```
# Create a package installer for win64
2021-02-02 20:23:51 +03:00
2023-04-05 12:07:50 +03:00
```pwsh
2022-05-20 09:46:22 +03:00
cd c:\hurl
2022-12-29 13:36:05 +03:00
.\bin\release\create_windows64_installer.ps1
2022-05-20 09:46:22 +03:00
```
2021-02-02 20:23:51 +03:00