-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04_build_ghdl_ls.ps1
42 lines (33 loc) · 1.07 KB
/
04_build_ghdl_ls.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# see https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
# GitHub changes the default to $ErrorActionPreference = 'stop'
$ErrorActionPreference = "Continue"
Function Install-MingwPath {
$MingwBase = "$(Get-Location)\build\mingw"
$Env:Path += ";$MingwBase\bin"
$Env:Path += ";$MingwBase\msys\1.0\bin"
}
Function Install-GhdlPath {
$GhdlBase = "$(Get-Location)\build\ghdl_artifacts"
$Env:Path += ";$GhdlBase\bin"
$Env:Path += ";$GhdlBase\lib"
}
Function Invoke-Pip($PythonPath) {
& "$PythonPath\pip" install .
}
Function Main() {
$BaseDir = Get-Location
Push-Location "build\ghdl\python"
Invoke-Pip("$BaseDir\build\python\Scripts\")
Pop-Location
$OriginalPath = $Env:Path
$Env:Path = ""
Install-MingwPath
Install-GhdlPath
Write-Host $Env:Path
# Test that we can run gldl-ls
& "build\python\Scripts\pyinstaller.exe" python\ghdl-ls.spec `
--workpath build\pyinstaller\build `
--distpath build\pyinstaller\dist
$Env:Path = $OriginalPath
}
Main