refactored

This commit is contained in:
Bryan Gerlach
2025-02-10 17:24:36 -06:00
parent ee673c2667
commit 0f1b1d1d55
10 changed files with 25 additions and 1868 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 #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
@@ -499,7 +491,7 @@ 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 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
@@ -516,7 +508,7 @@ 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 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
@@ -533,7 +525,7 @@ 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 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
@@ -550,7 +542,7 @@ 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 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
@@ -603,17 +595,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

View File

@@ -75,15 +75,8 @@ 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 }}"
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
@@ -290,12 +282,12 @@ jobs:
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 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 '/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
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 sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: change url to custom - name: change url to custom
@@ -538,7 +530,6 @@ 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

View File

@@ -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"
@@ -239,8 +233,8 @@ jobs:
sed -i '' -e 's/("About RustDesk", "Over RustDesk")/("About RustDesk", "Over ${{ 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/("About", "Over")/("About", "Over ${{ inputs.appname }}")/' ./src/lang/nl.rs
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 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 '/const KEY:/,/};/d' ./src/common.rs
@@ -723,15 +717,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: |
@@ -798,12 +784,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

View File

@@ -76,12 +76,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"
@@ -195,7 +189,7 @@ jobs:
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 url to custom - name: change url to custom
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
@@ -223,8 +217,8 @@ jobs:
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 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 '/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
@@ -330,7 +324,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' }}
@@ -521,7 +514,7 @@ jobs:
- 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

View File

@@ -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 }}"
ICONBASE64: "$${{ inputs.iconbase64 }}" ICONBASE64: "$${{ inputs.iconbase64 }}"
@@ -488,7 +482,7 @@ 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 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
@@ -505,7 +499,7 @@ 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 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
@@ -522,7 +516,7 @@ 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 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
@@ -539,7 +533,7 @@ 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 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

View File

@@ -76,11 +76,6 @@ env:
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 # 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 }}" ICONBASE64: "$${{ inputs.iconbase64 }}"
@@ -250,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
@@ -288,12 +282,12 @@ jobs:
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 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 '/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
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 sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
- name: change url to custom - name: change url to custom
@@ -527,7 +521,6 @@ 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

View File

@@ -76,12 +76,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"
@@ -212,6 +206,9 @@ jobs:
continue-on-error: true continue-on-error: true
shell: bash shell: bash
run: | 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 '/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
# ./flutter/pubspec.yaml # ./flutter/pubspec.yaml
@@ -317,7 +314,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' }}
@@ -522,7 +518,7 @@ jobs:
- 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