1
0
forked from shaytan/rdgen

30 Commits

Author SHA1 Message Date
Bryan Gerlach
995f78b6a1 force icon dimensions to be square 2025-02-14 07:13:57 -06:00
Bryan Gerlach
7951080c6c force filename to have no spaces, and be all ascii characters 2025-02-14 00:13:53 -06:00
Bryan Gerlach
6792760e57 added company name 2025-02-13 08:05:07 -06:00
Bryan Gerlach
da33c6f5fd added company name 2025-02-13 08:03:23 -06:00
Bryan Gerlach
6c2e2f39e9 change copyright name to appname, fix bug in import configuration settings 2025-02-12 13:32:12 -06:00
Bryan Gerlach
f420425ecb fix archlinux 2025-02-11 13:54:27 -06:00
Bryan Gerlach
4a5dce088a fix archlinux 2025-02-11 12:47:55 -06:00
Bryan Gerlach
51cb240b13 fix archlinux 2025-02-11 11:48:25 -06:00
Bryan Gerlach
a9bf03b34b fix archlinux 2025-02-11 10:47:39 -06:00
Bryan Gerlach
286320cd81 add archlinux, change RustDesk in all language files 2025-02-10 23:12:29 -06:00
Bryan Gerlach
0f1b1d1d55 refactored 2025-02-10 17:24:36 -06:00
Bryan Gerlach
ee673c2667 Merge branch 'master' of https://github.com/bryangerlach/rdgen into dev 2025-02-08 09:41:29 -06:00
Bryan Gerlach
2c970680ef remove upload artifact 2025-02-08 09:38:57 -06:00
Bryan
c973d5363f Merge pull request #29 from bryangerlach/dev
Dev
2025-02-06 07:05:51 -06:00
Bryan Gerlach
433b02dbfd fix typo 2025-02-06 07:02:01 -06:00
Bryan Gerlach
3699490b88 Merge branch 'master' of https://github.com/bryangerlach/rdgen into dev 2025-02-06 07:00:59 -06:00
Bryan
743781d662 Merge pull request #26 from VenimK/patch-9
Update generator-macos.yml
2025-02-06 06:59:03 -06:00
Bryan
7e81a75b0d Merge pull request #27 from VenimK/patch-10
Update generator-windows.yml
2025-02-06 06:58:50 -06:00
Bryan
dc965aa566 Merge pull request #28 from VenimK/patch-11
Update pre137-generator-windows.yml
2025-02-06 06:58:32 -06:00
VenimK
3c2959fd95 Update pre137-generator-windows.yml 2025-02-06 05:31:24 +01:00
VenimK
2020c85cce Update generator-windows.yml
Check if signed .. no error on build
2025-02-06 05:29:02 +01:00
VenimK
f1ab7ea43c Update generator-macos.yml
ADDED For SAVE AND LOAD CONF

