From 05559ee52f206d99a57d568bde8cdd2f9fefe274 Mon Sep 17 00:00:00 2001 From: Bryan Gerlach Date: Mon, 30 Sep 2024 08:44:02 -0500 Subject: [PATCH] linux --- .github/workflows/generator-linux.yml | 207 ++++++++++++++++++-------- 1 file changed, 146 insertions(+), 61 deletions(-) diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index 9e97894..9333660 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -103,18 +103,18 @@ jobs: arch: x86_64, target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: [self-hosted, Linux], + on: Linux, 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, - # } + - { + 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 @@ -123,43 +123,43 @@ jobs: core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - # - 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: 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: Checkout source code 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: 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: 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: 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: 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: | @@ -173,31 +173,104 @@ jobs: 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: 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: | - # 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 - # shell: bash + - name: Install vcpkg dependencies + if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' + 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 + shell: bash + + - name: icon stuff + 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 + + - name: magick stuff + continue-on-error: true + run: | + 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 + continue-on-error: true + shell: bash + run: | + cp ./src/ui.rs ./src/ui.rs.bak + sed -i -e 's|iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIr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AJIlN1CHhE9DZSpGjwUagJE+QdCG8D6qbxCQlwn2e1WvZ4/Xx1RM9XoAnCSLGQrdX0LNkYh1GCIjEB2GMhzRUYjU9xgnQLAdQztoO8o2hK0gH2BkE8Fgq34fz2/Hllr/D1DoAB9bI40ZAAAAAElFTkSuQmCC|${{ inputs.iconbase64 }}|' ./src/ui.rs + + - name: cargo.toml, runner.rc name, en.rs + continue-on-error: true + shell: bash + run: | + cp ./Cargo.toml ./Cargo.toml.bak + 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 + cp ./libs/portable/Cargo.toml ./libs/portable/Cargo.toml.bak + 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 + cp ./flutter/windows/runner/Runner.rc ./flutter/windows/runner/Runner.rc.bak + 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 + cp ./src/lang/en.rs ./src/lang/en.rs.bak + sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.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|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_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 + + - 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: replace flutter icons + run: | + cd ./flutter + flutter pub run flutter_launcher_icons + cd .. - name: Restore bridge files if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' @@ -206,6 +279,18 @@ jobs: name: bridge-artifact path: ./ + - name: logo stuff + continue-on-error: true + shell: bash + run: | + echo "${{ inputs.logobase64 }}" | base64 -d > ./rustdesk/data/flutter_assets/assets/logo.png + + - name: icon stuff + 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 + - uses: rustdesk-org/run-on-arch-action@amd64-support name: Build rustdesk id: vcpkg