Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
70f7dddf
Unverified
Commit
70f7dddf
authored
Sep 12, 2022
by
RustDesk
Committed by
GitHub
Sep 12, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1499 from Kingtous/master
feat: flutter-ci, remove corrsion for win/linux
parents
de1c7b96
74201b71
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
113 additions
and
41 deletions
+113
-41
flutter-ci.yml
.github/workflows/flutter-ci.yml
+97
-0
CMakeLists.txt
flutter/linux/CMakeLists.txt
+9
-22
CMakeLists.txt
flutter/windows/CMakeLists.txt
+7
-0
CMakeLists.txt
flutter/windows/runner/CMakeLists.txt
+0
-19
No files found.
.github/workflows/flutter-ci.yml
0 → 100644
View file @
70f7dddf
name
:
Flutter CI
on
:
workflow_dispatch
:
pull_request
:
push
:
branches
:
-
master
tags
:
-
'
*'
jobs
:
build
:
name
:
${{ matrix.job.target }} (${{ matrix.job.os }})
runs-on
:
${{ matrix.job.os }}
strategy
:
fail-fast
:
false
matrix
:
job
:
# - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
# - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true }
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
# - { target: i686-pc-windows-msvc , os: windows-2019 }
# - { 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: x86_64-apple-darwin , os: macos-10.15 }
# - { target: x86_64-pc-windows-gnu , os: windows-2019 }
# - { target: x86_64-pc-windows-msvc , os: windows-2019 }
-
{
target
:
x86_64-unknown-linux-gnu
,
os
:
ubuntu-20.04
}
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
steps
:
-
name
:
Checkout source code
uses
:
actions/checkout@v2
-
name
:
Install prerequisites
shell
:
bash
run
:
|
case ${{ matrix.job.target }} in
x86_64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev;;
# arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
# aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac
-
name
:
Install flutter
uses
:
subosito/flutter-action@v2
with
:
channel
:
'
stable'
-
name
:
Install Rust toolchain
uses
:
actions-rs/toolchain@v1
with
:
toolchain
:
stable
target
:
${{ matrix.job.target }}
override
:
true
profile
:
minimal
# minimal component installation (ie, no documentation)
-
uses
:
Swatinem/rust-cache@v1
-
name
:
Install flutter rust bridge deps
run
:
|
dart pub global activate ffigen --version 5.0.1
# flutter_rust_bridge
pushd /tmp && git clone https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge --depth=1 && popd
pushd /tmp/flutter_rust_bridge/frb_codegen && cargo install --path . && popd
pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
-
name
:
Restore from cache and install vcpkg
uses
:
lukka/run-vcpkg@v7
with
:
setupOnly
:
true
vcpkgGitCommitId
:
'
1d4128f08e30cec31b94500840c7eca8ebc579cb'
-
name
:
Install vcpkg dependencies
run
:
|
$VCPKG_ROOT/vcpkg install libvpx libyuv opus
shell
:
bash
-
name
:
Show version information (Rust, cargo, GCC)
shell
:
bash
run
:
|
gcc --version || true
rustup -V
rustup toolchain list
rustup default
cargo -V
rustc -V
-
name
:
Build rustdesk ffi lib
run
:
cargo build --features flutter --lib
-
name
:
Build Flutter
run
:
|
pushd flutter
flutter pub get
flutter build linux --debug -v
popd
\ No newline at end of file
flutter/linux/CMakeLists.txt
View file @
70f7dddf
...
...
@@ -56,26 +56,6 @@ pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
add_definitions
(
-DAPPLICATION_ID=
"
${
APPLICATION_ID
}
"
)
# flutter_rust_bridge
find_package
(
Corrosion REQUIRED
)
corrosion_import_crate
(
MANIFEST_PATH ../../Cargo.toml
# Equivalent to --all-features passed to cargo build
# [ALL_FEATURES]
# Equivalent to --no-default-features passed to cargo build
# [NO_DEFAULT_FEATURES]
# Disable linking of standard libraries (required for no_std crates).
# [NO_STD]
# Specify cargo build profile (e.g. release or a custom profile)
# [PROFILE <cargo-profile>]
# Only import the specified crates from a workspace
# [CRATES <crate1> ... <crateN>]
# Enable the specified features
# [FEATURES <feature1> ... <featureN>]
)
set
(
BASE_RUSTDESK
"librustdesk"
)
# Define the application target. To change its name, change BINARY_NAME above,
# not the value here, or `flutter run` will no longer work.
#
...
...
@@ -93,7 +73,7 @@ apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.
target_link_libraries
(
${
BINARY_NAME
}
PRIVATE flutter
)
target_link_libraries
(
${
BINARY_NAME
}
PRIVATE PkgConfig::GTK
)
target_link_libraries
(
${
BINARY_NAME
}
PRIVATE
${
BASE_RUSTDESK
}
)
target_link_libraries
(
${
BINARY_NAME
}
PRIVATE
${
CMAKE_DL_LIBS
}
)
# target_link_libraries(${BINARY_NAME} PRIVATE librustdesk)
# Run the Flutter tool portions of the build. This must not be removed.
...
...
@@ -144,7 +124,14 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
COMPONENT Runtime
)
endforeach
(
bundled_library
)
install
(
FILES $<TARGET_FILE:
${
BASE_RUSTDESK
}
-shared> DESTINATION
"
${
INSTALL_BUNDLE_LIB_DIR
}
"
COMPONENT Runtime RENAME librustdesk.so
)
# flutter_rust_bridge
set
(
RUSTDESK_LIB_BUILD_TYPE $<IF:$<CONFIG:Debug>,debug,release>
)
string
(
TOLOWER
${
CMAKE_BUILD_TYPE
}
${
RUSTDESK_LIB_BUILD_TYPE
}
)
message
(
STATUS
"rustdesk lib build type:
${
RUSTDESK_LIB_BUILD_TYPE
}
"
)
set
(
RUSTDESK_LIB
"../../target/
${
RUSTDESK_LIB_BUILD_TYPE
}
/liblibrustdesk.so"
)
install
(
FILES
"
${
RUSTDESK_LIB
}
"
DESTINATION
"
${
INSTALL_BUNDLE_LIB_DIR
}
"
COMPONENT Runtime RENAME librustdesk.so
)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
...
...
flutter/windows/CMakeLists.txt
View file @
70f7dddf
...
...
@@ -86,6 +86,13 @@ if(PLUGIN_BUNDLED_LIBRARIES)
COMPONENT Runtime
)
endif
()
# flutter_rust_bridge
set
(
RUSTDESK_LIB_BUILD_TYPE $<IF:$<CONFIG:Debug>,debug,release>
)
message
(
STATUS
"rustdesk lib build type:
${
RUSTDESK_LIB_BUILD_TYPE
}
"
)
set
(
RUSTDESK_LIB
"../../target/
${
RUSTDESK_LIB_BUILD_TYPE
}
/librustdesk.dll"
)
install
(
FILES
"
${
RUSTDESK_LIB
}
"
DESTINATION
"
${
INSTALL_BUNDLE_LIB_DIR
}
"
COMPONENT Runtime RENAME librustdesk.dll
)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set
(
FLUTTER_ASSET_DIR_NAME
"flutter_assets"
)
...
...
flutter/windows/runner/CMakeLists.txt
View file @
70f7dddf
...
...
@@ -16,25 +16,6 @@ add_executable(${BINARY_NAME} WIN32
"runner.exe.manifest"
)
# flutter_rust_bridge with Corrosion
find_package
(
Corrosion REQUIRED
)
corrosion_import_crate
(
MANIFEST_PATH ../../../Cargo.toml
# Equivalent to --all-features passed to cargo build
# [ALL_FEATURES]
# Equivalent to --no-default-features passed to cargo build
# [NO_DEFAULT_FEATURES]
# Disable linking of standard libraries (required for no_std crates).
# [NO_STD]
# Specify cargo build profile (e.g. release or a custom profile)
# [PROFILE <cargo-profile>]
# Only import the specified crates from a workspace
# [CRATES <crate1> ... <crateN>]
# Enable the specified features
# [FEATURES <feature1> ... <featureN>]
)
target_link_libraries
(
${
BINARY_NAME
}
PRIVATE librustdesk
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings
(
${
BINARY_NAME
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment