Merge pull request #2761 from Kingtous/master
feat: add AppImage for the nightly flutter version of rustdesk
This commit is contained in:
commit
f1243f4190
40
.github/workflows/flutter-nightly.yml
vendored
40
.github/workflows/flutter-nightly.yml
vendored
@ -599,6 +599,12 @@ jobs:
|
|||||||
os: ubuntu-20.04,
|
os: ubuntu-20.04,
|
||||||
extra-build-features: "flatpak",
|
extra-build-features: "flatpak",
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
arch: x86_64,
|
||||||
|
target: x86_64-unknown-linux-gnu,
|
||||||
|
os: ubuntu-20.04,
|
||||||
|
extra-build-features: "appimage",
|
||||||
|
}
|
||||||
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
steps:
|
steps:
|
||||||
- name: Maximize build space
|
- name: Maximize build space
|
||||||
@ -1148,6 +1154,12 @@ jobs:
|
|||||||
os: ubuntu-18.04,
|
os: ubuntu-18.04,
|
||||||
extra-build-features: "flatpak",
|
extra-build-features: "flatpak",
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
arch: x86_64,
|
||||||
|
target: x86_64-unknown-linux-gnu,
|
||||||
|
os: ubuntu-18.04,
|
||||||
|
extra-build-features: "appimage",
|
||||||
|
}
|
||||||
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
@ -1162,7 +1174,7 @@ jobs:
|
|||||||
- name: Prepare env
|
- name: Prepare env
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
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/
|
mkdir -p ./target/release/
|
||||||
|
|
||||||
- name: Restore the rustdesk lib file
|
- name: Restore the rustdesk lib file
|
||||||
@ -1217,7 +1229,8 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
for name in rustdesk*??.deb; do
|
for name in rustdesk*??.deb; do
|
||||||
mv "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb"
|
# use cp to duplicate deb files to fit other packages.
|
||||||
|
cp "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Publish debian package
|
- name: Publish debian package
|
||||||
@ -1285,6 +1298,29 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
res/rustdesk*.zst
|
res/rustdesk*.zst
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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: Publish fedora28/centos8 package
|
- name: Publish fedora28/centos8 package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
87
appimage/AppImageBuilder.yml
Normal file
87
appimage/AppImageBuilder.yml
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
# 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:
|
||||||
|
- amd64
|
||||||
|
allow_unauthenticated: true
|
||||||
|
sources:
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic universe
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
|
||||||
|
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
|
||||||
|
universe multiverse
|
||||||
|
- sourceline: deb http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu
|
||||||
|
bionic main
|
||||||
|
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: x86_64
|
||||||
|
update-information: guess
|
7
build.py
7
build.py
@ -99,6 +99,11 @@ def make_parser():
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help='Build rustdesk libs with the flatpak feature enabled'
|
help='Build rustdesk libs with the flatpak feature enabled'
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--appimage',
|
||||||
|
action='store_true',
|
||||||
|
help='Build rustdesk libs with the appimage feature enabled'
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--skip-cargo',
|
'--skip-cargo',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
@ -236,6 +241,8 @@ def get_features(args):
|
|||||||
features.append('flutter')
|
features.append('flutter')
|
||||||
if args.flatpak:
|
if args.flatpak:
|
||||||
features.append('flatpak')
|
features.append('flatpak')
|
||||||
|
if args.appimage:
|
||||||
|
features.append('appimage')
|
||||||
print("features:", features)
|
print("features:", features)
|
||||||
return features
|
return features
|
||||||
|
|
||||||
|
@ -23,7 +23,15 @@ static void my_application_activate(GApplication* application) {
|
|||||||
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
|
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
|
||||||
// we have custom window frame
|
// we have custom window frame
|
||||||
gtk_window_set_decorated(window, FALSE);
|
gtk_window_set_decorated(window, FALSE);
|
||||||
|
// try setting icon for rustdesk, which uses the system cache
|
||||||
|
GtkIconTheme* theme = gtk_icon_theme_get_default();
|
||||||
|
gint icons[4] = {256, 128, 64, 32};
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
GdkPixbuf* icon = gtk_icon_theme_load_icon(theme, "rustdesk", icons[i], GTK_ICON_LOOKUP_NO_SVG, NULL);
|
||||||
|
if (icon != nullptr) {
|
||||||
|
gtk_window_set_icon(window, icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Use a header bar when running in GNOME as this is the common style used
|
// Use a header bar when running in GNOME as this is the common style used
|
||||||
// by applications and is the setup most users will be using (e.g. Ubuntu
|
// by applications and is the setup most users will be using (e.g. Ubuntu
|
||||||
// desktop).
|
// desktop).
|
||||||
|
@ -63,7 +63,7 @@ dependencies:
|
|||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: e6d30bde98bd0f4ff50a130e5b1068138307bd03
|
ref: 057e6eb1bc7dcbcf9dafd1384274a611e4fe7124
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
flutter_custom_cursor: ^0.0.2
|
flutter_custom_cursor: ^0.0.2
|
||||||
window_size:
|
window_size:
|
||||||
|
BIN
res/64x64.png
Normal file
BIN
res/64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
x
Reference in New Issue
Block a user