118 Commits

Author SHA1 Message Date
Bryan Gerlach
e46d0bd0ef 1.4.3 2025-10-19 16:45:17 -05:00
Bryan
67e2bc7df9 Merge pull request #137 from Maxetto/patch-1
Fix Windows 64 and 32 Bit both active at same time
2025-10-06 16:16:22 -05:00
Maxetto
2e229d0800 Fix Windows 64 and 32 Bit both active at same time 2025-09-29 17:51:23 +02:00
Bryan Gerlach
89ee4822dd add icon for 32 bit windows 2025-09-25 13:16:11 -05:00
Bryan Gerlach
c429836057 add icon for 32 bit windows 2025-09-25 13:12:22 -05:00
Bryan Gerlach
6f1bb528bd add settings for camera,terminal, and printer 2025-09-25 13:02:58 -05:00
Bryan
13114d0bc3 Merge pull request #128 from Maxetto/website-changes
Proposal for Website changes
2025-09-25 12:49:32 -05:00
Bryan
56c4d9f0b7 Merge branch 'master' into website-changes 2025-09-25 12:49:24 -05:00
Bryan
6c7c1ed3e7 Merge pull request #127 from Maxetto/x86-build
Create X86 Windows Generator
2025-09-25 12:45:47 -05:00
Bryan
abbf4d899b Merge pull request #126 from Maxetto/generator-fixes
Generator fixes
2025-09-25 12:45:21 -05:00
Bryan
3e22a34906 Merge branch 'master' into generator-fixes 2025-09-25 12:45:02 -05:00
Bryan Gerlach
b4ec36c59a v1.4.2 2025-09-18 21:31:40 -05:00
Bryan Gerlach
7d578df4c2 v1.4.2 2025-09-18 20:57:26 -05:00
Maxetto
3169440af6 Revert moving Setup Server Tip block 2025-09-08 17:23:16 +02:00
Maxetto
12b5fe1e30 Update Waiting Page 2025-09-05 12:17:13 +02:00
Maxetto
23e91a5ea7 Update Generator Page 2025-09-05 12:16:40 +02:00
Maxetto
be47bcbe46 Update Generated page 2025-09-05 12:14:05 +02:00
Maxetto
668998e390 Update Views 2025-09-05 12:12:48 +02:00
Maxetto
fabbc91fae Add x86 in Forms 2025-09-05 12:08:32 +02:00
Maxetto
50082d5566 Create X86 Windows Generator 2025-09-05 11:56:19 +02:00
Maxetto
ac3d60cae1 Fix Hide CM and Remove Wallpaper options 2025-09-05 11:49:16 +02:00
Maxetto
6755dc1fa0 Remove Hide CM patch and move around things 2025-09-05 11:36:21 +02:00
Bryan Gerlach
c53548dcce linux appimage 2025-07-28 15:11:58 -05:00
Bryan Gerlach
e36790addc v1.4.1 2025-07-24 10:39:18 -05:00
Bryan Gerlach
94f1560196 v1.4.1 2025-07-24 10:38:20 -05:00
Bryan Gerlach
6ac5f4b283 . 2025-06-17 07:59:47 -05:00
Bryan Gerlach
606a5ee956 . 2025-06-17 07:51:55 -05:00
Bryan Gerlach
2548477390 fix code changes 2025-06-06 11:59:30 -05:00
Bryan Gerlach
885523e2f9 1.4.0 2025-05-11 14:57:46 -05:00
Bryan Gerlach
253749df21 macos 2025-05-01 16:45:34 -05:00
Bryan Gerlach
050f4b3130 fix the & symbol in company name 2025-04-30 07:06:07 -05:00
Bryan Gerlach
cc59f1d58d macos stuff 2025-04-19 00:57:00 -05:00
Bryan Gerlach
a56f965344 macos stuff 2025-04-19 00:04:05 -05:00
Bryan Gerlach
a45bc0acdd macos stuff 2025-04-18 20:58:18 -05:00
Bryan
5ea49e7a00 Merge pull request #72 from MLPCR/master
Continue on Update status timeout & Fix missed rustdesk.com to custom url text on android client
2025-04-18 20:57:59 -05:00
MLPCR
131ec1759d Merge branch 'bryangerlach:master' into master 2025-04-18 18:37:48 +00:00
MLPCR
bcef3a4026 Update generator-android.yml
Correct missed website link on android settings page
2025-04-18 15:34:28 +00:00
Bryan Gerlach
0240a905f9 fix macos 2025-04-18 10:04:35 -05:00
Bryan Gerlach
8577a25657 fix macos 2025-04-18 09:53:00 -05:00
Bryan Gerlach
465a9d3554 fix macos 2025-04-18 09:41:49 -05:00
MLPCR
f0f67f5be1 Update generator-linux.yml
Continue on error when update status timesout
2025-04-17 22:55:28 +00:00
MLPCR
2c1a5f93b5 Update generator-android.yml
Continue on error when update status timeout
2025-04-17 22:19:35 +00:00
MLPCR
55c41599be Update generator-windows.yml
Continue on Error or timeout of update status
2025-04-17 21:02:55 +00:00
Bryan Gerlach
9f23f1c94a fix linux deploy for api server 2025-04-17 08:35:42 -05:00
Bryan Gerlach
7479fbbd8f flatpak,appimage 2025-04-16 21:35:52 -05:00
Bryan Gerlach
c0ede165ab flatpak,appimage 2025-04-16 20:38:56 -05:00
Bryan Gerlach
78ec60d272 flatpak,appimage 2025-04-16 19:50:07 -05:00
Bryan Gerlach
807f26360e flatpak,appimage 2025-04-16 18:16:15 -05:00
Bryan Gerlach
bad75caf0b flatpak,appimage 2025-04-16 17:38:56 -05:00
Bryan Gerlach
b76e34aa1c delete artifact 2025-04-16 16:57:19 -05:00
Bryan Gerlach
e3c41ee258 flatpak & appimage 2025-04-16 16:52:45 -05:00
Bryan Gerlach
c76a63d269 flatpak & appimage 2025-04-16 16:42:42 -05:00
Bryan
88918cde01 Merge pull request #65 from Draakoor/master
Update generator-linux.yml
2025-04-15 21:17:12 -05:00
Dominik
6725aa21b0 Update generator-linux.yml 2025-04-16 03:29:04 +02:00
Bryan Gerlach
1978be9edf build web github action 2025-04-15 17:41:58 -05:00
Bryan Gerlach
4edff33ebd build web github action 2025-04-15 17:14:38 -05:00
Bryan Gerlach
49fd150fe5 build web github action 2025-04-15 17:02:06 -05:00
Bryan Gerlach
c8c1fac268 build web github action 2025-04-15 16:59:28 -05:00
Bryan Gerlach
a91d66007d build web github action 2025-04-15 16:58:08 -05:00
Bryan Gerlach
ca1aa3fcc5 max memory size 2025-04-14 21:42:26 -05:00
Bryan Gerlach
409ed5cfa3 debug false 2025-04-14 21:38:36 -05:00
Bryan Gerlach
2ca25d3a39 hidecm 2025-04-14 11:05:13 -05:00
Bryan Gerlach
0e975e73db docker 2025-04-14 08:09:13 -05:00
Bryan Gerlach
62ac82ec2e debug 2025-04-14 08:05:22 -05:00
Bryan Gerlach
fc239ef7b5 hidecm, layout changes 2025-04-14 06:49:25 -05:00
Bryan Gerlach
71eb691a52 hidecm, layout changes 2025-04-14 06:45:11 -05:00
Bryan Gerlach
256d647f04 fix direct-ip setting 2025-04-13 13:32:44 -05:00
Bryan Gerlach
7644222adf fix windows registry for appname with spaces? 2025-04-09 23:52:01 -05:00
Bryan Gerlach
fdfebbb01a fix windows registry for appname with spaces? 2025-04-09 22:01:01 -05:00
Bryan Gerlach
cd1915a4bf remove the calls to api.rustdesk.com when checking for updates 2025-04-08 16:27:45 -05:00
Bryan Gerlach
785d03e46f fix 2025-04-04 21:18:22 -05:00
Bryan Gerlach
996b3c66b0 maintenance 2025-04-02 07:06:18 -05:00
Bryan Gerlach
08af79b930 maintenance 2025-04-02 07:04:04 -05:00
Bryan Gerlach
f6be77c68a fix? 2025-04-01 21:57:33 -05:00
Bryan Gerlach
a9718c4f5d fix? 2025-04-01 21:37:37 -05:00
Bryan Gerlach
119b272564 fix? 2025-04-01 15:51:34 -05:00
Bryan Gerlach
50236e59ff fix? 2025-04-01 15:37:23 -05:00
Bryan Gerlach
877ec790d6 github depricating ubuntu 20.04? change to 24.04 2025-04-01 15:16:51 -05:00
Bryan Gerlach
972451709c github depricating ubuntu 20.04? change to 24.04 2025-04-01 15:11:40 -05:00
Bryan Gerlach
e2c20567d6 fix macos 2025-04-01 14:08:07 -05:00
Bryan Gerlach
6718464f57 1.3.9 2025-04-01 13:34:09 -05:00
Bryan Gerlach
5148b792e6 hopefully fix 500 error on download links 2025-03-30 19:34:25 -05:00
Bryan
e79572d55d Merge pull request #48 from sonnyyin/master
modify for arm64 compile and add download links for linux output file
2025-03-28 12:32:41 -05:00
zhengyin
9c1ab4de3c fix linux file name 2025-03-28 19:28:33 +08:00
zhengyin
d2b36d3876 fix a bug 2025-03-28 19:04:26 +08:00
zhengyin
16d0818a28 delete test on xbxiot 2025-03-28 18:24:51 +08:00
zhengyin
634a77a054 test on xbxiot branch 2025-03-28 18:21:01 +08:00
zhengyin
3ff33a6efb add aarch64 linux compile and download link for it 2025-03-28 18:05:50 +08:00
Bryan Gerlach
897fe1a487 fix linux rustdesk dir 2025-03-26 14:31:18 -05:00
Bryan Gerlach
8b04b051fd remove new version notification fix 2025-03-26 14:11:18 -05:00
Bryan Gerlach
c59a838f7b revert 2025-03-25 15:59:24 -05:00
Bryan Gerlach
ebaedbcf55 status on clients page 2025-03-25 15:58:02 -05:00
Bryan Gerlach
21a5dc1bf6 fix android server/key/api settings 2025-03-01 16:36:46 -06:00
Bryan Gerlach
e8af50a5fc fix linux/android builds? 2025-02-27 22:28:55 -06:00
Bryan Gerlach
124af41206 fix win build 2025-02-27 22:15:11 -06:00
Bryan Gerlach
2e216e9d26 test 2025-02-27 22:09:21 -06:00
Bryan Gerlach
8cd0e78ec7 test 2025-02-27 19:44:11 -06:00
Bryan Gerlach
581dcd62c3 test 2025-02-27 19:15:08 -06:00
Bryan Gerlach
60ec06b3ea changes 2025-02-27 14:05:54 -06:00
Bryan Gerlach
8253cce1bf changes 2025-02-27 13:19:57 -06:00
Bryan Gerlach
6167b8f61d update bridge 2025-02-27 11:37:46 -06:00
Bryan Gerlach
9fd8f52815 update bridge 2025-02-27 11:34:44 -06:00
Bryan
50f15f18b4 Merge pull request #43 from VenimK/patch-13
Update generator.html
2025-02-27 11:22:08 -06:00
Bryan
c4cc4a167e Merge pull request #42 from VenimK/patch-12
Update forms.py
2025-02-27 11:21:32 -06:00
VenimK
1d51a43a47 Update generator.html
More info for the user about master/nightly
2025-02-27 06:32:03 +01:00
VenimK
905d8039ef Update forms.py
Some info for the user regarding master/nightly
2025-02-27 06:25:29 +01:00
Bryan Gerlach
8b8aff445a try fixing imagamagick issues 2025-02-26 16:10:57 -06:00
Bryan Gerlach
1b56fa5833 try fixing imagamagick issues 2025-02-26 16:10:48 -06:00
Bryan Gerlach
ac114152de try fixing imagamagick issues 2025-02-25 09:58:55 -06:00
Bryan Gerlach
ca0d321873 v1.3.8 2025-02-24 12:22:03 -06:00
Bryan Gerlach
80fc9f6a84 v1.3.8 2025-02-24 12:17:52 -06:00
Bryan Gerlach
b567c74902 v1.3.8 2025-02-24 12:16:04 -06:00
Bryan Gerlach
cc47350fab fix setup_server_tip 2025-02-19 19:54:50 -06:00
Bryan Gerlach
e882a604d7 fix setup_server_tip 2025-02-19 18:05:33 -06:00
Bryan Gerlach
1b7468a1f2 remove unsigned and signed zip files 2025-02-18 07:42:22 -06:00
Bryan Gerlach
1424caffb0 fix api again 2025-02-18 06:29:06 -06:00
Bryan Gerlach
47cf713307 only allow ascii characters on appname 2025-02-17 09:10:00 -06:00
Bryan Gerlach
fe505ed35c fix master build 2025-02-16 23:41:18 -06:00
25 changed files with 1112 additions and 2796 deletions

29
.github/patches/allowCustom.diff vendored Normal file
View File

