|
@@ -1,6 +1,19 @@
|
|
|
param()
|
|
param()
|
|
|
$ErrorActionPreference = "Stop"
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
|
|
|
|
+$cargoDir = Join-Path $PSScriptRoot ".cargo"
|
|
|
|
|
+if (-not (Test-Path $cargoDir)) {
|
|
|
|
|
+ New-Item -ItemType Directory -Path $cargoDir | Out-Null
|
|
|
|
|
+}
|
|
|
|
|
+$cargoConfig = Join-Path $cargoDir "config.toml"
|
|
|
|
|
+$cargoConfigText = @"
|
|
|
|
|
+[patch.crates-io]
|
|
|
|
|
+hts-sys = { path = "patches/hts-sys" }
|
|
|
|
|
+rust-htslib = { path = "patches/rust-htslib" }
|
|
|
|
|
+"@
|
|
|
|
|
+[System.IO.File]::WriteAllText($cargoConfig, $cargoConfigText, (New-Object System.Text.UTF8Encoding $false))
|
|
|
|
|
+Write-Host "Wrote local Windows Cargo patch config -> .cargo\config.toml"
|
|
|
|
|
+
|
|
|
$found = Resolve-Path "$env:USERPROFILE\.cargo\registry\src\index.crates.io-*\hts-sys-2.2.0" `
|
|
$found = Resolve-Path "$env:USERPROFILE\.cargo\registry\src\index.crates.io-*\hts-sys-2.2.0" `
|
|
|
-ErrorAction SilentlyContinue
|
|
-ErrorAction SilentlyContinue
|
|
|
if (-not $found) {
|
|
if (-not $found) {
|