Needs little work on cleaning it up
2025-02-05 16:52:50 +01:00
Bryan Gerlach
423100c9ea Merge branch 'master' of https://github.com/bryangerlach/rdgen into dev 2025-02-05 00:40:49 -06:00
Bryan
8e11af77b8 Merge pull request #24 from VenimK/patch-8
Rename remove_new_version_notification.patch to removeNewVersionNotif…
2025-02-05 00:39:36 -06:00
Bryan
8ce7e6ac50 Add save/load configurations (#25) 2025-02-05 00:39:04 -06:00
Bryan Gerlach
87f587699c add save/load configuration 2025-02-05 00:32:59 -06:00
Bryan Gerlach
f294a1feda add save/load configuration 2025-02-04 23:59:33 -06:00
Bryan Gerlach
7c370dbcdf add save/load configuration 2025-02-04 23:44:34 -06:00
Bryan Gerlach
646ad8d4a1 add save/load configuration 2025-02-04 23:18:14 -06:00
VenimK
d78c1f7961 Rename remove_new_version_notification.patch to removeNewVersionNotif.diff 2025-02-05 05:21:18 +01:00
15 changed files with 446 additions and 2003 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -75,15 +75,8 @@ env:
#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 }}"
ICONBASE64: "$${{ inputs.iconbase64 }}"
STATUS_URL: "${{ secrets.GENURL }}/updategh"
jobs:
@@ -297,7 +290,6 @@ jobs:
mv ./res/icon.ico ./res/icon.ico.bak
mv ./res/icon.png ./res/icon.png.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 }}
mv ./res/32x32.png ./res/32x32.png.bak
mv ./res/64x64.png ./res/64x64.png.bak
@@ -338,7 +330,7 @@ jobs:
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"|"${{ 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|title: 'RustDesk'|title: '${{ inputs.appname }}'|" ./flutter/lib/main.dart
sed -i -e "s|return 'RustDesk';|return '${{ inputs.appname }}';|" ./flutter/lib/web/bridge.dart
@@ -365,6 +357,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|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
continue-on-error: true
shell: bash
@@ -490,7 +491,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -507,7 +508,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -524,7 +525,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -541,7 +542,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -594,17 +595,6 @@ jobs:
shell: bash
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
# 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
uses: fjogeleit/http-request-action@v1

View File

@@ -75,15 +75,8 @@ env:
#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 }}"
ICONBASE64: "$${{ inputs.iconbase64 }}"
STATUS_URL: "${{ secrets.GENURL }}/updategh"
jobs:
@@ -252,7 +245,6 @@ jobs:
mv ./res/icon.ico ./res/icon.ico.bak
mv ./res/icon.png ./res/icon.png.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 }}
mv ./res/32x32.png ./res/32x32.png.bak
mv ./res/64x64.png ./res/64x64.png.bak
@@ -283,19 +275,28 @@ jobs:
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|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
- 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
continue-on-error: true
shell: bash
run: |
sed -i -e 's|rs-ny.rustdesk.com|${{ env.RENDEZVOUS_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|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|For faster connection, please set up your own server||' ./src/lang/en.rs
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
echo -n "${{ env.CUSTOM }}" | cat > ./custom.txt
echo -n "${{ inputs.custom }}" | cat > ./custom.txt
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: change url to custom
@@ -311,6 +312,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|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
continue-on-error: true
if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
@@ -360,22 +370,6 @@ jobs:
name: bridge-artifact
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
uses: fjogeleit/http-request-action@v1
with:
@@ -529,7 +523,6 @@ jobs:
mkdir -p flutter/tmpdeb/usr/lib/rustdesk
cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt
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 }}
fi
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
@@ -575,25 +568,28 @@ jobs:
mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm"
done
# - name: Publish debian/rpm package
# if: env.UPLOAD_ARTIFACT == 'true'
# uses: softprops/action-gh-release@v1
# with:
# prerelease: true
# tag_name: ${{ env.TAG_NAME }}
# files: |
# rustdesk-*.deb
# rustdesk-*.rpm
# only x86_64 for arch since we can not find newest arm64 docker image to build
# old arch image does not make sense for arch since it is "arch" which always update to date
# and failed to makepkg arm64 on x86_64
- name: Patch archlinux PKGBUILD
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true'
run: |
sed -i "s/x86_64/${{ matrix.job.arch }}/g" res/PKGBUILD
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
sed -i "s/x86_64/aarch64/g" ./res/PKGBUILD
fi
# - 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: output/
# server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/
- name: Build archlinux package
if: matrix.job.arch == 'x86_64' && env.UPLOAD_ARTIFACT == 'true'
uses: rustdesk-org/arch-makepkg-action@master
with:
packages:
scripts: |
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
- name: Rename archlinux package
run: |
cp ./res/rustdesk-${{ env.VERSION }}-0-x86_64.pkg.tar.zst ./output/${{ inputs.filename }}.pkg.tar.zst
- name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
@@ -602,6 +598,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 }}.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
- name: send file to api server
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
@@ -610,13 +607,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 }}.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
- 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
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
- name: Report Status
uses: fjogeleit/http-request-action@v1

View File

