fix: nightly ci
This commit is contained in:
parent
d0aedaedce
commit
1109598131
38
.github/workflows/flutter-nightly.yml
vendored
38
.github/workflows/flutter-nightly.yml
vendored
@ -93,7 +93,7 @@ jobs:
|
|||||||
rustdesk-*.exe
|
rustdesk-*.exe
|
||||||
|
|
||||||
build-for-linux:
|
build-for-linux:
|
||||||
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
name: ${{ matrix.job.target }} (${{ matrix.job.os }},${{ matrix.job.extra-build-args }})
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -105,7 +105,8 @@ jobs:
|
|||||||
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
# - { target: x86_64-apple-darwin , os: macos-10.15 }
|
# - { target: x86_64-apple-darwin , os: macos-10.15 }
|
||||||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-18.04}
|
- { target: x86_64-unknown-linux-gnu , os: ubuntu-18.04, extra-build-args: ""}
|
||||||
|
- { target: x86_64-unknown-linux-gnu , os: ubuntu-18.04, extra-build-args: "--flatpak"}
|
||||||
# - { 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
|
||||||
@ -160,7 +161,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install cargo bundle tools
|
- name: Install cargo bundle tools
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-bundle --force
|
cargo install cargo-bundle
|
||||||
|
|
||||||
- name: Show version information (Rust, cargo, GCC)
|
- name: Show version information (Rust, cargo, GCC)
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -173,7 +174,7 @@ jobs:
|
|||||||
rustc -V
|
rustc -V
|
||||||
|
|
||||||
- name: Build rustdesk
|
- name: Build rustdesk
|
||||||
run: ./build.py --flutter --hwcodec
|
run: ./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }}
|
||||||
|
|
||||||
- name: Rename rustdesk
|
- name: Rename rustdesk
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -188,15 +189,17 @@ jobs:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
files: |
|
files: |
|
||||||
rustdesk-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
||||||
|
|
||||||
- name: Upload Artifcat
|
- name: Upload Artifcat
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
|
if: ${{ contains(matrix.job.extra-build-args, 'flatpak') }}
|
||||||
with:
|
with:
|
||||||
name: rustdesk-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
||||||
path: rustdesk-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
path: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
||||||
|
|
||||||
- name: Build archlinux package
|
- name: Build archlinux package
|
||||||
|
if: ${{ matrix.job.extra-build-args == '' }}
|
||||||
uses: vufa/arch-makepkg-action@master
|
uses: vufa/arch-makepkg-action@master
|
||||||
with:
|
with:
|
||||||
packages: >
|
packages: >
|
||||||
@ -231,6 +234,7 @@ jobs:
|
|||||||
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
||||||
|
|
||||||
- name: Publish archlinux package
|
- name: Publish archlinux package
|
||||||
|
if: ${{ matrix.job.extra-build-args == '' }}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -238,6 +242,20 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
res/rustdesk*.zst
|
res/rustdesk*.zst
|
||||||
|
|
||||||
|
# - name: build RPM package
|
||||||
|
# id: rpm
|
||||||
|
# uses: Kingtous/rustdesk-rpmbuild@master
|
||||||
|
# with:
|
||||||
|
# spec_file: "res/rpm-flutter.spec"
|
||||||
|
|
||||||
|
# - name: Publish fedora28/centos8 package
|
||||||
|
# uses: softprops/action-gh-release@v1
|
||||||
|
# with:
|
||||||
|
# prerelease: true
|
||||||
|
# tag_name: ${{ env.TAG_NAME }}
|
||||||
|
# files: |
|
||||||
|
# ${{ steps.rpm.outputs.rpm_dir_path }}/*
|
||||||
|
|
||||||
build-flatpak:
|
build-flatpak:
|
||||||
name: Build Flatpak
|
name: Build Flatpak
|
||||||
needs: [build-for-linux]
|
needs: [build-for-linux]
|
||||||
@ -252,7 +270,7 @@ jobs:
|
|||||||
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
# - { target: x86_64-apple-darwin , os: macos-10.15 }
|
# - { target: x86_64-apple-darwin , os: macos-10.15 }
|
||||||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-18.04, arch: "x86_64"}
|
- { target: x86_64-unknown-linux-gnu , os: ubuntu-18.04, arch: x86_64}
|
||||||
# - { 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
|
||||||
@ -266,12 +284,12 @@ jobs:
|
|||||||
- name: Download Binary
|
- name: Download Binary
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: rustdesk-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
- name: Rename Binary
|
- name: Rename Binary
|
||||||
run: |
|
run: |
|
||||||
mv rustdesk-${{ matrix.job.target }}-${{ matrix.job.os }}.deb rustdesk-${{ env.VERSION }}.deb
|
mv rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb rustdesk-${{ env.VERSION }}.deb
|
||||||
|
|
||||||
- name: Install Flatpak deps
|
- name: Install Flatpak deps
|
||||||
run: |
|
run: |
|
||||||
|
7
build.py
7
build.py
@ -81,6 +81,11 @@ def make_parser():
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help='Build windows portable'
|
help='Build windows portable'
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--flatpak',
|
||||||
|
action='store_true',
|
||||||
|
help='Build rustdesk libs with the flatpak feature enabled'
|
||||||
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
@ -188,6 +193,8 @@ def get_features(args):
|
|||||||
features.append('hwcodec')
|
features.append('hwcodec')
|
||||||
if args.flutter:
|
if args.flutter:
|
||||||
features.append('flutter')
|
features.append('flutter')
|
||||||
|
if args.flatpak:
|
||||||
|
features.append('flatpak')
|
||||||
print("features:", features)
|
print("features:", features)
|
||||||
return features
|
return features
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"command": "rustdesk",
|
"command": "rustdesk",
|
||||||
"modules": [
|
"modules": [
|
||||||
"shared-modules/libappindicator/libappindicator-gtk3-12.10.json",
|
"shared-modules/libappindicator/libappindicator-gtk3-12.10.json",
|
||||||
|
"xdotool.json",
|
||||||
{
|
{
|
||||||
"name": "rustdesk",
|
"name": "rustdesk",
|
||||||
"buildsystem": "simple",
|
"buildsystem": "simple",
|
||||||
@ -26,8 +27,12 @@
|
|||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--share=ipc",
|
"--share=ipc",
|
||||||
"--socket=x11",
|
"--socket=x11",
|
||||||
|
"--socket=fallback-x11",
|
||||||
"--socket=wayland",
|
"--socket=wayland",
|
||||||
"--share=network",
|
"--share=network",
|
||||||
"--filesystem=xdg-documents"
|
"--filesystem=home",
|
||||||
|
"--device=dri",
|
||||||
|
"--socket=pulseaudio",
|
||||||
|
"--talk-name=org.freedesktop.Flatpak"
|
||||||
]
|
]
|
||||||
}
|
}
|
15
flatpak/xdotool.json
Normal file
15
flatpak/xdotool.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "xdotool",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"make -j4 && PREFIX=./build make install",
|
||||||
|
"cp -r ./build/* /app/"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://github.com/jordansissel/xdotool/releases/download/v3.20211022.1/xdotool-3.20211022.1.tar.gz",
|
||||||
|
"sha256": "96f0facfde6d78eacad35b91b0f46fecd0b35e474c03e00e30da3fdd345f9ada"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -807,6 +807,8 @@ pub fn is_root() -> bool {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn check_super_user_permission() -> bool {
|
pub fn check_super_user_permission() -> bool {
|
||||||
|
#[cfg(feature = "flatpak")]
|
||||||
|
return true;
|
||||||
#[cfg(any(windows, target_os = "linux"))]
|
#[cfg(any(windows, target_os = "linux"))]
|
||||||
return crate::platform::check_super_user_permission().unwrap_or(false);
|
return crate::platform::check_super_user_permission().unwrap_or(false);
|
||||||
#[cfg(not(any(windows, target_os = "linux")))]
|
#[cfg(not(any(windows, target_os = "linux")))]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user