Publish Nerbus source snapshot and build documentation
This commit is contained in:
commit
73401987df
17 files changed
+2169
No files matched your search
@@ -0,0 +1,14 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$temp = Join-Path ([System.IO.Path]::GetTempPath()) ('nerbus-sodium-' + [guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Path $temp | Out-Null
|
||||
$archive = Join-Path $temp 'libsodium.zip'
|
||||
Invoke-WebRequest 'https://github.com/jedisct1/libsodium/releases/download/1.0.22-RELEASE/libsodium-1.0.22-msvc.zip' -OutFile $archive
|
||||
if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne '3e03a726fac4bc09cb61d8f29d658ef7a5eca0811de59082130414f7ca2e4279') { throw 'libsodium checksum mismatch' }
|
||||
Expand-Archive $archive -DestinationPath $temp
|
||||
$destination = Join-Path $root 'vendor/sodium'
|
||||
New-Item -ItemType Directory -Force -Path "$destination/lib","$destination/bin" | Out-Null
|
||||
Copy-Item "$temp/libsodium/include" $destination -Recurse -Force
|
||||
Copy-Item "$temp/libsodium/x64/Release/v143/dynamic/libsodium.lib" "$destination/lib/libsodium.lib" -Force
|
||||
Copy-Item "$temp/libsodium/x64/Release/v143/dynamic/libsodium.dll" "$destination/bin/libsodium.dll" -Force
|
||||
Write-Output 'Verified libsodium dependency installed.'
|
||||
Reference in new issue
Block a user