fix win32
This commit is contained in:
200
.github/workflows/generator-windows-x86.yml
vendored
200
.github/workflows/generator-windows-x86.yml
vendored
@@ -3,56 +3,17 @@ run-name: Custom Windows x86 Client Generator
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
server:
|
inputs:
|
||||||
description: 'Rendezvous Server'
|
version:
|
||||||
|
description: 'version to buld'
|
||||||
required: true
|
required: true
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
key:
|
zip_url:
|
||||||
description: 'Public Key'
|
description: 'url to zip of json'
|
||||||
required: true
|
required: true
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
apiServer:
|
|
||||||
description: 'API Server'
|
|
||||||
required: true
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
custom:
|
|
||||||
description: "Custom JSON"
|
|
||||||
required: true
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
uuid:
|
|
||||||
description: "uuid of request"
|
|
||||||
required: true
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
iconlink:
|
|
||||||
description: "icon link"
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
type: string
|
|
||||||
logolink:
|
|
||||||
description: "logo link"
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
type: string
|
|
||||||
appname:
|
|
||||||
description: "app name"
|
|
||||||
required: true
|
|
||||||
default: 'rustdesk'
|
|
||||||
type: string
|
|
||||||
filename:
|
|
||||||
description: "Filename"
|
|
||||||
required: true
|
|
||||||
default: 'rustdesk'
|
|
||||||
type: string
|
|
||||||
extras:
|
|
||||||
description: "extra inputs in json"
|
|
||||||
required: true
|
|
||||||
default: '{}'
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SCITER_RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503, also 1.78 has ABI change which causes our sciter version not working, https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
SCITER_RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503, also 1.78 has ABI change which causes our sciter version not working, https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
||||||
@@ -76,7 +37,7 @@ env:
|
|||||||
# 2. Update the `VCPKG_COMMIT_ID` in `ci.yml` and `playground.yml`.
|
# 2. Update the `VCPKG_COMMIT_ID` in `ci.yml` and `playground.yml`.
|
||||||
VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
|
VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
|
||||||
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836" # 2025.01.13, got "/opt/artifacts/vcpkg/vcpkg: No such file or directory" with latest version
|
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836" # 2025.01.13, got "/opt/artifacts/vcpkg/vcpkg: No such file or directory" with latest version
|
||||||
VERSION: "${{ fromJson(inputs.extras).version }}"
|
VERSION: "${{ inputs.version }}"
|
||||||
NDK_VERSION: "r27c"
|
NDK_VERSION: "r27c"
|
||||||
#signing keys env variable checks
|
#signing keys env variable checks
|
||||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||||
@@ -105,6 +66,47 @@ jobs:
|
|||||||
}
|
}
|
||||||
# - { target: aarch64-pc-windows-msvc, os: windows-2022 }
|
# - { target: aarch64-pc-windows-msvc, os: windows-2022 }
|
||||||
steps:
|
steps:
|
||||||
|
- name: install python deps
|
||||||
|
run: |
|
||||||
|
pip install requests pyzipper
|
||||||
|
- name: Download, Decrypt, and Mask
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import requests
|
||||||
|
import pyzipper
|
||||||
|
import io
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}')
|
||||||
|
r.raise_for_status()
|
||||||
|
|
||||||
|
try:
|
||||||
|
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
||||||
|
zf.setpassword('${{ secrets.ZIP_PASSWORD }}'.encode())
|
||||||
|
with zf.open('secrets.json') as f:
|
||||||
|
secrets = json.load(f)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error: Could not decrypt ZIP. Check if password matches. {e}")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
with open(os.environ['GITHUB_ENV'], 'a') as env_file:
|
||||||
|
for key, value in secrets.items():
|
||||||
|
print(f"::add-mask::{value}")
|
||||||
|
env_file.write(f"{key}={value}\n")
|
||||||
|
|
||||||
|
print("Secrets loaded into environment.")
|
||||||
|
|
||||||
|
- name: Finalize and Cleanup zip/json
|
||||||
|
if: always() # Run even if previous steps fail
|
||||||
|
continue-on-error: true
|
||||||
|
uses: fjogeleit/http-request-action@v1
|
||||||
|
with:
|
||||||
|
url: "${{ secrets.GENURL }}/cleanzip"
|
||||||
|
method: 'POST'
|
||||||
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
|
data: '{"uuid": "${{ env.uuid }}"}'
|
||||||
|
|
||||||
- name: Export GitHub Actions cache environment variables
|
- name: Export GitHub Actions cache environment variables
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
@@ -113,14 +115,14 @@ jobs:
|
|||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
|
||||||
- name: Set rdgen value
|
- name: Set rdgen value
|
||||||
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
if: ${{ env.rdgen == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
|
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Set rdgen value
|
- name: Set rdgen value
|
||||||
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
|
if: ${{ env.rdgen == 'false' }}
|
||||||
run: |
|
run: |
|
||||||
echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV
|
echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -129,7 +131,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}'
|
||||||
|
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
if: ${{ env.VERSION != 'master' }}
|
if: ${{ env.VERSION != 'master' }}
|
||||||
@@ -152,25 +154,25 @@ jobs:
|
|||||||
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||||
|
|
||||||
- name: change appname to custom
|
- name: change appname to custom
|
||||||
if: inputs.appname != 'rustdesk'
|
if: env.appname != 'rustdesk'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# ./Cargo.toml
|
# ./Cargo.toml
|
||||||
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./Cargo.toml
|
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ env.appname }}"|' ./Cargo.toml
|
||||||
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./Cargo.toml
|
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ env.appname }}"|' ./Cargo.toml
|
||||||
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./Cargo.toml
|
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ env.appname }}"|' ./Cargo.toml
|
||||||
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./Cargo.toml
|
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ env.appname }}.exe"|' ./Cargo.toml
|
||||||
# ./libs/portable/Cargo.toml
|
# ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ env.appname }}"|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml
|
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ env.appname }}.exe"|' ./libs/portable/Cargo.toml
|
||||||
# ./src/lang/en.rs
|
# ./src/lang/en.rs
|
||||||
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \;
|
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ env.appname }}|' {} \;
|
||||||
|
|
||||||
- name: fix registry if appname has a space
|
- name: fix registry if appname has a space
|
||||||
if: contains(inputs.appname, ' ')
|
if: contains(env.appname, ' ')
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -190,41 +192,41 @@ jobs:
|
|||||||
sed -i -e 's|reg delete HKEY_CLASSES_ROOT\\\\{ext} /f|reg delete \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\" /f|' ./src/platform/windows.rs
|
sed -i -e 's|reg delete HKEY_CLASSES_ROOT\\\\{ext} /f|reg delete \\\"HKEY_CLASSES_ROOT\\\\{ext}\\\" /f|' ./src/platform/windows.rs
|
||||||
|
|
||||||
- name: change company name
|
- name: change company name
|
||||||
if: fromJson(inputs.extras).compname != 'Purslane Ltd'
|
if: env.compname != 'Purslane Ltd'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|PURSLANE|${{ fromJson(inputs.extras).compname }}|' ./res/msi/preprocess.py
|
sed -i -e 's|PURSLANE|${{ env.compname }}|' ./res/msi/preprocess.py
|
||||||
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./res/msi/preprocess.py
|
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./res/msi/preprocess.py
|
||||||
sed -i -e 's|Copyright © 2025 Purslane Ltd.|Copyright \© 2025 ${{ fromJson(inputs.extras).compname }}|' ./src/ui/index.tis
|
sed -i -e 's|Copyright © 2025 Purslane Ltd.|Copyright \© 2025 ${{ env.compname }}|' ./src/ui/index.tis
|
||||||
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./Cargo.toml
|
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./Cargo.toml
|
||||||
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./libs/portable/Cargo.toml
|
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./libs/portable/Cargo.toml
|
||||||
sed -i -e 's|Purslane Ltd.|${{ fromJson(inputs.extras).compname }}|' ./res/setup.nsi
|
sed -i -e 's|Purslane Ltd.|${{ env.compname }}|' ./res/setup.nsi
|
||||||
|
|
||||||
- name: change url to custom
|
- name: change url to custom
|
||||||
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
|
if: env.urlLink != 'https://rustdesk.com'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).urlLink }}|' ./build.py
|
sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ env.urlLink }}|' ./build.py
|
||||||
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com'>|<div .link .custom-event url='${{ fromJson(inputs.extras).urlLink }}'>|" ./src/ui/index.tis
|
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com'>|<div .link .custom-event url='${{ env.urlLink }}'>|" ./src/ui/index.tis
|
||||||
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com/privacy.html'>|<div .link .custom-event url='${{ fromJson(inputs.extras).urlLink }}/privacy.html'>|" ./src/ui/index.tis
|
sed -i -e "s|<div .link .custom-event url='https://rustdesk.com/privacy.html'>|<div .link .custom-event url='${{ env.urlLink }}/privacy.html'>|" ./src/ui/index.tis
|
||||||
sed -i -e "s|https://rustdesk.com/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi
|
sed -i -e "s|https://rustdesk.com/|${{env.urlLink }}|" ./res/setup.nsi
|
||||||
|
|
||||||
- name: change download link to custom
|
- name: change download link to custom
|
||||||
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
if: env.downloadLink != 'https://rustdesk.com/download'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
sed -i -e 's|https://rustdesk.com/download|${{ env.downloadLink }}|' ./src/ui/index.tis
|
||||||
|
|
||||||
- name: set server, key, and apiserver
|
- name: set server, key, and apiserver
|
||||||
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|rs-ny.rustdesk.com|${{ env.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|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ env.key }}|' ./libs/hbb_common/src/config.rs
|
||||||
sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
|
sed -i -e 's|https://admin.rustdesk.com|${{ env.apiServer }}|' ./src/common.rs
|
||||||
sed -i -e 's|<span>{translate("Ready")}, <span .link #setup-server>{translate("setup_server_tip")}</span></span>|translate("Ready")|' ./src/ui/index.tis
|
sed -i -e 's|<span>{translate("Ready")}, <span .link #setup-server>{translate("setup_server_tip")}</span></span>|translate("Ready")|' ./src/ui/index.tis
|
||||||
|
|
||||||
- name: allow custom.txt
|
- name: allow custom.txt
|
||||||
@@ -245,7 +247,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}'
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@v1
|
uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -265,7 +267,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}'
|
||||||
|
|
||||||
- name: Setup vcpkg with Github Actions binary cache
|
- name: Setup vcpkg with Github Actions binary cache
|
||||||
uses: lukka/run-vcpkg@v11
|
uses: lukka/run-vcpkg@v11
|
||||||
@@ -295,7 +297,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: icon stuff
|
- name: icon stuff
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -304,10 +306,10 @@ jobs:
|
|||||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||||
|
|
||||||
- name: magick stuff
|
- name: magick stuff
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
Invoke-WebRequest -Uri ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }} -OutFile ./res/icon.png
|
Invoke-WebRequest -Uri ${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}"&"uuid=${{ env.iconlink_uuid }} -OutFile ./res/icon.png
|
||||||
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
|
||||||
mv ./res/128x128.png ./res/128x128.png.bak
|
mv ./res/128x128.png ./res/128x128.png.bak
|
||||||
@@ -321,7 +323,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
- name: ui.rs icon
|
- name: ui.rs icon
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -332,14 +334,14 @@ jobs:
|
|||||||
|
|
||||||
- name: fix connection delay
|
- name: fix connection delay
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
|
if: ${{ env.delayFix == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
|
sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
|
||||||
|
|
||||||
- name: removeNewVersionNotif
|
- name: removeNewVersionNotif
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
|
if: env.removeNewVersionNotif == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|{software_update_url ? <UpdateMe /> : ""}||' ./src/ui/index.tis
|
sed -i -e 's|{software_update_url ? <UpdateMe /> : ""}||' ./src/ui/index.tis
|
||||||
@@ -352,7 +354,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}'
|
||||||
|
|
||||||
- name: Build rustdesk
|
- name: Build rustdesk
|
||||||
id: build
|
id: build
|
||||||
@@ -397,7 +399,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}'
|
||||||
|
|
||||||
- name: zip dlls
|
- name: zip dlls
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -430,16 +432,16 @@ jobs:
|
|||||||
- name: Create custom.txt file
|
- name: Create custom.txt file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo -n "${{ inputs.custom }}" | cat > ./Release/custom.txt
|
echo -n "${{ env.custom }}" | cat > ./Release/custom.txt
|
||||||
|
|
||||||
- name: Build self-extracted executable
|
- name: Build self-extracted executable
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mv "./Release/rustdesk.exe" "./Release/${{ inputs.appname }}.exe" || echo "rustdesk.exe"
|
mv "./Release/rustdesk.exe" "./Release/${{ env.appname }}.exe" || echo "rustdesk.exe"
|
||||||
sed -i '/dpiAware/d' res/manifest.xml
|
sed -i '/dpiAware/d' res/manifest.xml
|
||||||
pushd ./libs/portable
|
pushd ./libs/portable
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
python3 ./generate.py -f ../../Release/ -o . -e "../../Release/${{ inputs.appname }}.exe"
|
python3 ./generate.py -f ../../Release/ -o . -e "../../Release/${{ env.appname }}.exe"
|
||||||
popd
|
popd
|
||||||
mkdir -p ./SignOutput
|
mkdir -p ./SignOutput
|
||||||
mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe"
|
mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe"
|
||||||
@@ -451,7 +453,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "85% complete"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}'
|
||||||
|
|
||||||
- name: zip exe
|
- name: zip exe
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -483,19 +485,19 @@ jobs:
|
|||||||
|
|
||||||
- name: rename rustdesk.exe to filename.exe
|
- name: rename rustdesk.exe to filename.exe
|
||||||
run: |
|
run: |
|
||||||
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ inputs.filename }}.exe" || echo "rustdesk"
|
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ env.filename }}.exe" || echo "rustdesk"
|
||||||
|
|
||||||
- name: send file to rdgen server
|
- name: send file to rdgen server
|
||||||
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
if: ${{ env.rdgen == 'true' }}
|
||||||
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=@./SignOutput/${{ inputs.filename }}.exe" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
|
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" -F "uuid=${{ env.uuid }}" ${{ secrets.GENURL }}/save_custom_client
|
||||||
|
|
||||||
- name: send file to api server
|
- name: send file to api server
|
||||||
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
|
if: ${{ env.rdgen == 'false' }}
|
||||||
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=@./SignOutput/${{ inputs.filename }}.exe" ${{ inputs.apiServer }}/api/save_custom_client
|
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" ${{ env.apiServer }}/api/save_custom_client
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -503,7 +505,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "Success"}'
|
||||||
|
|
||||||
- name: failed
|
- name: failed
|
||||||
if: failure()
|
if: failure()
|
||||||
@@ -512,7 +514,7 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
customHeaders: '{"Content-Type": "application/json"}'
|
customHeaders: '{"Content-Type": "application/json"}'
|
||||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}'
|
||||||
|
|
||||||
- name: failed
|
- name: failed
|
||||||
if: cancelled()
|
if: cancelled()
|
||||||
@@ -521,4 +523,4 @@ jobs:
|
|||||||
url: ${{ env.STATUS_URL }}
|
url: ${{ env.STATUS_URL }}
|
||||||
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": "${{ env.uuid }}", "status": "Generation cancelled, try again"}'
|
||||||
|
|||||||
Reference in New Issue
Block a user