@@ -0,0 +1,29 @@
diff --git a/src/common.rs b/src/common.rs
index 56361a5da..92b221e9a 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -1474,15 +1474,15 @@ pub fn read_custom_client(config: &str) {
log::error!("Failed to decode custom client config");
return;
};
- const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=";
- let Some(pk) = get_rs_pk(KEY) else {
- log::error!("Failed to parse public key of custom client");
- return;
- };
- let Ok(data) = sign::verify(&data, &pk) else {
- log::error!("Failed to dec custom client config");
- return;
- };
+ // const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=";
+ // let Some(pk) = get_rs_pk(KEY) else {
+ // log::error!("Failed to parse public key of custom client");
+ // return;
+ // };
+ // let Ok(data) = sign::verify(&data, &pk) else {
+ // log::error!("Failed to dec custom client config");
+ // return;
+ // };
let Ok(mut data) =
serde_json::from_slice::<std::collections::HashMap<String, serde_json::Value>>(&data)
else {

View File

@@ -1,22 +1,41 @@
diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart
index ba724eed5..cb66cdaed 100644 index ba724eed5..1604c429f 100644
--- a/flutter/lib/desktop/pages/desktop_home_page.dart --- a/flutter/lib/desktop/pages/desktop_home_page.dart
+++ b/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart
@@ -424,7 +424,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> @@ -424,21 +424,21 @@ class _DesktopHomePageState extends State<DesktopHomePage>
} }
Widget buildHelpCards(String updateUrl) { Widget buildHelpCards(String updateUrl) {
- if (!bind.isCustomClient() && - if (!bind.isCustomClient() &&
+ /*if (!bind.isCustomClient() && - updateUrl.isNotEmpty &&
updateUrl.isNotEmpty && - !isCardClosed &&
!isCardClosed && - bind.mainUriPrefixSync().contains('rustdesk')) {
bind.mainUriPrefixSync().contains('rustdesk')) { - return buildInstallCard(
@@ -435,7 +435,7 @@ class _DesktopHomePageState extends State<DesktopHomePage> - "Status",
final Uri url = Uri.parse('https://rustdesk.com/download'); - "${translate("new-version-of-{${bind.mainGetAppNameSync()}}-tip")} (${bind.mainGetNewVersion()}).",
await launchUrl(url); - "Click to download", () async {
}, closeButton: true); - final Uri url = Uri.parse('https://rustdesk.com/download');
- await launchUrl(url);
- }, closeButton: true);
- } - }
+ }*/ - if (systemError.isNotEmpty) {
if (systemError.isNotEmpty) { - return buildInstallCard("", systemError, "", () {});
return buildInstallCard("", systemError, "", () {}); - }
} + // if (!bind.isCustomClient() &&
+ // updateUrl.isNotEmpty &&
+ // !isCardClosed &&
+ // bind.mainUriPrefixSync().contains('rustdesk')) {
+ // return buildInstallCard(
+ // "Status",
+ // "${translate("new-version-of-{${bind.mainGetAppNameSync()}}-tip")} (${bind.mainGetNewVersion()}).",
+ // "Click to download", () async {
+ // final Uri url = Uri.parse('https://rustdesk.com/download');
+ // await launchUrl(url);
+ // }, closeButton: true);
+ // }
+ // if (systemError.isNotEmpty) {
+ // return buildInstallCard("", systemError, "", () {});
+ // }
if (isWindows && !bind.isDisableInstallation()) {
if (!bind.mainIsInstalled()) {

View File

@@ -0,0 +1,13 @@
diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart
index d9dc3eec4..76f386b76 100644
--- a/flutter/lib/desktop/pages/connection_page.dart
+++ b/flutter/lib/desktop/pages/connection_page.dart
@@ -131,7 +131,7 @@ class _OnlineStatusWidgetState extends State<OnlineStatusWidget> {
if (!isIncomingOnly) startServiceWidget(),
// ready && public
// No need to show the guide if is custom client.
- if (!isIncomingOnly) setupServerWidget(),
+ //if (!isIncomingOnly) setupServerWidget(),
],
);

View File

@@ -1,33 +0,0 @@
diff --git a/flutter/lib/common/widgets/peers_view.dart b/flutter/lib/common/widgets/peers_view.dart
index 3e34f882d..68d82116b 100644
--- a/flutter/lib/common/widgets/peers_view.dart
+++ b/flutter/lib/common/widgets/peers_view.dart
@@ -25,13 +25,13 @@ class PeerSortType {
static const String remoteId = 'Remote ID';
static const String remoteHost = 'Remote Host';
static const String username = 'Username';
- // static const String status = 'Status';
+ static const String status = 'Status';
static List<String> values = [
PeerSortType.remoteId,
PeerSortType.remoteHost,
PeerSortType.username,
- // PeerSortType.status
+ PeerSortType.status
];
}
@@ -384,9 +384,9 @@ class _PeersViewState extends State<_PeersView>
peers.sort((p1, p2) =>
p1.username.toLowerCase().compareTo(p2.username.toLowerCase()));
break;
- // case PeerSortType.status:
- // peers.sort((p1, p2) => p1.online ? -1 : 1);
- // break;
+ case PeerSortType.status:
+ peers.sort((p1, p2) => p1.online ? -1 : 1);
+ break;
}
}

View File

@@ -12,6 +12,7 @@ on:
type: string type: string
env: env:
CARGO_EXPAND_VERSION: "1.0.95"
FLUTTER_VERSION: "3.22.3" FLUTTER_VERSION: "3.22.3"
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503 RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503
@@ -25,7 +26,7 @@ jobs:
job: job:
- { - {
target: x86_64-unknown-linux-gnu, target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04, os: ubuntu-24.04,
extra-build-args: "", extra-build-args: "",
} }
steps: steps:
@@ -55,9 +56,9 @@ jobs:
gcc \ gcc \
git \ git \
g++ \ g++ \
libclang-10-dev \ libclang-dev \
libgtk-3-dev \ libgtk-3-dev \
llvm-10-dev \ llvm-dev \
nasm \ nasm \
ninja-build \ ninja-build \
pkg-config \ pkg-config \
@@ -91,6 +92,7 @@ jobs:
- name: Install flutter rust bridge deps - name: Install flutter rust bridge deps
shell: bash shell: bash
run: | run: |
cargo install cargo-expand --version ${{ env.CARGO_EXPAND_VERSION }} --locked
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked
pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd

69
.github/workflows/build-web.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: Build web
on:
workflow_dispatch:
env:
FLUTTER_VERSION: "3.24.5"
TAG_NAME: "nightly"
VERSION: "1.3.9"
jobs:
build-rustdesk-web:
name: build-rustdesk-web
runs-on: ubuntu-24.04
strategy:
fail-fast: false
env:
RELEASE_NAME: web-basic
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare env
run: |
sudo apt-get update -y
sudo apt-get install -y wget npm
- name: Install flutter
uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
# https://rustdesk.com/docs/en/dev/build/web/
- name: Build web
shell: bash
run: |
pushd flutter/web/v2
npm install yarn -g
npm install typescript -g
npm install protoc -g
# Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html
npm install ts-proto
# Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
npm install vite@2.8
yarn install && yarn build
popd
pushd flutter/web/v2
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
tar xzf web_deps.tar.gz
popd
pushd flutter
flutter build web --release
cd build
#cp ../web/README.md web
# TODO: Remove the following line when the web is almost complete.
#echo -e "\n\nThis build is for preview and not full functionality." >> web/README.md
dir_name="rustdesk-${{ env.VERSION }}-${{ env.RELEASE_NAME }}"
mv web "${dir_name}" && tar czf "${dir_name}".tar.gz "${dir_name}"
sha256sum "${dir_name}".tar.gz
popd
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: web
path: flutter/build/rustdesk-${{ env.VERSION }}-${{ env.RELEASE_NAME }}.tar.gz

View File

@@ -20,6 +20,9 @@ jobs:
elif [[ "${{ github.ref_type }}" == "tag" ]]; then elif [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "IMAGE_TAG=${{ github.ref_name }}" >> "$GITHUB_ENV" echo "IMAGE_TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
echo "CREATE_IMAGE=true" >> "$GITHUB_ENV" echo "CREATE_IMAGE=true" >> "$GITHUB_ENV"
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "IMAGE_TAG=latest" >> "$GITHUB_ENV"
echo "CREATE_IMAGE=true" >> "$GITHUB_ENV"
else else
echo "CREATE_IMAGE=false" >> "$GITHUB_ENV" echo "CREATE_IMAGE=false" >> "$GITHUB_ENV"
fi fi

View File

@@ -69,7 +69,8 @@ env:
TAG_NAME: "${{ inputs.upload-tag }}" TAG_NAME: "${{ inputs.upload-tag }}"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12 # vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836"
VERSION: "${{ fromJson(inputs.extras).version }}" VERSION: "${{ fromJson(inputs.extras).version }}"
NDK_VERSION: "r27c" NDK_VERSION: "r27c"
#signing keys env variable checks #signing keys env variable checks
@@ -96,21 +97,21 @@ jobs:
- { - {
arch: aarch64, arch: aarch64,
target: aarch64-linux-android, target: aarch64-linux-android,
os: ubuntu-20.04, os: ubuntu-24.04,
reltype: release, reltype: release,
suffix: "", suffix: "",
} }
- { - {
arch: armv7, arch: armv7,
target: armv7-linux-androideabi, target: armv7-linux-androideabi,
os: ubuntu-20.04, os: ubuntu-24.04,
reltype: release, reltype: release,
suffix: "", suffix: "",
} }
- { - {
arch: x86_64, arch: x86_64,
target: x86_64-linux-android, target: x86_64-linux-android,
os: ubuntu-20.04, os: ubuntu-24.04,
reltype: release, reltype: release,
suffix: "", suffix: "",
} }
@@ -145,6 +146,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -166,7 +168,8 @@ jobs:
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libasound2-dev \ libasound2-dev \
libc6-dev \ libc6-dev \
libclang-10-dev \ libclang-dev \
libunwind-dev \
libgstreamer1.0-dev \ libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \ libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \ libgtk-3-dev \
@@ -179,7 +182,7 @@ jobs:
libxcb-xfixes0-dev \ libxcb-xfixes0-dev \
libxdo-dev \ libxdo-dev \
libxfixes-dev \ libxfixes-dev \
llvm-10-dev \ llvm-dev \
nasm \ nasm \
ninja-build \ ninja-build \
openjdk-17-jdk-headless \ openjdk-17-jdk-headless \
@@ -228,19 +231,11 @@ jobs:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
doNotCache: false doNotCache: false
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}'
- name: Install vcpkg dependencies - name: Install vcpkg dependencies
run: | run: |
case ${{ matrix.job.target }} in case ${{ matrix.job.target }} in
aarch64-linux-android) aarch64-linux-android)
ANDROID_TARGET=arm64-v8a ANDROID_TARGET=arm64-v8a
;; ;;
armv7-linux-androideabi) armv7-linux-androideabi)
ANDROID_TARGET=armeabi-v7a ANDROID_TARGET=armeabi-v7a
@@ -310,6 +305,16 @@ jobs:
sed -i '/adaptive_icon_background/a \ \ adaptive_icon_foreground: "../res/icon.png"' ./flutter/pubspec.yaml sed -i '/adaptive_icon_background/a \ \ adaptive_icon_foreground: "../res/icon.png"' ./flutter/pubspec.yaml
sed -i '/adaptive_icon_foreground:/a \ \ adaptive_icon_foreground_inset: 32' ./flutter/pubspec.yaml sed -i '/adaptive_icon_foreground:/a \ \ adaptive_icon_foreground_inset: 32' ./flutter/pubspec.yaml
sed -i '/ic_launcher_background/d' ./flutter/android/app/src/main/res/values/colors.xml sed -i '/ic_launcher_background/d' ./flutter/android/app/src/main/res/values/colors.xml
- name: set server, key, and apiserver
continue-on-error: true
shell: bash
run: |
sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
# ./flutter/pubspec.yaml
#sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: change appname to custom - name: change appname to custom
if: inputs.appname != 'rustdesk' if: inputs.appname != 'rustdesk'
@@ -355,6 +360,7 @@ jobs:
sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i -e "s|child: Text('rustdesk.com',|child: Text('${{ fromJson(inputs.extras).urlLink }}',|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
- name: change download link to custom - name: change download link to custom
@@ -372,14 +378,14 @@ jobs:
run: | run: |
sed -i -e '/const KEY:/,/};/d' ./src/common.rs sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml # sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: fix connection delay - name: fix connection delay
continue-on-error: true continue-on-error: true
if: ${{ fromJson(inputs.extras).delayFix == 'true' }} if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
shell: bash shell: bash
run: | run: |
sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
- name: add cycle monitors to toolbar - name: add cycle monitors to toolbar
continue-on-error: true continue-on-error: true
@@ -402,22 +408,16 @@ jobs:
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: removeNewVersionNotif - name: removeNewVersionNotif
continue-on-error: true continue-on-error: true
if: fromJson(inputs.extras).removeNewVersionNotif == 'true' if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
run: | run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
git apply removeNewVersionNotif.diff sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -472,12 +472,22 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
customHeaders: '{"Content-Type": "application/json"}' customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "45% complete"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "45% complete"}'
- name: icons
if: ${{ inputs.iconlink != 'false' }}
continue-on-error: true
run: |
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png || true
cp ./flutter/assets/icon.svg ./res/scalable.svg
- name: Build rustdesk - name: Build rustdesk
shell: bash shell: bash
env: env:
@@ -493,12 +503,6 @@ jobs:
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so
echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt
#sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png
convert ./res/icon.png ./res/scalable.svg
fi
# build flutter # build flutter
pushd flutter pushd flutter
flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm64 --split-per-abi flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm64 --split-per-abi
@@ -510,12 +514,6 @@ jobs:
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so
echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt
#sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png
convert ./res/icon.png ./res/scalable.svg
fi
# build flutter # build flutter
pushd flutter pushd flutter
flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm --split-per-abi flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm --split-per-abi
@@ -527,12 +525,6 @@ jobs:
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so
echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt
#sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png
convert ./res/icon.png ./res/scalable.svg
fi
# build flutter # build flutter
pushd flutter pushd flutter
flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x64 --split-per-abi flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x64 --split-per-abi
@@ -544,12 +536,6 @@ jobs:
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so
echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt echo -n "${{ inputs.custom }}" | cat > ./flutter/assets/custom.txt
#sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml #sed -i '/^ - assets\//a\ - assets/custom.txt' ./flutter/pubspec.yaml
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png
convert ./res/icon.png ./res/scalable.svg
fi
# build flutter # build flutter
pushd flutter pushd flutter
flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x86 --split-per-abi flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x86 --split-per-abi
@@ -563,6 +549,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -598,6 +585,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'

View File