@@ -75,12 +75,6 @@ env:
#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"
@@ -172,24 +166,26 @@ jobs:
continue-on-error: false
shell: bash
run: |
# MACSTUFF Backup the original Info.plist
# MACSTUFF Backup the original files
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
# 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_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
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
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
@@ -206,7 +202,7 @@ jobs:
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
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|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py
@@ -217,6 +213,33 @@ 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|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
# 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|For faster connection, please set up your own server||' ./src/lang/en.rs
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
@@ -698,14 +721,6 @@ jobs:
"${{ 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: |
@@ -772,12 +787,3 @@ jobs:
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'
#- name: Publish DMG package
# if: env.UPLOAD_ARTIFACT == 'true'
# uses: softprops/action-gh-release@v1
# with:
# prerelease: true
# tag_name: ${{ inputs.upload-tag }}
# files: |
# ${{ inputs.appname }}*-${{ matrix.job.arch }}.dmg

View File

@@ -76,12 +76,6 @@ env:
#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"
@@ -191,11 +185,25 @@ jobs:
# ./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|"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"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc
# ./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
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
@@ -209,11 +217,24 @@ 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|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/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi
- 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
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|For faster connection, please set up your own server||' ./src/lang/en.rs
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
# ./flutter/pubspec.yaml
@@ -241,7 +262,6 @@ jobs:
# https://github.com/flutter/flutter/issues/155685
- name: Replace engine with rustdesk custom flutter engine
if: false
run: |
flutter doctor -v
flutter precache --windows
@@ -319,7 +339,6 @@ jobs:
mv ./res/icon.ico ./res/icon.ico.bak
mv ./res/icon.png ./res/icon.png.bak
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
#echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png
- name: magick stuff
if: ${{ inputs.iconlink != 'false' }}
@@ -472,20 +491,6 @@ jobs:
name: topmostwindow-artifacts
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
uses: fjogeleit/http-request-action@v1
with:
@@ -504,22 +509,27 @@ jobs:
continue-on-error: true
shell: bash
run: |
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-m 900 \
"${{ secrets.SIGN_URL }}/sign/" -o ./rustdesk/signed_files.zip
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-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
continue-on-error: true
shell: pwsh
run: |
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdek/ -Force
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdesk/ -Force
- name: Create custom.txt file
shell: bash
run: |
echo -n "${{ env.CUSTOM }}" | cat > ./rustdesk/custom.txt
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt
- name: Build self-extracted executable
@@ -552,12 +562,6 @@ jobs:
mv ./Package/bin/x64/Release/en-us/Package.msi ../../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
uses: fjogeleit/http-request-action@v1
with:
@@ -576,10 +580,15 @@ jobs:
continue-on-error: true
shell: bash
run: |
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-m 900 \
"${{ secrets.SIGN_URL }}/sign/" -o ./SignOutput/signed_files.zip
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-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
continue-on-error: true
@@ -587,27 +596,6 @@ jobs:
run: |
Expand-Archive -Path ./SignOutput/signed_files.zip -DestinationPath ./SignOutput/ -Force
# - name: Sign rustdesk self-extracted file
# 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
run: |
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ inputs.filename }}.exe" || echo "rustdesk"
@@ -617,15 +605,6 @@ jobs:
run: |
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
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
shell: bash

View File

@@ -75,12 +75,6 @@ env:
#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 }}"
ICONBASE64: "$${{ inputs.iconbase64 }}"
@@ -488,7 +482,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -505,7 +499,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -522,7 +516,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak
@@ -539,7 +533,7 @@ jobs:
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 ./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
if [[ "${{ inputs.iconlink }}" != "false" ]]; then
mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak

View File

@@ -76,11 +76,6 @@ env:
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 }}"
ICONBASE64: "$${{ inputs.iconbase64 }}"
@@ -250,7 +245,6 @@ jobs:
mv ./res/icon.ico ./res/icon.ico.bak
mv ./res/icon.png ./res/icon.png.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 }}
mv ./res/32x32.png ./res/32x32.png.bak
mv ./res/64x64.png ./res/64x64.png.bak
@@ -288,12 +282,12 @@ jobs:
continue-on-error: true
shell: bash
run: |
sed -i -e 's|rs-ny.rustdesk.com|${{ env.RENDEZVOUS_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|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|For faster connection, please set up your own server||' ./src/lang/en.rs
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
echo -n "${{ env.CUSTOM }}" | cat > ./custom.txt
echo -n "${{ inputs.custom }}" | cat > ./custom.txt
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: change url to custom
@@ -527,7 +521,6 @@ jobs:
mkdir -p flutter/tmpdeb/usr/lib/rustdesk
cp ./custom.txt ./flutter/tmpdeb/usr/lib/rustdesk/custom.txt
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 }}
fi
if [[ "${{ inputs.iconlink }}" != "false" ]]; then

