add: appimage config

This commit is contained in:
Kingtous 2022-05-29 10:14:22 +08:00
parent d1da63fc97
commit 0eeb0bacbd
5 changed files with 235 additions and 4 deletions

View File

@ -0,0 +1,19 @@
[Desktop Entry]
Version=1.2.0
Name=RustDesk
GenericName=Remote Desktop
Comment=Remote Desktop
Exec=rustdesk
Icon=rustdesk
Terminal=false
Type=Application
StartupNotify=true
Categories=Other;
Keywords=internet;
Actions=new-window;
X-Desktop-File-Install-Version=0.23
[Desktop Action new-window]
Name=Open a New Window

View File

@ -0,0 +1,199 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
AppDir:
path: /home/kingtous/projects/rustdesk/appimage/AppDir
app_info:
id: rustdesk
name: RustDesk
icon: rustdesk
version: latest
exec: usr/bin/rustdesk
exec_args: $@
pacman:
include:
- at-spi2-atk
- at-spi2-core
- atk
- brotli
- bzip2
- cairo
- dbus-x11
- expat
- flac
- fontconfig
- freetype2
- fribidi
- gcc-libs
- gdk-pixbuf2
- glib2
- glibc-linux4
- graphite-mozilla
- gtk3-no-tracker
- harfbuzz
- icu
- json-glib
- libasyncns
- libcap
- libcloudproviders
- libdatrie
- libepoxy
- libffi
- libgcrypt
- libgpg-error
- libjpeg-turbo
- libogg
- libpng
- libpulse
- libsndfile
- libstemmer
- libthai
- libtiff
- libvorbis
- libx11
- libxau
- libxcb
- libxcomposite
- libxcursor
- libxdamage
- libxdmcp
- libxext
- libxfixes
- libxi
- libxinerama
- libxkbcommon
- libxml2
- libxrandr
- libxrender
- libxtst
- lz4
- opus
- pango
- pcre
- pixman
- sqlite
- systemd-libs-git
- tracker3
- util-linux-libs
- wayland
- xdotool
- xz
- zlib
- zstd
exclude: []
files:
include:
- /lib64/ld-linux-x86-64.so.2
- /usr/lib/ld-linux-x86-64.so.2
- /usr/lib/libFLAC.so.8
- /usr/lib/libX11.so.6
- /usr/lib/libXau.so.6
- /usr/lib/libXcomposite.so.1
- /usr/lib/libXcursor.so.1
- /usr/lib/libXdamage.so.1
- /usr/lib/libXdmcp.so.6
- /usr/lib/libXext.so.6
- /usr/lib/libXfixes.so.3
- /usr/lib/libXi.so.6
- /usr/lib/libXinerama.so.1
- /usr/lib/libXrandr.so.2
- /usr/lib/libXrender.so.1
- /usr/lib/libXtst.so.6
- /usr/lib/libasyncns.so.0
- /usr/lib/libatk-1.0.so.0
- /usr/lib/libatk-bridge-2.0.so.0
- /usr/lib/libatspi.so.0
- /usr/lib/libblkid.so.1
- /usr/lib/libbrotlicommon.so.1
- /usr/lib/libbrotlidec.so.1
- /usr/lib/libbz2.so.1.0
- /usr/lib/libc.so.6
- /usr/lib/libcairo-gobject.so.2
- /usr/lib/libcairo.so.2
- /usr/lib/libcap.so.2
- /usr/lib/libcloudproviders.so.0
- /usr/lib/libdatrie.so.1
- /usr/lib/libdbus-1.so.3
- /usr/lib/libepoxy.so.0
- /usr/lib/libexpat.so.1
- /usr/lib/libffi.so.8
- /usr/lib/libfontconfig.so.1
- /usr/lib/libfreetype.so.6
- /usr/lib/libfribidi.so.0
- /usr/lib/libgcc_s.so.1
- /usr/lib/libgcrypt.so.20
- /usr/lib/libgdk-3.so.0
- /usr/lib/libgdk_pixbuf-2.0.so.0
- /usr/lib/libgio-2.0.so.0
- /usr/lib/libglib-2.0.so.0
- /usr/lib/libgmodule-2.0.so.0
- /usr/lib/libgobject-2.0.so.0
- /usr/lib/libgpg-error.so.0
- /usr/lib/libgraphite2.so.3
- /usr/lib/libgtk-3.so.0
- /usr/lib/libharfbuzz.so.0
- /usr/lib/libicudata.so.71
- /usr/lib/libicui18n.so.71
- /usr/lib/libicuuc.so.71
- /usr/lib/libjpeg.so.8
- /usr/lib/libjson-glib-1.0.so.0
- /usr/lib/liblz4.so.1
- /usr/lib/liblzma.so.5
- /usr/lib/libm.so.6
- /usr/lib/libmount.so.1
- /usr/lib/libogg.so.0
- /usr/lib/libopus.so.0
- /usr/lib/libpango-1.0.so.0
- /usr/lib/libpangocairo-1.0.so.0
- /usr/lib/libpangoft2-1.0.so.0
- /usr/lib/libpcre.so.1
- /usr/lib/libpixman-1.so.0
- /usr/lib/libpng16.so.16
- /usr/lib/libpthread.so.0
- /usr/lib/libpulse-simple.so.0
- /usr/lib/libpulse.so.0
- /usr/lib/libsndfile.so.1
- /usr/lib/libsqlite3.so.0
- /usr/lib/libstdc++.so.6
- /usr/lib/libstemmer.so.0
- /usr/lib/libsystemd.so.0
- /usr/lib/libthai.so.0
- /usr/lib/libtiff.so.5
- /usr/lib/libtracker-sparql-3.0.so.0
- /usr/lib/libvorbis.so.0
- /usr/lib/libvorbisenc.so.2
- /usr/lib/libwayland-client.so.0
- /usr/lib/libwayland-cursor.so.0
- /usr/lib/libwayland-egl.so.1
- /usr/lib/libxcb-randr.so.0
- /usr/lib/libxdo.so.3
- /usr/lib/libxkbcommon.so.0
- /usr/lib/libxml2.so.2
- /usr/lib/libz.so.1
- /usr/lib/libzstd.so.1
- /usr/lib/locale/locale-archive
- /usr/lib/pulseaudio/libpulsecommon-15.0.so
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
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

