Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbd6eceaa3 | ||
|
|
c20c90814b | ||
|
|
7ccf863a8f | ||
|
|
56900a2548 | ||
|
|
15b6923164 | ||
|
|
ee2e27de44 | ||
|
|
30e83c107e | ||
|
|
6f5b0f944b | ||
|
|
a85b6fcda5 | ||
|
|
12d71cc5c5 | ||
|
|
164c51f44b | ||
|
|
2caaea562b | ||
|
|
a76e26e58b | ||
|
|
b98d2d0187 | ||
|
|
18a7cf37b6 | ||
|
|
4068167379 | ||
|
|
14703c9f91 | ||
|
|
2f33b26441 | ||
|
|
0bd1d7d55e | ||
|
|
ea6dc088e8 | ||
|
|
50237b8725 | ||
|
|
78e037c763 | ||
|
|
52682fec1d |
32
.github/patches/privacyScreen.py
vendored
32
.github/patches/privacyScreen.py
vendored
@@ -1,32 +0,0 @@
|
||||
import os
|
||||
|
||||
def convert_png_to_cpp(input_file, output_file, array_name="g_img"):
|
||||
if not os.path.exists(input_file):
|
||||
print(f"Error: {input_file} not found.")
|
||||
return
|
||||
|
||||
with open(input_file, "rb") as f:
|
||||
data = f.read()
|
||||
|
||||
with open(output_file, "w") as f:
|
||||
f.write('#include "pch.h"\n')
|
||||
f.write('#include "./img.h"\n\n')
|
||||
f.write(f"const unsigned char {array_name}[] = {{\n")
|
||||
|
||||
for i in range(0, len(data), 20):
|
||||
chunk = data[i : i + 20]
|
||||
hex_chunk = [f"0x{b:02x}" for b in chunk]
|
||||
|
||||
line = ", ".join(hex_chunk)
|
||||
|
||||
if i + 20 < len(data):
|
||||
f.write(f"{line},\n")
|
||||
else:
|
||||
f.write(f"{line}\n")
|
||||
|
||||
f.write("};\n\n")
|
||||
f.write(f"const long long {array_name}Len = sizeof({array_name});\n")
|
||||
|
||||
#print(f"Successfully converted {input_file} to {output_file}")
|
||||
|
||||
convert_png_to_cpp("privacy.png", "img.cpp")
|
||||
37
.github/workflows/generator-android.yml
vendored
37
.github/workflows/generator-android.yml
vendored
@@ -87,44 +87,31 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
print(f"Downloading secrets (Attempt {attempt + 1})...")
|
||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}', timeout=60)
|
||||
r.raise_for_status()
|
||||
break
|
||||
except (requests.exceptions.RequestException, requests.exceptions.Timeout) as e:
|
||||
if attempt < 4:
|
||||
print(f"Timeout/Error occurred: {e}. Retrying in 5 seconds...")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Max retries reached. Failing.")
|
||||
raise e
|
||||
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)
|
||||
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)
|
||||
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")
|
||||
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"
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}"}'
|
||||
|
||||
11
.github/workflows/generator-linux.yml
vendored
11
.github/workflows/generator-linux.yml
vendored
@@ -83,7 +83,6 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
@@ -301,8 +300,8 @@ jobs:
|
||||
run: |
|
||||
sed -i -e 's|rs-ny.rustdesk.com|${{ env.server }}|' ./libs/hbb_common/src/config.rs
|
||||
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ env.key }}|' ./libs/hbb_common/src/config.rs
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.py
|
||||
python allowCustom.py
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
|
||||
git apply allowCustom.diff
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff
|
||||
git apply removeSetupServerTip.diff
|
||||
echo -n "${{ env.custom }}" | cat > ./custom_.txt
|
||||
@@ -676,7 +675,6 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
@@ -794,7 +792,6 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
@@ -911,7 +908,6 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
@@ -945,10 +941,9 @@ jobs:
|
||||
|
||||
- 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"
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}"}'
|
||||
|
||||
7
.github/workflows/generator-macos.yml
vendored
7
.github/workflows/generator-macos.yml
vendored
@@ -115,10 +115,9 @@ jobs:
|
||||
|
||||
- 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"
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}"}'
|
||||
@@ -237,8 +236,8 @@ jobs:
|
||||
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ env.key }}|' ./libs/hbb_common/src/config.rs
|
||||
sed -i -e 's|https://admin.rustdesk.com|${{ env.apiServer }}|' ./src/common.rs
|
||||
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.py
|
||||
python allowCustom.py
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
|
||||
git apply allowCustom.diff
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff
|
||||
git apply removeSetupServerTip.diff
|
||||
|
||||
|
||||
211
.github/workflows/generator-windows-x86.yml
vendored
211
.github/workflows/generator-windows-x86.yml
vendored
@@ -3,16 +3,56 @@ run-name: Custom Windows x86 Client Generator
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'version to buld'
|
||||
server:
|
||||
description: 'Rendezvous Server'
|
||||
required: true
|
||||
default: ''
|
||||
type: string
|
||||
zip_url:
|
||||
description: 'url to zip of json'
|
||||
key:
|
||||
description: 'Public Key'
|
||||
required: true
|
||||
default: ''
|
||||
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:
|
||||
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
|
||||
@@ -36,7 +76,7 @@ env:
|
||||
# 2. Update the `VCPKG_COMMIT_ID` in `ci.yml` and `playground.yml`.
|
||||
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
|
||||
VERSION: "${{ inputs.version }}"
|
||||
VERSION: "${{ fromJson(inputs.extras).version }}"
|
||||
NDK_VERSION: "r27c"
|
||||
#signing keys env variable checks
|
||||
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
|
||||
@@ -65,59 +105,6 @@ jobs:
|
||||
}
|
||||
# - { target: aarch64-pc-windows-msvc, os: windows-2022 }
|
||||
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
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
print(f"Downloading secrets (Attempt {attempt + 1})...")
|
||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}', timeout=60)
|
||||
r.raise_for_status()
|
||||
break
|
||||
except (requests.exceptions.RequestException, requests.exceptions.Timeout) as e:
|
||||
if attempt < 4:
|
||||
print(f"Timeout/Error occurred: {e}. Retrying in 5 seconds...")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Max retries reached. Failing.")
|
||||
raise e
|
||||
|
||||
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
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
@@ -126,14 +113,14 @@ jobs:
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
|
||||
- name: Set rdgen value
|
||||
if: ${{ env.rdgen == 'true' }}
|
||||
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
||||
run: |
|
||||
echo "STATUS_URL=${{ secrets.GENURL }}/updategh" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Set rdgen value
|
||||
if: ${{ env.rdgen == 'false' }}
|
||||
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
|
||||
run: |
|
||||
echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV
|
||||
echo "STATUS_URL=${{ inputs.apiServer }}/api/updategh" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Report Status
|
||||
uses: fjogeleit/http-request-action@v1
|
||||
@@ -142,7 +129,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "5% complete"}'
|
||||
|
||||
- name: Checkout source code
|
||||
if: ${{ env.VERSION != 'master' }}
|
||||
@@ -165,25 +152,25 @@ jobs:
|
||||
Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||
|
||||
- name: change appname to custom
|
||||
if: env.appname != 'rustdesk'
|
||||
if: inputs.appname != 'rustdesk'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
# ./Cargo.toml
|
||||
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ env.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ env.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ env.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ env.appname }}.exe"|' ./Cargo.toml
|
||||
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|ProductName = "RustDesk"|ProductName = "${{ inputs.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|FileDescription = "RustDesk Remote Desktop"|FileDescription = "${{ inputs.appname }}"|' ./Cargo.toml
|
||||
sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./Cargo.toml
|
||||
# ./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 = "${{ env.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 = "${{ env.appname }}.exe"|' ./libs/portable/Cargo.toml
|
||||
sed -i -e 's|description = "RustDesk Remote Desktop"|description = "${{ inputs.appname }}"|' ./libs/portable/Cargo.toml
|
||||
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
|
||||
# ./src/lang/en.rs
|
||||
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ env.appname }}|' {} \;
|
||||
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \;
|
||||
|
||||
- name: fix registry if appname has a space
|
||||
if: contains(env.appname, ' ')
|
||||
if: contains(inputs.appname, ' ')
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -203,41 +190,41 @@ jobs:
|
||||
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
|
||||
if: env.compname != 'Purslane Ltd'
|
||||
if: fromJson(inputs.extras).compname != 'Purslane Ltd'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's|PURSLANE|${{ env.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 ${{ env.compname }}|' ./src/ui/index.tis
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./Cargo.toml
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./libs/portable/Cargo.toml
|
||||
sed -i -e 's|Purslane Ltd.|${{ env.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.|Copyright \© 2025 ${{ fromJson(inputs.extras).compname }}|' ./src/ui/index.tis
|
||||
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
|
||||
sed -i -e 's|Purslane Ltd.|${{ fromJson(inputs.extras).compname }}|' ./res/setup.nsi
|
||||
|
||||
- name: change url to custom
|
||||
if: env.urlLink != 'https://rustdesk.com'
|
||||
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
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='${{ 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='${{ env.urlLink }}/privacy.html'>|" ./src/ui/index.tis
|
||||
sed -i -e "s|https://rustdesk.com/|${{env.urlLink }}|" ./res/setup.nsi
|
||||
sed -i -e 's|Homepage: https://rustdesk.com|Homepage: ${{ fromJson(inputs.extras).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/privacy.html'>|<div .link .custom-event url='${{ fromJson(inputs.extras).urlLink }}/privacy.html'>|" ./src/ui/index.tis
|
||||
sed -i -e "s|https://rustdesk.com/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi
|
||||
|
||||
- name: change download link to custom
|
||||
if: env.downloadLink != 'https://rustdesk.com/download'
|
||||
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's|https://rustdesk.com/download|${{ env.downloadLink }}|' ./src/ui/index.tis
|
||||
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./src/ui/index.tis
|
||||
|
||||
- name: set server, key, and apiserver
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's|rs-ny.rustdesk.com|${{ env.server }}|' ./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|${{ env.apiServer }}|' ./src/common.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|https://admin.rustdesk.com|${{ inputs.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
|
||||
|
||||
- name: allow custom.txt
|
||||
@@ -258,7 +245,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "10% complete"}'
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
@@ -278,7 +265,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "20% complete"}'
|
||||
|
||||
- name: Setup vcpkg with Github Actions binary cache
|
||||
uses: lukka/run-vcpkg@v11
|
||||
@@ -308,7 +295,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: icon stuff
|
||||
if: ${{ env.iconlink_url != 'false' }}
|
||||
if: ${{ inputs.iconlink != 'false' }}
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -317,10 +304,10 @@ jobs:
|
||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||
|
||||
- name: magick stuff
|
||||
if: ${{ env.iconlink_url != 'false' }}
|
||||
if: ${{ inputs.iconlink != 'false' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Invoke-WebRequest -Uri ${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}"&"uuid=${{ env.iconlink_uuid }} -OutFile ./res/icon.png
|
||||
Invoke-WebRequest -Uri ${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}"&"uuid=${{ fromJson(inputs.iconlink).uuid }} -OutFile ./res/icon.png
|
||||
mv ./res/32x32.png ./res/32x32.png.bak
|
||||
mv ./res/64x64.png ./res/64x64.png.bak
|
||||
mv ./res/128x128.png ./res/128x128.png.bak
|
||||
@@ -334,7 +321,7 @@ jobs:
|
||||
|
||||
|
||||
- name: ui.rs icon
|
||||
if: ${{ env.iconlink_url != 'false' }}
|
||||
if: ${{ inputs.iconlink != 'false' }}
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -345,14 +332,14 @@ jobs:
|
||||
|
||||
- name: fix connection delay
|
||||
continue-on-error: true
|
||||
if: ${{ env.delayFix == 'true' }}
|
||||
if: ${{ fromJson(inputs.extras).delayFix == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's|!key.is_empty()|false|' ./src/client.rs
|
||||
|
||||
- name: removeNewVersionNotif
|
||||
continue-on-error: true
|
||||
if: env.removeNewVersionNotif == 'true'
|
||||
if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's|{software_update_url ? <UpdateMe /> : ""}||' ./src/ui/index.tis
|
||||
@@ -365,7 +352,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}'
|
||||
|
||||
- name: Build rustdesk
|
||||
id: build
|
||||
@@ -410,7 +397,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}'
|
||||
|
||||
- name: zip dlls
|
||||
continue-on-error: true
|
||||
@@ -443,16 +430,16 @@ jobs:
|
||||
- name: Create custom.txt file
|
||||
shell: bash
|
||||
run: |
|
||||
echo -n "${{ env.custom }}" | cat > ./Release/custom.txt
|
||||
echo -n "${{ inputs.custom }}" | cat > ./Release/custom.txt
|
||||
|
||||
- name: Build self-extracted executable
|
||||
shell: bash
|
||||
run: |
|
||||
mv "./Release/rustdesk.exe" "./Release/${{ env.appname }}.exe" || echo "rustdesk.exe"
|
||||
mv "./Release/rustdesk.exe" "./Release/${{ inputs.appname }}.exe" || echo "rustdesk.exe"
|
||||
sed -i '/dpiAware/d' res/manifest.xml
|
||||
pushd ./libs/portable
|
||||
pip3 install -r requirements.txt
|
||||
python3 ./generate.py -f ../../Release/ -o . -e "../../Release/${{ env.appname }}.exe"
|
||||
python3 ./generate.py -f ../../Release/ -o . -e "../../Release/${{ inputs.appname }}.exe"
|
||||
popd
|
||||
mkdir -p ./SignOutput
|
||||
mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe"
|
||||
@@ -464,7 +451,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "85% complete"}'
|
||||
|
||||
- name: zip exe
|
||||
continue-on-error: true
|
||||
@@ -496,19 +483,19 @@ jobs:
|
||||
|
||||
- name: rename rustdesk.exe to filename.exe
|
||||
run: |
|
||||
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ env.filename }}.exe" || echo "rustdesk"
|
||||
mv ./SignOutput/rustdesk.exe "./SignOutput/${{ inputs.filename }}.exe" || echo "rustdesk"
|
||||
|
||||
- name: send file to rdgen server
|
||||
if: ${{ env.rdgen == 'true' }}
|
||||
if: ${{ fromJson(inputs.extras).rdgen == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
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
|
||||
|
||||
- name: send file to api server
|
||||
if: ${{ env.rdgen == 'false' }}
|
||||
if: ${{ fromJson(inputs.extras).rdgen == 'false' }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
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
|
||||
|
||||
- name: Report Status
|
||||
uses: fjogeleit/http-request-action@v1
|
||||
@@ -516,7 +503,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "Success"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "Success"}'
|
||||
|
||||
- name: failed
|
||||
if: failure()
|
||||
@@ -525,7 +512,7 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation failed, try again"}'
|
||||
|
||||
- name: failed
|
||||
if: cancelled()
|
||||
@@ -534,4 +521,4 @@ jobs:
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}'
|
||||
data: '{"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'
|
||||
|
||||
41
.github/workflows/generator-windows.yml
vendored
41
.github/workflows/generator-windows.yml
vendored
@@ -55,7 +55,6 @@ jobs:
|
||||
configuration: Release
|
||||
platform: x64
|
||||
target_version: Windows10
|
||||
secrets: inherit
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -88,44 +87,31 @@ jobs:
|
||||
import io
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
print(f"Downloading secrets (Attempt {attempt + 1})...")
|
||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}', timeout=60)
|
||||
r.raise_for_status()
|
||||
break
|
||||
except (requests.exceptions.RequestException, requests.exceptions.Timeout) as e:
|
||||
if attempt < 4:
|
||||
print(f"Timeout/Error occurred: {e}. Retrying in 5 seconds...")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Max retries reached. Failing.")
|
||||
raise e
|
||||
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)
|
||||
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)
|
||||
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")
|
||||
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"
|
||||
url: ${{ env.STATUS_URL }}
|
||||
method: 'POST'
|
||||
customHeaders: '{"Content-Type": "application/json"}'
|
||||
data: '{"uuid": "${{ env.uuid }}"}'
|
||||
@@ -214,7 +200,6 @@ jobs:
|
||||
find ./src/lang -name "*.rs" -exec sed -i '/powered_by_me/s|RustDesk|${{ env.compname }}|g' {} \;
|
||||
fi
|
||||
find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ env.appname }}|' {} \;
|
||||
sed -i -e 's|RustDesk|${{ env.appname }}|' ./res/msi/Package/License.rtf
|
||||
|
||||
- name: fix registry if appname has a space
|
||||
if: contains(env.appname, ' ')
|
||||
@@ -248,7 +233,6 @@ jobs:
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./flutter/windows/runner/Runner.rc
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./Cargo.toml
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./libs/portable/Cargo.toml
|
||||
sed -i -e 's|Purslane Ltd|${{ env.compname }}|' ./res/msi/Package/License.rtf
|
||||
|
||||
- name: change url to custom
|
||||
if: env.urlLink != 'https://rustdesk.com'
|
||||
@@ -262,7 +246,6 @@ jobs:
|
||||
sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ env.urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart
|
||||
sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ env.urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart
|
||||
sed -i -e "s|https://rustdesk.com/privacy.html|${{ env.urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
|
||||
sed -i -e "s|rustdesk.com|${{ env.urlLink }}|" ./res/msi/Package/License.rtf
|
||||
|
||||
- name: change download link to custom
|
||||
if: env.downloadLink != 'https://rustdesk.com/download'
|
||||
|
||||
@@ -45,70 +45,10 @@ jobs:
|
||||
run: |
|
||||
git clone https://github.com/rustdesk-org/RustDeskTempTopMostWindow RustDeskTempTopMostWindow
|
||||
|
||||
- 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
|
||||
import time
|
||||
|
||||
for attempt in range(5):
|
||||
try:
|
||||
print(f"Downloading secrets (Attempt {attempt + 1})...")
|
||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}', timeout=60)
|
||||
r.raise_for_status()
|
||||
break
|
||||
except (requests.exceptions.RequestException, requests.exceptions.Timeout) as e:
|
||||
if attempt < 4:
|
||||
print(f"Timeout/Error occurred: {e}. Retrying in 5 seconds...")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Max retries reached. Failing.")
|
||||
raise e
|
||||
|
||||
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 }}"}'
|
||||
|
||||
# Build. commit 53b548a5398624f7149a382000397993542ad796 is tag v0.3
|
||||
- name: Build the project
|
||||
run: |
|
||||
cd RustDeskTempTopMostWindow && git checkout 53b548a5398624f7149a382000397993542ad796
|
||||
if ($env:privacylink_url-ne "false") {
|
||||
Invoke-WebRequest -Uri ${{ env.privacylink_url }}/get_png?filename=${{ env.privacylink_file }}"&"uuid=${{ env.privacylink_uuid }} -OutFile privacy.png
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/privacyScreen.py -OutFile privacyScreen.py
|
||||
python privacyScreen.py
|
||||
rm ./WindowInjection/img.cpp
|
||||
mv img.cpp ./WindowInjection/img.cpp
|
||||
}
|
||||
msbuild ${{ env.project_path }} -p:Configuration=${{ inputs.configuration }} -p:Platform=${{ inputs.platform }} /p:TargetVersion=${{ inputs.target_version }}
|
||||
|
||||
- name: Archive build artifacts
|
||||
|
||||
@@ -33,5 +33,4 @@ urlpatterns = [
|
||||
url(r'^get_png',views.get_png),
|
||||
url(r'^save_custom_client',views.save_custom_client),
|
||||
url(r'^get_zip',views.get_zip),
|
||||
url(r'^cleanzip',views.cleanup_secrets),
|
||||
]
|
||||
|
||||
@@ -37,10 +37,8 @@ class GenerateForm(forms.Form):
|
||||
#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'}))
|
||||
privacyfile = forms.FileField(label="Custom privacy screen (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
||||
iconbase64 = forms.CharField(required=False)
|
||||
logobase64 = forms.CharField(required=False)
|
||||
privacybase64 = forms.CharField(required=False)
|
||||
theme = forms.ChoiceField(choices=[
|
||||
('light', 'Light'),
|
||||
('dark', 'Dark'),
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
<h2><i class="fas fa-paint-brush"></i> Visual</h2>
|
||||
{{ form.iconbase64.as_hidden }}
|
||||
{{ form.logobase64.as_hidden }}
|
||||
{{ form.privacybase64.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"> -->
|
||||
@@ -339,10 +338,6 @@
|
||||
{{ form.logofile }}<br><br>
|
||||
<!-- <input type="file" name="logofile" id="logofile" accept="image/png"> -->
|
||||
<div id="logo-preview"></div><br><br>
|
||||
<label for="{{ form.privacyfile.id_for_label }}">Custom Privacy Screen (in .png format)</label>
|
||||
{{ form.privacyfile }}<br><br>
|
||||
<!-- <input type="file" name="iconfile" id="iconfile" accept="image/png"> -->
|
||||
<div id="privacy-preview"></div><br><br>
|
||||
<label for="{{ form.theme.id_for_label }}">Theme:</label>
|
||||
{{ form.theme }} {{ form.themeDorO }} *Default sets the theme but allows the client to change it, Override sets the theme permanently.<br><br>
|
||||
</div>
|
||||
@@ -420,9 +415,6 @@
|
||||
document.getElementById("{{ form.logofile.id_for_label }}").addEventListener('change', function(event) {
|
||||
previewImage(event.target, 'logo-preview');
|
||||
});
|
||||
document.getElementById("{{ form.privacyfile.id_for_label }}").addEventListener('change', function(event) {
|
||||
previewImage(event.target, 'privacy-preview');
|
||||
});
|
||||
|
||||
document.getElementById("{{ form.hidecm.id_for_label }}").addEventListener('change',function() {
|
||||
if (this.checked) {
|
||||
@@ -602,16 +594,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
const privacyPreview = document.getElementById('privacy-preview');
|
||||
if (privacyPreview.firstChild && logoPrprivacyPrevieweview.firstChild.src.startsWith('data:image/png;base64')) {
|
||||
formData.privacyfile = privacyPreview.firstChild.src; // Use existing base64
|
||||
} else { //if it's a file upload
|
||||
const privacyFile = document.getElementById("{{ form.privacyfile.id_for_label }}").files[0];
|
||||
if (privacyFile) {
|
||||
formData.privacyfile = await readFileAsBase64(privacyFile);
|
||||
}
|
||||
}
|
||||
|
||||
const jsonData = JSON.stringify(formData, null, 2);
|
||||
const blob = new Blob([jsonData], { type: "application/json" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
@@ -673,10 +655,6 @@
|
||||
document.getElementById('id_logobase64').value = formData[key];
|
||||
document.getElementById('logo-preview').innerHTML = `<img src="${formData[key]}" style="max-width: 300px; max-height: 60px;">`;
|
||||
}
|
||||
if (key === 'privacyfile' && formData[key]) {
|
||||
document.getElementById('id_privacybase64').value = formData[key];
|
||||
document.getElementById('privacy-preview').innerHTML = `<img src="${formData[key]}" style="max-width: 300px; max-height: 60px;">`;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,16 +115,6 @@ def generator_view(request):
|
||||
logolink_url = "false"
|
||||
logolink_uuid = "false"
|
||||
logolink_file = "false"
|
||||
try:
|
||||
privacyfile = form.cleaned_data.get('privacyfile')
|
||||
if not privacyfile:
|
||||
privacyfile = form.cleaned_data.get('privacybase64')
|
||||
privacylink_url, privacylink_uuid, privacylink_file = save_png(privacyfile,myuuid,full_url,"privacy.png")
|
||||
except:
|
||||
print("failed to get logo")
|
||||
privacylink_url = "false"
|
||||
privacylink_uuid = "false"
|
||||
privacylink_file = "false"
|
||||
|
||||
###create the custom.txt json here and send in as inputs below
|
||||
decodedCustom = {}
|
||||
@@ -249,9 +239,6 @@ def generator_view(request):
|
||||
"logolink_url":logolink_url,
|
||||
"logolink_uuid":logolink_uuid,
|
||||
"logolink_file":logolink_file,
|
||||
"privacylink_url":privacylink_url,
|
||||
"privacylink_uuid":privacylink_uuid,
|
||||
"privacylink_file":privacylink_file,
|
||||
"appname":appname,
|
||||
"genurl":_settings.GENURL,
|
||||
"urlLink":urlLink,
|
||||
@@ -477,8 +464,7 @@ def save_custom_client(request):
|
||||
|
||||
def cleanup_secrets(request):
|
||||
# Pass the UUID as a query param or in JSON body
|
||||
data = json.loads(request.body)
|
||||
my_uuid = data.get('uuid')
|
||||
my_uuid = request.GET.get('uuid')
|
||||
|
||||
if not my_uuid:
|
||||
return HttpResponse("Missing UUID", status=400)
|
||||
|
||||
Reference in New Issue
Block a user