diff --git a/.github/workflows/release_feat_v5.yml b/.github/workflows/release_feat_v5.yml index 25740efc..c3a7ac4c 100644 --- a/.github/workflows/release_feat_v5.yml +++ b/.github/workflows/release_feat_v5.yml @@ -38,8 +38,7 @@ jobs: env: REF: ${{ github.ref }} run: | - echo ::set-output name=P_DIR::$(pwd) - + echo "name=P_DIR::$(pwd)" >> $GITHUB_OUTPUT if [[ "$REF" == "refs/tags/v"* ]]; then tag=$(git describe --tags $(git rev-list --tags --max-count=1)) version=${tag:1} @@ -49,9 +48,8 @@ jobs: commit=$(git rev-parse --short HEAD) version="unstable-$date.r${count}.$commit" fi - echo ::set-output name=VERSION::"$version" + echo "VERSION=$version" >> $GITHUB_OUTPUT echo "VERSION=$version" >> $GITHUB_ENV - - name: Set up Go uses: actions/setup-go@v2 with: @@ -104,7 +102,7 @@ jobs: - name: Upload Artifact if: "!startsWith(github.ref, 'refs/tags/v')" - uses: nanoufo/action-upload-artifacts-and-release-assets@v1.4 + uses: nanoufo/action-upload-artifacts-and-release-assets@v1.5 with: path: | v2raya_linux_x86_${{ steps.prep.outputs.VERSION }} diff --git a/.github/workflows/windows_inno.yml b/.github/workflows/windows_inno.yml index 1e2b69b3..983b20f4 100644 --- a/.github/workflows/windows_inno.yml +++ b/.github/workflows/windows_inno.yml @@ -17,7 +17,7 @@ jobs: env: REF: ${{ github.ref }} run: | - echo ::set-output name=P_DIR::$(pwd) + echo "name=P_DIR::$(pwd)" >> $GITHUB_OUTPUT if [[ "$REF" == "refs/tags/v"* ]]; then tag=$(git describe --tags $(git rev-list --tags --max-count=1)) version=${tag:1} @@ -27,10 +27,10 @@ jobs: commit=$(git rev-parse --short HEAD) version="unstable-$date.r${count}.$commit" fi - echo ::set-output name=VERSION::"$version" + echo "VERSION=$version" >> $GITHUB_OUTPUT echo "VERSION=$version" >> $GITHUB_ENV - name: Add PowerShell - uses: Amadevus/pwsh-script@v2.0.1 + uses: Amadevus/pwsh-script@v2.0.3 - name: Install Inno Setup run: | choco install innosetup -y @@ -45,7 +45,7 @@ jobs: mv installer_windows_inno_arm64.exe installer_windows_inno_arm64_${{ steps.prep.outputs.VERSION }}.exe - name: Upload Artifact if: "!startsWith(github.ref, 'refs/tags/v')" - uses: nanoufo/action-upload-artifacts-and-release-assets@v1.4 + uses: nanoufo/action-upload-artifacts-and-release-assets@v1.5 with: path: | installer_windows_inno_x64_${{ steps.prep.outputs.VERSION }}.exe diff --git a/install/windows-inno/build-helper.ps1 b/install/windows-inno/build-helper.ps1 index 144403f8..99d275a8 100644 --- a/install/windows-inno/build-helper.ps1 +++ b/install/windows-inno/build-helper.ps1 @@ -43,17 +43,18 @@ 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" -if ($REF -eq "refs/tags/v*") { - Write-Host $REF - $VERSION = (git describe --tags $(git rev-list --tags --max-count=1)).replace("v","") -}else { - $Date = $((git log -1 --format="%cd" --date=short) -replace "-","") - $count = git rev-list --count HEAD - $commit = git rev-parse --short HEAD - $VERSION = "unstable-$date.r$count.$commit" -} +# if ($REF -eq "refs/tags/v*") { +# Write-Host $REF +# $VERSION = (git describe --tags $(git rev-list --tags --max-count=1)).replace("v","") +# }else { +# $Date = $((git log -1 --format="%cd" --date=short) -replace "-","") +# $count = git rev-list --count HEAD +# $commit = git rev-parse --short HEAD +# $VERSION = "unstable-$date.r$count.$commit" +# } Set-Location -Path ./service +$VERSION = ${env:VERSION} $env:CGO_ENABLED = "0" $build_flags = "-X github.com/v2rayA/v2rayA/conf.Version=$VERSION -s -w" $env:GOARCH = "amd64"; $env:GOOS = "windows"; go build -ldflags $build_flags -o '../v2raya-x86_64-windows/bin/v2raya.exe' @@ -61,19 +62,15 @@ $env:GOARCH = "arm64"; $env:GOOS = "windows"; go build -ldflags $build_flags -o Set-Location ../ +Copy-Item "./install/windows-inno/v2raya.ico" "D:\v2raya.ico" + Copy-Item "./v2raya-x86_64-windows/" "D:\" -Recurse New-Item -ItemType Directory -Path "D:\v2raya-x86_64-windows\data" -New-Item -ItemType Directory -Path "D:\v2raya-x86_64-windows\config" Copy-Item "./v2raya-arm64-windows/" "D:\" -Recurse New-Item -ItemType Directory -Path "D:\v2raya-arm64-windows\data" -New-Item -ItemType Directory -Path "D:\v2raya-arm64-windows\config" -$NoticeInfo = "This folder contains the datas of v2rayA, remove the db file if you forget password." -Set-Content -Path "D:\v2raya-x86_64-windows\config\help.txt" $NoticeInfo -Set-Content -Path "D:\v2raya-arm64-windows\config\help.txt" $NoticeInfo - -$Version_v2ray = Invoke-WebRequest -Uri 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest' | ConvertFrom-Json | Select-Object tag_name | ForEach-Object { ([string]$_.tag_name).Split('v')[1] } +$Version_v2ray = ((Invoke-WebRequest -Uri 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest' | ConvertFrom-Json).tag_name).Split("v")[1] $Url_v2ray_x64 = "https://github.com/v2fly/v2ray-core/releases/download/v$Version_v2ray/v2ray-windows-64.zip" $Url_v2ray_A64 = "https://github.com/v2fly/v2ray-core/releases/download/v$Version_v2ray/v2ray-windows-arm64-v8a.zip" @@ -120,10 +117,9 @@ SOFTWARE. v2rayA background service for Windows v2rayA is a V2Ray client, compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols. %BASE%\bin\v2raya.exe ---lite --log-file "v2raya.log" --v2ray-bin "%BASE%\bin\v2ray.exe" --v2ray-assetsdir "%BASE%\data" --config "%BASE%\config" +--lite --log-file "v2raya.log" --v2ray-bin "%BASE%\bin\v2ray.exe" --v2ray-assetsdir "%BASE%\data" --config "%BASE%" %TEMP% -true ' -Path "D:\v2raya-x86_64-windows\v2rayA-service.xml" diff --git a/install/windows-inno/v2raya.ico b/install/windows-inno/v2raya.ico new file mode 100644 index 00000000..f95875ab Binary files /dev/null and b/install/windows-inno/v2raya.ico differ diff --git a/install/windows-inno/windows_arm64.iss b/install/windows-inno/windows_arm64.iss index ae107d9c..be181e31 100644 --- a/install/windows-inno/windows_arm64.iss +++ b/install/windows-inno/windows_arm64.iss @@ -32,6 +32,7 @@ Compression=lzma SolidCompression=yes UninstallDisplayName={#MyAppName}-{#MyAppVersion} WizardStyle=modern +SetupIconFile=D:\v2raya.ico [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -40,14 +41,15 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Source: "D:\v2raya-arm64-windows\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "D:\v2raya-arm64-windows\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "D:\v2raya-arm64-windows\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "D:\v2raya-arm64-windows\config\*"; DestDir: "{app}\config"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "D:\v2raya-arm64-windows\v2rayA-service.xml"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\v2raya.ico"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] -Name: "{group}\v2rayA Web Panel"; Filename: "http://localhost:2017" -Name: "{group}\v2rayA Wiki"; Filename: "{#MyAppURL}" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\v2rayA Web Panel"; Filename: "http://localhost:2017"; IconFilename: "{app}\v2raya.ico"; +Name: "{group}\v2rayA Web Panel"; Filename: "http://localhost:2017"; IconFilename: "{app}\v2raya.ico"; +Name: "{group}\v2rayA Wiki"; Filename: "{#MyAppURL}"; +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; [Run] Filename: "{app}\{#MyAppExeName}"; Parameters: "install"; diff --git a/install/windows-inno/windows_x86_64.iss b/install/windows-inno/windows_x86_64.iss index 7a1d25c0..a1a0d041 100644 --- a/install/windows-inno/windows_x86_64.iss +++ b/install/windows-inno/windows_x86_64.iss @@ -32,6 +32,7 @@ Compression=lzma SolidCompression=yes UninstallDisplayName={#MyAppName}-{#MyAppVersion} WizardStyle=modern +SetupIconFile=D:\v2raya.ico [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -40,14 +41,15 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Source: "D:\v2raya-x86_64-windows\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "D:\v2raya-x86_64-windows\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "D:\v2raya-x86_64-windows\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "D:\v2raya-x86_64-windows\config\*"; DestDir: "{app}\config"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "D:\v2raya-x86_64-windows\v2rayA-service.xml"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\v2raya.ico"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] -Name: "{group}\v2rayA Web Panel"; Filename: "http://localhost:2017" -Name: "{group}\v2rayA Wiki"; Filename: "{#MyAppURL}" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\v2rayA Web Panel"; Filename: "http://localhost:2017"; IconFilename: "{app}\v2raya.ico"; +Name: "{group}\v2rayA Web Panel"; Filename: "http://localhost:2017"; IconFilename: "{app}\v2raya.ico"; +Name: "{group}\v2rayA Wiki"; Filename: "{#MyAppURL}"; +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; [Run] Filename: "{app}\{#MyAppExeName}"; Parameters: "install";