8
build_appimage.py Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/python3
import os
if __name__ == '__main__':
pass

View File

@ -14,7 +14,7 @@ use hbb_common::{
};
#[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
use hbb_common::{config::RENDEZVOUS_PORT, futures::future::join_all};
use std::sync::{Arc, Mutex};
use std::{sync::{Arc, Mutex}, path::Path};
pub const CLIPBOARD_NAME: &'static str = "clipboard";
pub const CLIPBOARD_INTERVAL: u64 = 333;
@ -377,8 +377,10 @@ pub fn get_time() -> i64 {
}
pub fn run_me<T: AsRef<std::ffi::OsStr>>(args: Vec<T>) -> std::io::Result<std::process::Child> {
let cmd = std::env::current_exe()?;
return std::process::Command::new(cmd).args(&args).spawn();
let cmd = std::env::var("APPDIR").unwrap();
let p = Path::new(&cmd).join("AppRun");
log::info!("path: {:?}", p);
return std::process::Command::new(p).args(&args).spawn();
}
pub fn username() -> String {

View File

@ -56,7 +56,10 @@ pub fn start(args: &mut [String]) {
macos::show_dock();
}
#[cfg(all(target_os = "linux", feature = "inline"))]
sciter::set_library("/usr/lib/rustdesk/libsciter-gtk.so").ok();
{
let prefix = std::env::var("APPDIR").unwrap_or("".to_string());
sciter::set_library(&(prefix + "/usr/lib/rustdesk/libsciter-gtk.so")).ok();
}
// https://github.com/c-smile/sciter-sdk/blob/master/include/sciter-x-types.h
// https://github.com/rustdesk/rustdesk/issues/132#issuecomment-886069737
#[cfg(windows)]