View File

@@ -76,12 +76,6 @@ env:
#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"
@@ -212,6 +206,9 @@ jobs:
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|For faster connection, please set up your own server||' ./src/lang/en.rs
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
# ./flutter/pubspec.yaml
@@ -317,7 +314,6 @@ jobs:
mv ./res/icon.ico ./res/icon.ico.bak
mv ./res/icon.png ./res/icon.png.bak
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
#echo "${{ inputs.iconbase64 }}" | base64 -d > ./res/icon.png
- name: magick stuff
if: ${{ inputs.iconlink != 'false' }}
@@ -502,22 +498,27 @@ jobs:
continue-on-error: true
shell: bash
run: |
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-m 900 \
"${{ secrets.SIGN_URL }}/sign/" -o ./rustdesk/signed_files.zip
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
curl -X POST -F "file=@./rustdesk/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-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
continue-on-error: true
shell: pwsh
run: |
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdek/ -Force
Expand-Archive -Path ./rustdesk/signed_files.zip -DestinationPath ./rustdesk/ -Force
- name: Create custom.txt file
shell: bash
run: |
echo -n "${{ env.CUSTOM }}" | cat > ./rustdesk/custom.txt
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt
- name: Build self-extracted executable
@@ -574,10 +575,15 @@ jobs:
continue-on-error: true
shell: bash
run: |
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-m 900 \
"${{ secrets.SIGN_URL }}/sign/" -o ./SignOutput/signed_files.zip
if [ ! -z "${{ secrets.SIGN_BASE_URL }}" ] && [ ! -z "${{ secrets.SIGN_API_KEY }}" ]; then
curl -X POST -F "file=@./SignOutput/unsigned_files.zip" \
-H "X-API-KEY: ${{ secrets.SIGN_API_KEY }}" \
-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
continue-on-error: true

View File

@@ -1,4 +1,5 @@
from django import forms
from PIL import Image
class GenerateForm(forms.Form):
#Platform
@@ -28,10 +29,14 @@ class GenerateForm(forms.Form):
apiServer = forms.CharField(label="API Server", required=False)
key = forms.CharField(label="Key", 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
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'}))
iconbase64 = forms.CharField(required=False)
logobase64 = forms.CharField(required=False)
theme = forms.ChoiceField(choices=[
('light', 'Light'),
('dark', 'Dark'),
@@ -73,3 +78,27 @@ class GenerateForm(forms.Form):
hidecm = forms.BooleanField(initial=False, required=False)
statussort = 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']
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}")

View File

@@ -133,6 +133,7 @@
<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}}-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' %}
<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>

View File

@@ -106,11 +106,58 @@
max-height: 100px;
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 */
}
</style>
</head>
<body>
<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">
<h2><i class="fas fa-desktop"></i> Select Platform</h2>
<div class="platform-icons">
@@ -134,7 +181,7 @@
<div class="section">
<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>
{{ 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>
{{ form.appname }}<br><br>
<label for="{{ form.direction.id_for_label }}">Connection Type:</label>
@@ -155,6 +202,10 @@
{{ form.apiServer }}<br><br>
<label for="{{ form.urlLink.id_for_label }}">Custom URL for links (replaces https://rustdesk.com):</label>
{{ 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 class="container">
@@ -177,6 +228,8 @@
<div class="section">
<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>
{{ form.iconfile }}<br><br>
<!-- <input type="file" name="iconfile" id="iconfile" accept="image/png"> -->
@@ -260,6 +313,151 @@
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>
</body>
</html>

File diff suppressed because one or more lines are too long