mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-26 07:53:49 +00:00
Update dotnet to 10 (#9179)
Some checks are pending
release Linux / build (push) Waiting to run
release Linux / release-zip (push) Blocked by required conditions
release Linux / build and release deb x64 & arm64 (push) Waiting to run
release Linux / build and release rpm x64 & arm64 (push) Waiting to run
release Linux / build and release rpm riscv64 (push) Waiting to run
release macOS / build (push) Waiting to run
release macOS / release-zip (push) Blocked by required conditions
release macOS / package and release macOS dmg (push) Blocked by required conditions
release Windows desktop (Avalonia UI) / build (push) Waiting to run
release Windows desktop (Avalonia UI) / release-zip (push) Blocked by required conditions
release Windows / build (push) Waiting to run
release Windows / release-zip (push) Blocked by required conditions
Some checks are pending
release Linux / build (push) Waiting to run
release Linux / release-zip (push) Blocked by required conditions
release Linux / build and release deb x64 & arm64 (push) Waiting to run
release Linux / build and release rpm x64 & arm64 (push) Waiting to run
release Linux / build and release rpm riscv64 (push) Waiting to run
release macOS / build (push) Waiting to run
release macOS / release-zip (push) Blocked by required conditions
release macOS / package and release macOS dmg (push) Blocked by required conditions
release Windows desktop (Avalonia UI) / build (push) Waiting to run
release Windows desktop (Avalonia UI) / release-zip (push) Blocked by required conditions
release Windows / build (push) Waiting to run
release Windows / release-zip (push) Blocked by required conditions
This commit is contained in:
parent
8090799ccc
commit
cc57f952db
6 changed files with 13 additions and 13 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v5.2.0
|
uses: actions/setup-dotnet@v5.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
- name: Build v2rayN
|
- name: Build v2rayN
|
||||||
working-directory: ./v2rayN
|
working-directory: ./v2rayN
|
||||||
|
|
|
||||||
|
|
@ -88,10 +88,10 @@ if command -v apt-get >/dev/null 2>&1; then
|
||||||
libc6:arm64 libgcc-s1:arm64 libstdc++6:arm64 zlib1g:arm64 libfontconfig1:arm64
|
libc6:arm64 libgcc-s1:arm64 libstdc++6:arm64 zlib1g:arm64 libfontconfig1:arm64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install .NET SDK 8 via official script
|
# Install .NET SDK 10 via official script
|
||||||
wget -q https://dot.net/v1/dotnet-install.sh
|
wget -q https://dot.net/v1/dotnet-install.sh
|
||||||
chmod +x dotnet-install.sh
|
chmod +x dotnet-install.sh
|
||||||
./dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet"
|
./dotnet-install.sh --channel 10.0 --install-dir "$HOME/.dotnet"
|
||||||
|
|
||||||
export PATH="$HOME/.dotnet:$PATH"
|
export PATH="$HOME/.dotnet:$PATH"
|
||||||
export DOTNET_ROOT="$HOME/.dotnet"
|
export DOTNET_ROOT="$HOME/.dotnet"
|
||||||
|
|
@ -101,7 +101,7 @@ fi
|
||||||
|
|
||||||
if [[ "$install_ok" -ne 1 ]]; then
|
if [[ "$install_ok" -ne 1 ]]; then
|
||||||
echo "Could not auto-install dependencies for '$ID'. Make sure these are available:"
|
echo "Could not auto-install dependencies for '$ID'. Make sure these are available:"
|
||||||
echo "dotnet-sdk 8.x, curl, unzip, tar, rsync, git, dpkg-deb, desktop-file-utils, xdg-utils"
|
echo "dotnet-sdk 10.x, curl, unzip, tar, rsync, git, dpkg-deb, desktop-file-utils, xdg-utils"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -389,7 +389,7 @@ build_for_arch() {
|
||||||
echo "[*] Building for target: $short (RID=$rid, DEB arch=$deb_arch)"
|
echo "[*] Building for target: $short (RID=$rid, DEB arch=$deb_arch)"
|
||||||
|
|
||||||
dotnet clean "$PROJECT" -c Release
|
dotnet clean "$PROJECT" -c Release
|
||||||
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
|
rm -rf "$(dirname "$PROJECT")/bin/Release/net10.0" || true
|
||||||
|
|
||||||
dotnet restore "$PROJECT"
|
dotnet restore "$PROJECT"
|
||||||
dotnet publish "$PROJECT" \
|
dotnet publish "$PROJECT" \
|
||||||
|
|
@ -399,7 +399,7 @@ build_for_arch() {
|
||||||
|
|
||||||
local RID_DIR="$rid"
|
local RID_DIR="$rid"
|
||||||
local PUBDIR
|
local PUBDIR
|
||||||
PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish"
|
PUBDIR="$(dirname "$PROJECT")/bin/Release/net10.0/${RID_DIR}/publish"
|
||||||
[[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; }
|
[[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; }
|
||||||
|
|
||||||
local WORKDIR PKGROOT STAGE DEBIAN_DIR
|
local WORKDIR PKGROOT STAGE DEBIAN_DIR
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ if [[ -n "${VERSION_ARG:-}" && -n "${BUILD_FROM:-}" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apply_riscv_patch() {
|
apply_riscv_patch() {
|
||||||
# Upgrade net8.0 -> net10.0
|
# Ensure all project files target net10.0
|
||||||
find . -type f \( -name "*.csproj" -o -name "*.props" -o -name "*.targets" \) \
|
find . -type f \( -name "*.csproj" -o -name "*.props" -o -name "*.targets" \) \
|
||||||
-exec sed -i 's/net8\.0/net10.0/g' {} +
|
-exec sed -i 's/net8\.0/net10.0/g' {} +
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,13 @@ host_arch="$(uname -m)"
|
||||||
install_ok=0
|
install_ok=0
|
||||||
|
|
||||||
if command -v dnf >/dev/null 2>&1; then
|
if command -v dnf >/dev/null 2>&1; then
|
||||||
sudo dnf -y install rpm-build rpmdevtools curl unzip tar jq rsync dotnet-sdk-8.0 \
|
sudo dnf -y install rpm-build rpmdevtools curl unzip tar jq rsync dotnet-sdk-10.0 \
|
||||||
&& install_ok=1
|
&& install_ok=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$install_ok" -ne 1 ]]; then
|
if [[ "$install_ok" -ne 1 ]]; then
|
||||||
echo "Could not auto-install dependencies for '$ID'. Make sure these are available:"
|
echo "Could not auto-install dependencies for '$ID'. Make sure these are available:"
|
||||||
echo "dotnet-sdk 8.x, curl, unzip, tar, rsync, rpm, rpmdevtools, rpm-build (on Red Hat branch)"
|
echo "dotnet-sdk 10.x, curl, unzip, tar, rsync, rpm, rpmdevtools, rpm-build (on Red Hat branch)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Root directory
|
# Root directory
|
||||||
|
|
@ -372,7 +372,7 @@ build_for_arch() {
|
||||||
|
|
||||||
# .NET publish (self-contained) for this RID
|
# .NET publish (self-contained) for this RID
|
||||||
dotnet clean "$PROJECT" -c Release
|
dotnet clean "$PROJECT" -c Release
|
||||||
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
|
rm -rf "$(dirname "$PROJECT")/bin/Release/net10.0" || true
|
||||||
|
|
||||||
dotnet restore "$PROJECT"
|
dotnet restore "$PROJECT"
|
||||||
dotnet publish "$PROJECT" \
|
dotnet publish "$PROJECT" \
|
||||||
|
|
@ -383,7 +383,7 @@ build_for_arch() {
|
||||||
# Per-arch variables (scoped)
|
# Per-arch variables (scoped)
|
||||||
local RID_DIR="$rid"
|
local RID_DIR="$rid"
|
||||||
local PUBDIR
|
local PUBDIR
|
||||||
PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish"
|
PUBDIR="$(dirname "$PROJECT")/bin/Release/net10.0/${RID_DIR}/publish"
|
||||||
[[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; }
|
[[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; }
|
||||||
|
|
||||||
# Per-arch working area
|
# Per-arch working area
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||||
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058;IDE0053;IDE0200</NoWarn>
|
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058;IDE0053;IDE0200</NoWarn>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
|
||||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue