forked from shaytan/rdgen
Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b04b051fd | ||
|
|
c59a838f7b | ||
|
|
ebaedbcf55 | ||
|
|
21a5dc1bf6 | ||
|
|
e8af50a5fc | ||
|
|
124af41206 | ||
|
|
2e216e9d26 | ||
|
|
8cd0e78ec7 | ||
|
|
581dcd62c3 | ||
|
|
60ec06b3ea | ||
|
|
8253cce1bf | ||
|
|
6167b8f61d | ||
|
|
9fd8f52815 | ||
|
|
50f15f18b4 | ||
|
|
c4cc4a167e | ||
|
|
1d51a43a47 | ||
|
|
905d8039ef | ||
|
|
8b8aff445a | ||
|
|
1b56fa5833 | ||
|
|
ac114152de | ||
|
|
ca0d321873 | ||
|
|
80fc9f6a84 | ||
|
|
b567c74902 | ||
|
|
cc47350fab | ||
|
|
e882a604d7 | ||
|
|
1b7468a1f2 | ||
|
|
1424caffb0 | ||
|
|
47cf713307 | ||
|
|
fe505ed35c | ||
|
|
a68e9d8a83 | ||
|
|
995f78b6a1 | ||
|
|
7951080c6c | ||
|
|
6792760e57 | ||
|
|
da33c6f5fd | ||
|
|
6c2e2f39e9 | ||
|
|
f420425ecb | ||
|
|
4a5dce088a | ||
|
|
51cb240b13 | ||
|
|
a9bf03b34b | ||
|
|
286320cd81 | ||
|
|
0f1b1d1d55 | ||
|
|
ee673c2667 | ||
|
|
2c970680ef | ||
|
|
c973d5363f | ||
|
|
433b02dbfd | ||
|
|
3699490b88 | ||
|
|
743781d662 | ||
|
|
7e81a75b0d | ||
|
|
dc965aa566 | ||
|
|
3c2959fd95 | ||
|
|
2020c85cce | ||
|
|
f1ab7ea43c | ||
|
|
423100c9ea | ||
|
|
8e11af77b8 | ||
|
|
8ce7e6ac50 | ||
|
|
87f587699c | ||
|
|
f294a1feda | ||
|
|
7c370dbcdf | ||
|
|
646ad8d4a1 | ||
|
|
d78c1f7961 |
615
.github/old-workflows/pre133-generator-android.yml
vendored
615
.github/old-workflows/pre133-generator-android.yml
vendored
File diff suppressed because one or more lines are too long
587
.github/old-workflows/pre133-generator-linux.yml
vendored
587
.github/old-workflows/pre133-generator-linux.yml
vendored
File diff suppressed because one or more lines are too long
566
.github/old-workflows/pre133-generator-windows.yml
vendored
566
.github/old-workflows/pre133-generator-windows.yml
vendored
File diff suppressed because one or more lines are too long
29
.github/patches/allowCustom.diff
vendored
Normal file
29
.github/patches/allowCustom.diff
vendored
Normal 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 {
|
||||||
41
.github/patches/removeNewVersionNotif.diff
vendored
Normal file
41
.github/patches/removeNewVersionNotif.diff
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
index ba724eed5..1604c429f 100644
|
||||||
|
--- a/flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
+++ b/flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
@@ -424,21 +424,21 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildHelpCards(String updateUrl) {
|
||||||
|
- 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 (!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()) {
|
||||||
13
.github/patches/removeSetupServerTip.diff
vendored
Normal file
13
.github/patches/removeSetupServerTip.diff
vendored
Normal 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(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart
|
|
||||||
index ba724eed5..cb66cdaed 100644
|
|
||||||
--- a/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>
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget buildHelpCards(String updateUrl) {
|
|
||||||
- if (!bind.isCustomClient() &&
|
|
||||||
+ /*if (!bind.isCustomClient() &&
|
|
||||||
updateUrl.isNotEmpty &&
|
|
||||||
!isCardClosed &&
|
|
||||||
bind.mainUriPrefixSync().contains('rustdesk')) {
|
|
||||||
@@ -435,7 +435,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|
||||||
final Uri url = Uri.parse('https://rustdesk.com/download');
|
|
||||||
await launchUrl(url);
|
|
||||||
}, closeButton: true);
|
|
||||||
- }
|
|
||||||
+ }*/
|
|
||||||
if (systemError.isNotEmpty) {
|
|
||||||
return buildInstallCard("", systemError, "", () {});
|
|
||||||
}
|
|
||||||
33
.github/patches/statussort.diff
vendored
33
.github/patches/statussort.diff
vendored
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
2
.github/workflows/bridge.yml
vendored
2
.github/workflows/bridge.yml
vendored
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
95
.github/workflows/generator-android.yml
vendored
95
.github/workflows/generator-android.yml
vendored
@@ -69,21 +69,14 @@ 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: "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
|
||||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||||
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
|
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'
|
UPLOAD_ARTIFACT: 'true'
|
||||||
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
||||||
ICONBASE64: "$${{ inputs.iconbase64 }}"
|
|
||||||
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -297,7 +290,6 @@ jobs:
|
|||||||
mv ./res/icon.ico ./res/icon.ico.bak
|
mv ./res/icon.ico ./res/icon.ico.bak
|
||||||
mv ./res/icon.png ./res/icon.png.bak
|
mv ./res/icon.png ./res/icon.png.bak
|
||||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||||
#echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png
|
|
||||||
wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }}
|
wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }}
|
||||||
mv ./res/32x32.png ./res/32x32.png.bak
|
mv ./res/32x32.png ./res/32x32.png.bak
|
||||||
mv ./res/64x64.png ./res/64x64.png.bak
|
mv ./res/64x64.png ./res/64x64.png.bak
|
||||||
@@ -318,6 +310,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'
|
||||||
@@ -338,7 +340,7 @@ jobs:
|
|||||||
sed -i -e 's|"Copyright © 2025 Purslane Ltd. All rights reserved."|"Copyright © 2025"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"Copyright © 2025 Purslane Ltd. All rights reserved."|"Copyright © 2025"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs
|
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \;
|
||||||
sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./flutter/android/app/src/main/res/values/strings.xml
|
sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./flutter/android/app/src/main/res/values/strings.xml
|
||||||
sed -i -e "s|title: 'RustDesk'|title: '${{ inputs.appname }}'|" ./flutter/lib/main.dart
|
sed -i -e "s|title: 'RustDesk'|title: '${{ inputs.appname }}'|" ./flutter/lib/main.dart
|
||||||
sed -i -e "s|return 'RustDesk';|return '${{ inputs.appname }}';|" ./flutter/lib/web/bridge.dart
|
sed -i -e "s|return 'RustDesk';|return '${{ inputs.appname }}';|" ./flutter/lib/web/bridge.dart
|
||||||
@@ -365,13 +367,22 @@ jobs:
|
|||||||
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|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
|
||||||
|
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
||||||
|
|
||||||
- name: allow custom.txt
|
- name: allow custom.txt
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
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
|
||||||
@@ -401,19 +412,11 @@ 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
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -477,6 +480,15 @@ jobs:
|
|||||||
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:
|
||||||
@@ -490,14 +502,8 @@ jobs:
|
|||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a
|
mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a
|
||||||
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/
|
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/
|
||||||
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 "${{ env.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
|
||||||
@@ -507,14 +513,8 @@ jobs:
|
|||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a
|
mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a
|
||||||
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/
|
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/
|
||||||
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 "${{ env.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
|
||||||
@@ -524,14 +524,8 @@ jobs:
|
|||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64
|
mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64
|
||||||
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86_64/
|
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86_64/
|
||||||
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 "${{ env.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
|
||||||
@@ -541,14 +535,8 @@ jobs:
|
|||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/x86
|
mkdir -p ./flutter/android/app/src/main/jniLibs/x86
|
||||||
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86/
|
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86/
|
||||||
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 "${{ env.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
|
||||||
@@ -594,17 +582,6 @@ jobs:
|
|||||||
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=@./signed-apk/${{ inputs.filename }}-${{ matrix.job.arch }}.apk" ${{ 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=@./signed-apk/${{ inputs.filename }}-${{ matrix.job.arch }}.apk" ${{ inputs.apiServer }}/api/save_custom_client
|
||||||
# uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
||||||
# with:
|
|
||||||
# server: ${{ secrets.GEN_FTP_SERVER }}
|
|
||||||
# username: ${{ secrets.GEN_FTP_USER }}
|
|
||||||
# password: ${{ secrets.GEN_FTP_PASSWORD }}
|
|
||||||
# local-dir: ./signed-apk/
|
|
||||||
# server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/
|
|
||||||
# exclude: |
|
|
||||||
# *.idsig
|
|
||||||
# *.jks
|
|
||||||
# *aligned.apk
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
|
|||||||
131
.github/workflows/generator-linux.yml
vendored
131
.github/workflows/generator-linux.yml
vendored
@@ -69,21 +69,14 @@ 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: "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
|
||||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||||
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
|
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'
|
UPLOAD_ARTIFACT: 'true'
|
||||||
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
||||||
ICONBASE64: "$${{ inputs.iconbase64 }}"
|
|
||||||
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -252,7 +245,6 @@ jobs:
|
|||||||
mv ./res/icon.ico ./res/icon.ico.bak
|
mv ./res/icon.ico ./res/icon.ico.bak
|
||||||
mv ./res/icon.png ./res/icon.png.bak
|
mv ./res/icon.png ./res/icon.png.bak
|
||||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||||
#echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png
|
|
||||||
wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }}
|
wget -O ./res/icon.png ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }}
|
||||||
mv ./res/32x32.png ./res/32x32.png.bak
|
mv ./res/32x32.png ./res/32x32.png.bak
|
||||||
mv ./res/64x64.png ./res/64x64.png.bak
|
mv ./res/64x64.png ./res/64x64.png.bak
|
||||||
@@ -283,20 +275,31 @@ jobs:
|
|||||||
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs
|
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \;
|
||||||
sed -i -e '/-p tmpdeb\/usr\/lib\/rustdesk/d' ./build.py
|
sed -i -e '/-p tmpdeb\/usr\/lib\/rustdesk/d' ./build.py
|
||||||
|
|
||||||
|
- name: change company name
|
||||||
|
if: fromJson(inputs.extras).compname != 'Purslane Ltd'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./Cargo.toml
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./libs/portable/Cargo.toml
|
||||||
|
|
||||||
- name: allow custom.txt
|
- name: allow custom.txt
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|rs-ny.rustdesk.com|${{ env.RENDEZVOUS_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=|${{ env.RS_PUB_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
|
||||||
echo -n "${{ env.CUSTOM }}" | cat > ./custom.txt
|
git apply removeSetupServerTip.diff
|
||||||
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
echo -n "${{ inputs.custom }}" | cat > ./custom.txt
|
||||||
|
# sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
||||||
|
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'
|
||||||
@@ -311,6 +314,15 @@ jobs:
|
|||||||
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|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
|
||||||
|
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
||||||
|
|
||||||
- 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' }}
|
||||||
@@ -338,20 +350,12 @@ 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
|
|
||||||
|
|
||||||
- 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'
|
||||||
@@ -360,22 +364,6 @@ jobs:
|
|||||||
name: bridge-artifact
|
name: bridge-artifact
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
# - name: logo stuff
|
|
||||||
# if: ${{ inputs.logolink != 'false' }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# #echo "${{ inputs.logobase64 }}" | base64 -d > ./rustdesk/data/flutter_assets/assets/logo.png
|
|
||||||
# wget -O ./rustdesk/data/flutter_assets/assets/logo.png https://${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }}
|
|
||||||
|
|
||||||
# - name: icon stuff
|
|
||||||
# if: ${{ inputs.iconlink != 'false' }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: |
|
|
||||||
# #mv ./rustdesk/data/flutter_assets/assets/icon.svg ./rustdesk/data/flutter_assets/assets/icon.svg.bak
|
|
||||||
# convert ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.svg
|
|
||||||
# convert ./res/icon.png ./rustdesk/data/flutter_assets/assets/scalable.svg
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -467,7 +455,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
|
||||||
|
|
||||||
@@ -529,14 +517,13 @@ jobs:
|
|||||||
mkdir -p flutter/tmpdeb/usr/lib/rustdesk
|
mkdir -p flutter/tmpdeb/usr/lib/rustdesk
|
||||||
cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt
|
cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt
|
||||||
if [[ "${{ inputs.logolink }}" != "false" ]]; then
|
if [[ "${{ inputs.logolink }}" != "false" ]]; then
|
||||||
#echo "${{ inputs.logobase64 }}" | base64 -d > ./flutter/assets/logo.png
|
|
||||||
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
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart run flutter_launcher_icons
|
dart run flutter_launcher_icons
|
||||||
@@ -575,25 +562,32 @@ jobs:
|
|||||||
mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm"
|
mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm"
|
||||||
done
|
done
|
||||||
|
|
||||||
# - name: Publish debian/rpm package
|
# only x86_64 for arch since we can not find newest arm64 docker image to build
|
||||||
# if: env.UPLOAD_ARTIFACT == 'true'
|
# old arch image does not make sense for arch since it is "arch" which always update to date
|
||||||
# uses: softprops/action-gh-release@v1
|
# and failed to makepkg arm64 on x86_64
|
||||||
# with:
|
- name: Patch archlinux PKGBUILD
|
||||||
# prerelease: true
|
continue-on-error: true
|
||||||
# tag_name: ${{ env.TAG_NAME }}
|
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
|
||||||
# files: |
|
run: |
|
||||||
# rustdesk-*.deb
|
sed -i "s/x86_64/${{ matrix.job.arch }}/g" res/PKGBUILD
|
||||||
# rustdesk-*.rpm
|
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
|
||||||
|
sed -i "s/x86_64/aarch64/g" ./res/PKGBUILD
|
||||||
|
fi
|
||||||
|
|
||||||
# - name: Upload to FTP
|
- name: Build archlinux package
|
||||||
# if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
continue-on-error: true
|
||||||
# uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
|
||||||
# with:
|
uses: rustdesk-org/arch-makepkg-action@master
|
||||||
# server: ${{ secrets.GEN_FTP_SERVER }}
|
with:
|
||||||
# username: ${{ secrets.GEN_FTP_USER }}
|
packages:
|
||||||
# password: ${{ secrets.GEN_FTP_PASSWORD }}
|
scripts: |
|
||||||
# local-dir: output/
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
||||||
# server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/
|
|
||||||
|
- name: Rename archlinux package
|
||||||
|
continue-on-error: true
|
||||||
|
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true' && env.VERSION != 'master'
|
||||||
|
run: |
|
||||||
|
cp ./res/rustdesk-${{ env.VERSION }}-0-x86_64.pkg.tar.zst ./output/${{ inputs.filename }}.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' }}
|
||||||
@@ -602,6 +596,7 @@ jobs:
|
|||||||
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 }}.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 }}.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.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 || 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' }}
|
||||||
@@ -610,13 +605,7 @@ jobs:
|
|||||||
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 }}.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 }}.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.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 || true
|
||||||
- name: Upload deb
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
with:
|
|
||||||
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
|
|
||||||
path: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
|
|||||||
98
.github/workflows/generator-macos.yml
vendored
98
.github/workflows/generator-macos.yml
vendored
@@ -75,12 +75,6 @@ env:
|
|||||||
#signing keys env variable checks
|
#signing keys env variable checks
|
||||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||||
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
|
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'
|
UPLOAD_ARTIFACT: 'true'
|
||||||
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
||||||
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
||||||
@@ -172,23 +166,25 @@ jobs:
|
|||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
# MACSTUFF Backup the original files
|
||||||
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
|
cp ./flutter/macos/Runner/Info.plist ./flutter/macos/Runner/Info.plist.bak
|
||||||
|
|
||||||
# MACSTUFF Update window title and bundle settings
|
|
||||||
cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak
|
cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak
|
||||||
|
|
||||||
|
# MACSTUFF Update Info.plist
|
||||||
|
sed -i '' -e 's|<key>CFBundleName</key>.*<string>.*</string>|<key>CFBundleName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
|
sed -i '' -e 's|<key>CFBundleDisplayName</key>.*<string>.*</string>|<key>CFBundleDisplayName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
|
sed -i '' -e 's|<key>CFBundleIdentifier</key>.*<string>.*</string>|<key>CFBundleIdentifier</key>\n\t<string>com.${{ inputs.appname }}.app</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
|
# sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ inputs.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
||||||
|
|
||||||
|
# MACSTUFF Update AppInfo.xcconfig
|
||||||
sed -i '' -e 's|PRODUCT_NAME = .*|PRODUCT_NAME = ${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
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
|
sed -i '' -e 's|PRODUCT_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
||||||
sed -i '' -e 's|PRODUCT_COPYRIGHT = .*|PRODUCT_COPYRIGHT = ${{ inputs.appname }} All rights reserved.|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
sed -i '' -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
||||||
# Keep DEVELOPMENT_TEAM if it exists, don't blank it out
|
# Keep DEVELOPMENT_TEAM if it exists, don't blank it out
|
||||||
|
|
||||||
|
sed -i -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./Cargo.toml
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./libs/portable/Cargo.toml
|
||||||
|
|
||||||
# Update Xcode project settings
|
# 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_NAME = "RustDesk"/PRODUCT_NAME = "${{ inputs.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
|
||||||
@@ -206,7 +202,7 @@ jobs:
|
|||||||
|
|
||||||
cp ./src/lang/en.rs ./src/lang/en.rs.bak
|
cp ./src/lang/en.rs ./src/lang/en.rs.bak
|
||||||
cp ./src/lang/nl.rs ./src/lang/nl.rs.bak
|
cp ./src/lang/nl.rs ./src/lang/nl.rs.bak
|
||||||
sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs
|
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|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py
|
||||||
@@ -216,9 +212,38 @@ jobs:
|
|||||||
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|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
|
||||||
|
|
||||||
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs
|
- name: change download link to custom
|
||||||
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
||||||
|
|
||||||
|
# Update slogan
|
||||||
|
#sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ inputs.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
||||||
|
|
||||||
|
# Update slogan - About in en.rs
|
||||||
|
sed -i '' -e 's/("Slogan_tip", "Made with heart in this chaotic world!")/("Slogan_tip", "Powered by ${{ inputs.appname }}")/' ./src/lang/en.rs
|
||||||
|
sed -i '' -e 's/("About RustDesk", "")/("About RustDesk", "About ${{ inputs.appname }}")/' ./src/lang/en.rs
|
||||||
|
|
||||||
|
|
||||||
|
# Update slogan - About in nl.rs
|
||||||
|
sed -i '' -e 's/("Slogan_tip", "Ontwikkeld met het hart voor deze chaotische wereld!")/("Slogan_tip", "Powered by ${{ inputs.appname }}")/' ./src/lang/nl.rs
|
||||||
|
sed -i '' -e 's/("Your Desktop", "Uw Bureaublad")/("Your Desktop", "Uw ${{ inputs.appname }}")/' ./src/lang/nl.rs
|
||||||
|
sed -i '' -e 's/("About RustDesk", "Over RustDesk")/("About RustDesk", "Over ${{ inputs.appname }}")/' ./src/lang/nl.rs
|
||||||
|
sed -i '' -e 's/("About", "Over")/("About", "Over ${{ inputs.appname }}")/' ./src/lang/nl.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|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
|
||||||
|
|
||||||
|
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
|
||||||
|
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
|
||||||
@@ -443,19 +468,11 @@ 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
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -697,15 +714,7 @@ jobs:
|
|||||||
"${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" \
|
"${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" \
|
||||||
"${{ inputs.appname }}.app"
|
"${{ inputs.appname }}.app"
|
||||||
mv "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" $GITHUB_WORKSPACE/
|
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
|
- name: Rename rustdesk
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
run: |
|
run: |
|
||||||
@@ -772,12 +781,3 @@ jobs:
|
|||||||
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"}'
|
||||||
|
|
||||||
#- 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
|
|
||||||
|
|||||||
159
.github/workflows/generator-windows.yml
vendored
159
.github/workflows/generator-windows.yml
vendored
@@ -64,24 +64,17 @@ env:
|
|||||||
LLVM_VERSION: "15.0.6"
|
LLVM_VERSION: "15.0.6"
|
||||||
FLUTTER_VERSION: "3.24.5"
|
FLUTTER_VERSION: "3.24.5"
|
||||||
ANDROID_FLUTTER_VERSION: "3.24.5"
|
ANDROID_FLUTTER_VERSION: "3.24.5"
|
||||||
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
|
|
||||||
# for arm64 linux because official Dart SDK does not work
|
# for arm64 linux because official Dart SDK does not work
|
||||||
FLUTTER_ELINUX_VERSION: "3.16.9"
|
FLUTTER_ELINUX_VERSION: "3.16.9"
|
||||||
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: "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
|
||||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||||
MACOS_P12_BASE64: "${{ secrets.MACOS_P12_BASE64 }}"
|
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'
|
UPLOAD_ARTIFACT: 'true'
|
||||||
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
||||||
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
||||||
@@ -173,6 +166,12 @@ jobs:
|
|||||||
choco install -y imagemagick.app --no-progress
|
choco install -y imagemagick.app --no-progress
|
||||||
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||||
|
|
||||||
|
- name: fix flutter_gpu_texture_renderer (fixed in master rustdesk)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|2ded7f146437a761ffe6981e2f742038f85ca68d|08a471bb8ceccdd50483c81cdfa8b81b07b14b87|' ./flutter/pubspec.lock
|
||||||
|
sed -i -e 's|2ded7f146437a761ffe6981e2f742038f85ca68d|08a471bb8ceccdd50483c81cdfa8b81b07b14b87|' ./flutter/pubspec.yaml
|
||||||
|
|
||||||
- name: change appname to custom
|
- name: change appname to custom
|
||||||
if: inputs.appname != 'rustdesk'
|
if: inputs.appname != 'rustdesk'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -191,11 +190,25 @@ jobs:
|
|||||||
# ./flutter/windows/runner/Runner.rc
|
# ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|"RustDesk Remote Desktop"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"RustDesk Remote Desktop"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|VALUE "InternalName", "${{ inputs.appname }}" "\0"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|VALUE "InternalName", "${{ inputs.appname }}" "\0"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|"Copyright © 2025 Purslane Ltd. All rights reserved."|"Copyright © 2025"|' ./flutter/windows/runner/Runner.rc
|
|
||||||
sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc
|
||||||
sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
|
||||||
# ./src/lang/en.rs
|
# ./src/lang/en.rs
|
||||||
sed -i -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/en.rs
|
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \;
|
||||||
|
|
||||||
|
|
||||||
|
- name: change company name
|
||||||
|
if: fromJson(inputs.extras).compname != 'Purslane Ltd'
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||||
|
sed -i -e 's|Purslane Ltd.|${{ fromJson(inputs.extras).compname }}|' ./res/setup.nsi
|
||||||
|
sed -i -e 's|PURSLANE|${{ fromJson(inputs.extras).compname }}|' ./res/msi/preprocess.py
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./res/msi/preprocess.py
|
||||||
|
sed -i -e 's|"Copyright © 2025 Purslane Ltd. All rights reserved."|"Copyright © 2025 ${{ fromJson(inputs.extras).compname }}. All rights reserved."|' ./flutter/windows/runner/Runner.rc
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./flutter/windows/runner/Runner.rc
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./Cargo.toml
|
||||||
|
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./libs/portable/Cargo.toml
|
||||||
|
|
||||||
- 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'
|
||||||
@@ -209,15 +222,34 @@ jobs:
|
|||||||
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|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
|
||||||
|
sed -i -e "s|https://rustdesk.com/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi
|
||||||
|
|
||||||
- name: allow custom.txt
|
- name: change download link to custom
|
||||||
|
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
||||||
|
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
||||||
|
|
||||||
|
- 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
|
# ./flutter/pubspec.yaml
|
||||||
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
#sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
||||||
|
|
||||||
|
- name: allow custom.txt
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff -OutFile allowCustom.diff
|
||||||
|
git apply allowCustom.diff
|
||||||
|
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff -OutFile removeSetupServerTip.diff
|
||||||
|
git apply removeSetupServerTip.diff
|
||||||
|
|
||||||
|
|
||||||
- name: Install LLVM and Clang
|
- name: Install LLVM and Clang
|
||||||
@@ -241,7 +273,6 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/flutter/flutter/issues/155685
|
# https://github.com/flutter/flutter/issues/155685
|
||||||
- name: Replace engine with rustdesk custom flutter engine
|
- name: Replace engine with rustdesk custom flutter engine
|
||||||
if: false
|
|
||||||
run: |
|
run: |
|
||||||
flutter doctor -v
|
flutter doctor -v
|
||||||
flutter precache --windows
|
flutter precache --windows
|
||||||
@@ -319,7 +350,6 @@ jobs:
|
|||||||
mv ./res/icon.ico ./res/icon.ico.bak
|
mv ./res/icon.ico ./res/icon.ico.bak
|
||||||
mv ./res/icon.png ./res/icon.png.bak
|
mv ./res/icon.png ./res/icon.png.bak
|
||||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||||
#echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png
|
|
||||||
|
|
||||||
- name: magick stuff
|
- name: magick stuff
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ inputs.iconlink != 'false' }}
|
||||||
@@ -376,19 +406,12 @@ jobs:
|
|||||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff
|
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff
|
||||||
git apply hidecm.diff
|
git apply hidecm.diff
|
||||||
|
|
||||||
- name: statussort
|
|
||||||
continue-on-error: true
|
|
||||||
if: fromJson(inputs.extras).statussort == 'true'
|
|
||||||
run: |
|
|
||||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff -OutFile 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'
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeNewVersionNotif.diff -Outfile removeNewVersionNotif.diff
|
sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
git apply removeNewVersionNotif.diff
|
|
||||||
|
|
||||||
|
|
||||||
- name: run as admin
|
- name: run as admin
|
||||||
@@ -412,7 +435,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
cd ./flutter
|
cd ./flutter
|
||||||
flutter pub upgrade win32
|
#flutter pub upgrade win32
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter pub run flutter_launcher_icons
|
flutter pub run flutter_launcher_icons
|
||||||
cd ..
|
cd ..
|
||||||
@@ -472,20 +495,6 @@ jobs:
|
|||||||
name: topmostwindow-artifacts
|
name: topmostwindow-artifacts
|
||||||
path: "./rustdesk"
|
path: "./rustdesk"
|
||||||
|
|
||||||
- name: Upload unsigned
|
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: rustdesk-unsigned-windows-${{ matrix.job.arch }}
|
|
||||||
path: rustdesk
|
|
||||||
|
|
||||||
# - name: Sign rustdesk files
|
|
||||||
# if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != ''
|
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# pip3 install requests argparse
|
|
||||||
# BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./rustdesk/
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -504,22 +513,29 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
|
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
|
||||||
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
|
||||||
-m 900 \
|
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
||||||
"${{ secrets.SIGN_URL }}/sign/" -o ./rustdesk/signed_files.zip
|
-m 900 \
|
||||||
|
"${{ secrets.SIGN_BASE_URL }}/sign/" -o ./rustdesk/signed_files.zip
|
||||||
|
else
|
||||||
|
echo "Signing skipped - signing URL or API key not configured"
|
||||||
|
cp ./rustdesk/unsigned_files.zip ./rustdesk/signed_files.zip
|
||||||
|
fi
|
||||||
|
|
||||||
- name: unzip dlls
|
- name: unzip dlls
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdek/ -Force
|
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdesk/ -Force
|
||||||
|
Remove-Item ./rustdesk/unsigned_files.zip
|
||||||
|
Remove-Item ./rustdesk/signed_files.zip
|
||||||
|
|
||||||
|
|
||||||
- name: Create custom.txt file
|
- name: Create custom.txt file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo -n "${{ env.CUSTOM }}" | cat > ./rustdesk/custom.txt
|
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt
|
||||||
|
|
||||||
|
|
||||||
- name: Build self-extracted executable
|
- name: Build self-extracted executable
|
||||||
@@ -552,12 +568,6 @@ jobs:
|
|||||||
mv ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk.msi
|
mv ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk.msi
|
||||||
sha256sum ../../SignOutput/rustdesk.msi
|
sha256sum ../../SignOutput/rustdesk.msi
|
||||||
|
|
||||||
# - name: Sign rustdesk self-extracted file
|
|
||||||
# if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != ''
|
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./SignOutput
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -576,37 +586,23 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
|
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
|
||||||
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
|
||||||
-m 900 \
|
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
|
||||||
"${{ secrets.SIGN_URL }}/sign/" -o ./SignOutput/signed_files.zip
|
-m 900 \
|
||||||
|
"${{ secrets.SIGN_BASE_URL }}/sign/" -o ./SignOutput/signed_files.zip
|
||||||
|
else
|
||||||
|
echo "Signing skipped - signing URL or API key not configured"
|
||||||
|
cp ./SignOutput/unsigned_files.zip ./SignOutput/signed_files.zip
|
||||||
|
fi
|
||||||
|
|
||||||
- name: unzip exe and msi
|
- name: unzip exe and msi
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Expand-Archive -Path ./SignOutput/signed_files.zip -DestinationPath ./SignOutput/ -Force
|
Expand-Archive -Path ./SignOutput/signed_files.zip -DestinationPath ./SignOutput/ -Force
|
||||||
|
Remove-Item ./SignOutput/unsigned_files.zip
|
||||||
# - name: Sign rustdesk self-extracted file
|
Remove-Item ./SignOutput/signed_files.zip
|
||||||
# uses: GermanBluefox/code-sign-action@v7
|
|
||||||
# if: env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
# with:
|
|
||||||
# certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
|
||||||
# password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
|
||||||
# certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}'
|
|
||||||
# # certificatename: '${{ secrets.WINDOWS_PFX_NAME }}'
|
|
||||||
# folder: './SignOutput'
|
|
||||||
# recursive: false
|
|
||||||
|
|
||||||
# - name: Publish Release
|
|
||||||
# uses: softprops/action-gh-release@v1
|
|
||||||
# if: env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
# with:
|
|
||||||
# prerelease: true
|
|
||||||
# tag_name: ${{ env.TAG_NAME }}
|
|
||||||
# files: |
|
|
||||||
# ./SignOutput/rustdesk-*.msi
|
|
||||||
# ./SignOutput/rustdesk-*.exe
|
|
||||||
|
|
||||||
- name: rename rustdesk.exe to filename.exe
|
- name: rename rustdesk.exe to filename.exe
|
||||||
run: |
|
run: |
|
||||||
@@ -617,15 +613,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mv ./SignOutput/rustdesk.msi "./SignOutput/${{ inputs.filename }}.msi" || echo "rustdesk"
|
mv ./SignOutput/rustdesk.msi "./SignOutput/${{ inputs.filename }}.msi" || echo "rustdesk"
|
||||||
|
|
||||||
# - name: Upload to FTP
|
|
||||||
# if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
|
||||||
# uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
||||||
# with:
|
|
||||||
# server: ${{ secrets.GEN_FTP_SERVER }}
|
|
||||||
# username: ${{ secrets.GEN_FTP_USER }}
|
|
||||||
# password: ${{ secrets.GEN_FTP_PASSWORD }}
|
|
||||||
# local-dir: ./SignOutput/
|
|
||||||
# server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/
|
|
||||||
- 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
|
||||||
|
|||||||
110
.github/workflows/pre137-bridge.yml
vendored
110
.github/workflows/pre137-bridge.yml
vendored
@@ -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
|
|
||||||
631
.github/workflows/pre137-generator-android.yml
vendored
631
.github/workflows/pre137-generator-android.yml
vendored
File diff suppressed because one or more lines are too long
643
.github/workflows/pre137-generator-linux.yml
vendored
643
.github/workflows/pre137-generator-linux.yml
vendored
File diff suppressed because one or more lines are too long
798
.github/workflows/pre137-generator-macos.yml
vendored
798
.github/workflows/pre137-generator-macos.yml
vendored
@@ -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
|
|
||||||
665
.github/workflows/pre137-generator-windows.yml
vendored
665
.github/workflows/pre137-generator-windows.yml
vendored
File diff suppressed because one or more lines are too long
@@ -1,9 +1,11 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
|
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'),('linux','Linux (currently unavailable)'),('android','Android'),('macos','macOS')], initial='windows')
|
||||||
version = forms.ChoiceField(choices=[('master','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.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.3.8')
|
||||||
|
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
|
||||||
@@ -28,10 +30,14 @@ class GenerateForm(forms.Form):
|
|||||||
apiServer = forms.CharField(label="API Server", required=False)
|
apiServer = forms.CharField(label="API Server", required=False)
|
||||||
key = forms.CharField(label="Key", required=False)
|
key = forms.CharField(label="Key", required=False)
|
||||||
urlLink = forms.CharField(label="Custom URL for links", required=False)
|
urlLink = forms.CharField(label="Custom URL for links", required=False)
|
||||||
|
downloadLink = forms.CharField(label="Custom URL for downloading new versions", required=False)
|
||||||
|
compname = forms.CharField(label="Company name",required=False)
|
||||||
|
|
||||||
#Visual
|
#Visual
|
||||||
iconfile = forms.FileField(label="Custom App Icon (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
iconfile = forms.FileField(label="Custom App Icon (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
||||||
logofile = forms.FileField(label="Custom App Logo (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
logofile = forms.FileField(label="Custom App Logo (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
||||||
|
iconbase64 = forms.CharField(required=False)
|
||||||
|
logobase64 = forms.CharField(required=False)
|
||||||
theme = forms.ChoiceField(choices=[
|
theme = forms.ChoiceField(choices=[
|
||||||
('light', 'Light'),
|
('light', 'Light'),
|
||||||
('dark', 'Dark'),
|
('dark', 'Dark'),
|
||||||
@@ -71,5 +77,29 @@ class GenerateForm(forms.Form):
|
|||||||
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)
|
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):
|
||||||
|
print("checking icon")
|
||||||
|
image = self.cleaned_data['iconfile']
|
||||||
|
if image:
|
||||||
|
try:
|
||||||
|
# Open the image using Pillow
|
||||||
|
img = Image.open(image)
|
||||||
|
|
||||||
|
# Check if the image is a PNG (optional, but good practice)
|
||||||
|
if img.format != 'PNG':
|
||||||
|
raise forms.ValidationError("Only PNG images are allowed.")
|
||||||
|
|
||||||
|
# Get image dimensions
|
||||||
|
width, height = img.size
|
||||||
|
|
||||||
|
# Check for square dimensions
|
||||||
|
if width != height:
|
||||||
|
raise forms.ValidationError("Custom App Icon dimensions must be square.")
|
||||||
|
|
||||||
|
return image
|
||||||
|
except OSError: # Handle cases where the uploaded file is not a valid image
|
||||||
|
raise forms.ValidationError("Invalid icon file.")
|
||||||
|
except Exception as e: # Catch any other image processing errors
|
||||||
|
raise forms.ValidationError(f"Error processing icon: {e}")
|
||||||
|
|||||||
@@ -133,6 +133,7 @@
|
|||||||
<a href='/download?filename={{filename}}.deb&uuid={{uuid}}' class="download-link">Download {{filename}}.deb</a>
|
<a href='/download?filename={{filename}}.deb&uuid={{uuid}}' class="download-link">Download {{filename}}.deb</a>
|
||||||
<a href='/download?filename={{filename}}.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}.rpm</a>
|
<a href='/download?filename={{filename}}.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}.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.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-suse.rpm</a>
|
||||||
|
<a href='/download?filename={{filename}}.pkg.tar.zst&uuid={{uuid}}' class="download-link">Download {{filename}}.pkg.tar.zst</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>
|
||||||
|
|||||||
@@ -106,11 +106,72 @@
|
|||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
.save-load-section-container { /* New container for fixed positioning */
|
||||||
|
position: fixed;
|
||||||
|
top: 20px; /* Adjust as needed */
|
||||||
|
left: 20px; /* Adjust as needed */
|
||||||
|
background-color: #111; /* Match your section background */
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 100; /* Ensure it's above other content */
|
||||||
|
}
|
||||||
|
.save-load-section {
|
||||||
|
display: none; /* Initially hidden */
|
||||||
|
}
|
||||||
|
.error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.errorlist {
|
||||||
|
color: red;
|
||||||
|
display: flex; /* Enable flexbox for centering */
|
||||||
|
justify-content: center; /* Center horizontally */
|
||||||
|
align-items: center; /* Center vertically (if needed) */
|
||||||
|
list-style: none; /* Remove bullet points if it's a list */
|
||||||
|
padding: 0; /* Remove default padding */
|
||||||
|
margin: 10px auto; /* Center the list itself, add some top/bottom margin */
|
||||||
|
width: fit-content; /* Make the width fit the content */
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorlist li {
|
||||||
|
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;
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><i class="fas fa-cogs"></i> RustDesk Custom Client Builder</h1>
|
<h1><i class="fas fa-cogs"></i> RustDesk Custom Client Builder</h1>
|
||||||
<form action="/generator" method="post" enctype="multipart/form-data">
|
<form id="myForm" action="/generator" method="post" enctype="multipart/form-data">
|
||||||
|
<div class="save-load-section-container">
|
||||||
|
<div class="section">
|
||||||
|
<h2 id="saveLoadTitle">Save/Load Configuration <i class="fas fa-chevron-down"></i></h2>
|
||||||
|
<div class="save-load-section">
|
||||||
|
<button type="button" onclick="saveFormData()">Save Configuration</button>
|
||||||
|
<input type="file" id="fileInput" style="display:none;" accept=".json">
|
||||||
|
<button type="button" onclick="loadFormData()">Load Configuration</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if form.iconfile.errors %}
|
||||||
|
<ul class="errorlist">
|
||||||
|
{% for error in form.iconfile.errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
<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">
|
||||||
@@ -127,6 +188,10 @@
|
|||||||
</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>
|
||||||
@@ -134,7 +199,7 @@
|
|||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><i class="fas fa-sliders-h"></i> General</h2>
|
<h2><i class="fas fa-sliders-h"></i> General</h2>
|
||||||
<label for="{{ form.exename.id_for_label }}">Name of the configuration (no spaces or special characters, English characters only):</label>
|
<label for="{{ form.exename.id_for_label }}">Name of the configuration (no spaces or special characters, English characters only):</label>
|
||||||
{{ form.exename }}<br><br>
|
{{ form.exename }}<span id="filenameError" class="error"></span><br><br>
|
||||||
<label for="{{ form.appname.id_for_label }}">Custom Application Name (leave blank to use default):</label>
|
<label for="{{ form.appname.id_for_label }}">Custom Application Name (leave blank to use default):</label>
|
||||||
{{ form.appname }}<br><br>
|
{{ form.appname }}<br><br>
|
||||||
<label for="{{ form.direction.id_for_label }}">Connection Type:</label>
|
<label for="{{ form.direction.id_for_label }}">Connection Type:</label>
|
||||||
@@ -155,6 +220,10 @@
|
|||||||
{{ form.apiServer }}<br><br>
|
{{ form.apiServer }}<br><br>
|
||||||
<label for="{{ form.urlLink.id_for_label }}">Custom URL for links (replaces https://rustdesk.com):</label>
|
<label for="{{ form.urlLink.id_for_label }}">Custom URL for links (replaces https://rustdesk.com):</label>
|
||||||
{{ form.urlLink }}<br><br>
|
{{ form.urlLink }}<br><br>
|
||||||
|
<label for="{{ form.downloadLink.id_for_label }}">Custom URL for downloading updates (replaces https://rustdesk.com/download):</label>
|
||||||
|
{{ form.downloadLink }}<br><br>
|
||||||
|
<label for="{{ form.compname.id_for_label }}">Company name for copyright (replaces Purslane Ltd):</label>
|
||||||
|
{{ form.compname }}<br><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -177,6 +246,8 @@
|
|||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><i class="fas fa-paint-brush"></i> Visual</h2>
|
<h2><i class="fas fa-paint-brush"></i> Visual</h2>
|
||||||
|
{{ form.iconbase64.as_hidden }}
|
||||||
|
{{ form.logobase64.as_hidden }}
|
||||||
<label for="{{ form.iconfile.id_for_label }}">Custom App Icon (in .png format)</label>
|
<label for="{{ form.iconfile.id_for_label }}">Custom App Icon (in .png format)</label>
|
||||||
{{ form.iconfile }}<br><br>
|
{{ form.iconfile }}<br><br>
|
||||||
<!-- <input type="file" name="iconfile" id="iconfile" accept="image/png"> -->
|
<!-- <input type="file" name="iconfile" id="iconfile" accept="image/png"> -->
|
||||||
@@ -211,7 +282,6 @@
|
|||||||
<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.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>
|
||||||
|
|
||||||
@@ -260,6 +330,151 @@
|
|||||||
reader.readAsDataURL(input.files[0]);
|
reader.readAsDataURL(input.files[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const saveLoadTitle = document.getElementById("saveLoadTitle");
|
||||||
|
const saveLoadSection = document.querySelector(".save-load-section");
|
||||||
|
|
||||||
|
saveLoadTitle.addEventListener("click", () => {
|
||||||
|
if (!saveLoadSection.style.display || saveLoadSection.style.display === "none") {
|
||||||
|
saveLoadSection.style.display = "block";
|
||||||
|
} else {
|
||||||
|
saveLoadSection.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
const icon = saveLoadTitle.querySelector("i");
|
||||||
|
icon.classList.toggle("fa-chevron-down");
|
||||||
|
icon.classList.toggle("fa-chevron-up");
|
||||||
|
});
|
||||||
|
|
||||||
|
async function saveFormData() {
|
||||||
|
const filename = document.getElementById("{{ form.exename.id_for_label }}").value;
|
||||||
|
if (!filename) {
|
||||||
|
document.getElementById("filenameError").textContent = "Filename is required.";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
document.getElementById("filenameError").textContent = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = {};
|
||||||
|
const form = document.getElementById("myForm"); // Get the form element
|
||||||
|
|
||||||
|
// 1. Use FormData for robust data collection (handles most input types):
|
||||||
|
const formDataObj = new FormData(form); // Create a FormData object
|
||||||
|
|
||||||
|
formDataObj.forEach((value, key) => {
|
||||||
|
formData[key] = value; // Add each key/value pair to the formData object.
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. Handle select elements separately (more reliable):
|
||||||
|
const selectElements = form.querySelectorAll('select');
|
||||||
|
selectElements.forEach(select => {
|
||||||
|
formData[select.name] = select.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. Handle checkboxes and radio buttons (important!):
|
||||||
|
const checkboxRadioElements = form.querySelectorAll('input[type="checkbox"], input[type="radio"]');
|
||||||
|
checkboxRadioElements.forEach(input => {
|
||||||
|
if (input.name) { //only add to form data if it has a name
|
||||||
|
if (input.checked) {
|
||||||
|
formData[input.name] = input.value;
|
||||||
|
} else if (!formData.hasOwnProperty(input.name) && input.type === 'checkbox') { //if it's a checkbox and it's not checked, add it as false
|
||||||
|
formData[input.name] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 4. Handle icon and logo
|
||||||
|
const iconPreview = document.getElementById('icon-preview');
|
||||||
|
if (iconPreview.firstChild && iconPreview.firstChild.src.startsWith('data:image/png;base64')) {
|
||||||
|
formData.iconfile = iconPreview.firstChild.src; // Use existing base64
|
||||||
|
} else { //if it's a file upload
|
||||||
|
const iconFile = document.getElementById("{{ form.iconfile.id_for_label }}").files[0];
|
||||||
|
if (iconFile) {
|
||||||
|
formData.iconfile = await readFileAsBase64(iconFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const logoPreview = document.getElementById('logo-preview');
|
||||||
|
if (logoPreview.firstChild && logoPreview.firstChild.src.startsWith('data:image/png;base64')) {
|
||||||
|
formData.logofile = logoPreview.firstChild.src; // Use existing base64
|
||||||
|
} else { //if it's a file upload
|
||||||
|
const logoFile = document.getElementById("{{ form.logofile.id_for_label }}").files[0];
|
||||||
|
if (logoFile) {
|
||||||
|
formData.logofile = await readFileAsBase64(logoFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const jsonData = JSON.stringify(formData, null, 2);
|
||||||
|
const blob = new Blob([jsonData], { type: "application/json" });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = filename + ".json";
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function readFileAsBase64(file) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = (event) => resolve(event.target.result);
|
||||||
|
reader.onerror = (error) => reject(error);
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function loadFormData() {
|
||||||
|
const fileInput = document.getElementById("fileInput");
|
||||||
|
fileInput.click();
|
||||||
|
|
||||||
|
fileInput.addEventListener("change", (event) => {
|
||||||
|
const file = event.target.files[0];
|
||||||
|
if (file) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = (e) => {
|
||||||
|
try {
|
||||||
|
const formData = JSON.parse(e.target.result);
|
||||||
|
for (const key in formData) {
|
||||||
|
// More robust selector: checks for name OR id
|
||||||
|
const elements = document.querySelectorAll(`[name="${key}"], [id="${key}"]`);
|
||||||
|
|
||||||
|
if (elements.length > 0) { // Check if any element(s) exist
|
||||||
|
elements.forEach(element => { // Loop through all matching elements (important for radios)
|
||||||
|
if (element.type === 'radio') {
|
||||||
|
if (element.value === String(formData[key])) { // Compare value, crucial for radios
|
||||||
|
element.checked = true;
|
||||||
|
} else {
|
||||||
|
element.checked = false; // Uncheck others in the group
|
||||||
|
}
|
||||||
|
} else if (element.type === 'checkbox') {
|
||||||
|
element.checked = formData[key];
|
||||||
|
} else if (element.type !== 'file') {
|
||||||
|
element.value = formData[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle image previews (as before)
|
||||||
|
if (key === 'iconfile' && formData[key]) {
|
||||||
|
document.getElementById('id_iconbase64').value = formData[key];
|
||||||
|
document.getElementById('icon-preview').innerHTML = `<img src="${formData[key]}" style="max-width: 300px; max-height: 60px;">`;
|
||||||
|
}
|
||||||
|
if (key === 'logofile' && formData[key]) {
|
||||||
|
document.getElementById('id_logobase64').value = formData[key];
|
||||||
|
document.getElementById('logo-preview').innerHTML = `<img src="${formData[key]}" style="max-width: 300px; max-height: 60px;">`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
alert("Error loading data. Invalid JSON file.");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
reader.readAsText(file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
49
setup.md
49
setup.md
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user