Skip to content

Commit

Permalink
test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
paperclover committed Nov 1, 2023
1 parent 823b333 commit 27ae44c
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions windows-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@ $ErrorActionPreference = "Stop"

# Set up MSVC environment variables. This is taken from Bun's 'scripts\env.ps1'
if ($env:VSINSTALLDIR -eq $null) {
Write-Host "Loading Visual Studio environment, this may take a second..."
$vsDir = Get-ChildItem -Path "C:\Program Files\Microsoft Visual Studio\2022" -Directory
if ($vsDir -eq $null) {
throw "Visual Studio directory not found."
}
Push-Location $vsDir
try {
. (Join-Path -Path $vsDir.FullName -ChildPath "Common7\Tools\Launch-VsDevShell.ps1") -Arch amd64 -HostArch amd64
} finally { Pop-Location }
Write-Host "Loading Visual Studio environment, this may take a second..."
$vsDir = Get-ChildItem -Path "C:\Program Files\Microsoft Visual Studio\2022" -Directory
if ($vsDir -eq $null) {
throw "Visual Studio directory not found."
}
Push-Location $vsDir
try {
. (Join-Path -Path $vsDir.FullName -ChildPath "Common7\Tools\Launch-VsDevShell.ps1") -Arch amd64 -HostArch amd64
}
finally { Pop-Location }
}

if($Env:VSCMD_ARG_TGT_ARCH -eq "x86") {
# Please do not try to compile Bun for 32 bit. It will not work. I promise.
throw "Visual Studio environment is targetting 32 bit. This configuration is definetly a mistake."
if ($Env:VSCMD_ARG_TGT_ARCH -eq "x86") {
# Please do not try to compile Bun for 32 bit. It will not work. I promise.
throw "Visual Studio environment is targetting 32 bit. This configuration is definetly a mistake."
}

# Remove strawberry from the path while compiling ICU
# They define `link.exe` and many other things which will cause the build to fail.
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""

$output = if ($env:WEBKIT_OUTPUT_DIR) { $env:WEBKIT_OUTPUT_DIR } else { "bun-webkit" }
$WebKitBuild = if ($env:WEBKIT_BUILD_DIR) { $env:WEBKIT_BUILD_DIR } else { "WebKitBuild" }
$CMAKE_BUILD_TYPE = if ($env:CMAKE_BUILD_TYPE) { $env:CMAKE_BUILD_TYPE } else { "Release" }
Expand Down

0 comments on commit 27ae44c

Please sign in to comment.