mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
Merge branch '2dust:master' into revert-6681-master
This commit is contained in:
commit
684cccdb71
2 changed files with 40 additions and 12 deletions
20
.github/workflows/build-windows-desktop.yml
vendored
20
.github/workflows/build-windows-desktop.yml
vendored
|
@ -47,4 +47,22 @@ jobs:
|
||||||
name: v2rayN-windows-desktop
|
name: v2rayN-windows-desktop
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/v2rayN/Release/windows*
|
${{ github.workspace }}/v2rayN/Release/windows*
|
||||||
|
|
||||||
|
# release zip archive
|
||||||
|
- name: Package release zip archive
|
||||||
|
if: github.event.inputs.release_tag != ''
|
||||||
|
run: |
|
||||||
|
chmod 755 package-release-zip.sh
|
||||||
|
./package-release-zip.sh $OutputArch $OutputPath64
|
||||||
|
mv "v2rayN-${OutputArch}.zip" "v2rayN-${OutputArch}-desktop.zip"
|
||||||
|
./package-release-zip.sh $OutputArchArm $OutputPathArm64
|
||||||
|
mv "v2rayN-${OutputArchArm}.zip" "v2rayN-${OutputArchArm}-desktop.zip"
|
||||||
|
|
||||||
|
- name: Upload zip archive to release
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
if: github.event.inputs.release_tag != ''
|
||||||
|
with:
|
||||||
|
file: ${{ github.workspace }}/v2rayN*.zip
|
||||||
|
tag: ${{ github.event.inputs.release_tag }}
|
||||||
|
file_glob: true
|
||||||
|
prerelease: true
|
||||||
|
|
|
@ -427,22 +427,32 @@ namespace ServiceLib.Services
|
||||||
{
|
{
|
||||||
if (Utils.IsWindows())
|
if (Utils.IsWindows())
|
||||||
{
|
{
|
||||||
//Check for standalone windows .Net version
|
var url = RuntimeInformation.ProcessArchitecture switch
|
||||||
if (coreInfo?.CoreType == ECoreType.v2rayN && RuntimeInformation.ProcessArchitecture == Architecture.X64)
|
|
||||||
{
|
|
||||||
var runtimes = await Utils.GetCliWrapOutput("dotnet", "--list-runtimes");
|
|
||||||
if (runtimes == null || runtimes.Contains("Microsoft.WindowsDesktop.App 8") == false)
|
|
||||||
{
|
|
||||||
return coreInfo?.DownloadUrlWin64?.Replace(".zip", "-SelfContained.zip");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return RuntimeInformation.ProcessArchitecture switch
|
|
||||||
{
|
{
|
||||||
Architecture.Arm64 => coreInfo?.DownloadUrlWinArm64,
|
Architecture.Arm64 => coreInfo?.DownloadUrlWinArm64,
|
||||||
Architecture.X64 => coreInfo?.DownloadUrlWin64,
|
Architecture.X64 => coreInfo?.DownloadUrlWin64,
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (coreInfo?.CoreType != ECoreType.v2rayN)
|
||||||
|
{
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check for standalone windows .Net version
|
||||||
|
if (File.Exists(Path.Combine(Utils.GetBaseDirectory(), "wpfgfx_cor3.dll"))
|
||||||
|
&& File.Exists(Path.Combine(Utils.GetBaseDirectory(), "D3DCompiler_47_cor3.dll")))
|
||||||
|
{
|
||||||
|
return url?.Replace(".zip", "-SelfContained.zip");
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check for avalonia desktop windows version
|
||||||
|
if (File.Exists(Path.Combine(Utils.GetBaseDirectory(), "libHarfBuzzSharp.dll")))
|
||||||
|
{
|
||||||
|
return url?.Replace(".zip", "-desktop.zip");
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
}
|
}
|
||||||
else if (Utils.IsLinux())
|
else if (Utils.IsLinux())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue