Skip to content

Commit

Permalink
Merge pull request #941 from MarksonHon/feat_v5
Browse files Browse the repository at this point in the history
Fix Windows build workflow
  • Loading branch information
MarksonHon committed May 9, 2023
2 parents 292a892 + 468c3be commit 8e156b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows_inno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
shell: bash
run: |
for v2raya in $(ls | grep .exe)
do
do
echo $(sha256sum $v2raya | awk -F ' ' '{print $1}') > $v2raya.sha256.txt
done
- name: Upload Artifact
Expand Down
15 changes: 7 additions & 8 deletions install/windows-inno/build-helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,22 @@ Function Compress-File([ValidateScript({Test-Path $_})][string]$File){
}

Invoke-Expression "& {$(Invoke-RestMethod get.scoop.sh)} -RunAsAdmin"
# scoop bucket add versions;scoop install nodejs16;
scoop install yarn go nodejs
scoop install yarn go nodejs-lts

${env:NODE_OPTIONS} = "--openssl-legacy-provider"
${env:OUTPUT_DIR} = (Get-Location).Path + "\service\server\router\web"

yarn --cwd gui --check-files
yarn --cwd gui build
cd ./gui
yarn; yarn build
cd ..

Get-ChildItem "./web" -recurse |Where-Object{$_.PSIsContainer -eq $False}|ForEach-Object -Process{
Get-ChildItem "${env:OUTPUT_DIR}" -recurse |Where-Object{$_.PSIsContainer -eq $False}|ForEach-Object -Process{
if($_.Extension -ne ".png" -and $_.Extension -ne ".gz" -and $_.Name -ne "index.html"){
Compress-File($_.FullName)
Remove-Item -Path $_.FullName
}
}

Copy-Item -Path ./web ./service/server/router/ -Recurse

New-Item -ItemType Directory -Path ./ -Name "v2raya-x86_64-windows"; New-Item -ItemType Directory -Path ".\v2raya-x86_64-windows\bin"
New-Item -ItemType Directory -Path ./ -Name "v2raya-arm64-windows"; New-Item -ItemType Directory -Path ".\v2raya-arm64-windows\bin"

Expand Down Expand Up @@ -116,7 +115,7 @@ SOFTWARE.
' -Path "D:\v2raya-x86_64-windows\v2rayA-service.xml"
Copy-Item -Path "D:\v2raya-x86_64-windows\v2rayA-service.xml" -Destination "D:\v2raya-arm64-windows\v2rayA-service.xml"

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/v2rayA/v2rayA/feat_v5/LICENSE" -OutFile "D:\LICENSE.txt"
Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/v2rayA/v2rayA/feat_v5/LICENSE' | Out-File "D:\LICENSE.txt"

$(Get-Content -Path .\install\windows-inno\windows_x86_64.iss).replace("TheRealVersion", "$VERSION") | Out-File "D:\windows_x86_64.iss"
$(Get-Content -Path .\install\windows-inno\windows_arm64.iss).replace("TheRealVersion", "$VERSION") | Out-File "D:\windows_arm64.iss"
Expand Down

0 comments on commit 8e156b9

Please sign in to comment.