-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor how CI builds jsdec and rizin
- Loading branch information
Showing
6 changed files
with
60 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.ci-scripts\vsdevenv.ps1 64 | ||
|
||
function Invoke-NativeCommand() { | ||
if ($args.Count -eq 0) { | ||
throw "Must supply some arguments." | ||
} | ||
|
||
$command = $args[0] | ||
$commandArgs = @() | ||
if ($args.Count -gt 1) { | ||
$commandArgs = $args[1..($args.Count - 1)] | ||
} | ||
|
||
& $command $commandArgs | ||
$result = $LASTEXITCODE | ||
|
||
if ($result -ne 0) { | ||
throw "$command $commandArgs exited with code $result." | ||
} | ||
} | ||
|
||
|
||
$rizin_path = "C:$env:HOMEPATH\AppData\Local\Programs\rizin" | ||
$env:PATH = "$env:PATH;C:$env:HOMEPATH\AppData\Local\Programs\rizin\bin" | ||
$env:PKG_CONFIG_PATH = "C:$env:HOMEPATH\AppData\Local\Programs\rizin\lib\pkgconfig" | ||
$env:CFLAGS = "-IC:$env:HOMEPATH\AppData\Local\Programs\rizin\include\librz -IC:$env:HOMEPATH\AppData\Local\Programs\rizin\include\librz\sdb" | ||
$env:LDFLAGS = "-LC:$env:HOMEPATH\AppData\Local\Programs\rizin\lib" | ||
|
||
|
||
Invoke-NativeCommand meson setup --buildtype=release --prefix="$rizin_path" build | ||
Invoke-NativeCommand ninja -C build install | ||
rizin.exe -e log.level=2 -Qc "Lc" | ||
rizin.exe -Qc "af ; pdd" "C:\Windows\System32\calc.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
$bits = $args[0] | ||
$installationPath = vswhere.exe -latest -property installationPath | ||
if ($installationPath -and (test-path "$installationPath\Common7\Tools\vsdevcmd.bat")) { | ||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo && set" | foreach-object { | ||
$name, $value = $_ -split '=', 2 | ||
set-content env:\"$name" $value | ||
if (-not $installationPath -or -not (test-path "$installationPath\VC\Auxiliary\Build\vcvars$bits.bat")) { | ||
throw "vcvars$bits.bat file not found" | ||
} | ||
& "${env:COMSPEC}" /s /c "`"$installationPath\VC\Auxiliary\Build\vcvars$bits.bat`" > nul 2>&1 && set" | . { process { | ||
if ($_ -match '^([^=]+)=(.*)') { | ||
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2]) | ||
} | ||
} | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters