diff --git a/.github/workflows/generator-android.yml b/.github/workflows/generator-android.yml index eb108dc..c3be9d8 100644 --- a/.github/workflows/generator-android.yml +++ b/.github/workflows/generator-android.yml @@ -483,6 +483,9 @@ jobs: env: JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 run: | + echo "MAGICK_MEMORY_LIMIT=512MiB" >> $GITHUB_ENV + echo "MAGICK_MAP_LIMIT=256MiB" >> $GITHUB_ENV + echo "MAGICK_DISK_LIMIT=1GiB" >> $GITHUB_ENV export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH # temporary use debug sign config sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index 3e8839c..366bbf8 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -528,6 +528,9 @@ jobs: wget -O ./flutter/assets/logo.png ${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} fi if [[ "${{ inputs.iconlink }}" != "false" ]]; then + echo "MAGICK_MEMORY_LIMIT=512MiB" >> $GITHUB_ENV + echo "MAGICK_MAP_LIMIT=256MiB" >> $GITHUB_ENV + echo "MAGICK_DISK_LIMIT=1GiB" >> $GITHUB_ENV mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak convert ./res/icon.png ./flutter/assets/icon.svg convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png diff --git a/.github/workflows/pre137-bridge.yml b/.github/workflows/pre137-bridge.yml deleted file mode 100644 index 4365d97..0000000 --- a/.github/workflows/pre137-bridge.yml +++ /dev/null @@ -1,110 +0,0 @@ -# This yaml shares the build bridge steps with ci and nightly. -name: Build flutter-rust-bridge -# 2023-11-23 18:00:00+00:00 - -on: - workflow_call: - inputs: - version: - description: 'Rustdesk Version' - required: true - default: '1.3.1' - type: string - -env: - FLUTTER_VERSION: "3.22.3" - FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" - RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503 - -jobs: - generate_bridge: - runs-on: ${{ matrix.job.os }} - strategy: - fail-fast: false - matrix: - job: - - { - target: x86_64-unknown-linux-gnu, - os: ubuntu-20.04, - extra-build-args: "", - } - steps: - - name: Checkout source code - if: ${{ inputs.version != 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - ref: refs/tags/${{ inputs.version }} - - - name: Checkout source code - if: ${{ inputs.version == 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - - - name: Install prerequisites - run: | - sudo apt-get install ca-certificates -y - sudo apt-get update -y - sudo apt-get install -y \ - clang \ - cmake \ - curl \ - gcc \ - git \ - g++ \ - libclang-10-dev \ - libgtk-3-dev \ - llvm-10-dev \ - nasm \ - ninja-build \ - pkg-config \ - wget - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: bridge-${{ matrix.job.os }} - - - name: Cache Bridge - id: cache-bridge - uses: actions/cache@v3 - with: - path: /tmp/flutter_rust_bridge - key: vcpkg-${{ matrix.job.arch }} - - - name: Install flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - cache: true - - - name: Install flutter rust bridge deps - shell: bash - run: | - cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked - pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd - - - name: Run flutter rust bridge - run: | - ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h - cp ./flutter/macos/Runner/bridge_generated.h ./flutter/ios/Runner/bridge_generated.h - - - name: Upload Artifact - uses: actions/upload-artifact@master - with: - name: bridge-artifact - path: | - ./src/bridge_generated.rs - ./src/bridge_generated.io.rs - ./flutter/lib/generated_bridge.dart - ./flutter/lib/generated_bridge.freezed.dart - ./flutter/macos/Runner/bridge_generated.h - ./flutter/ios/Runner/bridge_generated.h \ No newline at end of file diff --git a/.github/workflows/pre137-generator-android.yml b/.github/workflows/pre137-generator-android.yml deleted file mode 100644 index 6ac4655..0000000 --- a/.github/workflows/pre137-generator-android.yml +++ /dev/null @@ -1,625 +0,0 @@ -name: Custom Android Client Generator -run-name: Custom Android Client Generator -on: - workflow_dispatch: - inputs: - server: - description: 'Rendezvous Server' - required: true - default: '' - type: string - key: - description: 'Public Key' - required: true - default: '' - type: string - apiServer: - description: 'API Server' - required: true - default: '' - type: string - custom: - description: "Custom JSON" - required: true - default: '' - type: string - uuid: - description: "uuid of request" - required: true - default: '' - type: string - iconlink: - description: "icon link" - required: false - default: 'false' - type: string - logolink: - description: "logo link" - required: false - default: 'false' - type: string - appname: - description: "app name" - required: true - default: 'rustdesk' - type: string - filename: - description: "Filename" - required: true - default: 'rustdesk' - type: string - extras: - description: "extra inputs in 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 - CARGO_NDK_VERSION: "3.1.2" - SCITER_ARMV7_CMAKE_VERSION: "3.29.7" - SCITER_NASM_DEBVERSION: "2.14-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;x-gha,readwrite" - # vcpkg version: 2024.07.12 - VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" - VERSION: "${{ fromJson(inputs.extras).version }}" - NDK_VERSION: "r27c" - #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 }}" - ICONBASE64: "$${{ inputs.iconbase64 }}" - STATUS_URL: "${{ secrets.GENURL }}/updategh" - -jobs: - generate-bridge-linux: - uses: ./.github/workflows/pre137-bridge.yml - with: - version: ${{ fromJson(inputs.extras).version }} - - build-rustdesk-android: - needs: [generate-bridge-linux] - name: build rustdesk android apk ${{ matrix.job.target }} - runs-on: ${{ matrix.job.os }} - strategy: - fail-fast: false - matrix: - job: - - { - arch: aarch64, - target: aarch64-linux-android, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - - { - arch: armv7, - target: armv7-linux-androideabi, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - - { - arch: x86_64, - target: x86_64-linux-android, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: false - dotnet: true - haskell: true - large-packages: false - docker-images: true - swap-storage: false - - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - run: | - echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $GITHUB_ENV - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - run: | - echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - clang \ - cmake \ - curl \ - gcc-multilib \ - git \ - g++ \ - g++-multilib \ - imagemagick \ - libayatana-appindicator3-dev \ - libasound2-dev \ - libc6-dev \ - libclang-10-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libpam0g-dev \ - libpulse-dev \ - libva-dev \ - libvdpau-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - llvm-10-dev \ - nasm \ - ninja-build \ - openjdk-17-jdk-headless \ - pkg-config \ - tree \ - wget - - - name: Checkout source code - if: ${{ env.VERSION != 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - ref: refs/tags/${{ env.VERSION }} - - - name: Checkout source code - if: ${{ env.VERSION == 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - - - name: Install flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.ANDROID_FLUTTER_VERSION }} - - - name: Patch flutter - continue-on-error: true - run: | - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.ANDROID_FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - - - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: ${{ env.NDK_VERSION }} - add-to-path: true - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgDirectory: /opt/artifacts/vcpkg - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}' - - - name: Install vcpkg dependencies - run: | - case ${{ matrix.job.target }} in - aarch64-linux-android) - ANDROID_TARGET=arm64-v8a - ;; - armv7-linux-androideabi) - ANDROID_TARGET=armeabi-v7a - ;; - x86_64-linux-android) - ANDROID_TARGET=x86_64 - ;; - i686-linux-android) - ANDROID_TARGET=x86 - ;; - esac - if ! ./flutter/build_android_deps.sh "${ANDROID_TARGET}"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - shell: bash - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: rustdesk-lib-cache-android # TODO: drop '-android' part after caches are invalidated - key: ${{ matrix.job.target }} - - ###########################################################echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png - - name: icon stuff - if: ${{ inputs.iconlink != '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 - #echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png - wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }} - 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 - convert ./res/icon.png -define icon:auto-resize=256,64,48,32,16 ./res/icon.ico - convert ./res/icon.png -define icon:auto-resize=256,64,48,32,16 ./res/tray-icon.ico - cp ./res/icon.ico ./res/tray-icon.ico - convert ./res/icon.png -resize 32x32 ./res/32x32.png - convert ./res/icon.png -resize 64x64 ./res/64x64.png - convert ./res/icon.png -resize 128x128 ./res/128x128.png - convert ./res/128x128.png -resize 200% ./res/128x128@2x.png - cp ./src/ui.rs ./src/ui.rs.bak - b64=$(base64 < ./res/icon.png) - sed -i -e 's|iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIrgHwmhA7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEx9JREFUeJztnXmYHMV5h9+vZnZ0rHYRum8J4/AErQlgAQbMsRIWBEFCjK2AgwTisGILMBFCIMug1QLiPgIYE/QY2QQwiMVYjoSlODxEAgLEHMY8YuUEbEsOp3Z1X7vanf7yR8/MztEz0zPTPTO7M78/tnurvqn6uuqdr6q7a7pFVelrkpaPhhAMTEaYjJHDUWsEARkODANGAfWgINEPxLb7QNtBPkdoR7Ud0T8iphUTbtXp4z8pyQH5KOntAEhL2yCCnALW6aAnIDQAI+3MqFHkGJM73BkCO93JXnQnsAl4C8MGuoIv69mj2rw9ouKq1wEgzRiO2noSlp6DoRHleISgnQkJnRpLw0sI4v9X4H2E9Yj172zf+2udOflgYUdYXPUaAOTpzxoImJkIsxG+YCfG+Z7cecWDIN5+J8hqjNXCIW3rdMqULvdHWBqVNQDS8tlwNPCPKJcjOslOjGZGt2UHQTStHZGnMPxQG8d9mOk4S6myBEBWbj0aZR7ILISBPRlZOiMlr+QQgGAhvITqg0ybsEZjhZWHygoA+VnbaSBLEaY6dgb0Vgii+h2GO2gcv7JcQCgLAOSp7ZNBlyI6sycR+igEILoRdJFOnfgCJVZJAZCf7pxETfhmlIsQjHNH9VkIAF0H1iKdetjvKJFKAoC0EODA9msQvQUYmL2j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PcC7udGVK5HsdesVXYk6ASa2DloSrE7H0oUAWKVX8dE1FqGyLdwWm4V2yeXb1JviQSK6CosXawL6kr2Yu2yWBEk19KA0TuBcyoDAl5Dwot0ft0rlFhlAUBUch1ngd5AdEVQX4NA+A1Gm3R+7TrKRGUFQFSygKMJWPNQuRihfy+HoAt0FaLL9braFx0PuIQqSwCikvmMpsaaBzILdJKdGM2MbssWgo8RXUE3j+hib+7c+aGyBiBesogGwtZsDBcDo+3EaGaZQKC0Y1iLWC10DFyrTZG3spaxeg0AUcnfE+Cw7tNQcyZGp4JMAYIlgqAb0d+isoGgrqaj/6te/yLJb/U6AJIlN1CHhE9DZSpGjwUagJE+QdCG8D6qbxCQlwn2e1WvZ4/Xx1RM9XoAnCSLGQrdX0LNkYh1GCIjEB2GMhzRUYjU9xgnQLAdQztoO8o2hK0gH2BkE8Fgq34fz2/Hllr/D1DoAB9bI40ZAAAAAElFTkSuQmCC|$(echo "$b64")|' ./src/ui.rs - b64="" - sed -i '/android: true/a \ \ adaptive_icon_background: "#ffffff"' ./flutter/pubspec.yaml - sed -i '/adaptive_icon_background/a \ \ adaptive_icon_foreground: "../res/icon.png"' ./flutter/pubspec.yaml - sed -i '/adaptive_icon_foreground:/a \ \ adaptive_icon_foreground_inset: 32' ./flutter/pubspec.yaml - sed -i '/ic_launcher_background/d' ./flutter/android/app/src/main/res/values/colors.xml - - - name: change appname to custom - if: inputs.appname != 'rustdesk' - continue-on-error: true - shell: bash - run: | - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./Cargo.toml - sed -i 's|name = "RustDesk"|name = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml - sed -i -e 's|"RustDesk Remote Desktop"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|VALUE "InternalName", "${{ inputs.appname }}" "\0"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"Copyright © 2024 Purslane Ltd. All rights reserved."|"Copyright © 2024"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs - sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./flutter/android/app/src/main/res/values/strings.xml - sed -i -e "s|title: 'RustDesk'|title: '${{ inputs.appname }}'|" ./flutter/lib/main.dart - sed -i -e "s|return 'RustDesk';|return '${{ inputs.appname }}';|" ./flutter/lib/web/bridge.dart - sed -i 's|android:label="RustDesk"|android:label="${{ inputs.appname }}"|' ./flutter/android/app/src/main/AndroidManifest.xml - sed -i 's|android:label="RustDesk Input"|android:label="${{ inputs.appname }} Input"|' ./flutter/android/app/src/main/AndroidManifest.xml - sed -i 's|RustDesk is Open|${{ inputs.appname }} is Open|' ./flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt - sed -i 's|Show Rustdesk|Show ${{ inputs.appname }}|' ./flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/FloatingWindowService.kt - sed -i 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt - sed -i 's|"RustDesk Service|"${{ inputs.appname }} Service|' ./flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt - sed -i 's|RustDesk|${{ inputs.appname }}|' ./flutter/lib/main.dart - sed -i 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/lib/desktop/widgets/tabbar_widget.dart - sed -i 's|"RustDesk"|"${{ inputs.appname }}"|' ./libs/hbb_common/src/config.rs - - - name: change url to custom - if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' - continue-on-error: true - shell: bash - run: | - sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py - sed -i -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart - sed -i -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart - - - name: allow custom.txt - continue-on-error: true - shell: bash - run: | - sed -i -e '/const KEY:/,/};/d' ./src/common.rs - sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs - sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml - - - name: fix connection delay - continue-on-error: true - if: ${{ fromJson(inputs.extras).delayFix == 'true' }} - shell: bash - run: | - sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs - - - name: add cycle monitors to toolbar - continue-on-error: true - if: fromJson(inputs.extras).cycleMonitor == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff - git apply cycle_monitor.diff - - - name: use X for offline display instead of orange circle - continue-on-error: true - if: fromJson(inputs.extras).xOffline == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff - git apply xoffline.diff - - - name: hide-cm - continue-on-error: true - if: fromJson(inputs.extras).hidecm == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff - git apply hidecm.diff - - - name: statussort - continue-on-error: true - if: fromJson(inputs.extras).statussort == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff - git apply statussort.diff - - - name: removeNewVersionNotif - continue-on-error: true - if: fromJson(inputs.extras).removeNewVersionNotif == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff - git apply removeNewVersionNotif.diff - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "35% complete"}' - - - name: replace flutter icons - if: ${{ inputs.iconlink != 'false' }} - run: | - pushd ./flutter - flutter pub get - dart run flutter_launcher_icons - popd - sed -i '/ic_launcher_background/d' ./flutter/android/app/src/main/res/values/colors.xml - ########################################################## - - - name: Build rustdesk lib - env: - ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - rustup target add ${{ matrix.job.target }} - cargo install cargo-ndk --version ${{ env.CARGO_NDK_VERSION }} --locked - case ${{ matrix.job.target }} in - aarch64-linux-android) - ./flutter/ndk_arm64.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so - ;; - armv7-linux-androideabi) - ./flutter/ndk_arm.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so - ;; - x86_64-linux-android) - ./flutter/ndk_x64.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64 - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so - ;; - i686-linux-android) - ./flutter/ndk_x86.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/x86 - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so - ;; - esac - - - name: Upload Rustdesk library to Artifacts - uses: actions/upload-artifact@master - with: - name: librustdesk.so.${{ matrix.job.target }} - path: ./target/${{ matrix.job.target }}/release/liblibrustdesk.so - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "45% complete"}' - - - name: Build rustdesk - shell: bash - env: - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - run: | - export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH - # temporary use debug sign config - sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle - case ${{ matrix.job.target }} in - aarch64-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so - echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt - #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml - if [[ "${{ inputs.iconlink }}" != "false" ]]; then - mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - convert ./res/icon.png ./flutter/assets/icon.svg - convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png - convert ./res/icon.png ./res/scalable.svg - fi - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm64 --split-per-abi - mv build/app/outputs/flutter-apk/app-arm64-v8a-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - armv7-linux-androideabi) - mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so - echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt - #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml - if [[ "${{ inputs.iconlink }}" != "false" ]]; then - mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - convert ./res/icon.png ./flutter/assets/icon.svg - convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png - convert ./res/icon.png ./res/scalable.svg - fi - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm --split-per-abi - mv build/app/outputs/flutter-apk/app-armeabi-v7a-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - x86_64-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64 - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86_64/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so - echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt - #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml - if [[ "${{ inputs.iconlink }}" != "false" ]]; then - mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - convert ./res/icon.png ./flutter/assets/icon.svg - convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png - convert ./res/icon.png ./res/scalable.svg - fi - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x64 --split-per-abi - mv build/app/outputs/flutter-apk/app-x86_64-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - i686-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/x86 - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so - echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt - #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml - if [[ "${{ inputs.iconlink }}" != "false" ]]; then - mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - convert ./res/icon.png ./flutter/assets/icon.svg - convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png - convert ./res/icon.png ./res/scalable.svg - fi - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x86 --split-per-abi - mv build/app/outputs/flutter-apk/app-x86-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - esac - popd - mkdir -p signed-apk; pushd signed-apk - mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk ./${{ inputs.filename }}-${{ matrix.job.arch }}.apk - popd - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "75% complete"}' - - - uses: r0adkll/sign-android-release@v1 - name: Sign app APK - continue-on-error: true - if: env.ANDROID_SIGNING_KEY != null - id: sign-rustdesk - with: - releaseDirectory: ./signed-apk - signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} - alias: ${{ secrets.ANDROID_ALIAS }} - keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} - env: - # override default build-tools version (29.0.3) -- optional - BUILD_TOOLS_VERSION: "30.0.2" - - - name: send file to rdgen server - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./signed-apk/${{ inputs.filename }}-${{ matrix.job.arch }}.apk" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client - - - name: send file to api server - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./signed-apk/${{ inputs.filename }}-${{ matrix.job.arch }}.apk" ${{ inputs.apiServer }}/api/save_custom_client - # uses: SamKirkland/FTP-Deploy-Action@v4.3.5 - # with: - # server: ${{ secrets.GEN_FTP_SERVER }} - # username: ${{ secrets.GEN_FTP_USER }} - # password: ${{ secrets.GEN_FTP_PASSWORD }} - # local-dir: ./signed-apk/ - # server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/ - # exclude: | - # *.idsig - # *.jks - # *aligned.apk - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}' \ No newline at end of file diff --git a/.github/workflows/pre137-generator-linux.yml b/.github/workflows/pre137-generator-linux.yml deleted file mode 100644 index 3d72204..0000000 --- a/.github/workflows/pre137-generator-linux.yml +++ /dev/null @@ -1,636 +0,0 @@ -name: Custom Linux Client Generator -run-name: Custom Linux Client Generator -on: - workflow_dispatch: - inputs: - server: - description: 'Rendezvous Server' - required: true - default: '' - type: string - key: - description: 'Public Key' - required: true - default: '' - type: string - apiServer: - description: 'API Server' - required: true - default: '' - type: string - custom: - description: "Custom JSON" - required: true - default: '' - type: string - uuid: - description: "uuid of request" - required: true - default: '' - type: string - iconlink: - description: "icon link" - required: false - default: 'false' - type: string - logolink: - description: "logo link" - required: false - default: 'false' - type: string - appname: - description: "app name" - required: true - default: 'rustdesk' - type: string - filename: - description: "Filename" - required: true - default: 'rustdesk' - type: string - extras: - description: "extra inputs in 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 - CARGO_NDK_VERSION: "3.1.2" - SCITER_ARMV7_CMAKE_VERSION: "3.29.7" - SCITER_NASM_DEBVERSION: "2.14-1" - LLVM_VERSION: "15.0.6" - FLUTTER_VERSION: "3.24.5" - ANDROID_FLUTTER_VERSION: "3.24.5" - FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" - # 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;x-gha,readwrite" - # vcpkg version: 2024.07.12 - VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" - VERSION: "${{ fromJson(inputs.extras).version }}" - NDK_VERSION: "r27c" - #signing keys env variable checks - ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" - MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}" - # To make a custom build with your own servers set the below secret values - UPLOAD_ARTIFACT: 'true' - SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}" - ICONBASE64: "$${{ inputs.iconbase64 }}" - STATUS_URL: "${{ secrets.GENURL }}/updategh" - -jobs: - generate-bridge-linux: - uses: ./.github/workflows/pre137-bridge.yml - with: - version: ${{ fromJson(inputs.extras).version }} - - build-rustdesk-linux: - needs: [generate-bridge-linux] - name: build rustdesk linux ${{ matrix.job.target }} - runs-on: ${{ matrix.job.on }} - strategy: - fail-fast: false - matrix: - # use a high level qemu-user-static - job: - - { - arch: x86_64, - target: x86_64-unknown-linux-gnu, - distro: ubuntu18.04, - on: ubuntu-20.04, - deb_arch: amd64, - vcpkg-triplet: x64-linux, - } - # - { - # arch: aarch64, - # target: aarch64-unknown-linux-gnu, - # distro: ubuntu18.04, - # on: [self-hosted, Linux, ARM64], - # deb_arch: arm64, - # vcpkg-triplet: arm64-linux, - # } - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - run: | - echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $GITHUB_ENV - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - run: | - echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}' - - - name: Maximize build space - if: ${{ matrix.job.arch == 'x86_64' }} - run: | - sudo rm -rf /opt/ghc - sudo rm -rf /usr/local/lib/android - sudo rm -rf /usr/share/dotnet - sudo apt-get update -y - sudo apt-get install -y nasm qemu-user-static - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y imagemagick - - - name: Checkout source code - if: ${{ env.VERSION != 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - ref: refs/tags/${{ env.VERSION }} - - - name: Checkout source code - if: ${{ env.VERSION == 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - - - name: Set Swap Space - if: ${{ matrix.job.arch == 'x86_64' }} - uses: pierotofy/set-swap-space@master - with: - swap-size-gb: 12 - - - name: Free Space - run: | - df -h - free -m - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - with: - toolchain: ${{ env.RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - name: Save Rust toolchain version - run: | - RUST_TOOLCHAIN_VERSION=$(cargo --version | awk '{print $2}') - echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> $GITHUB_ENV - - - name: Disable rust bridge build - run: | - # only build cdylib - sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}' - - - name: Restore bridge files - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Setup vcpkg with Github Actions binary cache - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - uses: lukka/run-vcpkg@v11 - with: - vcpkgDirectory: /opt/artifacts/vcpkg - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - run: | - sudo apt install -y libva-dev libvdpau-dev - if ! $VCPKG_ROOT/vcpkg \ - install \ - --triplet ${{ matrix.job.vcpkg-triplet }} \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - shell: bash - - - name: icon stuff - if: ${{ inputs.iconlink != '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 - wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }} - 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 - convert ./res/icon.png -define icon:auto-resize=256,64,48,32,16 ./res/icon.ico - convert ./res/icon.png -define icon:auto-resize=256,64,48,32,16 ./res/tray-icon.ico - cp ./res/icon.ico ./res/tray-icon.ico - convert ./res/icon.png -resize 32x32 ./res/32x32.png - convert ./res/icon.png -resize 64x64 ./res/64x64.png - convert ./res/icon.png -resize 128x128 ./res/128x128.png - convert ./res/128x128.png -resize 200% ./res/128x128@2x.png - cp ./src/ui.rs ./src/ui.rs.bak - b64=$(base64 < ./res/icon.png) - sed -i -e 's|iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIrgHwmhA7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEx9JREFUeJztnXmYHMV5h9+vZnZ0rHYRum8J4/AErQlgAQbMsRIWBEFCjK2AgwTisGILMBFCIMug1QLiPgIYE/QY2QQwiMVYjoSlODxEAgLEHMY8YuUEbEsOp3Z1X7vanf7yR8/MztEz0zPTPTO7M78/tnurvqn6uuqdr6q7a7pFVelrkpaPhhAMTEaYjJHDUWsEARkODANGAfWgINEPxLb7QNtBPkdoR7Ud0T8iphUTbtXp4z8pyQH5KOntAEhL2yCCnALW6aAnIDQAI+3MqFHkGJM73BkCO93JXnQnsAl4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v13tt9IwJyul9cX9BT2kgEgC6kloGtAG4vSiH0Lgj9BzVd17sBPKVAlGQKkmUGY8LrYM4OKEU77znCwGZjuRedDCQAQQdinT6JyClDcRuz9EGykq+urOveQnncKFaiiDwFyPeeCri5pOO2dw8F/Y8k5emXdNjxU8YcAy5pV8m9Sb4sEsIbAvmledz6UZA4gRwKlD6e9AwIFvYut9V/P5fp+LsqwKtg3daHYbaeQ12pj16tmsf8k2yeXg0O9CWWnqddf/3cizNF5h/yykMbOphIMAfo2UD4Tq3KMBOi7qHWcXlnna+dDKQBQ8yjRh0NUIUiuw0LlAbrqT9arvZvpZ1JJLgTJtSxDdHGZzK7L5exgI8b6tl5d3/PMxiKoNPcC7udGVK5HsdesVXYk6ASa2DloSrE7H0oUAWKVX8dE1FqGyLdwWm4V2yeXb1JviQSK6CosXawL6kr2Yu2yWBEk19KA0TuBcyoDAl5Dwot0ft0rlFhlAUBUch1ngd5AdEVQX4NA+A1Gm3R+7TrKRGUFQFSygKMJWPNQuRihfy+HoAt0FaLL9braFx0PuIQqSwCikvmMpsaaBzILdJKdGM2MbssWgo8RXUE3j+hib+7c+aGyBiBesogGwtZsDBcDo+3EaGaZQKC0Y1iLWC10DFyrTZG3spaxeg0AUcnfE+Cw7tNQcyZGp4JMAYIlgqAb0d+isoGgrqaj/6te/yLJb/U6AJIlN1CHhE9DZSpGjwUagJE+QdCG8D6qbxCQlwn2e1WvZ4/Xx1RM9XoAnCSLGQrdX0LNkYh1GCIjEB2GMhzRUYjU9xgnQLAdQztoO8o2hK0gH2BkE8Fgq34fz2/Hllr/D1DoAB9bI40ZAAAAAElFTkSuQmCC|$(echo "$b64")|' ./src/ui.rs - b64="" - - - name: change appname to custom - if: inputs.appname != 'rustdesk' - continue-on-error: true - shell: bash - run: | - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./Cargo.toml - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml - sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs - sed -i -e '/-p tmpdeb\/usr\/lib\/rustdesk/d' ./build.py - - - name: allow custom.txt - continue-on-error: true - shell: bash - run: | - sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs - sed -i -e '/const KEY:/,/};/d' ./src/common.rs - sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs - echo -n "${{ inputs.custom }}" | cat > ./custom.txt - sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml - - - name: change url to custom - if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' - continue-on-error: true - shell: bash - run: | - sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py - sed -i -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart - sed -i -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart - - - name: fix connection delay - continue-on-error: true - if: ${{ fromJson(inputs.extras).delayFix == 'true' }} - shell: bash - run: | - sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs - - - name: add cycle monitors to toolbar - continue-on-error: true - if: fromJson(inputs.extras).cycleMonitor == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff - git apply cycle_monitor.diff - - - name: use X for offline display instead of orange circle - continue-on-error: true - if: fromJson(inputs.extras).xOffline == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff - git apply xoffline.diff - - - name: hide-cm - continue-on-error: true - if: fromJson(inputs.extras).hidecm == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff - git apply hidecm.diff - - - name: statussort - continue-on-error: true - if: fromJson(inputs.extras).statussort == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff - git apply statussort.diff - - - name: removeNewVersionNotif - continue-on-error: true - if: fromJson(inputs.extras).removeNewVersionNotif == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff - git apply removeNewVersionNotif.diff - - - name: Restore bridge files - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - # - name: logo stuff - # if: ${{ inputs.logolink != 'false' }} - # continue-on-error: true - # shell: bash - # run: | - # #echo "${{ inputs.logobase64 }}" | base64 -d > ./rustdesk/data/flutter_assets/assets/logo.png - # wget -O ./rustdesk/data/flutter_assets/assets/logo.png https://${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} - - # - name: icon stuff - # if: ${{ inputs.iconlink != 'false' }} - # continue-on-error: true - # run: | - # #mv ./rustdesk/data/flutter_assets/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg.bak - # convert ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.svg - # convert ./res/icon.png ./rustdesk/data/flutter_assets/assets/scalable.svg - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "65% complete"}' - - - uses: rustdesk-org/run-on-arch-action@amd64-support - name: Build rustdesk - id: vcpkg - if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' - with: - arch: ${{ matrix.job.arch }} - distro: ${{ matrix.job.distro }} - githubToken: ${{ github.token }} - setup: | - ls -l "${PWD}" - ls -l /opt/artifacts/vcpkg/installed - dockerRunArgs: | - --volume "${PWD}:/workspace" - --volume "/opt/artifacts:/opt/artifacts" - shell: /bin/bash - install: | - apt-get update -y - echo -e "installing deps" - apt-get install -y \ - build-essential \ - clang \ - cmake \ - curl \ - gcc \ - git \ - g++ \ - imagemagick \ - libayatana-appindicator3-dev \ - libasound2-dev \ - libclang-10-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libpam0g-dev \ - libpulse-dev \ - libva-dev \ - libvdpau-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - llvm-10-dev \ - nasm \ - ninja-build \ - pkg-config \ - tree \ - python3 \ - rpm \ - unzip \ - wget \ - xz-utils - # we have libopus compiled by us. - apt-get remove -y libopus-dev || true - # output devs - ls -l ./ - tree -L 3 /opt/artifacts/vcpkg/installed - run: | - # disable git safe.directory - git config --global --add safe.directory "*" - # rust - pushd /opt - # do not use rustup, because memory overflow in qemu - wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}.tar.gz - tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz - cd rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }} && ./install.sh - rm -rf rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }} - # edit config - mkdir -p ~/.cargo/ - echo """ - [source.crates-io] - registry = 'https://github.com/rust-lang/crates.io-index' - """ > ~/.cargo/config - cat ~/.cargo/config - # start build - pushd /workspace - export VCPKG_ROOT=/opt/artifacts/vcpkg - if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then - export JOBS="--jobs 3" - else - export JOBS="" - fi - echo $JOBS - cargo build --lib $JOBS --features hwcodec,flutter --release - rm -rf target/release/deps target/release/build - rm -rf ~/.cargo - - # Setup Flutter - # disable git safe.directory - git config --global --add safe.directory "*" - pushd /workspace - case ${{ matrix.job.arch }} in - aarch64) - export PATH=/opt/flutter-elinux/bin:$PATH - sed -i "s/flutter build linux --release/flutter-elinux build linux --verbose/g" ./build.py - sed -i "s/x64\/release/arm64\/release/g" ./build.py - ;; - x86_64) - export PATH=/opt/flutter/bin:$PATH - ;; - esac - popd - pushd /opt - wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz - tar xf flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz - case ${{ matrix.job.arch }} in - aarch64) - # clone repo and reset to flutter ${{ env.FLUTTER_VERSION }} - git clone https://github.com/sony/flutter-elinux.git || true - pushd flutter-elinux - git fetch - git reset --hard ${{ env.FLUTTER_VERSION }} - bin/flutter-elinux doctor -v - bin/flutter-elinux precache --linux - popd - cp -R flutter/bin/cache/artifacts/engine/linux-x64/shader_lib flutter-elinux/flutter/bin/cache/artifacts/engine/linux-arm64 - rm -rf flutter - ;; - x86_64) - flutter doctor -v - ;; - esac - - if [[ "3.24.5" == ${{ env.FLUTTER_VERSION }} ]]; then - case ${{ matrix.job.arch }} in - aarch64) - pushd /opt/flutter-elinux/flutter - ;; - x86_64) - pushd /opt/flutter - ;; - esac - git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - popd - fi - - # build flutter - pushd /workspace - mkdir output - chmod 777 output -R - export CARGO_INCREMENTAL=0 - export DEB_ARCH=${{ matrix.job.deb_arch }} - mkdir -p flutter/tmpdeb/usr/lib/rustdesk - cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt - if [[ "${{ inputs.logolink }}" != "false" ]]; then - wget -O ./flutter/assets/logo.png ${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} - fi - if [[ "${{ inputs.iconlink }}" != "false" ]]; then - mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - convert ./res/icon.png ./flutter/assets/icon.svg - convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png - convert ./res/icon.png ./res/scalable.svg - pushd ./flutter - flutter pub get - dart run flutter_launcher_icons - popd - fi - python3 ./build.py --flutter --skip-cargo - for name in rustdesk*??.deb; do - mv "$name" /workspace/output/"${{ inputs.filename }}.deb" - done - - # rpm package - echo -e "start packaging fedora package" - pushd /workspace - case ${{ matrix.job.arch }} in - aarch64) - sed -i "s/linux\/x64/linux\/arm64/g" ./res/rpm-flutter.spec - ;; - esac - HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb - pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }} - for name in rustdesk*??.rpm; do - mv "$name" /workspace/output/"${{ inputs.filename }}.rpm" - done - - # rpm suse package - echo -e "start packaging suse package" - pushd /workspace - case ${{ matrix.job.arch }} in - aarch64) - sed -i "s/linux\/x64/linux\/arm64/g" ./res/rpm-flutter-suse.spec - ;; - esac - HBB=`pwd` rpmbuild ./res/rpm-flutter-suse.spec -bb - pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }} - for name in rustdesk*??.rpm; do - mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm" - done - - # - name: Publish debian/rpm package - # if: env.UPLOAD_ARTIFACT == 'true' - # uses: softprops/action-gh-release@v1 - # with: - # prerelease: true - # tag_name: ${{ env.TAG_NAME }} - # files: | - # rustdesk-*.deb - # rustdesk-*.rpm - - # - name: Upload to FTP - # if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - # uses: SamKirkland/FTP-Deploy-Action@v4.3.5 - # with: - # server: ${{ secrets.GEN_FTP_SERVER }} - # username: ${{ secrets.GEN_FTP_USER }} - # password: ${{ secrets.GEN_FTP_PASSWORD }} - # local-dir: output/ - # server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/ - - - name: send file to rdgen server - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.deb" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client - - - name: send file to api server - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.deb" ${{ inputs.apiServer }}/api/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse.rpm" ${{ inputs.apiServer }}/api/save_custom_client - - - name: Upload deb - uses: actions/upload-artifact@master - if: env.UPLOAD_ARTIFACT == 'true' - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb - path: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}' \ No newline at end of file diff --git a/.github/workflows/pre137-generator-macos.yml b/.github/workflows/pre137-generator-macos.yml deleted file mode 100644 index ba0371f..0000000 --- a/.github/workflows/pre137-generator-macos.yml +++ /dev/null @@ -1,798 +0,0 @@ -name: Custom macOS Client Generator -run-name: Custom macOS Client Generator -on: - workflow_dispatch: - inputs: - server: - description: 'Rendezvous Server' - required: true - default: '' - type: string - key: - description: 'Public Key' - required: true - default: '' - type: string - apiServer: - description: 'API Server' - required: true - default: '' - type: string - custom: - description: "Custom JSON" - required: true - default: '' - type: string - uuid: - description: "uuid of request" - required: true - default: '' - type: string - iconlink: - description: "icon link" - required: false - default: 'false' - type: string - logolink: - description: "logo link" - required: false - default: 'false' - type: string - appname: - description: "app name" - required: true - default: 'rustdesk' - type: string - filename: - description: "Filename" - required: true - default: 'rustdesk' - type: string - extras: - description: "extra inputs in 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" - CARGO_NDK_VERSION: "3.1.2" - SCITER_ARMV7_CMAKE_VERSION: "3.29.7" - SCITER_NASM_DEBVERSION: "2.14-1" - LLVM_VERSION: "15.0.6" - FLUTTER_VERSION: "3.24.5" - ANDROID_FLUTTER_VERSION: "3.24.5" # >= 3.16 is very slow on my android phone, but work well on most of others. We may switch to new flutter after changing to texture rendering (I believe it can solve my problem). - FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" # 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;x-gha,readwrite" - # vcpkg version: 2024.07.12 - VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" - VERSION: "${{ fromJson(inputs.extras).version }}" - NDK_VERSION: "r27c" - #signing keys env variable checks - ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" - MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}" - # To make a custom build with your own servers set the below secret values - RS_PUB_KEY: "${{ inputs.key }}" - RENDEZVOUS_SERVER: "${{ inputs.server }}" - CUSTOM: "${{ inputs.custom }}" - UUIDFOLDER: "${{ inputs.uuid }}" - API_SERVER: "${{ inputs.apiServer }}" - UPLOAD_ARTIFACT: 'true' - SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}" - STATUS_URL: "${{ secrets.GENURL }}/updategh" - -jobs: - generate-bridge: - uses: ./.github/workflows/pre137-bridge.yml - with: - version: ${{ fromJson(inputs.extras).version }} - - build-for-macos-flutter: - name: Build macOS - runs-on: macos-latest - needs: [generate-bridge] - strategy: - fail-fast: false - matrix: - job: - - { - target: aarch64-apple-darwin, - os: macos-latest, - # extra-build-args: "--disable-flutter-texture-render", # disable this for mac, because we see a lot of users reporting flickering both on arm and x64, and we can not confirm if texture rendering has better performance if htere is no vram, https://github.com/rustdesk/rustdesk/issues/6296 - extra-build-args: "--screencapturekit", - arch: aarch64, - vcpkg-triplet: arm64-osx, - } - - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - run: | - echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - run: | - echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}' - - - - - name: Checkout source code - if: ${{ env.VERSION != 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - ref: refs/tags/${{ env.VERSION }} - - - name: Checkout source code - if: ${{ env.VERSION == 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Install imagemagick and potrace and nasm and and - shell: bash - run: | - brew install imagemagick potrace nasm cmake gcc wget ninja - echo "$(brew --prefix imagemagick)/bin" >> $GITHUB_PATH - - - name: Update macOS Info.plist and settings - continue-on-error: false - shell: bash - run: | - # MACSTUFF Backup the original Info.plist - cp ./flutter/macos/Runner/Info.plist ./flutter/macos/Runner/Info.plist.bak - - # MACSTUFF Update application name and display name - sed -i '' -e 's|CFBundleName\s*$(PRODUCT_NAME)|CFBundleName\n\t${{ inputs.appname }}|' ./flutter/macos/Runner/Info.plist - sed -i '' -e 's|CFBundleDisplayName\s*$(PRODUCT_NAME)|CFBundleDisplayName\n\t${{ inputs.appname }}|' ./flutter/macos/Runner/Info.plist - sed -i '' -e 's|CFBundleIdentifier\s*$(PRODUCT_BUNDLE_IDENTIFIER)|CFBundleIdentifier\n\tcom.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Info.plist - - # MACSTUFF Update copyright information if needed - sed -i '' -e 's|NSHumanReadableCopyright\s*$(PRODUCT_COPYRIGHT)|NSHumanReadableCopyright\n\t${{ inputs.appname }}|' ./flutter/macos/Runner/Info.plist - - # MACSTUFF Update window title and bundle settings - cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak - sed -i '' -e 's|PRODUCT_NAME = .*|PRODUCT_NAME = ${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig - sed -i '' -e 's|PRODUCT_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig - # Keep DEVELOPMENT_TEAM if it exists, don't blank it out - - # Update Xcode project settings - sed -i '' -e 's/PRODUCT_NAME = "RustDesk"/PRODUCT_NAME = "${{ inputs.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj - sed -i '' -e 's/PRODUCT_BUNDLE_IDENTIFIER = ".*"/PRODUCT_BUNDLE_IDENTIFIER = "com.${{ inputs.appname }}.app"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj - # Don't modify DEVELOPMENT_TEAM in project.pbxproj - - # Update CMake settings - if [ -f "./flutter/macos/CMakeLists.txt" ]; then - sed -i '' -e 's/set(BINARY_NAME ".*")/set(BINARY_NAME "${{ inputs.appname }}")/' ./flutter/macos/CMakeLists.txt - fi - - # Update Podfile - keep the target as 'Runner' - # sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'${{ inputs.appname }}'"'"' do/' ./flutter/macos/Podfile - sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'Runner'"'"' do/' ./flutter/macos/Podfile - - cp ./src/lang/en.rs ./src/lang/en.rs.bak - cp ./src/lang/nl.rs ./src/lang/nl.rs.bak - sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs - sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/nl.rs - - sed -i '' -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py - sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart - sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i '' -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i '' -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart - - sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs - sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs - - # Update pubspec.yaml with proper YAML formatting - cp ./flutter/pubspec.yaml ./flutter/pubspec.yaml.bak - echo " archive: ^3.6.1" > ./flutter/temp_dependency.txt - awk '/intl:/{print;system("cat ./flutter/temp_dependency.txt");next}1' ./flutter/pubspec.yaml > ./flutter/pubspec.yaml.tmp - mv ./flutter/pubspec.yaml.tmp ./flutter/pubspec.yaml - rm ./flutter/temp_dependency.txt - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}' - - - name: Install flutter - uses: subosito/flutter-action@v2.12.0 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - cache: true - - - name: Patch flutter - continue-on-error: true - run: | - cp .github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff $(dirname $(dirname $(which flutter))) - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.4" == 3.24.5 ]] && git apply flutter_3.24.4_dropdown_menu_enableFilter.diff - - - name: Workaround for flutter issue - shell: bash - run: | - cd "$(dirname "$(which flutter)")" - # https://github.com/flutter/flutter/issues/1.3.43 - sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart - grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.MAC_RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.job.os }} - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - run: | - if ! $VCPKG_ROOT/vcpkg \ - install \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - shell: bash - - - name: Magick stuff for macOS - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: false - shell: bash - run: | - # Create all necessary directories first - mkdir -p ./res - mkdir -p ./flutter/assets - mkdir -p ./flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset - mkdir -p ./macos/Runner/Assets.xcassets/AppIcon.appiconset - mkdir -p ./rustdesk/data/flutter_assets/assets - - # Download icon using curl with additional SSL options - curl -k -L --tlsv1.2 --proto =https --ssl-reqd \ - -H "User-Agent: Mozilla/5.0" \ - "${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}" \ - -o ./res/icon.png || wget --no-check-certificate -O ./res/icon.png "${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}" - - # Backup existing files (if they exist) - [ -f "./res/32x32.png" ] && mv ./res/32x32.png ./res/32x32.png.bak - [ -f "./res/64x64.png" ] && mv ./res/64x64.png ./res/64x64.png.bak - [ -f "./res/128x128.png" ] && mv ./res/128x128.png ./res/128x128.png.bak - [ -f "./res/mac-icon.png" ] && mv ./res/mac-icon.png ./res/mac-icon.png.bak - [ -f "./flutter/assets/icon.png" ] && mv ./flutter/assets/icon.png ./flutter/assets/icon.png.bak - [ -f "./flutter/assets/icon.svg" ] && mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak - [ -f "./rustdesk/data/flutter_assets/assets/icon.svg" ] && mv ./rustdesk/data/flutter_assets/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg.bak - - # Create standard app icons - 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 - - # Copy icon to Flutter assets - cp ./res/icon.png ./flutter/assets/icon.png - cp ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.png - - # Convert PNG to SVG using potrace - magick ./res/icon.png -flatten ./temp_icon.pbm - potrace --svg -o ./flutter/assets/icon.svg ./temp_icon.pbm - cp ./flutter/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg - rm ./temp_icon.pbm - - # Create macOS app icons - magick ./res/icon.png -resize 16x16 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png" - magick ./res/icon.png -resize 32x32 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png" - magick ./res/icon.png -resize 64x64 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png" - magick ./res/icon.png -resize 128x128 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png" - magick ./res/icon.png -resize 256x256 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png" - magick ./res/icon.png -resize 512x512 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png" - magick ./res/icon.png -resize 1024x1024 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png" - - # Create macOS specific icons - magick ./res/icon.png -resize 128x128 ./res/mac-icon.png - - # Create dark mode tray icon (optimized for macOS menu bar) - magick ./res/icon.png -resize 22x22 -colorspace gray -alpha set -background none -channel A -evaluate set 100% ./res/mac-tray-dark-x2.png - - # Create light mode tray icon (optimized for macOS menu bar) - magick ./res/icon.png -resize 22x22 -negate -colorspace gray -alpha set -background none -channel A -evaluate set 100% ./res/mac-tray-light-x2.png - - # Create AppIcon.icns (macOS native icon format) - mkdir -p ./iconset.iconset - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png" "./iconset.iconset/icon_16x16.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png" "./iconset.iconset/icon_16x16@2x.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png" "./iconset.iconset/icon_32x32.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png" "./iconset.iconset/icon_32x32@2x.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png" "./iconset.iconset/icon_128x128.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png" "./iconset.iconset/icon_128x128@2x.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png" "./iconset.iconset/icon_256x256.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png" "./iconset.iconset/icon_256x256@2x.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png" "./iconset.iconset/icon_512x512.png" - cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png" "./iconset.iconset/icon_512x512@2x.png" - iconutil -c icns ./iconset.iconset -o ./flutter/macos/Runner/AppIcon.icns - rm -rf ./iconset.iconset - - # Create Contents.json for macOS app icon - echo '{ - "images": [ - {"size":"16x16","idiom":"mac","filename":"app_icon_16.png","scale":"1x"}, - {"size":"16x16","idiom":"mac","filename":"app_icon_32.png","scale":"2x"}, - {"size":"32x32","idiom":"mac","filename":"app_icon_32.png","scale":"1x"}, - {"size":"32x32","idiom":"mac","filename":"app_icon_64.png","scale":"2x"}, - {"size":"128x128","idiom":"mac","filename":"app_icon_128.png","scale":"1x"}, - {"size":"128x128","idiom":"mac","filename":"app_icon_256.png","scale":"2x"}, - {"size":"256x256","idiom":"mac","filename":"app_icon_256.png","scale":"1x"}, - {"size":"256x256","idiom":"mac","filename":"app_icon_512.png","scale":"2x"}, - {"size":"512x512","idiom":"mac","filename":"app_icon_512.png","scale":"1x"}, - {"size":"512x512","idiom":"mac","filename":"app_icon_1024.png","scale":"2x"} - ], - "info": { - "version": 1, - "author": "xcode" - } - }' > "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json" - - # Copy icons and Contents.json to both locations - cp -r flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/* macos/Runner/Assets.xcassets/AppIcon.appiconset/ - - # Verify files exist and show their sizes - echo "Verifying generated files:" - ls -lh ./res/mac-tray-dark-x2.png - ls -lh ./res/mac-tray-light-x2.png - ls -lh ./res/mac-icon.png - echo "Flutter macOS app icons:" - ls -lh flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/ - echo "Flutter assets:" - ls -lh flutter/assets/icon.* - echo "RustDesk Flutter assets:" - ls -lh rustdesk/data/flutter_assets/assets/ - - - name: replace flutter icons - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: false - shell: bash - run: | - cd ./flutter - # Create required directories and files - mkdir -p web - mkdir -p assets - echo '{"name":"${{ inputs.appname }}","short_name":"${{ inputs.appname }}","start_url":"/","display":"standalone","background_color":"#ffffff","theme_color":"#ffffff","description":"A remote desktop software."}' > web/manifest.json - echo '${{ inputs.appname }}' > web/index.html - - # Ensure the AppIcon.appiconset directory exists - mkdir -p macos/Runner/Assets.xcassets/AppIcon.appiconset - - # Copy the processed icons to Flutter locations - cp ../res/mac-icon.png ./assets/icon.png - cp ../flutter/assets/icon.svg ./assets/icon.svg || true - - flutter pub upgrade win32 - flutter pub get - flutter pub run flutter_launcher_icons - cd .. - - - name: ui.rs - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: true - shell: bash - run: | - cp ./src/ui.rs ./src/ui.rs.bak - if [ -f "./res/icon.png" ]; then - SEARCH_STR="iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIrgHwmhA7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEx9JREFUeJztnXmYHMV5h9" - b64=$(base64 < ./res/icon.png) - sed -i '' -e "s~$SEARCH_STR.*\"~$b64\"~" ./src/ui.rs - fi - - - name: fix connection delay - continue-on-error: false - if: ${{ fromJson(inputs.extras).delayFix == 'true' }} - shell: bash - run: | - sed -i '' -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs - - - name: add cycle monitors to toolbar - continue-on-error: true - if: fromJson(inputs.extras).cycleMonitor == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff - git apply cycle_monitor.diff - - - name: use X for offline display instead of orange circle - continue-on-error: true - if: fromJson(inputs.extras).xOffline == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff - git apply xoffline.diff - - - name: hide-cm - continue-on-error: true - if: fromJson(inputs.extras).hidecm == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff - git apply hidecm.diff - - - name: statussort - continue-on-error: true - if: fromJson(inputs.extras).statussort == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff - git apply statussort.diff - - - name: removeNewVersionNotif - continue-on-error: true - if: fromJson(inputs.extras).removeNewVersionNotif == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff - git apply removeNewVersionNotif.diff - - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.MAC_RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}' - - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.job.os }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}' - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - run: | - if ! $VCPKG_ROOT/vcpkg \ - install \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "25% complete"}' - - - name: Build rustdesk - run: | - if [ "${{ matrix.job.target }}" = "aarch64-apple-darwin" ]; then - MIN_MACOS_VERSION="12.3" - sed -i -e "s/MACOSX_DEPLOYMENT_TARGET\=[0-9]*.[0-9]*/MACOSX_DEPLOYMENT_TARGET=${MIN_MACOS_VERSION}/" build.py - sed -i -e "s/platform :osx, '.*'/platform :osx, '${MIN_MACOS_VERSION}'/" flutter/macos/Podfile - sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml - sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj - fi - sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py - ./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}' - - - name: Install rcodesign tool - if: env.MACOS_P12_BASE64 != null - shell: bash - run: | - pushd /tmp - wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz - tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz - mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin - popd - - - name: Install build runtime - run: | - brew install llvm create-dmg nasm cmake gcc wget ninja - # pkg-config is handled in a separate step, because it may be already installed by `macos-latest`(14.7.1) runner - if command -v pkg-config &>/dev/null; then - echo "pkg-config is already installed" - else - brew install pkg-config - fi - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}' - - - name: Show version information (Rust, cargo, Clang) - shell: bash - run: | - clang --version || true - rustup -V - rustup toolchain list - rustup default - cargo -V - rustc -V - - - name: icon svg handling - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: false - shell: bash - run: | - ASSETS_DIR="build/macos/Build/Products/Release/RustDesk.app/Contents/Frameworks/App.framework/Versions/Current/Resources/flutter_assets/assets" - mkdir -p "$ASSETS_DIR" - if [ -f "$ASSETS_DIR/icon.svg" ]; then - mv "$ASSETS_DIR/icon.svg" "$ASSETS_DIR/icon.svg.bak" - fi - # First convert PNG to PBM (bitmap) - magick convert ./res/icon.png ./temp_icon.pbm - # Then use potrace to convert to SVG - potrace --svg -o "$ASSETS_DIR/icon.svg" ./temp_icon.pbm - rm ./temp_icon.pbm - - - name: logo handling - if: ${{ inputs.logolink != 'false' }} - continue-on-error: false - shell: bash - run: | - ASSETS_DIR="build/macos/Build/Products/Release/RustDesk.app/Contents/Frameworks/App.framework/Versions/Current/Resources/flutter_assets/assets" - mkdir -p "$ASSETS_DIR" - curl -k -L --tlsv1.2 --proto =https --ssl-reqd \ - -H "User-Agent: Mozilla/5.0" \ - "${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}" \ - -o "$ASSETS_DIR/logo.png" || \ - wget --no-check-certificate \ - -O "$ASSETS_DIR/logo.png" \ - "${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "85% complete"}' - - - name: Sign macOS app bundle - if: env.MACOS_P12_BASE64 != '' - run: | - cd flutter/build/macos/Build/Products/Release - # Debug info - echo "Current directory contents:" - ls -la - - # Rename RustDesk.app to the custom app name first - if [ -d "RustDesk.app" ]; then - # First rename the app if it's still called RustDesk.app - mv "RustDesk.app" "${{ inputs.appname }}.app" - echo "Renamed RustDesk.app to ${{ inputs.appname }}.app" - fi - - echo "App bundle contents after rename:" - ls -la "${{ inputs.appname }}.app" || echo "App not found" - ls -la "${{ inputs.appname }}.app/Contents" || echo "Contents not found" - - # Decode the certificate - echo "${{ secrets.MACOS_P12_BASE64 }}" | base64 --decode > certificate.p12 - - # Sign the app bundle and its contents - if [ -d "${{ inputs.appname }}.app/Contents/MacOS" ]; then - echo "Signing main executable..." - MAIN_EXECUTABLE="${{ inputs.appname }}.app/Contents/MacOS/${{ inputs.appname }}" - if [ -f "$MAIN_EXECUTABLE" ]; then - rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \ - --code-signature-flags runtime "$MAIN_EXECUTABLE" - else - echo "Main executable not found at expected path: $MAIN_EXECUTABLE" - # Try to find the actual executable - echo "Available executables in MacOS directory:" - ls -la "${{ inputs.appname }}.app/Contents/MacOS/" - ACTUAL_EXECUTABLE=$(ls "${{ inputs.appname }}.app/Contents/MacOS/" | head -n 1) - if [ -n "$ACTUAL_EXECUTABLE" ]; then - echo "Found executable: $ACTUAL_EXECUTABLE" - rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \ - --code-signature-flags runtime "${{ inputs.appname }}.app/Contents/MacOS/$ACTUAL_EXECUTABLE" - fi - fi - - echo "Signing frameworks..." - find "${{ inputs.appname }}.app/Contents/Frameworks" -type f -not -name ".*" -exec \ - rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \ - --code-signature-flags runtime {} \; - - echo "Signing main bundle..." - rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \ - --code-signature-flags runtime "${{ inputs.appname }}.app" - else - echo "Error: Invalid app bundle structure" - exit 1 - fi - - # Clean up - rm certificate.p12 - - - name: Create DMG - run: | - cd /Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/flutter/build/macos/Build/Products/Release - # Print directory contents for debugging - echo "Directory contents:" - ls -la - # Find the actual .app bundle - if [ -d "RustDesk.app" ]; then - # First rename the app if it's still called RustDesk.app - mv "RustDesk.app" "${{ inputs.appname }}.app" - fi - if [ ! -d "${{ inputs.appname }}.app" ]; then - echo "Could not find .app bundle!" - exit 1 - fi - echo "Creating DMG for ${{ inputs.appname }}.app" - create-dmg \ - --volname "${{ inputs.appname }}" \ - --window-pos 200 120 \ - --window-size 800 400 \ - --icon-size 100 \ - --icon "${{ inputs.appname }}.app" 200 190 \ - --hide-extension "${{ inputs.appname }}.app" \ - --app-drop-link 600 185 \ - "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" \ - "${{ inputs.appname }}.app" - mv "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" $GITHUB_WORKSPACE/ - - #- name: Upload unsigned macOS app - # if: env.UPLOAD_ARTIFACT == 'true' - # uses: actions/upload-artifact@master - # with: - # name: ${{ inputs.appname }}-${{ matrix.job.arch }} - # path: ${{ inputs.appname }}-${{ matrix.job.arch }}.dmg - - - - name: Rename rustdesk - if: env.UPLOAD_ARTIFACT == 'true' - run: | - cd $GITHUB_WORKSPACE - echo "Directory contents:" - ls -la - - # Find the DMG file dynamically - DMG_FILE=$(find . -name "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg") - - if [ -n "$DMG_FILE" ]; then - echo "Found DMG file: $DMG_FILE" - mv "$DMG_FILE" "${{ inputs.filename }}.dmg" - echo "Renamed to ${{ inputs.filename }}.dmg" - else - echo "No DMG file found matching the pattern" - exit 1 - fi - - - name: send file to rdgen server - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - shell: bash - run: | - curl -i -X POST \ - -H "Content-Type: multipart/form-data" \ - -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \ - -F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \ - -F "uuid=${{ inputs.uuid }}" \ - "${{ secrets.GENURL }}/save_custom_client" - - - - name: send file to api server - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - shell: bash - run: | - curl -i -X POST \ - -H "Content-Type: multipart/form-data" \ - -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \ - -F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \ - "${{ inputs.apiServer }}/api/save_custom_client" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}' - - #- name: Publish DMG package - # if: env.UPLOAD_ARTIFACT == 'true' - # uses: softprops/action-gh-release@v1 - # with: - # prerelease: true - # tag_name: ${{ inputs.upload-tag }} - # files: | - # ${{ inputs.appname }}*-${{ matrix.job.arch }}.dmg \ No newline at end of file diff --git a/.github/workflows/pre137-generator-windows.yml b/.github/workflows/pre137-generator-windows.yml deleted file mode 100644 index 9971ff1..0000000 --- a/.github/workflows/pre137-generator-windows.yml +++ /dev/null @@ -1,671 +0,0 @@ -name: Custom Windows Client Generator -run-name: Custom Windows Client Generator -on: - workflow_dispatch: - inputs: - server: - description: 'Rendezvous Server' - required: true - default: '' - type: string - key: - description: 'Public Key' - required: true - default: '' - type: string - apiServer: - description: 'API Server' - required: true - default: '' - type: string - custom: - description: "Custom JSON" - required: true - default: '' - type: string - uuid: - description: "uuid of request" - required: true - default: '' - type: string - iconlink: - description: "icon link" - required: false - default: 'false' - type: string - logolink: - description: "logo link" - required: false - default: 'false' - type: string - appname: - description: "app name" - required: true - default: 'rustdesk' - type: string - filename: - description: "Filename" - required: true - default: 'rustdesk' - type: string - extras: - description: "extra inputs in 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 - CARGO_NDK_VERSION: "3.1.2" - SCITER_ARMV7_CMAKE_VERSION: "3.29.7" - SCITER_NASM_DEBVERSION: "2.14-1" - LLVM_VERSION: "15.0.6" - FLUTTER_VERSION: "3.24.5" - ANDROID_FLUTTER_VERSION: "3.24.5" - FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" - # 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;x-gha,readwrite" - # vcpkg version: 2024.07.12 - VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" - VERSION: "${{ fromJson(inputs.extras).version }}" - NDK_VERSION: "r27c" - #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: - generate-bridge: - uses: ./.github/workflows/pre137-bridge.yml - with: - version: ${{ fromJson(inputs.extras).version }} - - build-RustDeskTempTopMostWindow: - uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml - with: - upload-artifact: true - target: windows-2022 - configuration: Release - platform: x64 - target_version: Windows10 - strategy: - fail-fast: false - - build-for-windows-flutter: - name: Build Windows - needs: [build-RustDeskTempTopMostWindow, generate-bridge] - runs-on: ${{ matrix.job.os }} - strategy: - fail-fast: false - matrix: - job: - # - { target: i686-pc-windows-msvc , os: windows-2022 } - # - { target: x86_64-pc-windows-gnu , os: windows-2022 } - - { - target: x86_64-pc-windows-msvc, - os: windows-2022, - arch: x86_64, - vcpkg-triplet: x64-windows-static, - } - # - { target: aarch64-pc-windows-msvc, os: windows-2022, arch: aarch64 } - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - run: | - echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV - - - name: Set rdgen value - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - run: | - echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}' - - - name: Checkout source code - if: ${{ env.VERSION != 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - ref: refs/tags/${{ env.VERSION }} - - - name: Checkout source code - if: ${{ env.VERSION == 'master' }} - uses: actions/checkout@v4 - with: - repository: rustdesk/rustdesk - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - 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: inputs.appname != 'rustdesk' - continue-on-error: true - shell: bash - run: | - # ./Cargo.toml - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./Cargo.toml - # ./libs/portable/Cargo.toml - sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml - sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml - # ./flutter/windows/runner/Runner.rc - sed -i -e 's|"RustDesk Remote Desktop"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|VALUE "InternalName", "${{ inputs.appname }}" "\0"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"Copyright © 2024 Purslane Ltd. All rights reserved."|"Copyright © 2024"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc - sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc - # ./src/lang/en.rs - sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs - - - name: change url to custom - if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' - continue-on-error: true - shell: bash - run: | - sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py - sed -i -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart - sed -i -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart - sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart - sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart - - - name: allow custom.txt - continue-on-error: true - shell: bash - run: | - sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs - sed -i -e '/const KEY:/,/};/d' ./src/common.rs - sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs - # ./flutter/pubspec.yaml - sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml - - - - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 - with: - version: ${{ env.LLVM_VERSION }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}' - - - name: Install flutter - uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - - # https://github.com/flutter/flutter/issues/155685 - - name: Replace engine with rustdesk custom flutter engine - if: false - run: | - flutter doctor -v - flutter precache --windows - Invoke-WebRequest -Uri https://github.com/rustdesk/engine/releases/download/main/windows-x64-release.zip -OutFile windows-x64-release.zip - Expand-Archive -Path windows-x64-release.zip -DestinationPath windows-x64-release - mv -Force windows-x64-release/*  C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/ - - - name: Patch flutter - continue-on-error: true - shell: bash - run: | - cp .github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff $(dirname $(dirname $(which flutter))) - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.FLUTTER_VERSION}} ]] && git apply flutter_3.24.4_dropdown_menu_enableFilter.diff - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.SCITER_RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}' - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.job.os }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}' - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - 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: | - if ! $VCPKG_ROOT/vcpkg \ - install \ - --triplet ${{ matrix.job.vcpkg-triplet }} \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - shell: bash - - - name: icon stuff - if: ${{ inputs.iconlink != '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: ${{ inputs.iconlink != 'false' }} - continue-on-error: true - run: | - Invoke-WebRequest -Uri ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.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: ${{ inputs.iconlink != 'false' }} - continue-on-error: true - shell: bash - run: | - cp ./src/ui.rs ./src/ui.rs.bak - b64=$(base64 < ./res/icon.png) - sed -i -e 's|iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIrgHwmhA7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEx9JREFUeJztnXmYHMV5h9+vZnZ0rHY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9xgnQLAdQztoO8o2hK0gH2BkE8Fgq34fz2/Hllr/D1DoAB9bI40ZAAAAAElFTkSuQmCC|$(echo "$b64")|' ./src/ui.rs - b64="" - - - name: fix connection delay - continue-on-error: true - if: ${{ fromJson(inputs.extras).delayFix == 'true' }} - shell: bash - run: | - sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs - - - name: add cycle monitors to toolbar - continue-on-error: true - if: fromJson(inputs.extras).cycleMonitor == 'true' - run: | - Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff -OutFile cycle_monitor.diff - git apply cycle_monitor.diff - - - name: use X for offline display instead of orange circle - continue-on-error: true - if: fromJson(inputs.extras).xOffline == 'true' - run: | - Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff -OutFile xoffline.diff - git apply xoffline.diff - - - name: hide-cm - continue-on-error: true - if: fromJson(inputs.extras).hidecm == 'true' - run: | - Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff - git apply hidecm.diff - - - name: statussort - continue-on-error: true - if: fromJson(inputs.extras).statussort == 'true' - run: | - Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff -OutFile statussort.diff - git apply statussort.diff - - - name: removeNewVersionNotif - continue-on-error: true - if: fromJson(inputs.extras).removeNewVersionNotif == 'true' - run: | - wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff - git apply removeNewVersionNotif.diff - - - - name: run as admin - continue-on-error: true - if: ${{ fromJson(inputs.extras).runasadmin == 'true' }} - shell: bash - run: | - echo "SET_TARGET_PROPERTIES(\${BINARY_NAME} PROPERTIES LINK_FLAGS \"/MANIFESTUAC:\\\"level='requireAdministrator' uiAccess='false'\\\" /SUBSYSTEM:WINDOWS\")" >> ./flutter/windows/runner/CMakeLists.txt - sed -i '/administrator/d' res/manifest.xml - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "25% complete"}' - - - name: replace flutter icons - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: true - run: | - cd ./flutter - flutter pub upgrade win32 - flutter pub get - flutter pub run flutter_launcher_icons - cd .. - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}' - - - name: Build rustdesk - run: | - Invoke-WebRequest -Uri https://github.com/rustdesk-org/rdev/releases/download/usbmmidd_v2/usbmmidd_v2.zip -OutFile usbmmidd_v2.zip - Expand-Archive usbmmidd_v2.zip -DestinationPath . -Force - python3 .\build.py --portable --hwcodec --flutter --vram --skip-portable-pack - Remove-Item -Path usbmmidd_v2\Win32 -Recurse - Remove-Item -Path "usbmmidd_v2\deviceinstaller64.exe", "usbmmidd_v2\deviceinstaller.exe", "usbmmidd_v2\usbmmidd.bat" - mv ./flutter/build/windows/x64/runner/Release ./rustdesk - mv -Force .\usbmmidd_v2 ./rustdesk - - - name: icon stuff - if: ${{ inputs.iconlink != 'false' }} - continue-on-error: true - run: | - mv ./rustdesk/data/flutter_assets/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg.bak - magick ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.svg - - - name: logo stuff - if: ${{ inputs.logolink != 'false' }} - continue-on-error: true - run: | - Invoke-WebRequest -Uri ${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} -OutFile ./rustdesk/data/flutter_assets/assets/logo.png - - - - 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: Download RustDeskTempTopMostWindow artifacts - uses: actions/download-artifact@master - if: env.UPLOAD_ARTIFACT == 'true' - with: - name: topmostwindow-artifacts - path: "./rustdesk" - - - name: Upload unsigned - if: env.UPLOAD_ARTIFACT == 'true' - uses: actions/upload-artifact@master - with: - name: rustdesk-unsigned-windows-${{ matrix.job.arch }} - path: rustdesk - - # - name: Sign rustdesk files - # if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != '' - # shell: bash - # run: | - # pip3 install requests argparse - # BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./rustdesk/ - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}' - - - name: zip dlls - continue-on-error: true - shell: pwsh - run: | - Compress-Archive -Path ./rustdesk/*.dll, ./rustdesk/*.exe -DestinationPath ./rustdesk/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=@./rustdesk/unsigned_files.zip" \ - -H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \ - -m 900 \ - "${{ secrets.SIGN_BASE_URL }}/sign/" -o ./rustdesk/signed_files.zip - else - echo "Signing skipped - signing URL or API key not configured" - cp ./rustdesk/unsigned_files.zip ./rustdesk/signed_files.zip - fi - - - name: unzip dlls - continue-on-error: true - shell: pwsh - run: | - Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdesk/ -Force - - - - name: Create custom.txt file - shell: bash - run: | - echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt - - - - name: Build self-extracted executable - shell: bash - if: env.UPLOAD_ARTIFACT == 'true' - run: | - mv "./rustdesk/rustdesk.exe" "./rustdesk/${{ inputs.appname }}.exe" || echo "rustdesk.exe" - sed -i '/dpiAware/d' res/manifest.xml - pushd ./libs/portable - pip3 install -r requirements.txt - python3 ./generate.py -f ../../rustdesk/ -o . -e "../../rustdesk/${{ inputs.appname }}.exe" - popd - mkdir -p ./SignOutput - mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe" - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v2 - - - name: Build msi - continue-on-error: true - if: env.UPLOAD_ARTIFACT == 'true' - run: | - $myappname = "${{ inputs.appname }}" -replace '\s','_' - cp "rustdesk/${{ inputs.appname }}.exe" "rustdesk/${myappname}.exe" -ErrorAction SilentlyContinue - pushd ./res/msi - python preprocess.py --app-name "$myappname" --arp -d ../../rustdesk - nuget restore msi.sln - msbuild msi.sln -p:Configuration=Release -p:Platform=x64 /p:TargetVersion=Windows10 - cp ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk-latest.msi - mv ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk.msi - sha256sum ../../SignOutput/rustdesk.msi - - # - name: Sign rustdesk self-extracted file - # if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != '' - # shell: bash - # run: | - # BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./SignOutput - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "85% complete"}' - - - name: zip exe and msi - continue-on-error: true - shell: pwsh - run: | - Compress-Archive -Path ./SignOutput/*.exe, ./SignOutput/*.msi -DestinationPath ./SignOutput/unsigned_files.zip -CompressionLevel Fastest - - - name: sign exe and msi - 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 and msi - continue-on-error: true - shell: pwsh - run: | - Expand-Archive -Path ./SignOutput/signed_files.zip -DestinationPath ./SignOutput/ -Force - - # - name: Sign rustdesk self-extracted file - # uses: GermanBluefox/code-sign-action@v7 - # if: env.UPLOAD_ARTIFACT == 'true' - # with: - # certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}' - # password: '${{ secrets.WINDOWS_PFX_PASSWORD }}' - # certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}' - # # certificatename: '${{ secrets.WINDOWS_PFX_NAME }}' - # folder: './SignOutput' - # recursive: false - - # - name: Publish Release - # uses: softprops/action-gh-release@v1 - # if: env.UPLOAD_ARTIFACT == 'true' - # with: - # prerelease: true - # tag_name: ${{ env.TAG_NAME }} - # files: | - # ./SignOutput/rustdesk-*.msi - # ./SignOutput/rustdesk-*.exe - - - name: rename rustdesk.exe to filename.exe - run: | - mv ./SignOutput/rustdesk.exe "./SignOutput/${{ inputs.filename }}.exe" || echo "rustdesk" - - - name: rename rustdesk.msi to filename.msi - continue-on-error: true - run: | - mv ./SignOutput/rustdesk.msi "./SignOutput/${{ inputs.filename }}.msi" || echo "rustdesk" - - # - name: Upload to FTP - # if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - # uses: SamKirkland/FTP-Deploy-Action@v4.3.5 - # with: - # server: ${{ secrets.GEN_FTP_SERVER }} - # username: ${{ secrets.GEN_FTP_USER }} - # password: ${{ secrets.GEN_FTP_PASSWORD }} - # local-dir: ./SignOutput/ - # server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/ - - name: send file to rdgen server - if: ${{ fromJson(inputs.extras).rdgen == 'true' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./SignOutput/${{ inputs.filename }}.exe" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./SignOutput/${{ inputs.filename }}.msi" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client || true - - - name: send file to api server - if: ${{ fromJson(inputs.extras).rdgen == 'false' }} - shell: bash - run: | - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./SignOutput/${{ inputs.filename }}.exe" ${{ inputs.apiServer }}/api/save_custom_client - curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./SignOutput/${{ inputs.filename }}.msi" ${{ inputs.apiServer }}/api/save_custom_client || true - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'