前端: - 「我的构建」列表「查看详情/查看进度」按钮补充与其他按钮同风格的眼睛小图标 - 顶部导航增加 768px 以下移动端适配: 顶栏纵向排列, 导航单行横向滑动, 修复手机端错位 Gitea Actions 工作流 (仅 .gitea, 不动 .github): - 5 个生成器工作流全部补充 /updategh 终态状态回调 (成功/取消/失败均回调), 修复无回调导致构建 6 小时后被误判为超时的 P0 缺陷 - Windows 两个工作流 job 级默认 shell 设为 pwsh, 兼容 act 在 Windows 默认 bash - 修复 VCPKG_BINARY_SOURCES 中 \v 的 YAML 非法转义 (双引号改单引号) - Flutter 补丁路径改为 .rdgen-src/.github/patches/, run-on-arch 容器内用 /workspace 前缀 - run-on-arch githubToken 置空, 避免 Gitea token 拉 ghcr.io 失败 - runs-on 标签对齐现场 runner: ubuntu-22.04 改为 ubuntu-24.04 - run-vcpkg/setup-ndk 钉到 node20 运行时 SHA, 规避 node24 action 不兼容 - decrypt-secrets 的 pip 安装增加三级回退; cleanzip 请求增加超时重试 - 所有产物上传 curl 增加 --fail/超时/重试参数 - macOS 动态定位 *.app 不再硬编码 RustDesk.app, DMG 路径改用 GITHUB_WORKSPACE - 修复签名条件判断、PowerShell 变量空格等小问题 - setup.md 更新 runner 标签表及 Windows/macOS host 准备要求
604 lines
34 KiB
YAML
604 lines
34 KiB
YAML
# Gitea Actions 适配副本:由 .github/workflows 同名文件适配(本地路径/cache/artifact 差异),修改时请同步两边。差异说明见 setup.md「Gitea 部署附录」。
|
|
name: Custom Windows x86 Client Generator
|
|
run-name: Custom Windows x86 Client Generator
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'version to buld'
|
|
required: true
|
|
default: ''
|
|
type: string
|
|
zip_url:
|
|
description: 'url to zip of json'
|
|
required: true
|
|
default: ''
|
|
type: string
|
|
|
|
env:
|
|
SCITER_RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503, also 1.78 has ABI change which causes our sciter version not working, https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
|
RUST_VERSION: "1.75" # sciter failed on m1 with 1.78 because of https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
|
MAC_RUST_VERSION: "1.81" # 1.81 is requred for macos, because of https://github.com/yury/cidre requires 1.81
|
|
CARGO_NDK_VERSION: "3.1.2"
|
|
SCITER_ARMV7_CMAKE_VERSION: "3.29.7"
|
|
SCITER_NASM_DEBVERSION: "2.15.05-1"
|
|
LLVM_VERSION: "15.0.6"
|
|
FLUTTER_VERSION: "3.24.5"
|
|
ANDROID_FLUTTER_VERSION: "3.24.5"
|
|
# for arm64 linux because official Dart SDK does not work
|
|
FLUTTER_ELINUX_VERSION: "3.16.9"
|
|
TAG_NAME: "${{ inputs.upload-tag }}"
|
|
VCPKG_BINARY_SOURCES: 'clear;files,D:\vcpkg-cache,readwrite'
|
|
# vcpkg version: 2025.08.27
|
|
# If we change the `VCPKG COMMIT_ID`, please remember:
|
|
# 1. Call `$VCPKG_ROOT/vcpkg x-update-baseline` to update the baseline in `vcpkg.json`.
|
|
# Or we may face build issue like
|
|
# https://github.com/rustdesk/rustdesk/actions/runs/14414119794/job/40427970174
|
|
# 2. Update the `VCPKG_COMMIT_ID` in `ci.yml` and `playground.yml`.
|
|
VCPKG_COMMIT_ID: "${{ inputs.version == 'master' && '9e593bb18ea69cc5095e012465dcd675a822ed0d' || '120deac3062162151622ca4860575a33844ba10b' }}"
|
|
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836" # 2025.01.13, got "/opt/artifacts/vcpkg/vcpkg: No such file or directory" with latest version
|
|
VERSION: "${{ inputs.version }}"
|
|
NDK_VERSION: "r28c"
|
|
#signing keys env variable checks
|
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
|
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
|
|
UPLOAD_ARTIFACT: 'true'
|
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
|
|
|
jobs:
|
|
setup:
|
|
uses: ./.gitea/workflows/fetch-encrypted-secrets.yml
|
|
with:
|
|
zip_url_json: ${{ inputs.zip_url }}
|
|
|
|
build-for-windows-sciter:
|
|
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
|
needs: setup
|
|
runs-on: ${{ matrix.job.os }}
|
|
# Gitea act defaults to bash on Windows hosts; most unmarked steps here are
|
|
# PowerShell. Requires PowerShell 7 (pwsh) installed on the self-hosted runner.
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
# Temporarily disable this action due to additional test is needed.
|
|
# if: false
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
job:
|
|
# - { target: i686-pc-windows-msvc , os: windows-2022 }
|
|
# - { target: x86_64-pc-windows-gnu , os: windows-2022 }
|
|
- {
|
|
target: i686-pc-windows-msvc,
|
|
os: windows-2022,
|
|
arch: x86,
|
|
vcpkg-triplet: x86-windows-static,
|
|
}
|
|
# - { target: aarch64-pc-windows-msvc, os: windows-2022 }
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: .rdgen-src
|
|
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: encrypted-secrets-zip
|
|
|
|
- name: Load Secrets
|
|
uses: ./.gitea/actions/decrypt-secrets
|
|
with:
|
|
zip_password: ${{ secrets.ZIP_PASSWORD }}
|
|
|
|
- name: Finalize and Cleanup zip/json
|
|
if: always() # Run even if previous steps fail
|
|
continue-on-error: true
|
|
uses: fjogeleit/http-request-action@v1
|
|
with:
|
|
url: "${{ secrets.GENURL }}/cleanzip"
|
|
method: 'POST'
|
|
customHeaders: '{"Content-Type": "application/json"}'
|
|
data: '{"uuid": "${{ env.uuid }}"}'
|
|
timeout: '15000'
|
|
retry: '3'
|
|
|
|
|
|
- name: Set rdgen value
|
|
if: ${{ env.rdgen == 'true' }}
|
|
run: |
|
|
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
|
|
|
|
- name: Set rdgen value
|
|
if: ${{ env.rdgen == 'false' }}
|
|
run: |
|
|
echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV
|
|
|
|
- name: Checkout source code
|
|
if: ${{ env.VERSION != 'master' }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: rustdesk/rustdesk
|
|
ref: refs/tags/${{ env.VERSION }}
|
|
submodules: recursive
|
|
|
|
- name: Checkout source code
|
|
if: ${{ env.VERSION == 'master' }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: rustdesk/rustdesk
|
|
submodules: recursive
|
|
|
|
- name: Install ImageMagick on Windows
|
|
run: |
|
|
choco install -y imagemagick.app --no-progress
|
|
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
|
|
|
- name: change appname to custom
|
|
if: env.appname != 'rustdesk'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
# ./Cargo.toml
|
|
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ env.appname }}"|' ./Cargo.toml
|
|
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ env.appname }}"|' ./Cargo.toml
|
|
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ env.appname }}"|' ./Cargo.toml
|
|
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ env.appname }}.exe"|' ./Cargo.toml
|
|
# ./libs/portable/Cargo.toml
|
|
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
|
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
|
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
|
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ env.appname }}.exe"|' ./libs/portable/Cargo.toml
|
|
# ./libs/portable/src/main.rs
|
|
sed -i -e 's|const APP_PREFIX: \&str = "rustdesk";|const APP_PREFIX: \&str = "${{ env.appname }}";|' ./libs/portable/src/main.rs
|
|
# ./src/lang/en.rs
|
|
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ env.appname }}|' {} \;
|
|
|
|
- name: fix registry if appname has a space
|
|
if: contains(env.appname, ' ')
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
#./src/platform/windows.rs
|
|
sed -i -e 's|reg add {}|reg add \\\"{}\\\"|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\.{ext} /f|reg add \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\.{ext}\\\\DefaultIcon /f|reg add \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\\DefaultIcon\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell /f|reg add \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell\\\\open /f|reg add \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell\\\\open\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell\\\\open\\\\command|reg add \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\\shell\\\\open\\\\command\\\"|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\{ext} /f|reg add \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\{ext}\\\\shell /f|reg add \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\\shell\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\{ext}\\\\shell\\\\open /f|reg add \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\\shell\\\\open\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\\\{ext}\\\\shell\\\\open\\\\command /f|reg add \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\\shell\\\\open\\\\command\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|{subkey}|\\\"{subkey}\\\"|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg delete HKEY_CLASSES_ROOT\\\\.{ext} /f|reg delete \\\"HKEY_CLASSES_ROOT\\\\.{ext}\\\" /f|' ./src/platform/windows.rs
|
|
sed -i -e 's|reg delete HKEY_CLASSES_ROOT\\\\{ext} /f|reg delete \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\" /f|' ./src/platform/windows.rs
|
|
|
|
- name: change company name
|
|
if: env.compname != 'Purslane Ltd'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
sed -i -e 's|Purslane Tech Pte. Ltd.|${{ env.compname }}|' ./src/ui/index.tis
|
|
sed -i -e 's|Purslane Tech Pte. Ltd.|${{ env.compname }}|' ./Cargo.toml
|
|
sed -i -e 's|Purslane Tech Pte. Ltd.|${{ env.compname }}|' ./libs/portable/Cargo.toml
|
|
sed -i -e 's|Purslane Tech Pte. Ltd.|${{ env.compname }}|' ./src/main.rs
|
|
sed -i -e 's|Purslane Ltd.|${{ env.compname }}|' ./src/ui/index.tis
|
|
sed -i -e 's|Purslane Ltd.|${{ env.compname }}|' ./Cargo.toml
|
|
sed -i -e 's|Purslane Ltd.|${{ env.compname }}|' ./libs/portable/Cargo.toml
|
|
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./src/main.rs
|
|
|
|
- name: change url to custom
|
|
if: env.urlLink != 'https://rustdesk.com'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ env.urlLink }}|' ./build.py
|
|
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com'>|<div .link .custom-event url='${{ env.urlLink }}'>|" ./src/ui/index.tis
|
|
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com/privacy.html'>|<div .link .custom-event url='${{ env.urlLink }}/privacy.html'>|" ./src/ui/index.tis
|
|
if [ -f ./res/setup.nsi ]; then sed -i -e "s|https://rustdesk.com/|${{env.urlLink }}|" ./res/setup.nsi; else echo "res/setup.nsi not present in this rustdesk version, skipped"; fi
|
|
|
|
- name: change download link to custom
|
|
if: env.downloadLink != 'https://rustdesk.com/download'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
sed -i -e 's|https://rustdesk.com/download|${{ env.downloadLink }}|' ./src/ui/index.tis
|
|
sed -i -e 's|&download_url|"${{ env.downloadLink }}"|' ./src/updater.rs
|
|
|
|
- name: set server, serverPort, key, and apiserver
|
|
continue-on-error: true
|
|
shell: bash
|
|
env:
|
|
SERVER_DOMAIN: ${{ env.server }}
|
|
SERVER_PORT_INPUT: ${{ env.serverPort }}
|
|
SERVER_KEY: ${{ env.key }}
|
|
API_SERVER: ${{ env.apiServer }}
|
|
run: |
|
|
# Pass secrets via bash env vars to avoid quoting issues
|
|
if [ ! -f "./libs/hbb_common/src/config.rs" ]; then
|
|
echo "Error: config.rs not found!"
|
|
exit 1
|
|
fi
|
|
if [ ! -f "./src/common.rs" ]; then
|
|
echo "Error: common.rs not found!"
|
|
exit 1
|
|
fi
|
|
|
|
# Port must be a number; views.py defaults it to 21116
|
|
if ! [[ "$SERVER_PORT_INPUT" =~ ^[0-9]+$ ]]; then
|
|
echo "Error: serverPort must be a number, got: '$SERVER_PORT_INPUT'"
|
|
exit 1
|
|
fi
|
|
|
|
# Derive the port block from the rendezvous port
|
|
# (defaults 21116/21117/21118/21119)
|
|
SERVER_PORT=$SERVER_PORT_INPUT
|
|
RELAY_PORT=$((SERVER_PORT + 1))
|
|
WS_RENDEZVOUS_PORT=$((RELAY_PORT + 1))
|
|
WS_RELAY_PORT=$((WS_RENDEZVOUS_PORT + 1))
|
|
|
|
echo "Setting server: $SERVER_DOMAIN"
|
|
echo "Setting ports: $SERVER_PORT, $RELAY_PORT, $WS_RENDEZVOUS_PORT, $WS_RELAY_PORT"
|
|
|
|
sed -i -e "s|rs-ny.rustdesk.com|$SERVER_DOMAIN|" ./libs/hbb_common/src/config.rs
|
|
|
|
# Match on numeric value so the step is independent of defaults
|
|
sed -i -e "s|pub const RENDEZVOUS_PORT: i32 = [0-9][0-9]*;|pub const RENDEZVOUS_PORT: i32 = $SERVER_PORT;|" ./libs/hbb_common/src/config.rs
|
|
sed -i -e "s|pub const RELAY_PORT: i32 = [0-9][0-9]*;|pub const RELAY_PORT: i32 = $RELAY_PORT;|" ./libs/hbb_common/src/config.rs
|
|
sed -i -e "s|pub const WS_RENDEZVOUS_PORT: i32 = [0-9][0-9]*;|pub const WS_RENDEZVOUS_PORT: i32 = $WS_RENDEZVOUS_PORT;|" ./libs/hbb_common/src/config.rs
|
|
sed -i -e "s|pub const WS_RELAY_PORT: i32 = [0-9][0-9]*;|pub const WS_RELAY_PORT: i32 = $WS_RELAY_PORT;|" ./libs/hbb_common/src/config.rs
|
|
|
|
sed -i -e "s|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|$SERVER_KEY|" ./libs/hbb_common/src/config.rs
|
|
sed -i -e "s|https://admin.rustdesk.com|$API_SERVER|" ./src/common.rs
|
|
|
|
echo "=== Verification ==="
|
|
grep -nE "RENDEZVOUS_PORT|RELAY_PORT|WS_" ./libs/hbb_common/src/config.rs
|
|
sed -i -e 's|<span>{translate("Ready")}, <span .link #setup-server>{translate("setup_server_tip")}</span></span>|translate("Ready")|' ./src/ui/index.tis
|
|
|
|
- name: allow custom.txt
|
|
uses: nick-fields/retry@v3
|
|
with:
|
|
timeout_minutes: 5
|
|
max_attempts: 3
|
|
retry_wait_seconds: 15
|
|
shell: pwsh
|
|
continue_on_error: true
|
|
command: |
|
|
Copy-Item .rdgen-src/.github/patches/allowCustom.diff allowCustom.diff
|
|
git apply allowCustom.diff
|
|
|
|
- name: Install LLVM and Clang
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
with:
|
|
version: ${{ env.LLVM_VERSION }}
|
|
|
|
- name: Install Rust toolchain
|
|
run: |
|
|
rustup toolchain install nightly-2023-10-13-x86_64-pc-windows-msvc --component rustfmt --profile minimal --no-self-update
|
|
rustup target add ${{ matrix.job.target }} --toolchain nightly-2023-10-13-x86_64-pc-windows-msvc
|
|
rustup default nightly-2023-10-13-x86_64-pc-windows-msvc
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
prefix-key: ${{ matrix.job.os }}-sciter
|
|
|
|
- name: Setup vcpkg with Github Actions binary cache
|
|
uses: lukka/run-vcpkg@1737e223b9c3f4fb07a7cf1cfa123cc243fcc0dd # v11 pinned to node20 runtime
|
|
with:
|
|
vcpkgDirectory: C:\vcpkg
|
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
doNotCache: false
|
|
|
|
- name: Install vcpkg dependencies
|
|
env:
|
|
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.job.vcpkg-triplet }}
|
|
run: |
|
|
for attempt in 1 2 3; do
|
|
echo "vcpkg install attempt $attempt/3"
|
|
if $VCPKG_ROOT/vcpkg \
|
|
install \
|
|
--triplet ${{ matrix.job.vcpkg-triplet }} \
|
|
--x-install-root="$VCPKG_ROOT/installed"; then
|
|
break
|
|
fi
|
|
echo "vcpkg install failed (attempt $attempt/3)"
|
|
if [ "$attempt" -lt 3 ]; then
|
|
sleep 15
|
|
else
|
|
find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do
|
|
echo "$_1:"
|
|
echo "======"
|
|
cat "$_1"
|
|
echo "======"
|
|
echo ""
|
|
done
|
|
exit 1
|
|
fi
|
|
done
|
|
head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true
|
|
shell: bash
|
|
|
|
- name: icon stuff
|
|
if: ${{ env.iconlink_url != 'false' }}
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
mv ./res/icon.ico ./res/icon.ico.bak
|
|
mv ./res/icon.png ./res/icon.png.bak
|
|
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
|
|
|
- name: magick stuff
|
|
if: ${{ env.iconlink_url != 'false' }}
|
|
uses: nick-fields/retry@v3
|
|
with:
|
|
timeout_minutes: 5
|
|
max_attempts: 3
|
|
retry_wait_seconds: 15
|
|
shell: pwsh
|
|
command: |
|
|
Invoke-WebRequest -Uri ${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}"&"uuid=${{ env.iconlink_uuid }} -OutFile ./res/icon.png
|
|
mv ./res/32x32.png ./res/32x32.png.bak
|
|
mv ./res/64x64.png ./res/64x64.png.bak
|
|
mv ./res/128x128.png ./res/128x128.png.bak
|
|
mv ./res/128x128@2x.png ./res/128x128@2x.png.bak
|
|
magick ./res/icon.png -define icon:auto-resize=256,64,48,32,16 ./res/icon.ico
|
|
cp ./res/icon.ico ./res/tray-icon.ico
|
|
magick ./res/icon.png -resize 32x32 ./res/32x32.png
|
|
magick ./res/icon.png -resize 64x64 ./res/64x64.png
|
|
magick ./res/icon.png -resize 128x128 ./res/128x128.png
|
|
magick ./res/128x128.png -resize 200% ./res/128x128@2x.png
|
|
|
|
|
|
- name: ui.rs icon
|
|
if: ${{ env.iconlink_url != 'false' }}
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
cp ./src/ui.rs ./src/ui.rs.bak
|
|
b64=$(base64 -w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3EaGaZQKC0Y1iLWC10DFyrTZG3spaxeg0AUcnfE+Cw7tNQcyZGp4JMAYIlgqAb0d+isoGgrqaj/6te/yLJb/U6AJIlN1CHhE9DZSpGjwUagJE+QdCG8D6qbxCQlwn2e1WvZ4/Xx1RM9XoAnCSLGQrdX0LNkYh1GCIjEB2GMhzRUYjU9xgnQLAdQztoO8o2hK0gH2BkE8Fgq34fz2/Hllr/D1DoAB9bI40ZAAAAAElFTkSuQmCC|$(echo $b64)|" ./src/ui.rs
|
|
b64=""
|
|
|
|
- name: fix connection delay
|
|
continue-on-error: true
|
|
if: ${{ env.delayFix == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
# Precise fix: only extend the direct-connection condition with the
|
|
# key check, instead of globally replacing !key.is_empty() with
|
|
# false (which would also disable TCP encryption and UDP logic).
|
|
sed -i -e 's#if is_local || peer_nat_type == NatType::SYMMETRIC {#if is_local || peer_nat_type == NatType::SYMMETRIC || !key.is_empty() {#' ./src/client.rs
|
|
grep -n "key.is_empty()" ./src/client.rs || true
|
|
|
|
- name: removeNewVersionNotif
|
|
continue-on-error: true
|
|
if: env.removeNewVersionNotif == 'true'
|
|
shell: bash
|
|
run: |
|
|
sed -i -e 's|{software_update_url ? <UpdateMe /> : ""}||' ./src/ui/index.tis
|
|
sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
|
|
|
|
- name: Build rustdesk
|
|
id: build
|
|
shell: bash
|
|
run: |
|
|
python3 res/inline-sciter.py
|
|
# Patch sciter x86
|
|
sed -i 's/branch = "dyn"/branch = "dyn_x86"/g' ./Cargo.toml
|
|
# libsodium-sys 0.2.7 build.rs selects its prebuilt lib via HOST cfg
|
|
# (target_pointer_width): cross host-x64 -> target-x86 wrongly links
|
|
# msvc/x64 (LNK2019 x132). SODIUM_LIB_DIR is global and breaks the
|
|
# host build-script link, so scope the Win32 lib to the i686 target
|
|
# via per-target rustflags (-L from rustflags precedes build-script
|
|
# paths in the link line; host keeps the default x64 prebuilt).
|
|
# NOTE: rustdesk ships .cargo/config.toml with its own
|
|
# [target.i686-pc-windows-msvc] rustflags -> MERGE into the array.
|
|
cargo fetch
|
|
SODIUM_WIN32_DIR="$(ls -d "$HOME"/.cargo/registry/src/*/libsodium-sys-0.2.7/msvc/Win32/Release/v142 | head -n 1)"
|
|
echo "SODIUM_WIN32_DIR=$SODIUM_WIN32_DIR"
|
|
ls "$SODIUM_WIN32_DIR/libsodium.lib"
|
|
mkdir -p .cargo
|
|
SODIUM_WIN32_NATIVE="$(cygpath -m "$SODIUM_WIN32_DIR")"
|
|
SODIUM_WIN32_NATIVE="$SODIUM_WIN32_NATIVE" python3 - <<'PYEOF'
|
|
import os, re
|
|
native = os.environ['SODIUM_WIN32_NATIVE']
|
|
entry = f'"-L", "native={native}"'
|
|
p = '.cargo/config.toml'
|
|
s = open(p, encoding='utf-8').read() if os.path.exists(p) else ''
|
|
if f'native={native}' in s:
|
|
print('sodium Win32 -L already configured')
|
|
else:
|
|
m = re.search(r'\[target\.i686-pc-windows-msvc\](.*?)(?=^\[|\Z)', s, re.S | re.M)
|
|
if m:
|
|
sec = m.group(1)
|
|
rm = re.search(r'rustflags\s*=\s*\[(.*?)\]', sec, re.S)
|
|
if rm:
|
|
inner = rm.group(1).rstrip()
|
|
sep = '' if inner.strip() == '' else ', '
|
|
sec = sec[:rm.start(1)] + inner + sep + entry + sec[rm.end(1):]
|
|
else:
|
|
sec = sec + f'rustflags = [{entry}]\n'
|
|
s = s[:m.start(1)] + sec + s[m.end(1):]
|
|
else:
|
|
s += f'\n[target.i686-pc-windows-msvc]\nrustflags = [{entry}]\n'
|
|
open(p, 'w', encoding='utf-8').write(s)
|
|
print('sodium Win32 -L injected')
|
|
PYEOF
|
|
cat .cargo/config.toml
|
|
cargo build --target ${{ matrix.job.target }} --features inline,vram,hwcodec --release --bins
|
|
mkdir -p ./Release
|
|
mv ./target/${{ matrix.job.target }}/release/rustdesk.exe ./Release/rustdesk.exe
|
|
curl --fail -LJ --connect-timeout 30 --max-time 300 --retry 3 --retry-delay 5 -o ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll
|
|
echo "output_folder=./Release" >> $GITHUB_OUTPUT
|
|
curl --fail -LJ --connect-timeout 30 --max-time 300 --retry 3 --retry-delay 5 -o ./usbmmidd_v2.zip https://github.com/rustdesk-org/rdev/releases/download/usbmmidd_v2/usbmmidd_v2.zip
|
|
unzip usbmmidd_v2.zip
|
|
# Do not remove x64 files, because the user may run the 32bit version on a 64bit system.
|
|
# Do not remove ./usbmmidd_v2/deviceinstaller64.exe, as x86 exe cannot install and uninstall drivers when running on x64,
|
|
# we need the x64 exe to install and uninstall the driver.
|
|
rm -rf ./usbmmidd_v2/deviceinstaller.exe ./usbmmidd_v2/usbmmidd.bat
|
|
mv ./usbmmidd_v2 ./Release || true
|
|
|
|
- name: find Runner.res
|
|
# Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res
|
|
# Runner.rc does not contain actual version, but Runner.res does
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
runner_res=$(find . -name "Runner.res");
|
|
if [ "$runner_res" == "" ]; then
|
|
echo "Runner.res: not found";
|
|
else
|
|
echo "Runner.res: $runner_res";
|
|
cp $runner_res ./libs/portable/Runner.res;
|
|
echo "list ./libs/portable/Runner.res";
|
|
ls -l ./libs/portable/Runner.res;
|
|
fi
|
|
|
|
- name: zip dlls
|
|
continue-on-error: true
|
|
shell: pwsh
|
|
run: |
|
|
Compress-Archive -Path ./Release/*.dll, ./Release/*.exe -DestinationPath ./Release/unsigned_files.zip -CompressionLevel Fastest
|
|
|
|
- name: sign dlls
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
|
|
curl -X POST -F "file=@./Release/unsigned_files.zip" \
|
|
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
|
-m 900 \
|
|
"${{ secrets.SIGN_BASE_URL }}/sign/" -o ./Release/signed_files.zip
|
|
else
|
|
echo "Signing skipped - signing URL or API key not configured"
|
|
cp ./Release/unsigned_files.zip ./Release/signed_files.zip
|
|
fi
|
|
|
|
- name: unzip dlls
|
|
continue-on-error: true
|
|
shell: pwsh
|
|
run: |
|
|
Expand-Archive -Path ./Release/signed_files.zip -DestinationPath ./Release/ -Force
|
|
Remove-Item ./Release/unsigned_files.zip
|
|
Remove-Item ./Release/signed_files.zip
|
|
|
|
- name: Create custom.txt file
|
|
shell: bash
|
|
run: |
|
|
echo -n "${{ env.custom }}" | cat > ./Release/custom.txt
|
|
|
|
- name: Build self-extracted executable
|
|
shell: bash
|
|
run: |
|
|
mv "./Release/rustdesk.exe" "./Release/${{ env.appname }}.exe" || echo "rustdesk.exe"
|
|
sed -i '/dpiAware/d' res/manifest.xml
|
|
pushd ./libs/portable
|
|
pip3 install -r requirements.txt
|
|
python3 ./generate.py -f ../../Release/ -o . -e "../../Release/${{ env.appname }}.exe"
|
|
popd
|
|
# rustdesk-portable-packer is a separate workspace member (root
|
|
# `cargo build --bins` does not build it) and it embeds
|
|
# libs/portable/app_metadata.toml via include_bytes!, so compile it
|
|
# explicitly AFTER generate.py creates that file.
|
|
cargo build --target ${{ matrix.job.target }} --package rustdesk-portable-packer --release
|
|
mkdir -p ./SignOutput
|
|
mv ./target/${{ matrix.job.target }}/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe"
|
|
|
|
- name: zip exe
|
|
continue-on-error: true
|
|
shell: pwsh
|
|
run: |
|
|
Compress-Archive -Path ./SignOutput/*.exe -DestinationPath ./SignOutput/unsigned_files.zip -CompressionLevel Fastest
|
|
|
|
- name: sign exe
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
|
|
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
|
|
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
|
-m 900 \
|
|
"${{ secrets.SIGN_BASE_URL }}/sign/" -o ./SignOutput/signed_files.zip
|
|
else
|
|
echo "Signing skipped - signing URL or API key not configured"
|
|
cp ./SignOutput/unsigned_files.zip ./SignOutput/signed_files.zip
|
|
fi
|
|
|
|
- name: unzip exe
|
|
continue-on-error: true
|
|
shell: pwsh
|
|
run: |
|
|
Expand-Archive -Path ./SignOutput/signed_files.zip -DestinationPath ./SignOutput/ -Force
|
|
Remove-Item ./SignOutput/unsigned_files.zip
|
|
Remove-Item ./SignOutput/signed_files.zip
|
|
|
|
- name: rename rustdesk.exe to filename.exe
|
|
run: |
|
|
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ env.filename }}.exe" || echo "rustdesk"
|
|
|
|
- name: send file to rdgen server
|
|
if: ${{ env.rdgen == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
curl --fail -i -X POST --connect-timeout 10 --max-time 300 --retry 3 --retry-delay 5 -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" -F "uuid=${{ env.uuid }}" ${{ secrets.GENURL }}/save_custom_client
|
|
|
|
- name: send file to api server
|
|
if: ${{ env.rdgen == 'false' }}
|
|
shell: bash
|
|
run: |
|
|
curl --fail -i -X POST --connect-timeout 10 --max-time 300 --retry 3 --retry-delay 5 -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" ${{ env.apiServer }}/api/save_custom_client
|
|
|
|
cleanup:
|
|
needs: [build-for-windows-sciter]
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
if: always()
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: .rdgen-src
|
|
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: encrypted-secrets-zip
|
|
|
|
- name: Load Secrets
|
|
uses: ./.gitea/actions/decrypt-secrets
|
|
with:
|
|
zip_password: ${{ secrets.ZIP_PASSWORD }}
|
|
|
|
- name: Report build status
|
|
if: always()
|
|
shell: bash
|
|
env:
|
|
BUILD_RESULT: ${{ needs.build-for-windows-sciter.result }}
|
|
run: |
|
|
# Single aggregated callback (the build job may be skipped/cancelled).
|
|
case "$BUILD_RESULT" in
|
|
success) STATUS=success ;;
|
|
cancelled) STATUS=cancelled ;;
|
|
*) STATUS=failure ;;
|
|
esac
|
|
if [ "${{ env.rdgen }}" = "false" ]; then
|
|
STATUS_URL="${{ env.apiServer }}/api/updategh"
|
|
else
|
|
STATUS_URL="${{ secrets.GENURL }}/updategh"
|
|
fi
|
|
if [ -z "${{ env.uuid }}" ]; then
|
|
echo "::warning::uuid missing, skip status callback"
|
|
exit 0
|
|
fi
|
|
echo "Reporting status=$STATUS for uuid=${{ env.uuid }}"
|
|
curl --fail --silent --show-error \
|
|
--connect-timeout 10 --max-time 30 --retry 3 --retry-delay 5 \
|
|
-X POST -H "Content-Type: application/json" \
|
|
-d "{\"uuid\":\"${{ env.uuid }}\",\"status\":\"$STATUS\"}" \
|
|
"$STATUS_URL" || echo "::warning::status callback failed"
|
|
|
|
- name: Delete secrets artifact
|
|
uses: geekyeggo/delete-artifact@v4
|
|
with:
|
|
name: encrypted-secrets-zip
|