Improve building
This commit is contained in:
@@ -13,11 +13,16 @@ Version="$1"
|
||||
PROJ="./v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"
|
||||
dotnet restore "$PROJ"
|
||||
sudo rm -rf "$(dirname "$PROJ")/bin/Release/net8.0"
|
||||
dotnet publish "${PROJ}" -c Release -r "linux-x64" --self-contained -p:StripSymbols=true -o "$OutputPath"
|
||||
PROJ="./v2rayN/AmazTool/AmazTool.csproj"
|
||||
dotnet restore "$PROJ"
|
||||
sudo rm -rf "$(dirname "$PROJ")/bin/Release/net8.0"
|
||||
dotnet publish "${PROJ}" -c Release -r "linux-x64" --self-contained -p:StripSymbols=true -p:PublishTrimmed=true -o "$OutputPath"
|
||||
dotnet publish "${PROJ}" \
|
||||
-c Release \
|
||||
-r "linux-x64" \
|
||||
-p:SelfContained=true \
|
||||
-p:PublishSingleFile=false \
|
||||
-p:PublishTrimmed=false \
|
||||
-p:DebugType=none \
|
||||
-p:DebugSymbols=false \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-o "$OutputPath"
|
||||
|
||||
export RID_DIR="linux-x64"
|
||||
download_xray "$OutputPath/bin/xray"
|
||||
@@ -71,7 +76,6 @@ EOF
|
||||
|
||||
sudo chmod 0755 "${PackagePath}/DEBIAN/postinst"
|
||||
sudo chmod 0755 "${PackagePath}/opt/v2rayN/v2rayN"
|
||||
sudo chmod 0755 "${PackagePath}/opt/v2rayN/AmazTool"
|
||||
|
||||
# Patch
|
||||
# set owner to root:root
|
||||
@@ -82,7 +86,6 @@ sudo find "${PackagePath}/opt/v2rayN" -type d -exec chmod 755 {} +
|
||||
sudo find "${PackagePath}/opt/v2rayN" -type f -exec chmod 644 {} +
|
||||
# ensure main binaries are 755 (executable by all users)
|
||||
sudo chmod 755 "${PackagePath}/opt/v2rayN/v2rayN" 2>/dev/null || true
|
||||
sudo chmod 755 "${PackagePath}/opt/v2rayN/AmazTool" 2>/dev/null || true
|
||||
|
||||
# build deb package
|
||||
sudo dpkg-deb -Zzstd -z19 --build "$PackagePath"
|
||||
|
||||
@@ -197,11 +197,12 @@ build_for_arch() {
|
||||
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
|
||||
dotnet publish "$PROJECT" \
|
||||
-c Release -r "$rid" \
|
||||
--sc \
|
||||
-p:PublishSingleFile=false \
|
||||
-p:SelfContained=true \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-p:StripSymbols=true
|
||||
-p:PublishSingleFile=false \
|
||||
-p:PublishTrimmed=false \
|
||||
-p:DebugType=none \
|
||||
-p:DebugSymbols=false \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
# Per-arch variables (scoped)
|
||||
local RID_DIR="$rid"
|
||||
|
||||
Reference in New Issue
Block a user