From 6f455be347dd2954c5da78bd00323b2985c869dd Mon Sep 17 00:00:00 2001 From: Kingtous Date: Sun, 8 Jan 2023 16:27:03 +0800 Subject: [PATCH 1/4] opt: set title for all windows --- flutter/lib/main.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 6fd205a22..6593f1804 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -61,6 +61,8 @@ Future main(List args) async { kAppTypeDesktopRemote, 'RustDesk - Remote Desktop', ); + WindowController.fromWindowId(windowId!) + .setTitle('RustDesk - Remote Desktop'); break; case WindowType.FileTransfer: desktopType = DesktopType.fileTransfer; @@ -69,6 +71,8 @@ Future main(List args) async { kAppTypeDesktopFileTransfer, 'RustDesk - File Transfer', ); + WindowController.fromWindowId(windowId!) + .setTitle('RustDesk - File Transfer'); break; case WindowType.PortForward: desktopType = DesktopType.portForward; @@ -135,6 +139,7 @@ void runMainApp(bool startService) async { windowManager.waitUntilReadyToShow(windowOptions, () async { windowManager.setOpacity(1); }); + windowManager.setTitle("RustDesk"); } void runMobileApp() async { @@ -198,6 +203,7 @@ void runMultiWindow( } // show window from hidden status WindowController.fromWindowId(windowId!).show(); + WindowController.fromWindowId(windowId!).setTitle(title); } void runConnectionManagerScreen(bool hide) async { From 3f3e71c1f9f48a6dbfb731626bac150118b2d827 Mon Sep 17 00:00:00 2001 From: Kingtous Date: Sun, 8 Jan 2023 17:42:18 +0800 Subject: [PATCH 2/4] feat: add arm64 appimage build --- .github/workflows/flutter-nightly.yml | 41 ++++++++- appimage/AppImageBuilder-aarch64.yml | 85 +++++++++++++++++++ ...Builder.yml => AppImageBuilder-x86_64.yml} | 0 3 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 appimage/AppImageBuilder-aarch64.yml rename appimage/{AppImageBuilder.yml => AppImageBuilder-x86_64.yml} (100%) diff --git a/.github/workflows/flutter-nightly.yml b/.github/workflows/flutter-nightly.yml index eb13edf15..aaafede07 100644 --- a/.github/workflows/flutter-nightly.yml +++ b/.github/workflows/flutter-nightly.yml @@ -761,6 +761,13 @@ jobs: use-cross: true, extra-build-features: "", } + - { + arch: aarch64, + target: aarch64-unknown-linux-gnu, + os: ubuntu-18.04, # just for naming package, not running host + use-cross: true, + extra-build-features: "appimage", + } # - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" } # - { # arch: armv7, @@ -939,6 +946,13 @@ jobs: use-cross: true, extra-build-features: "", } + - { + arch: aarch64, + target: aarch64-unknown-linux-gnu, + os: ubuntu-18.04, # just for naming package, not running host + use-cross: true, + extra-build-features: "appimage", + } # - { # arch: aarch64, # target: aarch64-unknown-linux-gnu, @@ -1046,7 +1060,7 @@ jobs: shell: bash run: | for name in rustdesk*??.deb; do - mv "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb" + cp "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb" done - name: Publish debian package @@ -1057,6 +1071,29 @@ jobs: tag_name: ${{ env.TAG_NAME }} files: | rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb + + - name: Build appimage package + if: ${{ matrix.job.extra-build-features == 'appimage' }} + shell: bash + run: | + # set-up appimage-builder + pushd /tmp + wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage + chmod +x appimage-builder-x86_64.AppImage + sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder + popd + # run appimage-builder + pushd appimage + sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml + + - name: Publish appimage package + if: ${{ matrix.job.extra-build-features == 'appimage' }} + uses: softprops/action-gh-release@v1 + with: + prerelease: true + tag_name: ${{ env.TAG_NAME }} + files: | + ./appimage/rustdesk-${{ env.VERSION }}-*.AppImage - name: Upload Artifact uses: actions/upload-artifact@master @@ -1310,7 +1347,7 @@ jobs: popd # run appimage-builder pushd appimage - sudo appimage-builder --skip-tests + sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml - name: Publish appimage package if: ${{ matrix.job.extra-build-features == 'appimage' }} diff --git a/appimage/AppImageBuilder-aarch64.yml b/appimage/AppImageBuilder-aarch64.yml new file mode 100644 index 000000000..12d737718 --- /dev/null +++ b/appimage/AppImageBuilder-aarch64.yml @@ -0,0 +1,85 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +script: + - rm -rf ./AppDir || true + - bsdtar -zxvf ../rustdesk-1.2.0.deb + - tar -xvf ./data.tar.xz + - mkdir ./AppDir + - mv ./usr ./AppDir/usr + # 32x32 icon + - for i in {32,64,128}; do mkdir -p ./AppDir/usr/share/icons/hicolor/$i\x$i/apps/; cp ../res/$i\x$i.png ./AppDir/usr/share/icons/hicolor/$i\x$i/apps/rustdesk.png; done + # desktop file + # - sed -i "s/Icon=\/usr\/share\/rustdesk\/files\/rustdesk.png/Icon=rustdesk/g" ./AppDir/usr/share/applications/rustdesk.desktop + - rm -rf ./AppDir/usr/share/applications +AppDir: + path: ./AppDir + app_info: + id: rustdesk + name: rustdesk + icon: rustdesk + version: 1.2.0 + exec: usr/lib/rustdesk/rustdesk + exec_args: $@ + apt: + arch: + - aarch64 + allow_unauthenticated: true + sources: + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main restricted + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main restricted + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic universe + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates universe + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic multiverse + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates multiverse + - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main restricted + universe multiverse + include: + - libc6:amd64 + - libgtk-3-0 + - libxcb-randr0 + - libxdo3 + - libxfixes3 + - libxcb-shape0 + - libxcb-xfixes0 + - libasound2 + - libsystemd0 + - curl + - libva-drm2 + - libva-x11-2 + - libvdpau1 + - libgstreamer-plugins-base1.0-0 + exclude: + - humanity-icon-theme + - hicolor-icon-theme + - adwaita-icon-theme + - ubuntu-mono + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* + runtime: + env: + GIO_MODULE_DIR: $APPDIR/usr/lib/x86_64-linux-gnu/gio/modules/ + test: + fedora-30: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian-stable: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + archlinux-latest: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos-7: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu-xenial: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun +AppImage: + arch: aarch64 + update-information: guess diff --git a/appimage/AppImageBuilder.yml b/appimage/AppImageBuilder-x86_64.yml similarity index 100% rename from appimage/AppImageBuilder.yml rename to appimage/AppImageBuilder-x86_64.yml From 522aacb9b5c62d21861a221d5e110ae04acd90a3 Mon Sep 17 00:00:00 2001 From: Kingtous Date: Mon, 9 Jan 2023 10:38:43 +0800 Subject: [PATCH 3/4] fix: missing deps fix: trusted sourceline fix: libc6 arm64 def fix: aarch64 appimage build fix: change to ports ubuntu --- .github/workflows/flutter-nightly.yml | 2 +- appimage/AppImageBuilder-aarch64.yml | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/flutter-nightly.yml b/.github/workflows/flutter-nightly.yml index aaafede07..e1dfdbe74 100644 --- a/.github/workflows/flutter-nightly.yml +++ b/.github/workflows/flutter-nightly.yml @@ -976,7 +976,7 @@ jobs: - name: Prepare env run: | sudo apt update -y - sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev + sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools mkdir -p ./target/release/ - name: Restore the rustdesk lib file diff --git a/appimage/AppImageBuilder-aarch64.yml b/appimage/AppImageBuilder-aarch64.yml index 12d737718..ee37baf1c 100644 --- a/appimage/AppImageBuilder-aarch64.yml +++ b/appimage/AppImageBuilder-aarch64.yml @@ -22,19 +22,18 @@ AppDir: exec_args: $@ apt: arch: - - aarch64 + - arm64 allow_unauthenticated: true sources: - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main restricted - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main restricted - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic universe - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates universe - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic multiverse - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates multiverse - - sourceline: deb https://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main restricted + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe multiverse + key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe multiverse + key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse + key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' include: - - libc6:amd64 + - libc6 - libgtk-3-0 - libxcb-randr0 - libxdo3 From 6a9dbbd7a0cdf2c24f9960c5f071adf686e103f1 Mon Sep 17 00:00:00 2001 From: Kingtous Date: Tue, 10 Jan 2023 11:07:12 +0800 Subject: [PATCH 4/4] fix: remove gio module dir fix: set GDK_BACKEND to x11 --- appimage/AppImageBuilder-aarch64.yml | 1 + appimage/AppImageBuilder-x86_64.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/appimage/AppImageBuilder-aarch64.yml b/appimage/AppImageBuilder-aarch64.yml index ee37baf1c..f3cd8f568 100644 --- a/appimage/AppImageBuilder-aarch64.yml +++ b/appimage/AppImageBuilder-aarch64.yml @@ -63,6 +63,7 @@ AppDir: runtime: env: GIO_MODULE_DIR: $APPDIR/usr/lib/x86_64-linux-gnu/gio/modules/ + GDK_BACKEND: x11 test: fedora-30: image: appimagecrafters/tests-env:fedora-30 diff --git a/appimage/AppImageBuilder-x86_64.yml b/appimage/AppImageBuilder-x86_64.yml index ae95fd2ce..59dd5164f 100644 --- a/appimage/AppImageBuilder-x86_64.yml +++ b/appimage/AppImageBuilder-x86_64.yml @@ -66,6 +66,7 @@ AppDir: runtime: env: GIO_MODULE_DIR: $APPDIR/usr/lib/x86_64-linux-gnu/gio/modules/ + GDK_BACKEND: x11 test: fedora-30: image: appimagecrafters/tests-env:fedora-30