From 3ff33a6efb930da4dcc6a7f6dd95cf4fa482801a Mon Sep 17 00:00:00 2001
From: zhengyin <165739215@qq.com>
Date: Fri, 28 Mar 2025 18:05:50 +0800
Subject: [PATCH 1/5] add aarch64 linux compile and download link for it
---
.github/workflows/generator-linux.yml | 39 ++++++++++++++++++---------
rdgenerator/templates/generated.html | 12 ++++++---
2 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml
index 819f202..49a8004 100644
--- a/.github/workflows/generator-linux.yml
+++ b/.github/workflows/generator-linux.yml
@@ -102,6 +102,14 @@ jobs:
deb_arch: amd64,
vcpkg-triplet: x64-linux,
}
+ - {
+ arch: aarch64,
+ target: aarch64-unknown-linux-gnu,
+ distro: ubuntu18.04,
+ on: ubuntu-22.04-arm,
+ deb_arch: arm64,
+ vcpkg-triplet: arm64-linux,
+ }
# - {
# arch: aarch64,
# target: aarch64-unknown-linux-gnu,
@@ -137,13 +145,15 @@ jobs:
data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}'
- name: Maximize build space
- if: ${{ matrix.job.arch == 'x86_64' }}
run: |
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo apt-get update -y
- sudo apt-get install -y nasm qemu-user-static
+ sudo apt-get install -y nasm
+ if [[ "${{ matrix.job.arch }}" == "x86_64" ]]; then
+ sudo apt-get install -y qemu-user-static
+ fi
- name: Install dependencies
run: |
@@ -525,13 +535,16 @@ jobs:
convert ./res/128x128.png -resize 200% ./flutter/assets/128x128@2x.png || true
cp ./flutter/assets/icon.svg ./res/scalable.svg
pushd ./flutter
+ if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
+ export PATH="/opt/flutter-elinux/flutter/bin:$PATH"
+ fi
flutter pub get
dart run flutter_launcher_icons
popd
fi
python3 ./build.py --flutter --skip-cargo
for name in rustdesk*??.deb; do
- mv "$name" /workspace/output/"${{ inputs.filename }}.deb"
+ mv "$name" /workspace/output/"${{ inputs.filename }}-${{ matrix.job.arch }}.deb"
done
# rpm package
@@ -545,7 +558,7 @@ jobs:
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
for name in rustdesk*??.rpm; do
- mv "$name" /workspace/output/"${{ inputs.filename }}.rpm"
+ mv "$name" /workspace/output/"${{ inputs.filename }}-${{ matrix.job.arch }}.rpm"
done
# rpm suse package
@@ -559,7 +572,7 @@ jobs:
HBB=`pwd` rpmbuild ./res/rpm-flutter-suse.spec -bb
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
for name in rustdesk*??.rpm; do
- mv "$name" /workspace/output/"${{ inputs.filename }}-suse.rpm"
+ mv "$name" /workspace/output/"${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm"
done
# only x86_64 for arch since we can not find newest arm64 docker image to build
@@ -593,19 +606,19 @@ jobs:
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=@./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 || true
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client || true
- 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
- 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
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb" ${{ inputs.apiServer }}/api/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst" ${{ inputs.apiServer }}/api/save_custom_client || true
- name: Report Status
uses: fjogeleit/http-request-action@v1
diff --git a/rdgenerator/templates/generated.html b/rdgenerator/templates/generated.html
index 4636db8..a80fdc4 100644
--- a/rdgenerator/templates/generated.html
+++ b/rdgenerator/templates/generated.html
@@ -130,10 +130,14 @@
Download {{filename}}.exe
Download {{filename}}.msi
{% elif platform == 'linux' %}
- Download {{filename}}.deb
- Download {{filename}}.rpm
- Download {{filename}}-suse.rpm
- Download {{filename}}.pkg.tar.zst
+ Download {{filename}}.deb
+ Download {{filename}}.rpm
+ Download {{filename}}-suse.rpm
+ Download {{filename}}.pkg.tar.zst
+ Download {{filename}}.deb
+ Download {{filename}}.rpm
+ Download {{filename}}-suse.rpm
+ Download {{filename}}.pkg.tar.zst
{% elif platform == 'android' %}
Download {{filename}}-aarch64.apk
Download {{filename}}-x86_64.apk
From 634a77a054da3925acab302b2b0807c5ead7ffaf Mon Sep 17 00:00:00 2001
From: zhengyin <165739215@qq.com>
Date: Fri, 28 Mar 2025 18:21:01 +0800
Subject: [PATCH 2/5] test on xbxiot branch
---
rdgenerator/views.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rdgenerator/views.py b/rdgenerator/views.py
index 800e412..668fa84 100644
--- a/rdgenerator/views.py
+++ b/rdgenerator/views.py
@@ -193,7 +193,7 @@ def generator_view(request):
#url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches'
data = {
- "ref":"master",
+ "ref":"xbxiot",
"inputs":{
"server":server,
"key":key,
@@ -327,7 +327,7 @@ def startgh(request):
####from here run the github action, we need user, repo, access token.
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-'+data_.get('platform')+'.yml/dispatches'
data = {
- "ref":"master",
+ "ref":"xbxiot",
"inputs":{
"server":data_.get('server'),
"key":data_.get('key'),
From 16d0818a284365f9974cb7a9c7efccb7b3464a8b Mon Sep 17 00:00:00 2001
From: zhengyin <165739215@qq.com>
Date: Fri, 28 Mar 2025 18:24:51 +0800
Subject: [PATCH 3/5] delete test on xbxiot
---
rdgenerator/views.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rdgenerator/views.py b/rdgenerator/views.py
index 668fa84..800e412 100644
--- a/rdgenerator/views.py
+++ b/rdgenerator/views.py
@@ -193,7 +193,7 @@ def generator_view(request):
#url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches'
data = {
- "ref":"xbxiot",
+ "ref":"master",
"inputs":{
"server":server,
"key":key,
@@ -327,7 +327,7 @@ def startgh(request):
####from here run the github action, we need user, repo, access token.
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-'+data_.get('platform')+'.yml/dispatches'
data = {
- "ref":"xbxiot",
+ "ref":"master",
"inputs":{
"server":data_.get('server'),
"key":data_.get('key'),
From d2b36d387624ee8f435d01aae65ea9c20b93fb01 Mon Sep 17 00:00:00 2001
From: zhengyin <165739215@qq.com>
Date: Fri, 28 Mar 2025 19:04:26 +0800
Subject: [PATCH 4/5] fix a bug
---
.github/workflows/generator-linux.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml
index 49a8004..254a577 100644
--- a/.github/workflows/generator-linux.yml
+++ b/.github/workflows/generator-linux.yml
@@ -600,7 +600,7 @@ jobs:
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
+ cp ./res/rustdesk-${{ env.VERSION }}-0-x86_64.pkg.tar.zst ./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst
- name: send file to rdgen server
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
From 9c1ab4de3cf7e12b51c3eb55c73874bb2b00fb67 Mon Sep 17 00:00:00 2001
From: zhengyin <165739215@qq.com>
Date: Fri, 28 Mar 2025 19:28:33 +0800
Subject: [PATCH 5/5] fix linux file name
---
rdgenerator/templates/generated.html | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/rdgenerator/templates/generated.html b/rdgenerator/templates/generated.html
index a80fdc4..c52de3b 100644
--- a/rdgenerator/templates/generated.html
+++ b/rdgenerator/templates/generated.html
@@ -130,14 +130,14 @@
Download {{filename}}.exe
Download {{filename}}.msi
{% elif platform == 'linux' %}
- Download {{filename}}.deb
- Download {{filename}}.rpm
- Download {{filename}}-suse.rpm
- Download {{filename}}.pkg.tar.zst
- Download {{filename}}.deb
- Download {{filename}}.rpm
- Download {{filename}}-suse.rpm
- Download {{filename}}.pkg.tar.zst
+ Download {{filename}}-x86_64.deb
+ Download {{filename}}-x86_64.rpm
+ Download {{filename}}-suse-x86_64.rpm
+ Download {{filename}}-x86_64.pkg.tar.zst
+ Download {{filename}}-aarch64.deb
+ Download {{filename}}-aarch64.rpm
+ Download {{filename}}-suse-aarch64.rpm
+ Download {{filename}}-aarch64.pkg.tar.zst
{% elif platform == 'android' %}
Download {{filename}}-aarch64.apk
Download {{filename}}-x86_64.apk