@@ -69,7 +69,8 @@ env:
TAG_NAME: "${{ inputs.upload-tag }}" TAG_NAME: "${{ inputs.upload-tag }}"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12 # vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836"
VERSION: "${{ fromJson(inputs.extras).version }}" VERSION: "${{ fromJson(inputs.extras).version }}"
NDK_VERSION: "r27c" NDK_VERSION: "r27c"
#signing keys env variable checks #signing keys env variable checks
@@ -98,18 +99,18 @@ jobs:
arch: x86_64, arch: x86_64,
target: x86_64-unknown-linux-gnu, target: x86_64-unknown-linux-gnu,
distro: ubuntu18.04, distro: ubuntu18.04,
on: ubuntu-20.04, on: ubuntu-22.04,
deb_arch: amd64, deb_arch: amd64,
vcpkg-triplet: x64-linux, vcpkg-triplet: x64-linux,
} }
# - { - {
# arch: aarch64, arch: aarch64,
# target: aarch64-unknown-linux-gnu, target: aarch64-unknown-linux-gnu,
# distro: ubuntu18.04, distro: ubuntu18.04,
# on: [self-hosted, Linux, ARM64], on: ubuntu-22.04-arm,
# deb_arch: arm64, deb_arch: arm64,
# vcpkg-triplet: arm64-linux, vcpkg-triplet: arm64-linux,
# } }
steps: steps:
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
@@ -130,6 +131,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -137,13 +139,15 @@ jobs:
data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}'
- name: Maximize build space - name: Maximize build space
if: ${{ matrix.job.arch == 'x86_64' }}
run: | run: |
sudo rm -rf /opt/ghc sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet sudo rm -rf /usr/share/dotnet
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y nasm qemu-user-static sudo apt-get install -y nasm
if [[ "${{ matrix.job.arch }}" == "x86_64" ]]; then
sudo apt-get install -y qemu-user-static
fi
- name: Install dependencies - name: Install dependencies
run: | run: |
@@ -196,6 +200,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -220,7 +225,7 @@ jobs:
- name: Install vcpkg dependencies - name: Install vcpkg dependencies
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
run: | run: |
sudo apt install -y libva-dev libvdpau-dev sudo apt install -y libva-dev && apt show libva-dev
if ! $VCPKG_ROOT/vcpkg \ if ! $VCPKG_ROOT/vcpkg \
install \ install \
--triplet ${{ matrix.job.vcpkg-triplet }} \ --triplet ${{ matrix.job.vcpkg-triplet }} \
@@ -293,12 +298,13 @@ jobs:
run: | run: |
sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
sed -i -e '/const KEY:/,/};/d' ./src/common.rs git apply allowCustom.diff
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff
git apply removeSetupServerTip.diff
echo -n "${{ inputs.custom }}" | cat > ./custom.txt echo -n "${{ inputs.custom }}" | cat > ./custom.txt
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml # sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
sed -i -e '|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
- name: change url to custom - name: change url to custom
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
@@ -327,7 +333,7 @@ jobs:
if: ${{ fromJson(inputs.extras).delayFix == 'true' }} if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
shell: bash shell: bash
run: | run: |
sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
- name: add cycle monitors to toolbar - name: add cycle monitors to toolbar
continue-on-error: true continue-on-error: true
@@ -349,20 +355,13 @@ jobs:
run: | run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: removeNewVersionNotif - name: removeNewVersionNotif
continue-on-error: true continue-on-error: true
if: fromJson(inputs.extras).removeNewVersionNotif == 'true' if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
run: | run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
git apply removeNewVersionNotif.diff sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
- name: Restore bridge files - name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
@@ -373,6 +372,7 @@ jobs:
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
@@ -415,7 +415,6 @@ jobs:
libpam0g-dev \ libpam0g-dev \
libpulse-dev \ libpulse-dev \
libva-dev \ libva-dev \
libvdpau-dev \
libxcb-randr0-dev \ libxcb-randr0-dev \
libxcb-shape0-dev \ libxcb-shape0-dev \
libxcb-xfixes0-dev \ libxcb-xfixes0-dev \
@@ -462,7 +461,7 @@ jobs:
export JOBS="" export JOBS=""
fi fi
echo $JOBS echo $JOBS
cargo build --lib $JOBS --features hwcodec,flutter --release cargo build --lib $JOBS --features hwcodec,flutter,unix-file-copy-paste --release
rm -rf target/release/deps target/release/build rm -rf target/release/deps target/release/build
rm -rf ~/.cargo rm -rf ~/.cargo
@@ -521,24 +520,27 @@ jobs:
chmod 777 output -R chmod 777 output -R
export CARGO_INCREMENTAL=0 export CARGO_INCREMENTAL=0
export DEB_ARCH=${{ matrix.job.deb_arch }} export DEB_ARCH=${{ matrix.job.deb_arch }}
mkdir -p flutter/tmpdeb/usr/lib/rustdesk mkdir -p flutter/tmpdeb/usr/share/rustdesk
cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt cp ./custom.txt ./flutter/tmpdeb/usr/share/rustdesk/custom.txt
if [[ "${{ inputs.logolink }}" != "false" ]]; then if [[ "${{ inputs.logolink }}" != "false" ]]; then
wget -O ./flutter/assets/logo.png ${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} wget -O ./flutter/assets/logo.png ${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }}
fi fi
if [[ "${{ inputs.iconlink }}" != "false" ]]; then if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
convert ./res/icon.png ./flutter/assets/icon.svg convert ./res/icon.png ./flutter/assets/icon.svg
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png || true
convert ./res/icon.png ./res/scalable.svg cp ./flutter/assets/icon.svg ./res/scalable.svg
pushd ./flutter pushd ./flutter
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
export PATH="/opt/flutter-elinux/flutter/bin:$PATH"
fi
flutter pub get flutter pub get
dart run flutter_launcher_icons dart run flutter_launcher_icons
popd popd
fi fi
python3 ./build.py --flutter --skip-cargo python3 ./build.py --flutter --skip-cargo
for name in rustdesk*??.deb; do for name in rustdesk*??.deb; do
mv "$name" /workspace/output/"${{ inputs.filename }}.deb" mv "$name" /workspace/output/"${{ inputs.filename }}-${{ matrix.job.arch }}.deb"
done done
# rpm package # rpm package
@@ -552,7 +554,7 @@ jobs:
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }} pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
for name in rustdesk*??.rpm; do for name in rustdesk*??.rpm; do
mv "$name" /workspace/output/"${{ inputs.filename }}.rpm" mv "$name" /workspace/output/"${{ inputs.filename }}-${{ matrix.job.arch }}.rpm"
done done
# rpm suse package # rpm suse package
@@ -566,14 +568,15 @@ jobs:
HBB=`pwd` rpmbuild ./res/rpm-flutter-suse.spec -bb HBB=`pwd` rpmbuild ./res/rpm-flutter-suse.spec -bb
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }} pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
for name in rustdesk*??.rpm; do for name in rustdesk*??.rpm; do
mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm" mv "$name" /workspace/output/"${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm"
done done
# only x86_64 for arch since we can not find newest arm64 docker image to build # only x86_64 for arch since we can not find newest arm64 docker image to build
# old arch image does not make sense for arch since it is "arch" which always update to date # old arch image does not make sense for arch since it is "arch" which always update to date
# and failed to makepkg arm64 on x86_64 # and failed to makepkg arm64 on x86_64
- name: Patch archlinux PKGBUILD - name: Patch archlinux PKGBUILD
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' continue-on-error: true
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
run: | run: |
sed -i "s/x86_64/${{ matrix.job.arch }}/g" res/PKGBUILD sed -i "s/x86_64/${{ matrix.job.arch }}/g" res/PKGBUILD
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
@@ -581,7 +584,8 @@ jobs:
fi fi
- name: Build archlinux package - name: Build archlinux package
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' continue-on-error: true
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
uses: rustdesk-org/arch-makepkg-action@master uses: rustdesk-org/arch-makepkg-action@master
with: with:
packages: packages:
@@ -589,34 +593,44 @@ jobs:
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
- name: Rename archlinux package - name: Rename archlinux package
continue-on-error: true
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
run: | run: |
cp ./res/rustdesk-${{ env.VERSION }}-0-x86_64.pkg.tar.zst ./output/${{ inputs.filename }}.pkg.tar.zst cp ./res/rustdesk-${{ env.VERSION }}-0-x86_64.pkg.tar.zst ./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst
- name: send file to rdgen server - name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }} if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
shell: bash shell: bash
run: | run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.deb" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.pkg.tar.zst" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client || true
- name: send file to api server - name: send file to api server
if: ${{ fromJson(inputs.extras).rdgen == 'false' }} if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
shell: bash shell: bash
run: | run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.deb" ${{ inputs.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb" ${{ inputs.apiServer }}/api/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse.rpm" ${{ inputs.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}.pkg.tar.zst" ${{ inputs.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst" ${{ inputs.apiServer }}/api/save_custom_client || true
- name: Upload deb
uses: actions/upload-artifact@master
if: env.UPLOAD_ARTIFACT == 'true'
with:
name: ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
path: ./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
continue-on-error: true
with: with:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
customHeaders: '{"Content-Type": "application/json"}' customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "Finished ${{ matrix.job.arch }}"}'
- name: failed - name: failed
if: failure() if: failure()
@@ -634,4 +648,188 @@ jobs:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
customHeaders: '{"Content-Type": "application/json"}' customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'
build-appimage:
name: Build appimage ${{ matrix.job.target }}
needs: [build-rustdesk-linux]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-gnu, arch: x86_64 }
- { target: aarch64-unknown-linux-gnu, arch: aarch64 }
steps:
- name: Checkout source code
if: ${{ env.VERSION != 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
ref: refs/tags/${{ env.VERSION }}
submodules: recursive
- name: Checkout source code
if: ${{ env.VERSION == 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
submodules: recursive
- name: Download Binary
uses: actions/download-artifact@master
with:
name: ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
path: .
- name: Rename Binary
run: |
mv ${{ inputs.filename }}-${{ matrix.job.arch }}.deb appimage/rustdesk.deb
- name: Build appimage package
shell: bash
run: |
# install libarchive-tools for bsdtar command used in AppImageBuilder.yml
sudo apt-get update -y
sudo apt-get install -y libarchive-tools libfuse2
# set-up appimage-builder
sudo pip3 install git+https://github.com/rustdesk-org/appimage-builder.git
# run appimage-builder
pushd appimage
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
sudo mv ./rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.AppImage ./${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage
- name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
shell: bash
run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./appimage/${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
- name: send file to api server
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
shell: bash
run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./appimage/${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage" ${{ inputs.apiServer }}/api/save_custom_client
build-flatpak:
name: Build flatpak ${{ matrix.job.target }}${{ matrix.job.suffix }}
needs:
- build-rustdesk-linux
runs-on: ${{ matrix.job.on }}
strategy:
fail-fast: false
matrix:
job:
- {
target: x86_64-unknown-linux-gnu,
distro: ubuntu18.04,
on: ubuntu-22.04,
arch: x86_64,
suffix: "",
}
- {
target: aarch64-unknown-linux-gnu,
# try out newer flatpak since error of "error: Nothing matches org.freedesktop.Platform in remote flathub"
distro: ubuntu22.04,
on: ubuntu-22.04-arm,
arch: aarch64,
suffix: "",
}
steps:
- name: Checkout source code
if: ${{ env.VERSION != 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
ref: refs/tags/${{ env.VERSION }}
submodules: recursive
- name: Checkout source code
if: ${{ env.VERSION == 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
submodules: recursive
- name: Download Binary
uses: actions/download-artifact@master
with:
name: ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
path: .
- name: Rename Binary
run: |
mv ${{ inputs.filename }}-${{ matrix.job.arch }}.deb flatpak/rustdesk.deb
- uses: rustdesk-org/run-on-arch-action@amd64-support
name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
continue-on-error: true
timeout-minutes: 30
id: flatpak
with:
arch: ${{ matrix.job.arch }}
distro: ${{ matrix.job.distro }}
githubToken: ${{ github.token }}
setup: |
ls -l "${PWD}"
dockerRunArgs: |
--volume "${PWD}:/workspace"
shell: /bin/bash
install: |
apt-get update -y
apt-get install -y git flatpak flatpak-builder
run: |
# disable git safe.directory
git config --global --add safe.directory "*"
pushd /workspace
# flatpak deps
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# package
pushd flatpak
git clone https://github.com/flathub/shared-modules.git --depth=1
flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./rustdesk.json
flatpak build-bundle ./repo ${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak com.rustdesk.RustDesk
- name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
continue-on-error: true
shell: bash
run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./flatpak/${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
- name: send file to api server
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
continue-on-error: true
shell: bash
run: |
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./flatpak/${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak" ${{ inputs.apiServer }}/api/save_custom_client
deploy:
needs: [build-rustdesk-linux,build-flatpak,build-appimage]
runs-on: ubuntu-latest
steps:
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
run: |
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $GITHUB_ENV
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
run: |
echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $GITHUB_ENV
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}'
- uses: geekyeggo/delete-artifact@v5
continue-on-error: true
with:
name: ${{ inputs.filename }}-*.deb

View File

@@ -69,7 +69,8 @@ env:
TAG_NAME: "${{ inputs.upload-tag }}" TAG_NAME: "${{ inputs.upload-tag }}"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12 # vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836"
VERSION: "${{ fromJson(inputs.extras).version }}" VERSION: "${{ fromJson(inputs.extras).version }}"
NDK_VERSION: "r27c" NDK_VERSION: "r27c"
#signing keys env variable checks #signing keys env variable checks
@@ -77,7 +78,6 @@ env:
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}" MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
UPLOAD_ARTIFACT: 'true' UPLOAD_ARTIFACT: 'true'
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}" SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
STATUS_URL: "${{ secrets.GENURL }}/updategh"
jobs: jobs:
generate-bridge: generate-bridge:
@@ -85,29 +85,31 @@ jobs:
with: with:
version: ${{ fromJson(inputs.extras).version }} version: ${{ fromJson(inputs.extras).version }}
build-for-macos-flutter: build-for-macos:
name: Build macOS name: ${{ matrix.job.target }}
runs-on: macos-latest runs-on: ${{ matrix.job.os }}
needs: [generate-bridge] needs: [generate-bridge]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
job: job:
# - { - {
# target: x86_64-apple-darwin, target: x86_64-apple-darwin,
# os: macos-13, #macos-latest or macos-14 use M1 now, https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#:~:text=14%20GB-,macos%2Dlatest%20or%20macos%2D14,-The%20macos%2Dlatestlabel os: macos-13, #macos-latest or macos-14 use M1 now, https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#:~:text=14%20GB-,macos%2Dlatest%20or%20macos%2D14,-The%20macos%2Dlatestlabel
# extra-build-args: "", extra-build-args: "",
# arch: x86_64, arch: x86_64,
# vcpkg-triplet: x64-osx, vcpkg-triplet: x64-osx,
# } }
- { - {
target: aarch64-apple-darwin, target: aarch64-apple-darwin,
os: macos-latest, os: macos-14,
# extra-build-args: "--disable-flutter-texture-render", # disable this for mac, because we see a lot of users reporting flickering both on arm and x64, and we can not confirm if texture rendering has better performance if htere is no vram, https://github.com/rustdesk/rustdesk/issues/6296 # extra-build-args: "--disable-flutter-texture-render", # disable this for mac, because we see a lot of users reporting flickering both on arm and x64, and we can not confirm if texture rendering has better performance if htere is no vram, https://github.com/rustdesk/rustdesk/issues/6296
extra-build-args: "--screencapturekit", extra-build-args: "--screencapturekit",
arch: aarch64, arch: aarch64,
vcpkg-triplet: arm64-osx, vcpkg-triplet: arm64-osx,
} }
env:
STATUS_URL: ${{ fromJson(inputs.extras).rdgen == 'true' && format('{0}/updategh', secrets.GENURL) || format('{0}/api/updategh', inputs.apiServer) }}
steps: steps:
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
@@ -117,16 +119,6 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
run: |
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
run: |
echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
with: with:
@@ -150,12 +142,6 @@ jobs:
repository: rustdesk/rustdesk repository: rustdesk/rustdesk
submodules: recursive submodules: recursive
- name: Restore bridge files
uses: actions/download-artifact@master
with:
name: bridge-artifact
path: ./
- name: Install imagemagick and potrace and nasm and and - name: Install imagemagick and potrace and nasm and and
shell: bash shell: bash
run: | run: |
@@ -205,7 +191,7 @@ jobs:
find ./src/lang -name "*.rs" -exec sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' {} \; find ./src/lang -name "*.rs" -exec sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' {} \;
sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/nl.rs sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/nl.rs
sed -i '' -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py sed -i '' -e 's|https://rustdesk.com|${{ fromJson(inputs.extras).urlLink }}|' ./build.py
sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart
sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
@@ -238,11 +224,12 @@ jobs:
sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
sed -i -e '|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs git apply allowCustom.diff
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff
git apply removeSetupServerTip.diff
# Update pubspec.yaml with proper YAML formatting # Update pubspec.yaml with proper YAML formatting
cp ./flutter/pubspec.yaml ./flutter/pubspec.yaml.bak cp ./flutter/pubspec.yaml ./flutter/pubspec.yaml.bak
@@ -257,27 +244,35 @@ jobs:
url: ${{ env.STATUS_URL }} url: ${{ env.STATUS_URL }}
method: 'POST' method: 'POST'
customHeaders: '{"Content-Type": "application/json"}' customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}'
- name: Install build runtime
run: |
brew install llvm create-dmg nasm
# pkg-config is handled in a separate step, because it may be already installed by `macos-latest`(14.7.1) runner
if command -v pkg-config &>/dev/null; then
echo "pkg-config is already installed"
else
brew install pkg-config
fi
- name: Install flutter - name: Install flutter
uses: subosito/flutter-action@v2.12.0 uses: subosito/flutter-action@v2
with: with:
channel: "stable" channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }} flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Patch flutter - name: Patch flutter
continue-on-error: true continue-on-error: true
run: | run: |
cp .github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff $(dirname $(dirname $(which flutter)))
cd $(dirname $(dirname $(which flutter))) cd $(dirname $(dirname $(which flutter)))
[[ "3.24.4" == 3.24.5 ]] && git apply flutter_3.24.4_dropdown_menu_enableFilter.diff [[ "3.24.5" == ${{env.FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff
- name: Workaround for flutter issue - name: Workaround for flutter issue
shell: bash shell: bash
run: | run: |
cd "$(dirname "$(which flutter)")" cd "$(dirname "$(which flutter)")"
# https://github.com/flutter/flutter/issues/1.3.43 # https://github.com/flutter/flutter/issues/133533
sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart
grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart
@@ -288,7 +283,6 @@ jobs:
targets: ${{ matrix.job.target }} targets: ${{ matrix.job.target }}
components: "rustfmt" components: "rustfmt"
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
prefix-key: ${{ matrix.job.os }} prefix-key: ${{ matrix.job.os }}
@@ -444,7 +438,7 @@ jobs:
if: ${{ fromJson(inputs.extras).delayFix == 'true' }} if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
shell: bash shell: bash
run: | run: |
sed -i '' -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
- name: add cycle monitors to toolbar - name: add cycle monitors to toolbar
continue-on-error: true continue-on-error: true
@@ -467,32 +461,12 @@ jobs:
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: removeNewVersionNotif - name: removeNewVersionNotif
continue-on-error: true continue-on-error: true
if: fromJson(inputs.extras).removeNewVersionNotif == 'true' if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
run: | run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
git apply removeNewVersionNotif.diff sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}'
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.job.os }}
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
@@ -502,12 +476,18 @@ jobs:
customHeaders: '{"Content-Type": "application/json"}' customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}' data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}'
- name: Restore bridge files
uses: actions/download-artifact@master
with:
name: bridge-artifact
path: ./
- name: Setup vcpkg with Github Actions binary cache - name: Setup vcpkg with Github Actions binary cache
uses: lukka/run-vcpkg@v11 uses: lukka/run-vcpkg@v11
with: with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
doNotCache: false doNotCache: false
- name: Install vcpkg dependencies - name: Install vcpkg dependencies
run: | run: |
if ! $VCPKG_ROOT/vcpkg \ if ! $VCPKG_ROOT/vcpkg \
@@ -522,6 +502,7 @@ jobs:
done done
exit 1 exit 1
fi fi
head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true
- name: Report Status - name: Report Status
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
@@ -545,7 +526,7 @@ jobs:
sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj
fi fi
sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py
./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }} ./build.py --flutter --hwcodec --unix-file-copy-paste ${{ matrix.job.extra-build-args }}
# - name: Copy service file # - name: Copy service file
# run: | # run: |
@@ -734,8 +715,8 @@ jobs:
if [ -n "$DMG_FILE" ]; then if [ -n "$DMG_FILE" ]; then
echo "Found DMG file: $DMG_FILE" echo "Found DMG file: $DMG_FILE"
mv "$DMG_FILE" "${{ inputs.filename }}.dmg" mv "$DMG_FILE" "${{ inputs.filename }}-${{ matrix.job.arch }}.dmg"
echo "Renamed to ${{ inputs.filename }}.dmg" echo "Renamed to ${{ inputs.filename }}-${{ matrix.job.arch }}.dmg"
else else
echo "No DMG file found matching the pattern" echo "No DMG file found matching the pattern"
exit 1 exit 1
@@ -748,7 +729,7 @@ jobs:
curl -i -X POST \ curl -i -X POST \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \ -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \ -F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" \
-F "uuid=${{ inputs.uuid }}" \ -F "uuid=${{ inputs.uuid }}" \
"${{ secrets.GENURL }}/save_custom_client" "${{ secrets.GENURL }}/save_custom_client"
@@ -760,7 +741,7 @@ jobs:
curl -i -X POST \ curl -i -X POST \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \ -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \ -F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" \
"${{ inputs.apiServer }}/api/save_custom_client" "${{ inputs.apiServer }}/api/save_custom_client"
- name: Report Status - name: Report Status

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,110 +0,0 @@
# This yaml shares the build bridge steps with ci and nightly.
name: Build flutter-rust-bridge
# 2023-11-23 18:00:00+00:00
on:
workflow_call:
inputs:
version:
description: 'Rustdesk Version'
required: true
default: '1.3.1'
type: string
env:
FLUTTER_VERSION: "3.22.3"
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503
jobs:
generate_bridge:
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
}
steps:
- name: Checkout source code
if: ${{ inputs.version != 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
ref: refs/tags/${{ inputs.version }}
- name: Checkout source code
if: ${{ inputs.version == 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
- name: Install prerequisites
run: |
sudo apt-get install ca-certificates -y
sudo apt-get update -y
sudo apt-get install -y \
clang \
cmake \
curl \
gcc \
git \
g++ \
libclang-10-dev \
libgtk-3-dev \
llvm-10-dev \
nasm \
ninja-build \
pkg-config \
wget
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.job.target }}
components: "rustfmt"
- uses: Swatinem/rust-cache@v2
with:
prefix-key: bridge-${{ matrix.job.os }}
- name: Cache Bridge
id: cache-bridge
uses: actions/cache@v3
with:
path: /tmp/flutter_rust_bridge
key: vcpkg-${{ matrix.job.arch }}
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install flutter rust bridge deps
shell: bash
run: |
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked
pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd
- name: Run flutter rust bridge
run: |
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
cp ./flutter/macos/Runner/bridge_generated.h ./flutter/ios/Runner/bridge_generated.h
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: bridge-artifact
path: |
./src/bridge_generated.rs
./src/bridge_generated.io.rs
./flutter/lib/generated_bridge.dart
./flutter/lib/generated_bridge.freezed.dart
./flutter/macos/Runner/bridge_generated.h
./flutter/ios/Runner/bridge_generated.h

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,798 +0,0 @@
name: Custom macOS Client Generator
run-name: Custom macOS Client Generator
on:
workflow_dispatch:
inputs:
server:
description: 'Rendezvous Server'
required: true
default: ''
type: string
key:
description: 'Public Key'
required: true
default: ''
type: string
apiServer:
description: 'API Server'
required: true
default: ''
type: string
custom:
description: "Custom JSON"
required: true
default: ''
type: string
uuid:
description: "uuid of request"
required: true
default: ''
type: string
iconlink:
description: "icon link"
required: false
default: 'false'
type: string
logolink:
description: "logo link"
required: false
default: 'false'
type: string
appname:
description: "app name"
required: true
default: 'rustdesk'
type: string
filename:
description: "Filename"
required: true
default: 'rustdesk'
type: string
extras:
description: "extra inputs in json"
required: true
default: '{}'
type: string
env:
SCITER_RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503, also 1.78 has ABI change which causes our sciter version not working, https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
RUST_VERSION: "1.75" # sciter failed on m1 with 1.78 because of https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
MAC_RUST_VERSION: "1.81"
CARGO_NDK_VERSION: "3.1.2"
SCITER_ARMV7_CMAKE_VERSION: "3.29.7"
SCITER_NASM_DEBVERSION: "2.14-1"
LLVM_VERSION: "15.0.6"
FLUTTER_VERSION: "3.24.5"
ANDROID_FLUTTER_VERSION: "3.24.5" # >= 3.16 is very slow on my android phone, but work well on most of others. We may switch to new flutter after changing to texture rendering (I believe it can solve my problem).
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" # for arm64 linux because official Dart SDK does not work
FLUTTER_ELINUX_VERSION: "3.16.9"
TAG_NAME: "${{ inputs.upload-tag }}"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c"
VERSION: "${{ fromJson(inputs.extras).version }}"
NDK_VERSION: "r27c"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
# To make a custom build with your own servers set the below secret values
RS_PUB_KEY: "${{ inputs.key }}"
RENDEZVOUS_SERVER: "${{ inputs.server }}"
CUSTOM: "${{ inputs.custom }}"
UUIDFOLDER: "${{ inputs.uuid }}"
API_SERVER: "${{ inputs.apiServer }}"
UPLOAD_ARTIFACT: 'true'
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
STATUS_URL: "${{ secrets.GENURL }}/updategh"
jobs:
generate-bridge:
uses: ./.github/workflows/pre137-bridge.yml
with:
version: ${{ fromJson(inputs.extras).version }}
build-for-macos-flutter:
name: Build macOS
runs-on: macos-latest
needs: [generate-bridge]
strategy:
fail-fast: false
matrix:
job:
- {
target: aarch64-apple-darwin,
os: macos-latest,
# extra-build-args: "--disable-flutter-texture-render", # disable this for mac, because we see a lot of users reporting flickering both on arm and x64, and we can not confirm if texture rendering has better performance if htere is no vram, https://github.com/rustdesk/rustdesk/issues/6296
extra-build-args: "--screencapturekit",
arch: aarch64,
vcpkg-triplet: arm64-osx,
}
steps:
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
run: |
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
- name: Set rdgen value
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
run: |
echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}'
- name: Checkout source code
if: ${{ env.VERSION != 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
ref: refs/tags/${{ env.VERSION }}
- name: Checkout source code
if: ${{ env.VERSION == 'master' }}
uses: actions/checkout@v4
with:
repository: rustdesk/rustdesk
- name: Restore bridge files
uses: actions/download-artifact@master
with:
name: bridge-artifact
path: ./
- name: Install imagemagick and potrace and nasm and and
shell: bash
run: |
brew install imagemagick potrace nasm cmake gcc wget ninja
echo "$(brew --prefix imagemagick)/bin" >> $GITHUB_PATH
- name: Update macOS Info.plist and settings
continue-on-error: false
shell: bash
run: |
# MACSTUFF Backup the original Info.plist
cp ./flutter/macos/Runner/Info.plist ./flutter/macos/Runner/Info.plist.bak
# MACSTUFF Update application name and display name
sed -i '' -e 's|<key>CFBundleName</key>\s*<string>$(PRODUCT_NAME)</string>|<key>CFBundleName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
sed -i '' -e 's|<key>CFBundleDisplayName</key>\s*<string>$(PRODUCT_NAME)</string>|<key>CFBundleDisplayName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
sed -i '' -e 's|<key>CFBundleIdentifier</key>\s*<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>|<key>CFBundleIdentifier</key>\n\t<string>com.${{ inputs.appname }}.app</string>|' ./flutter/macos/Runner/Info.plist
# MACSTUFF Update copyright information if needed
sed -i '' -e 's|<key>NSHumanReadableCopyright</key>\s*<string>$(PRODUCT_COPYRIGHT)</string>|<key>NSHumanReadableCopyright</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
# MACSTUFF Update window title and bundle settings
cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak
sed -i '' -e 's|PRODUCT_NAME = .*|PRODUCT_NAME = ${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
sed -i '' -e 's|PRODUCT_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
# Keep DEVELOPMENT_TEAM if it exists, don't blank it out
# Update Xcode project settings
sed -i '' -e 's/PRODUCT_NAME = "RustDesk"/PRODUCT_NAME = "${{ inputs.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
sed -i '' -e 's/PRODUCT_BUNDLE_IDENTIFIER = ".*"/PRODUCT_BUNDLE_IDENTIFIER = "com.${{ inputs.appname }}.app"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
# Don't modify DEVELOPMENT_TEAM in project.pbxproj
# Update CMake settings
if [ -f "./flutter/macos/CMakeLists.txt" ]; then
sed -i '' -e 's/set(BINARY_NAME ".*")/set(BINARY_NAME "${{ inputs.appname }}")/' ./flutter/macos/CMakeLists.txt
fi
# Update Podfile - keep the target as 'Runner'
# sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'${{ inputs.appname }}'"'"' do/' ./flutter/macos/Podfile
sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'Runner'"'"' do/' ./flutter/macos/Podfile
cp ./src/lang/en.rs ./src/lang/en.rs.bak
cp ./src/lang/nl.rs ./src/lang/nl.rs.bak
sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs
sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/nl.rs
sed -i '' -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py
sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart
sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
sed -i '' -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i '' -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
# Update pubspec.yaml with proper YAML formatting
cp ./flutter/pubspec.yaml ./flutter/pubspec.yaml.bak
echo " archive: ^3.6.1" > ./flutter/temp_dependency.txt
awk '/intl:/{print;system("cat ./flutter/temp_dependency.txt");next}1' ./flutter/pubspec.yaml > ./flutter/pubspec.yaml.tmp
mv ./flutter/pubspec.yaml.tmp ./flutter/pubspec.yaml
rm ./flutter/temp_dependency.txt
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}'
- name: Install flutter
uses: subosito/flutter-action@v2.12.0
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Patch flutter
continue-on-error: true
run: |
cp .github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff $(dirname $(dirname $(which flutter)))
cd $(dirname $(dirname $(which flutter)))
[[ "3.24.4" == 3.24.5 ]] && git apply flutter_3.24.4_dropdown_menu_enableFilter.diff
- name: Workaround for flutter issue
shell: bash
run: |
cd "$(dirname "$(which flutter)")"
# https://github.com/flutter/flutter/issues/1.3.43
sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart
grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.MAC_RUST_VERSION }}
targets: ${{ matrix.job.target }}
components: "rustfmt"
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.job.os }}
- name: Setup vcpkg with Github Actions binary cache
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
doNotCache: false
- name: Install vcpkg dependencies
run: |
if ! $VCPKG_ROOT/vcpkg \
install \
--x-install-root="$VCPKG_ROOT/installed"; then
find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do
echo "$_1:"
echo "======"
cat "$_1"
echo "======"
echo ""
done
exit 1
fi
head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true
shell: bash
- name: Magick stuff for macOS
if: ${{ inputs.iconlink != 'false' }}
continue-on-error: false
shell: bash
run: |
# Create all necessary directories first
mkdir -p ./res
mkdir -p ./flutter/assets
mkdir -p ./flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset
mkdir -p ./macos/Runner/Assets.xcassets/AppIcon.appiconset
mkdir -p ./rustdesk/data/flutter_assets/assets
# Download icon using curl with additional SSL options
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
-H "User-Agent: Mozilla/5.0" \
"${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}" \
-o ./res/icon.png || wget --no-check-certificate -O ./res/icon.png "${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}"
# Backup existing files (if they exist)
[ -f "./res/32x32.png" ] && mv ./res/32x32.png ./res/32x32.png.bak
[ -f "./res/64x64.png" ] && mv ./res/64x64.png ./res/64x64.png.bak
[ -f "./res/128x128.png" ] && mv ./res/128x128.png ./res/128x128.png.bak
[ -f "./res/mac-icon.png" ] && mv ./res/mac-icon.png ./res/mac-icon.png.bak
[ -f "./flutter/assets/icon.png" ] && mv ./flutter/assets/icon.png ./flutter/assets/icon.png.bak
[ -f "./flutter/assets/icon.svg" ] && mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
[ -f "./rustdesk/data/flutter_assets/assets/icon.svg" ] && mv ./rustdesk/data/flutter_assets/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg.bak
# Create standard app icons
magick ./res/icon.png -resize 32x32 ./res/32x32.png
magick ./res/icon.png -resize 64x64 ./res/64x64.png
magick ./res/icon.png -resize 128x128 ./res/128x128.png
# Copy icon to Flutter assets
cp ./res/icon.png ./flutter/assets/icon.png
cp ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.png
# Convert PNG to SVG using potrace
magick ./res/icon.png -flatten ./temp_icon.pbm
potrace --svg -o ./flutter/assets/icon.svg ./temp_icon.pbm
cp ./flutter/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg
rm ./temp_icon.pbm
# Create macOS app icons
magick ./res/icon.png -resize 16x16 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png"
magick ./res/icon.png -resize 32x32 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png"
magick ./res/icon.png -resize 64x64 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png"
magick ./res/icon.png -resize 128x128 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png"
magick ./res/icon.png -resize 256x256 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png"
magick ./res/icon.png -resize 512x512 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png"
magick ./res/icon.png -resize 1024x1024 "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png"
# Create macOS specific icons
magick ./res/icon.png -resize 128x128 ./res/mac-icon.png
# Create dark mode tray icon (optimized for macOS menu bar)
magick ./res/icon.png -resize 22x22 -colorspace gray -alpha set -background none -channel A -evaluate set 100% ./res/mac-tray-dark-x2.png
# Create light mode tray icon (optimized for macOS menu bar)
magick ./res/icon.png -resize 22x22 -negate -colorspace gray -alpha set -background none -channel A -evaluate set 100% ./res/mac-tray-light-x2.png
# Create AppIcon.icns (macOS native icon format)
mkdir -p ./iconset.iconset
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png" "./iconset.iconset/icon_16x16.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png" "./iconset.iconset/icon_16x16@2x.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png" "./iconset.iconset/icon_32x32.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png" "./iconset.iconset/icon_32x32@2x.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png" "./iconset.iconset/icon_128x128.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png" "./iconset.iconset/icon_128x128@2x.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png" "./iconset.iconset/icon_256x256.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png" "./iconset.iconset/icon_256x256@2x.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png" "./iconset.iconset/icon_512x512.png"
cp "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png" "./iconset.iconset/icon_512x512@2x.png"
iconutil -c icns ./iconset.iconset -o ./flutter/macos/Runner/AppIcon.icns
rm -rf ./iconset.iconset
# Create Contents.json for macOS app icon
echo '{
"images": [
{"size":"16x16","idiom":"mac","filename":"app_icon_16.png","scale":"1x"},
{"size":"16x16","idiom":"mac","filename":"app_icon_32.png","scale":"2x"},
{"size":"32x32","idiom":"mac","filename":"app_icon_32.png","scale":"1x"},
{"size":"32x32","idiom":"mac","filename":"app_icon_64.png","scale":"2x"},
{"size":"128x128","idiom":"mac","filename":"app_icon_128.png","scale":"1x"},
{"size":"128x128","idiom":"mac","filename":"app_icon_256.png","scale":"2x"},
{"size":"256x256","idiom":"mac","filename":"app_icon_256.png","scale":"1x"},
{"size":"256x256","idiom":"mac","filename":"app_icon_512.png","scale":"2x"},
{"size":"512x512","idiom":"mac","filename":"app_icon_512.png","scale":"1x"},
{"size":"512x512","idiom":"mac","filename":"app_icon_1024.png","scale":"2x"}
],
"info": {
"version": 1,
"author": "xcode"
}
}' > "flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json"
# Copy icons and Contents.json to both locations
cp -r flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/* macos/Runner/Assets.xcassets/AppIcon.appiconset/
# Verify files exist and show their sizes
echo "Verifying generated files:"
ls -lh ./res/mac-tray-dark-x2.png
ls -lh ./res/mac-tray-light-x2.png
ls -lh ./res/mac-icon.png
echo "Flutter macOS app icons:"
ls -lh flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/
echo "Flutter assets:"
ls -lh flutter/assets/icon.*
echo "RustDesk Flutter assets:"
ls -lh rustdesk/data/flutter_assets/assets/
- name: replace flutter icons
if: ${{ inputs.iconlink != 'false' }}
continue-on-error: false
shell: bash
run: |
cd ./flutter
# Create required directories and files
mkdir -p web
mkdir -p assets
echo '{"name":"${{ inputs.appname }}","short_name":"${{ inputs.appname }}","start_url":"/","display":"standalone","background_color":"#ffffff","theme_color":"#ffffff","description":"A remote desktop software."}' > web/manifest.json
echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>${{ inputs.appname }}</title></head><body></body></html>' > web/index.html
# Ensure the AppIcon.appiconset directory exists
mkdir -p macos/Runner/Assets.xcassets/AppIcon.appiconset
# Copy the processed icons to Flutter locations
cp ../res/mac-icon.png ./assets/icon.png
cp ../flutter/assets/icon.svg ./assets/icon.svg || true
flutter pub upgrade win32
flutter pub get
flutter pub run flutter_launcher_icons
cd ..
- name: ui.rs
if: ${{ inputs.iconlink != 'false' }}
continue-on-error: true
shell: bash
run: |
cp ./src/ui.rs ./src/ui.rs.bak
if [ -f "./res/icon.png" ]; then
SEARCH_STR="iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAEiuAABIrgHwmhA7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEx9JREFUeJztnXmYHMV5h9"
b64=$(base64 < ./res/icon.png)
sed -i '' -e "s~$SEARCH_STR.*\"~$b64\"~" ./src/ui.rs
fi
- name: fix connection delay
continue-on-error: false
if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
shell: bash
run: |
sed -i '' -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs
- name: add cycle monitors to toolbar
continue-on-error: true
if: fromJson(inputs.extras).cycleMonitor == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff
git apply cycle_monitor.diff
- name: use X for offline display instead of orange circle
continue-on-error: true
if: fromJson(inputs.extras).xOffline == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff
git apply xoffline.diff
- name: hide-cm
continue-on-error: true
if: fromJson(inputs.extras).hidecm == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: removeNewVersionNotif
continue-on-error: true
if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff
git apply removeNewVersionNotif.diff
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.MAC_RUST_VERSION }}
targets: ${{ matrix.job.target }}
components: "rustfmt"
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "15% complete"}'
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.job.os }}
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}'
- name: Setup vcpkg with Github Actions binary cache
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
doNotCache: false
- name: Install vcpkg dependencies
run: |
if ! $VCPKG_ROOT/vcpkg \
install \
--x-install-root="$VCPKG_ROOT/installed"; then
find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do
echo "$_1:"
echo "======"
cat "$_1"
echo "======"
echo ""
done
exit 1
fi
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "25% complete"}'
- name: Build rustdesk
run: |
if [ "${{ matrix.job.target }}" = "aarch64-apple-darwin" ]; then
MIN_MACOS_VERSION="12.3"
sed -i -e "s/MACOSX_DEPLOYMENT_TARGET\=[0-9]*.[0-9]*/MACOSX_DEPLOYMENT_TARGET=${MIN_MACOS_VERSION}/" build.py
sed -i -e "s/platform :osx, '.*'/platform :osx, '${MIN_MACOS_VERSION}'/" flutter/macos/Podfile
sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml
sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj
fi
sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py
./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }}
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}'
- name: Install rcodesign tool
if: env.MACOS_P12_BASE64 != null
shell: bash
run: |
pushd /tmp
wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz
mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin
popd
- name: Install build runtime
run: |
brew install llvm create-dmg nasm cmake gcc wget ninja
# pkg-config is handled in a separate step, because it may be already installed by `macos-latest`(14.7.1) runner
if command -v pkg-config &>/dev/null; then
echo "pkg-config is already installed"
else
brew install pkg-config
fi
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}'
- name: Show version information (Rust, cargo, Clang)
shell: bash
run: |
clang --version || true
rustup -V
rustup toolchain list
rustup default
cargo -V
rustc -V
- name: icon svg handling
if: ${{ inputs.iconlink != 'false' }}
continue-on-error: false
shell: bash
run: |
ASSETS_DIR="build/macos/Build/Products/Release/RustDesk.app/Contents/Frameworks/App.framework/Versions/Current/Resources/flutter_assets/assets"
mkdir -p "$ASSETS_DIR"
if [ -f "$ASSETS_DIR/icon.svg" ]; then
mv "$ASSETS_DIR/icon.svg" "$ASSETS_DIR/icon.svg.bak"
fi
# First convert PNG to PBM (bitmap)
magick convert ./res/icon.png ./temp_icon.pbm
# Then use potrace to convert to SVG
potrace --svg -o "$ASSETS_DIR/icon.svg" ./temp_icon.pbm
rm ./temp_icon.pbm
- name: logo handling
if: ${{ inputs.logolink != 'false' }}
continue-on-error: false
shell: bash
run: |
ASSETS_DIR="build/macos/Build/Products/Release/RustDesk.app/Contents/Frameworks/App.framework/Versions/Current/Resources/flutter_assets/assets"
mkdir -p "$ASSETS_DIR"
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
-H "User-Agent: Mozilla/5.0" \
"${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}" \
-o "$ASSETS_DIR/logo.png" || \
wget --no-check-certificate \
-O "$ASSETS_DIR/logo.png" \
"${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}"
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "85% complete"}'
- name: Sign macOS app bundle
if: env.MACOS_P12_BASE64 != ''
run: |
cd flutter/build/macos/Build/Products/Release
# Debug info
echo "Current directory contents:"
ls -la
# Rename RustDesk.app to the custom app name first
if [ -d "RustDesk.app" ]; then
# First rename the app if it's still called RustDesk.app
mv "RustDesk.app" "${{ inputs.appname }}.app"
echo "Renamed RustDesk.app to ${{ inputs.appname }}.app"
fi
echo "App bundle contents after rename:"
ls -la "${{ inputs.appname }}.app" || echo "App not found"
ls -la "${{ inputs.appname }}.app/Contents" || echo "Contents not found"
# Decode the certificate
echo "${{ secrets.MACOS_P12_BASE64 }}" | base64 --decode > certificate.p12
# Sign the app bundle and its contents
if [ -d "${{ inputs.appname }}.app/Contents/MacOS" ]; then
echo "Signing main executable..."
MAIN_EXECUTABLE="${{ inputs.appname }}.app/Contents/MacOS/${{ inputs.appname }}"
if [ -f "$MAIN_EXECUTABLE" ]; then
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
--code-signature-flags runtime "$MAIN_EXECUTABLE"
else
echo "Main executable not found at expected path: $MAIN_EXECUTABLE"
# Try to find the actual executable
echo "Available executables in MacOS directory:"
ls -la "${{ inputs.appname }}.app/Contents/MacOS/"
ACTUAL_EXECUTABLE=$(ls "${{ inputs.appname }}.app/Contents/MacOS/" | head -n 1)
if [ -n "$ACTUAL_EXECUTABLE" ]; then
echo "Found executable: $ACTUAL_EXECUTABLE"
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
--code-signature-flags runtime "${{ inputs.appname }}.app/Contents/MacOS/$ACTUAL_EXECUTABLE"
fi
fi
echo "Signing frameworks..."
find "${{ inputs.appname }}.app/Contents/Frameworks" -type f -not -name ".*" -exec \
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
--code-signature-flags runtime {} \;
echo "Signing main bundle..."
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
--code-signature-flags runtime "${{ inputs.appname }}.app"
else
echo "Error: Invalid app bundle structure"
exit 1
fi
# Clean up
rm certificate.p12
- name: Create DMG
run: |
cd /Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/flutter/build/macos/Build/Products/Release
# Print directory contents for debugging
echo "Directory contents:"
ls -la
# Find the actual .app bundle
if [ -d "RustDesk.app" ]; then
# First rename the app if it's still called RustDesk.app
mv "RustDesk.app" "${{ inputs.appname }}.app"
fi
if [ ! -d "${{ inputs.appname }}.app" ]; then
echo "Could not find .app bundle!"
exit 1
fi
echo "Creating DMG for ${{ inputs.appname }}.app"
create-dmg \
--volname "${{ inputs.appname }}" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "${{ inputs.appname }}.app" 200 190 \
--hide-extension "${{ inputs.appname }}.app" \
--app-drop-link 600 185 \
"${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" \
"${{ inputs.appname }}.app"
mv "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" $GITHUB_WORKSPACE/
#- name: Upload unsigned macOS app
# if: env.UPLOAD_ARTIFACT == 'true'
# uses: actions/upload-artifact@master
# with:
# name: ${{ inputs.appname }}-${{ matrix.job.arch }}
# path: ${{ inputs.appname }}-${{ matrix.job.arch }}.dmg
- name: Rename rustdesk
if: env.UPLOAD_ARTIFACT == 'true'
run: |
cd $GITHUB_WORKSPACE
echo "Directory contents:"
ls -la
# Find the DMG file dynamically
DMG_FILE=$(find . -name "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg")
if [ -n "$DMG_FILE" ]; then
echo "Found DMG file: $DMG_FILE"
mv "$DMG_FILE" "${{ inputs.filename }}.dmg"
echo "Renamed to ${{ inputs.filename }}.dmg"
else
echo "No DMG file found matching the pattern"
exit 1
fi
- name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
shell: bash
run: |
curl -i -X POST \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \
-F "uuid=${{ inputs.uuid }}" \
"${{ secrets.GENURL }}/save_custom_client"
- name: send file to api server
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
shell: bash
run: |
curl -i -X POST \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}.dmg" \
"${{ inputs.apiServer }}/api/save_custom_client"
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}'
- name: failed
if: failure()
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}'
- name: failed
if: cancelled()
uses: fjogeleit/http-request-action@v1
with:
url: ${{ env.STATUS_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'
#- name: Publish DMG package
# if: env.UPLOAD_ARTIFACT == 'true'
# uses: softprops/action-gh-release@v1
# with:
# prerelease: true
# tag_name: ${{ inputs.upload-tag }}
# files: |
# ${{ inputs.appname }}*-${{ matrix.job.arch }}.dmg

View File

@@ -1,7 +1,7 @@
services: services:
rdgen: rdgen:
# use bryangerlach/rdgen:dev for the latest dev build # use bryangerlach/rdgen:latest for the latest build
image: bryangerlach/rdgen:v0.3.1 image: bryangerlach/rdgen:latest
restart: unless-stopped restart: unless-stopped
environment: environment:
SECRET_KEY: "django-insecure-!(t-!f#6g#sr%yfded9(xha)g+=!6craeez^cp+*&bz_7vdk61" SECRET_KEY: "django-insecure-!(t-!f#6g#sr%yfded9(xha)g+=!6craeez^cp+*&bz_7vdk61"

View File

@@ -131,3 +131,5 @@ STATIC_URL = 'static/'
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DATA_UPLOAD_MAX_MEMORY_SIZE = None

View File

@@ -3,8 +3,9 @@ from PIL import Image
class GenerateForm(forms.Form): class GenerateForm(forms.Form):
#Platform #Platform
platform = forms.ChoiceField(choices=[('windows','Windows'),('linux','Linux (currently unavailable)'),('android','Android'),('macos','macOS')], initial='windows') platform = forms.ChoiceField(choices=[('windows','Windows 64Bit'),('windows-x86','Windows 32Bit'),('linux','Linux'),('android','Android'),('macos','macOS')], initial='windows')
version = forms.ChoiceField(choices=[('1.3.8','nightly'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.3.7') version = forms.ChoiceField(choices=[('master','nightly'),('1.4.3','1.4.3'),('1.4.2','1.4.2'),('1.4.1','1.4.1'),('1.4.0','1.4.0'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.4.3')
help_text="'master' is the development version (nightly build) with the latest features but may be less stable"
delayFix = forms.BooleanField(initial=True, required=False) delayFix = forms.BooleanField(initial=True, required=False)
#General #General
@@ -65,6 +66,10 @@ class GenerateForm(forms.Form):
enableRecording = forms.BooleanField(initial=True, required=False) enableRecording = forms.BooleanField(initial=True, required=False)
enableBlockingInput = forms.BooleanField(initial=True, required=False) enableBlockingInput = forms.BooleanField(initial=True, required=False)
enableRemoteModi = forms.BooleanField(initial=False, required=False) enableRemoteModi = forms.BooleanField(initial=False, required=False)
hidecm = forms.BooleanField(initial=False, required=False)
enablePrinter = forms.BooleanField(initial=True, required=False)
enableCamera = forms.BooleanField(initial=True, required=False)
enableTerminal = forms.BooleanField(initial=True, required=False)
#Other #Other
removeWallpaper = forms.BooleanField(initial=True, required=False) removeWallpaper = forms.BooleanField(initial=True, required=False)
@@ -75,30 +80,29 @@ class GenerateForm(forms.Form):
#custom added features #custom added features
cycleMonitor = forms.BooleanField(initial=False, required=False) cycleMonitor = forms.BooleanField(initial=False, required=False)
xOffline = forms.BooleanField(initial=False, required=False) xOffline = forms.BooleanField(initial=False, required=False)
hidecm = forms.BooleanField(initial=False, required=False)
statussort = forms.BooleanField(initial=False, required=False)
removeNewVersionNotif = forms.BooleanField(initial=False, required=False) removeNewVersionNotif = forms.BooleanField(initial=False, required=False)
def clean_iconfile(self): def clean_iconfile(self):
print("checking icon") print("checking icon")
image = self.cleaned_data['iconfile'] image = self.cleaned_data['iconfile']
try: if image:
# Open the image using Pillow try:
img = Image.open(image) # Open the image using Pillow
img = Image.open(image)
# Check if the image is a PNG (optional, but good practice) # Check if the image is a PNG (optional, but good practice)
if img.format != 'PNG': if img.format != 'PNG':
raise forms.ValidationError("Only PNG images are allowed.") raise forms.ValidationError("Only PNG images are allowed.")
# Get image dimensions # Get image dimensions
width, height = img.size width, height = img.size
# Check for square dimensions # Check for square dimensions
if width != height: if width != height:
raise forms.ValidationError("Custom App Icon dimensions must be square.") raise forms.ValidationError("Custom App Icon dimensions must be square.")
return image return image
except OSError: # Handle cases where the uploaded file is not a valid image except OSError: # Handle cases where the uploaded file is not a valid image
raise forms.ValidationError("Invalid icon file.") raise forms.ValidationError("Invalid icon file.")
except Exception as e: # Catch any other image processing errors except Exception as e: # Catch any other image processing errors
raise forms.ValidationError(f"Error processing icon: {e}") raise forms.ValidationError(f"Error processing icon: {e}")

View File

@@ -129,17 +129,28 @@
{% if platform == 'windows' %} {% if platform == 'windows' %}
<a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a> <a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a>
<a href='/download?filename={{filename}}.msi&uuid={{uuid}}' class="download-link">Download {{filename}}.msi</a> <a href='/download?filename={{filename}}.msi&uuid={{uuid}}' class="download-link">Download {{filename}}.msi</a>
{% elif platform == 'windows-x86' %}
<a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a>
{% elif platform == 'linux' %} {% elif platform == 'linux' %}
<a href='/download?filename={{filename}}.deb&uuid={{uuid}}' class="download-link">Download {{filename}}.deb</a> <a href='/download?filename={{filename}}-x86_64.deb&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.deb</a>
<a href='/download?filename={{filename}}.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}.rpm</a> <a href='/download?filename={{filename}}-x86_64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.rpm</a>
<a href='/download?filename={{filename}}-suse.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-suse.rpm</a> <a href='/download?filename={{filename}}-suse-x86_64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-suse-x86_64.rpm</a>
<a href='/download?filename={{filename}}.pkg.tar.zst&uuid={{uuid}}' class="download-link">Download {{filename}}.pkg.tar.zst</a> <a href='/download?filename={{filename}}-x86_64.pkg.tar.zst&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.pkg.tar.zst</a>
<a href='/download?filename={{filename}}-aarch64.deb&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.deb</a>
<a href='/download?filename={{filename}}-aarch64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.rpm</a>
<a href='/download?filename={{filename}}-suse-aarch64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-suse-aarch64.rpm</a>
<a href='/download?filename={{filename}}-aarch64.pkg.tar.zst&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.pkg.tar.zst</a>
<a href='/download?filename={{filename}}-x86_64.AppImage&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.AppImage</a>
<a href='/download?filename={{filename}}-aarch64.AppImage&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.AppImage</a>
<a href='/download?filename={{filename}}-x86_64.flatpak&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.flatpak</a>
<a href='/download?filename={{filename}}-aarch64.flatpak&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.flatpak</a>
{% elif platform == 'android' %} {% elif platform == 'android' %}
<a href='/download?filename={{filename}}-aarch64.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.apk</a> <a href='/download?filename={{filename}}-aarch64.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.apk</a>
<a href='/download?filename={{filename}}-x86_64.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.apk</a> <a href='/download?filename={{filename}}-x86_64.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.apk</a>
<a href='/download?filename={{filename}}-armv7.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-armv7.apk</a> <a href='/download?filename={{filename}}-armv7.apk&uuid={{uuid}}' class="download-link">Download {{filename}}-armv7.apk</a>
{% elif platform == 'macos' %} {% elif platform == 'macos' %}
<a href='/download?filename={{filename}}.dmg&uuid={{uuid}}' class="download-link">Download {{filename}}.dmg</a> <a href='/download?filename={{filename}}-x86_64.dmg&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.dmg</a>
<a href='/download?filename={{filename}}-aarch64.dmg&uuid={{uuid}}' class="download-link">Download {{filename}}-aarch64.dmg</a>
{% else %} {% else %}
<p>Error: No file generated</p> <p>Error: No file generated</p>
{% endif %} {% endif %}
@@ -168,7 +179,7 @@
platformLogos.macos.style.display = 'block'; platformLogos.macos.style.display = 'block';
platformNote.textContent = 'Note: For macOS, you may need to adjust security settings to run the application.'; platformNote.textContent = 'Note: For macOS, you may need to adjust security settings to run the application.';
platformNote.style.display = 'block'; platformNote.style.display = 'block';
} else if (platform === 'windows') { } else if (platform === 'windows' || platform === 'windows-x86') {
document.getElementById('pageTitle').textContent = 'Windows Build Generated'; document.getElementById('pageTitle').textContent = 'Windows Build Generated';
platformLogos.windows.style.display = 'block'; platformLogos.windows.style.display = 'block';
platformNote.textContent = 'Note: You might need to disable SmartScreen or adjust Windows security settings.'; platformNote.textContent = 'Note: You might need to disable SmartScreen or adjust Windows security settings.';
@@ -190,4 +201,4 @@
updatePlatformUI(); updatePlatformUI();
</script> </script>
</body> </body>
</html>{{ ... }} </html>{{ ... }}

View File

@@ -90,7 +90,26 @@
transition: color 0.3s ease; transition: color 0.3s ease;
} }
.platform-icon:hover, .platform-icon.active { .platform-icon:hover, .platform-icon.active {
color: #fff; color: #2e52f7;
}
.text-64 {
font-size: 0.5em;
font-weight: bold;
bottom: -0.2em;
right: -0.2em;
position: absolute;
color: white;
transform: translate(-50%, -50%);
}
.text-32 {
font-size: 0.5em;
font-weight: bold;
bottom: -0.2em;
right: -0.2em;
position: absolute;
color: white;
transform: translate(-50%, -50%);
} }
.checkbox-group { .checkbox-group {
display: grid; display: grid;
@@ -136,6 +155,72 @@
.errorlist li { .errorlist li {
margin: 5px; /* Add some spacing between list items */ margin: 5px; /* Add some spacing between list items */
} }
@keyframes blink {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.help-text {
color: #ffd700;
font-style: italic;
animation: blink 2s infinite;
padding: 5px;
border-radius: 4px;
display: inline-block;
margin-left: 10px;
}
.password-requirement {
display: none; /* Hidden by default */
color: orange;
font-size: 0.9em;
margin-top: 5px;
}
.sponsor-button {
display: inline-flex;
align-items: center;
background: linear-gradient(135deg, #00457C 0%, #0079C1 100%);
color: white;
padding: 12px 28px;
border-radius: 50px;
text-decoration: none;
font-weight: 600;
font-size: 16px;
letter-spacing: 0.5px;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 69, 124, 0.2);
border: 2px solid rgba(255, 255, 255, 0.1);
text-transform: uppercase;
}
.sponsor-button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 69, 124, 0.3);
background: linear-gradient(135deg, #005AA7 0%, #0095EA 100%);
border-color: rgba(255, 255, 255, 0.2);
}
.sponsor-button i {
margin-right: 12px;
font-size: 20px;
background: white;
color: #00457C;
padding: 8px;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.sponsor-button:hover i {
transform: rotate(360deg);
color: #0095EA;
}
</style> </style>
</head> </head>
<body> <body>
@@ -161,19 +246,31 @@
<div class="platform"> <div class="platform">
<h2><i class="fas fa-desktop"></i> Select Platform</h2> <h2><i class="fas fa-desktop"></i> Select Platform</h2>
<div class="platform-icons"> <div class="platform-icons">
<i class="fab fa-windows platform-icon active" data-platform="windows"></i> <span class="fa-stack fa-lg">
<i class="fab fa-windows fa-stack-2x platform-icon active" data-platform="windows"></i>
<strong class="fa-stack-1x text-64">64</strong>
</span>
<span class="fa-stack fa-lg">
<i class="fab fa-windows fa-stack-2x platform-icon" data-platform="windows-x86"></i>
<strong class="fa-stack-1x text-32">32</strong>
</span>
<i class="fab fa-linux platform-icon" data-platform="linux"></i> <i class="fab fa-linux platform-icon" data-platform="linux"></i>
<i class="fab fa-android platform-icon" data-platform="android"></i> <i class="fab fa-android platform-icon" data-platform="android"></i>
<i class="fab fa-apple platform-icon" data-platform="macos"></i> <i class="fab fa-apple platform-icon" data-platform="macos"></i>
</div> </div>
<select name="platform" id="id_platform"> <select name="platform" id="id_platform">
<option value="windows" selected>Windows</option> <option value="windows" selected>Windows 64Bit</option>
<option value="windows-x86">Windows 32Bit</option>
<option value="linux">Linux</option> <option value="linux">Linux</option>
<option value="android">Android</option> <option value="android">Android</option>
<option value="macos">macOS</option> <option value="macos">macOS</option>
</select> </select>
<label for="{{ form.version.id_for_label }}">Rustdesk Version:</label> <label for="{{ form.version.id_for_label }}">Rustdesk Version:</label>
{{ form.version }} {{ form.version }}
{% if form.version.help_text %}
<span class="help-text">{{ form.version.help_text }}</span>
{% endif %}
<div class="help-text">{{ form.version.help_text }}</div>
<label for="{{ form.delayFix.id_for_label }}">{{ form.delayFix }} Fix connection delay when using third-party API</label> <label for="{{ form.delayFix.id_for_label }}">{{ form.delayFix }} Fix connection delay when using third-party API</label>
</div> </div>
</div> </div>
@@ -215,6 +312,7 @@
{{ form.runasadmin }}<br><br> {{ form.runasadmin }}<br><br>
<label for="{{ form.passApproveMode.id_for_label }}">Password Approve mode:</label> <label for="{{ form.passApproveMode.id_for_label }}">Password Approve mode:</label>
{{ form.passApproveMode }}<br><br> {{ form.passApproveMode }}<br><br>
<div id="passwordRequirement" class="password-requirement">To use the hide connection window feature, please set a permanent password.</div>
<label for="{{ form.permanentPassword.id_for_label }}">Set Permanent Password:</label> <label for="{{ form.permanentPassword.id_for_label }}">Set Permanent Password:</label>
{{ form.permanentPassword }} *The password is used as default, but can be changed by the client<br><br> {{ form.permanentPassword }} *The password is used as default, but can be changed by the client<br><br>
@@ -223,7 +321,9 @@
<label for="{{ form.enableDirectIP.id_for_label }}">{{ form.enableDirectIP }} Enable direct IP access</label><br> <label for="{{ form.enableDirectIP.id_for_label }}">{{ form.enableDirectIP }} Enable direct IP access</label><br>
<label for="{{ form.autoClose.id_for_label }}">{{ form.autoClose }} Automatically close incoming sessions on user inactivity</label><br> <label for="{{ form.autoClose.id_for_label }}">{{ form.autoClose }} Automatically close incoming sessions on user inactivity</label><br>
<label for="{{ form.hidecm.id_for_label }}">{{ form.hidecm }} Allow hiding the connection window from remote screen.</label><br>
</div> </div>
<div class="section"> <div class="section">
@@ -245,7 +345,7 @@
<div class="container"> <div class="container">
<div class="section"> <div class="section">
<h2><i class="fas fa-lock"></i> Permissions</h2> <h2><i class="fas fa-lock"></i> Permissions</h2>
The following Permissions can be set as default (the user can change the settins) or override (the settings cannot be changed).<br> The following Permissions can be set as default (the user can change the settings) or override (the settings cannot be changed).<br>
{{ form.permissionsDorO }} {{ form.permissionsDorO }}
<label for="{{ form.permissionsType.id_for_label }}">Permission type:</label> <label for="{{ form.permissionsType.id_for_label }}">Permission type:</label>
{{ form.permissionsType }}<br><br> {{ form.permissionsType }}<br><br>
@@ -259,18 +359,20 @@
<label for="{{ form.enableRecording.id_for_label }}">{{ form.enableRecording }} Enable recording session</label> <label for="{{ form.enableRecording.id_for_label }}">{{ form.enableRecording }} Enable recording session</label>
<label for="{{ form.enableBlockingInput.id_for_label }}">{{ form.enableBlockingInput }} Enable blocking user input</label> <label for="{{ form.enableBlockingInput.id_for_label }}">{{ form.enableBlockingInput }} Enable blocking user input</label>
<label for="{{ form.enableRemoteModi.id_for_label }}">{{ form.enableRemoteModi }} Enable remote configuration modification</label> <label for="{{ form.enableRemoteModi.id_for_label }}">{{ form.enableRemoteModi }} Enable remote configuration modification</label>
<label for="{{ form.enablePrinter.id_for_label }}">{{ form.enablePrinter }} Enable remote printer</label>
<label for="{{ form.enableCamera.id_for_label }}">{{ form.enableCamera }} Enable remote camera</label>
<label for="{{ form.enableTerminal.id_for_label }}">{{ form.enableTerminal }} Enable remote terminal</label>
</div><br> </div><br>
<h2><i class="fas fa-code"></i> Code Changes</h2> <h2><i class="fas fa-code"></i> Code Changes</h2>
<label for="{{ form.cycleMonitor.id_for_label }}">{{ form.cycleMonitor }} Add a button to cycle through available monitors to the minimized toolbar.</label><br> <label for="{{ form.cycleMonitor.id_for_label }}">{{ form.cycleMonitor }} Add a button to cycle through available monitors to the minimized toolbar.</label><br>
<label for="{{ form.xOffline.id_for_label }}">{{ form.xOffline }} Display an X for offline devices in the addressbook.</label><br> <label for="{{ form.xOffline.id_for_label }}">{{ form.xOffline }} Display an X for offline devices in the addressbook.</label><br>
<label for="{{ form.hidecm.id_for_label }}">{{ form.hidecm }} Allow hiding the connection window from remote screen.</label><br>
<label for="{{ form.statussort.id_for_label }}">{{ form.statussort }} Allow sorting by online status.</label><br>
<label for="{{ form.removeNewVersionNotif.id_for_label }}">{{ form.removeNewVersionNotif }} Remove notification for new versions.</label><br> <label for="{{ form.removeNewVersionNotif.id_for_label }}">{{ form.removeNewVersionNotif }} Remove notification for new versions.</label><br>
</div> </div>
<div class="section"> <div class="section">
<h2><i class="fas fa-cog"></i> Other</h2> <h2><i class="fas fa-cog"></i> Other</h2>
<label for="{{ form.removeWallpaper.id_for_label }}">{{ form.removeWallpaper }} Remove wallpaper during incoming sessions</label><br> <label for="{{ form.removeWallpaper.id_for_label }}">{{ form.removeWallpaper }} Remove wallpaper during incoming sessions</label><br>
<a href="https://rustdesk.com/docs/en/self-host/client-configuration/advanced-settings/">Click here for a list of Default/Override settings</a>
<label for="{{ form.defaultManual.id_for_label }}">Default settings</label><br> <label for="{{ form.defaultManual.id_for_label }}">Default settings</label><br>
{{ form.defaultManual }}<br><br> {{ form.defaultManual }}<br><br>
<label for="{{ form.overrideManual.id_for_label }}">Override settings</label><br> <label for="{{ form.overrideManual.id_for_label }}">Override settings</label><br>
@@ -280,10 +382,24 @@
<div class="platform"> <div class="platform">
<div class="section"> <div class="section">
<button type="submit"><i class="fas fa-rocket"></i> Generate Custom Client</button> <button type="submit"><i class="fas fa-rocket"></i> Generate Custom Client</button>
<a href="https://github.com/bryangerlach/rdgen">Source Code on github</a>
<iframe src="https://github.com/sponsors/bryangerlach/button" title="Sponsor bryangerlach" height="32" width="114" style="border: 0; border-radius: 6px;"></iframe>
</div> </div>
</div> </div>
<div style="text-align: center; margin: 30px 0;">
<a href="https://github.com/bryangerlach/rdgen"
target="_blank"
class="sponsor-button">
<i class="fab fa-github"></i>
Source Code on Github
</a>
</div>
<div style="text-align: center; margin: 30px 0;">
<a href="https://github.com/sponsors/bryangerlach?o=esb"
target="_blank"
class="sponsor-button">
<i class="fab fa-github"></i>
Donate
</a>
</div>
</form> </form>
<script> <script>
document.querySelectorAll('.platform-icon').forEach(icon => { document.querySelectorAll('.platform-icon').forEach(icon => {
@@ -299,6 +415,98 @@
document.getElementById("{{ form.logofile.id_for_label }}").addEventListener('change', function(event) { document.getElementById("{{ form.logofile.id_for_label }}").addEventListener('change', function(event) {
previewImage(event.target, 'logo-preview'); previewImage(event.target, 'logo-preview');
}); });
document.getElementById("{{ form.hidecm.id_for_label }}").addEventListener('change',function() {
if (this.checked) {
document.getElementById("passwordRequirement").style.display = 'block';
document.getElementById("{{ form.permanentPassword.id_for_label }}").focus();
document.getElementById("{{ form.passApproveMode.id_for_label }}").value = 'password';
} else {
document.getElementById("passwordRequirement").style.display = 'none';
document.getElementById("{{ form.passApproveMode.id_for_label }}").value = 'password-click';
}
});
const enableKeyboard = document.getElementById("{{ form.enableKeyboard.id_for_label }}");
const enableClipboard = document.getElementById("{{ form.enableClipboard.id_for_label }}");
const enableFileTransfer = document.getElementById("{{ form.enableFileTransfer.id_for_label }}");
const enableAudio = document.getElementById("{{ form.enableAudio.id_for_label }}");
const enableTCP = document.getElementById("{{ form.enableTCP.id_for_label }}");
const enableRemoteRestart = document.getElementById("{{ form.enableRemoteRestart.id_for_label }}");
const enableRecording = document.getElementById("{{ form.enableRecording.id_for_label }}");
const enableBlockingInput = document.getElementById("{{ form.enableBlockingInput.id_for_label }}");
const enableRemoteModi = document.getElementById("{{ form.enableRemoteModi.id_for_label }}");
const enablePrinter = document.getElementById("{{ form.enablePrinter.id_for_label }}");
const enableCamera = document.getElementById("{{ form.enableCamera.id_for_label }}");
const enableTerminal = document.getElementById("{{ form.enableTerminal.id_for_label }}");
document.getElementById("{{ form.permissionsType.id_for_label }}").addEventListener('change', function() {
if (this.value === 'full') {
enableKeyboard.checked = true;
enableClipboard.checked = true;
enableFileTransfer.checked = true;
enableAudio.checked = true;
enableTCP.checked = true;
enableRemoteRestart.checked = true;
enableRecording.checked = true;
enableBlockingInput.checked = true;
enableRemoteModi.checked = true;
enablePrinter.checked = true;
enableCamera.checked = true;
enableTerminal.checked = true;
enableKeyboard.disabled = true;
enableClipboard.disabled = true;
enableFileTransfer.disabled = true;
enableAudio.disabled = true;
enableTCP.disabled = true;
enableRemoteRestart.disabled = true;
enableRecording.disabled = true;
enableBlockingInput.disabled = true;
enableRemoteModi.disabled = true;
enablePrinter.disabled = true;
enableCamera.disabled = true;
enableTerminal.disable = true;
} else if (this.value === 'view') {
enableKeyboard.checked = false;
enableClipboard.checked = false;
enableFileTransfer.checked = false;
enableAudio.checked = false;
enableTCP.checked = false;
enableRemoteRestart.checked = false;
enableRecording.checked = false;
enableBlockingInput.checked = false;
enableRemoteModi.checked = false;
enablePrinter.checked = false;
enableCamera.checked = false;
enableTerminal.checked = false;
enableKeyboard.disabled = true;
enableClipboard.disabled = true;
enableFileTransfer.disabled = true;
enableAudio.disabled = true;
enableTCP.disabled = true;
enableRemoteRestart.disabled = true;
enableRecording.disabled = true;
enableBlockingInput.disabled = true;
enableRemoteModi.disabled = true;
enablePrinter.disabled = true;
enableCamera.disabled = true;
enableTerminal.disable = true;
} else if (this.value === 'custom') {
enableKeyboard.disabled = false;
enableClipboard.disabled = false;
enableFileTransfer.disabled = false;
enableAudio.disabled = false;
enableTCP.disabled = false;
enableRemoteRestart.disabled = false;
enableRecording.disabled = false;
enableBlockingInput.disabled = false;
enableRemoteModi.disabled = false;
enablePrinter.checked = false;
enableCamera.checked = false;
enableTerminal.checked = false;
}
});
function previewImage(input, previewContainerId) { function previewImage(input, previewContainerId) {
if (input.files && input.files[0]) { if (input.files && input.files[0]) {
var reader = new FileReader(); var reader = new FileReader();
@@ -460,4 +668,4 @@
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -0,0 +1,60 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Rustdesk Client Generator</title>
<style>
html, body {
height: 100%;
}
body {
background-color: #fff;
background: radial-gradient(circle at center, #fff 0%, #f8f8f8 75%, #ebebeb 100%);
color: #222;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
font-size: 1rem;
line-height: 1.5;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
main {
padding: 1rem;
text-align: center;
}
h1 {
font-size: 2.5rem;
line-height: 1.1;
margin: 0;
}
@media screen and (max-width: 480px) {
h1 {
font-size: 1.5rem;
}
}
h1::after {
content: "";
background-color: #ffe800;
background: repeating-linear-gradient(45deg, #ffe800, #ffe800 0.5rem, #222 0.5rem, #222 1.0rem);
display: block;
height: 0.5rem;
margin-top: 1rem;
}
img {
max-width: 100%;
height: auto;
}
p {
margin: 1rem 0 0 0;
}
</style>
</head>
<body>
<main>
<h1>Rustdesk Client Generator</h1>
<p>The Rustdesk Client Generator is currently under construction, please come back at a later time.</p>
</main>
</body>
</html>

View File

@@ -154,6 +154,7 @@
const platform = '{{platform}}'.toLowerCase(); const platform = '{{platform}}'.toLowerCase();
const platformLogos = { const platformLogos = {
'windows': document.getElementById('windowsLogo'), 'windows': document.getElementById('windowsLogo'),
'windows-x86': document.getElementById('windowsLogo'),
'macos': document.getElementById('macosLogo'), 'macos': document.getElementById('macosLogo'),
'linux': document.getElementById('linuxLogo'), 'linux': document.getElementById('linuxLogo'),
'android': document.getElementById('androidLogo') 'android': document.getElementById('androidLogo')
@@ -167,7 +168,7 @@
document.getElementById('pageTitle').textContent = 'Generating MacOS Build'; document.getElementById('pageTitle').textContent = 'Generating MacOS Build';
platformLogos.macos.style.display = 'block'; platformLogos.macos.style.display = 'block';
document.getElementById('macosNote').style.display = 'block'; document.getElementById('macosNote').style.display = 'block';
} else if (platform === 'windows') { } else if (platform === 'windows' | platform === 'windows-x86') {
document.getElementById('pageTitle').textContent = 'Generating Windows Build'; document.getElementById('pageTitle').textContent = 'Generating Windows Build';
platformLogos.windows.style.display = 'block'; platformLogos.windows.style.display = 'block';
} else if (platform === 'linux') { } else if (platform === 'linux') {
@@ -214,4 +215,4 @@
}, 5000); // 5000 milliseconds = 5 seconds }, 5000); // 5000 milliseconds = 5 seconds
</script> </script>
</body> </body>
</html> </html>

View File

@@ -26,7 +26,6 @@ def generator_view(request):
cycleMonitor = form.cleaned_data['cycleMonitor'] cycleMonitor = form.cleaned_data['cycleMonitor']
xOffline = form.cleaned_data['xOffline'] xOffline = form.cleaned_data['xOffline']
hidecm = form.cleaned_data['hidecm'] hidecm = form.cleaned_data['hidecm']
statussort = form.cleaned_data['statussort']
removeNewVersionNotif = form.cleaned_data['removeNewVersionNotif'] removeNewVersionNotif = form.cleaned_data['removeNewVersionNotif']
server = form.cleaned_data['serverIP'] server = form.cleaned_data['serverIP']
key = form.cleaned_data['key'] key = form.cleaned_data['key']
@@ -51,6 +50,7 @@ def generator_view(request):
compname = form.cleaned_data['compname'] compname = form.cleaned_data['compname']
if not compname: if not compname:
compname = "Purslane Ltd" compname = "Purslane Ltd"
compname = compname.replace("&","\\&")
permPass = form.cleaned_data['permanentPassword'] permPass = form.cleaned_data['permanentPassword']
theme = form.cleaned_data['theme'] theme = form.cleaned_data['theme']
themeDorO = form.cleaned_data['themeDorO'] themeDorO = form.cleaned_data['themeDorO']
@@ -74,12 +74,17 @@ def generator_view(request):
removeWallpaper = form.cleaned_data['removeWallpaper'] removeWallpaper = form.cleaned_data['removeWallpaper']
defaultManual = form.cleaned_data['defaultManual'] defaultManual = form.cleaned_data['defaultManual']
overrideManual = form.cleaned_data['overrideManual'] overrideManual = form.cleaned_data['overrideManual']
enablePrinter = form.cleaned_data['enablePrinter']
enableCamera = form.cleaned_data['enableCamera']
enableTerminal = form.cleaned_data['enableTerminal']
if all(char.isascii() for char in filename): if all(char.isascii() for char in filename):
filename = re.sub(r'[^\w\s-]', '_', filename).strip() filename = re.sub(r'[^\w\s-]', '_', filename).strip()
filename = filename.replace(" ","_") filename = filename.replace(" ","_")
else: else:
filename = "rustdesk" filename = "rustdesk"
if not all(char.isascii() for char in appname):
appname = "rustdesk"
myuuid = str(uuid.uuid4()) myuuid = str(uuid.uuid4())
protocol = _settings.PROTOCOL protocol = _settings.PROTOCOL
host = request.get_host() host = request.get_host()
@@ -117,14 +122,18 @@ def generator_view(request):
decodedCustom['password'] = permPass decodedCustom['password'] = permPass
if theme != "system": if theme != "system":
if themeDorO == "default": if themeDorO == "default":
decodedCustom['default-settings']['theme'] = theme if platform == "windows-x86":
decodedCustom['default-settings']['allow-darktheme'] = 'Y' if theme == "dark" else 'N'
else:
decodedCustom['default-settings']['theme'] = theme
elif themeDorO == "override": elif themeDorO == "override":
decodedCustom['override-settings']['theme'] = theme if platform == "windows-x86":
decodedCustom['approve-mode'] = passApproveMode decodedCustom['override-settings']['allow-darktheme'] = 'Y' if theme == "dark" else 'N'
else:
decodedCustom['override-settings']['theme'] = theme
decodedCustom['enable-lan-discovery'] = 'N' if denyLan else 'Y' decodedCustom['enable-lan-discovery'] = 'N' if denyLan else 'Y'
decodedCustom['direct-server'] = 'Y' if enableDirectIP else 'N' #decodedCustom['direct-server'] = 'Y' if enableDirectIP else 'N'
decodedCustom['allow-auto-disconnect'] = 'Y' if autoClose else 'N' decodedCustom['allow-auto-disconnect'] = 'Y' if autoClose else 'N'
decodedCustom['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
if permissionsDorO == "default": if permissionsDorO == "default":
decodedCustom['default-settings']['access-mode'] = permissionsType decodedCustom['default-settings']['access-mode'] = permissionsType
decodedCustom['default-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N' decodedCustom['default-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
@@ -136,6 +145,14 @@ def generator_view(request):
decodedCustom['default-settings']['enable-record-session'] = 'Y' if enableRecording else 'N' decodedCustom['default-settings']['enable-record-session'] = 'Y' if enableRecording else 'N'
decodedCustom['default-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N' decodedCustom['default-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
decodedCustom['default-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N' decodedCustom['default-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
decodedCustom['default-settings']['direct-server'] = 'Y' if enableDirectIP else 'N'
decodedCustom['default-settings']['verification-method'] = 'use-permanent-password' if hidecm else 'use-both-passwords'
decodedCustom['default-settings']['approve-mode'] = passApproveMode
decodedCustom['default-settings']['allow-hide-cm'] = 'Y' if hidecm else 'N'
decodedCustom['default-settings']['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
decodedCustom['default-settings']['enable-remote-printer'] = 'Y' if enablePrinter else 'N'
decodedCustom['default-settings']['enable-camera'] = 'Y' if enableCamera else 'N'
decodedCustom['default-settings']['enable-terminal'] = 'Y' if enableTerminal else 'N'
else: else:
decodedCustom['override-settings']['access-mode'] = permissionsType decodedCustom['override-settings']['access-mode'] = permissionsType
decodedCustom['override-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N' decodedCustom['override-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
@@ -147,6 +164,14 @@ def generator_view(request):
decodedCustom['override-settings']['enable-record-session'] = 'Y' if enableRecording else 'N' decodedCustom['override-settings']['enable-record-session'] = 'Y' if enableRecording else 'N'
decodedCustom['override-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N' decodedCustom['override-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
decodedCustom['override-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N' decodedCustom['override-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
decodedCustom['override-settings']['direct-server'] = 'Y' if enableDirectIP else 'N'
decodedCustom['override-settings']['verification-method'] = 'use-permanent-password' if hidecm else 'use-both-passwords'
decodedCustom['override-settings']['approve-mode'] = passApproveMode
decodedCustom['override-settings']['allow-hide-cm'] = 'Y' if hidecm else 'N'
decodedCustom['override-settings']['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
decodedCustom['override-settings']['enable-remote-printer'] = 'Y' if enablePrinter else 'N'
decodedCustom['override-settings']['enable-camera'] = 'Y' if enableCamera else 'N'
decodedCustom['override-settings']['enable-terminal'] = 'Y' if enableTerminal else 'N'
for line in defaultManual.splitlines(): for line in defaultManual.splitlines():
k, value = line.split('=') k, value = line.split('=')
@@ -173,45 +198,23 @@ def generator_view(request):
extras['rdgen'] = 'true' extras['rdgen'] = 'true'
extras['cycleMonitor'] = 'true' if cycleMonitor else 'false' extras['cycleMonitor'] = 'true' if cycleMonitor else 'false'
extras['xOffline'] = 'true' if xOffline else 'false' extras['xOffline'] = 'true' if xOffline else 'false'
extras['hidecm'] = 'true' if hidecm else 'false'
extras['statussort'] = 'true' if statussort else 'false'
extras['removeNewVersionNotif'] = 'true' if removeNewVersionNotif else 'false' extras['removeNewVersionNotif'] = 'true' if removeNewVersionNotif else 'false'
extras['compname'] = compname extras['compname'] = compname
extra_input = json.dumps(extras) extra_input = json.dumps(extras)
####from here run the github action, we need user, repo, access token. ####from here run the github action, we need user, repo, access token.
if platform == 'windows': if platform == 'windows':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
if platform == 'windows-x86':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows-x86.yml/dispatches'
elif platform == 'linux': elif platform == 'linux':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-linux.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-linux.yml/dispatches'
elif platform == 'android': elif platform == 'android':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-android.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-android.yml/dispatches'
elif platform == 'macos': elif platform == 'macos':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-macos.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-macos.yml/dispatches'
else: else:
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
####changes were made to use hbb_common as a submodule in version 1.3.7, so if 1.3.3 through 1.3.6, use:
if version == '1.3.3' or version == '1.3.4' or version == '1.3.5' or version == '1.3.6':
if platform == 'windows':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre137-generator-windows.yml/dispatches'
elif platform == 'linux':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre137-generator-linux.yml/dispatches'
elif platform == 'android':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre137-generator-android.yml/dispatches'
elif platform == 'macos':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre137-generator-macos.yml/dispatches'
else:
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre137-generator-windows.yml/dispatches'
####breaking changes were made in 1.3.3 version, so if 1.3.2 or lower, use:
if version == '1.3.2' or version == '1.3.1' or version == '1.3.0':
if platform == 'windows':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre133-generator-windows.yml/dispatches'
elif platform == 'linux':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre133-generator-linux.yml/dispatches'
elif platform == 'android':
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre133-generator-android.yml/dispatches'
else:
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/pre133-generator-windows.yml/dispatches'
#url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches' #url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches'
data = { data = {
@@ -247,6 +250,7 @@ def generator_view(request):
return JsonResponse({"error": "Something went wrong"}) return JsonResponse({"error": "Something went wrong"})
else: else:
form = GenerateForm() form = GenerateForm()
#return render(request, 'maintenance.html')
return render(request, 'generator.html', {'form': form}) return render(request, 'generator.html', {'form': form})
@@ -408,4 +412,4 @@ def save_custom_client(request):
for chunk in file.chunks(): for chunk in file.chunks():
f.write(chunk) f.write(chunk)
return HttpResponse("File saved successfully!") return HttpResponse("File saved successfully!")

View File

@@ -1,4 +1,35 @@
## To fully host the client generator yourself, you will need to following: ## Host the rdgen server with docker
1. First you will need to fork this repo on github
2. Next, setup a A Github fine-grained access token with permissions for your rdgen
repository:
* login to your github account
* click on your profile picture at the top right, click Settings
* at the bottom of the left panel, click Developer Settings
* click Personal access tokens
* click Fine-grained tokens
* click Generate new token
* give a token name, change expiration to whatever you want
* under Repository access, select Only select repositories, then pick your
rdgen repo
* give Read and Write access to actions and workflows
* You might have to go to: https://github.com/USERNAME/rdgen/actions and hit green Enable Actions button so it works.
3. Next, login to your Github account, go to your rdgen repo page (https://github.com/USERNAME/rdgen)
* Click on Settings
* In the left pane, click on Secrets and variables, then click Actions
* Now click New repository secret
* Set the Name to GENURL
* Set the Secret to https://rdgen.hostname.com (or whatever your server will be accessed from)
4. Now download the docker-compose.yml file and fill in the environment variables:
* SECRET_KEY="your secret key" - generate a secret key by running: ```python3 -c 'import secrets; print(secrets.token_hex(100))'```
* GHUSER="your github username"
* GHBEARER="your fine-grained access token"
* PROTOCOL="https" *optional - defaults to "https", change to "http" if you need to
* REPONAME="rdgen" *optional - defaults to "rdgen", change this if you renamed the repo when you forked it
5. Now just run ```docker compose up -d```
## Host manually:
1. A Github account with a fork of this repo 1. A Github account with a fork of this repo
2. A Github fine-grained access token with permissions for your rdgen 2. A Github fine-grained access token with permissions for your rdgen
@@ -24,20 +55,6 @@
* GENURL="example.com:8000" *this is the domain and port that you are * GENURL="example.com:8000" *this is the domain and port that you are
running rdgen on, needs to be accessible on the internet, depending running rdgen on, needs to be accessible on the internet, depending
on how you have this setup the port may not be needed on how you have this setup the port may not be needed
* optional github secrets (for signing the code):
* WINDOWS_PFX_BASE64
* WINDOWS_PFX_PASSWORD
* WINDOWS_PFX_SHA1_THUMBPRINT
## A few notes:
* If you change your repository name, make sure to change the url on lines
172-203 of views.py to reflect the change
* If you are running on http instead of https, make sure to make the change on
line 75 of views.py
## To run rdgen on your server without docker:
``` ```
# Open to the directory you want to install rdgen (change /opt to wherever you want) # Open to the directory you want to install rdgen (change /opt to wherever you want)
@@ -69,7 +86,7 @@ open your web browser to yourdomain:8000
use nginx, caddy, traefik, etc. for ssl reverse proxy use nginx, caddy, traefik, etc. for ssl reverse proxy
## To autostart the server on boot, you can set up a systemd service called rdgen.service ### To autostart the server on boot, you can set up a systemd service called rdgen.service
replace user, group, and port if you need to replace /opt with wherever you replace user, group, and port if you need to replace /opt with wherever you
have installed rdgen save the following file as have installed rdgen save the following file as