mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
Merge pull request #702 from MarksonHon/feat_v5
Make inno installer great again!
This commit is contained in:
commit
6eed0f7b4d
6 files changed
+33
-35
No files matched your search
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
<name>v2rayA background service for Windows</name>
|
||||
<description>v2rayA is a V2Ray client, compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.</description>
|
||||
<executable>%BASE%\bin\v2raya.exe</executable>
|
||||
<arguments>--lite --log-file "v2raya.log" --v2ray-bin "%BASE%\bin\v2ray.exe" --v2ray-assetsdir "%BASE%\data" --config "%BASE%\config"</arguments>
|
||||
<arguments>--lite --log-file "v2raya.log" --v2ray-bin "%BASE%\bin\v2ray.exe" --v2ray-assetsdir "%BASE%\data" --config "%BASE%"</arguments>
|
||||
<workingdirectory>%TEMP%</workingdirectory>
|
||||
<log mode="roll"></log>
|
||||
<delayedAutoStart>true</delayedAutoStart>
|
||||
<onfailure action="restart" delay="10 sec"/>
|
||||
</service>
|
||||
' -Path "D:\v2raya-x86_64-windows\v2rayA-service.xml"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user