From 0d971aa40c9ca10735fca3537757bc0ca9dc9090 Mon Sep 17 00:00:00 2001 From: Bryan Gerlach Date: Fri, 1 Nov 2024 22:58:36 -0500 Subject: [PATCH] fix linux and android, added to setup.txt --- .github/workflows/generator-android.yml | 9 ++++++++- .github/workflows/generator-linux.yml | 12 ++++++++++-- setup.txt | 9 +++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generator-android.yml b/.github/workflows/generator-android.yml index d4ca7c7..2a937a9 100644 --- a/.github/workflows/generator-android.yml +++ b/.github/workflows/generator-android.yml @@ -295,7 +295,7 @@ jobs: 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 https://${{ 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/64x64.png ./res/64x64.png.bak mv ./res/128x128.png ./res/128x128.png.bak @@ -553,6 +553,7 @@ jobs: # - name: Upload to FTP + if: ${{ fromJson(inputs.extras).rdgen == 'true' }} uses: nerdoza/action-simple-file-upload@v2 with: user: ${{ secrets.GEN_FTP_USER }} @@ -560,6 +561,12 @@ jobs: host: ${{ secrets.GEN_FTP_SERVER }} src: ./signed-apk/${{ inputs.filename }}-${{ matrix.job.arch }}.apk dest: /root/rdgen/exe/${{ env.UUIDFOLDER }}/${{ inputs.filename }}-${{ matrix.job.arch }}.apk + + - 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=@./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 }} diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index 1f7c20d..2631bf4 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -249,7 +249,7 @@ jobs: 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 https://${{ 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/64x64.png ./res/64x64.png.bak mv ./res/128x128.png ./res/128x128.png.bak @@ -470,7 +470,7 @@ jobs: 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 https://${{ 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 if [[ "${{ inputs.iconlink }}" != "false" ]]; then mv ./flutter/assets/icon.svg ./flutter/assets/icon.svg.bak @@ -534,6 +534,14 @@ jobs: local-dir: output/ server-dir: /root/rdgen/exe/${{ env.UUIDFOLDER }}/ + - 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=@./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' diff --git a/setup.txt b/setup.txt index 308ec5a..7473e8c 100644 --- a/setup.txt +++ b/setup.txt @@ -2,6 +2,15 @@ To fully host the client generator yourself, you will need to following: 1) A Github account with a fork of this repo 2) A Github fine-grained access token with permissions for your rdgen repository + a) login to your github account + b) click on your profile picture at the top right, click Settings + c) at the bottom of the left panel, click Developer Settings + d) click Personal access tokens + e) click Fine-grained tokens + f) click Generate new token + g) give a token name, change expiration to whatever you want + h) under Repository acces, select Only select repositories, then pick your rdgen repo + i) give Read and Write access to actions and workflows 3) On the server running the client generator: a) environment variables: GHUSER="your github username"