test input hiding
This commit is contained in:
52
.github/workflows/generator-linux.yml
vendored
52
.github/workflows/generator-linux.yml
vendored
@@ -84,8 +84,19 @@ jobs:
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}')
|
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()
|
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:
|
try:
|
||||||
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
||||||
@@ -665,8 +676,19 @@ jobs:
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}')
|
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()
|
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:
|
try:
|
||||||
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
||||||
@@ -771,8 +793,19 @@ jobs:
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}')
|
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()
|
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:
|
try:
|
||||||
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
||||||
@@ -876,8 +909,19 @@ jobs:
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
r = requests.get('${{ fromJson(inputs.zip_url).url }}/get_zip?filename=${{ fromJson(inputs.zip_url).file }}')
|
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()
|
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:
|
try:
|
||||||
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
with pyzipper.AESZipFile(io.BytesIO(r.content)) as zf:
|
||||||
|
|||||||
292
.github/workflows/generator-macos.yml
vendored
292
.github/workflows/generator-macos.yml
vendored
@@ -3,56 +3,16 @@ run-name: Custom macOS Client Generator
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
server:
|
version:
|
||||||
description: 'Rendezvous Server'
|
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
|
||||||
@@ -71,7 +31,7 @@ env:
|
|||||||
# vcpkg version: 2024.07.12
|
# vcpkg version: 2024.07.12
|
||||||
VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
|
VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
|
||||||
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836"
|
ARMV7_VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836"
|
||||||
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 }}"
|
||||||
@@ -83,7 +43,7 @@ jobs:
|
|||||||
generate-bridge:
|
generate-bridge:
|
||||||
uses: ./.github/workflows/bridge.yml
|
uses: ./.github/workflows/bridge.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ fromJson(inputs.extras).version }}
|
version: ${{ inputs.version }}
|
||||||
|
|
||||||
build-for-macos:
|
build-for-macos:
|
||||||
name: ${{ matrix.job.target }}
|
name: ${{ matrix.job.target }}
|
||||||
@@ -109,9 +69,59 @@ jobs:
|
|||||||
vcpkg-triplet: arm64-osx,
|
vcpkg-triplet: arm64-osx,
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
STATUS_URL: ${{ fromJson(inputs.extras).rdgen == 'true' && format('{0}/updategh', secrets.GENURL) || format('{0}/api/updategh', inputs.apiServer) }}
|
STATUS_URL: "${{ secrets.GENURL }}/updategh"
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
|
api_server = secrets.get('apiServer', '').strip()
|
||||||
|
api_server = api_server.rstrip('/')
|
||||||
|
|
||||||
|
rdgen_value = str(secrets.get('rdgen', 'false')).lower()
|
||||||
|
if rdgen_value == "true":
|
||||||
|
status_url = "${{ secrets.GENURL }}/updategh"
|
||||||
|
else:
|
||||||
|
status_url = f"{api_server}/api/updategh"
|
||||||
|
env_file.write(f"STATUS_URL={status_url}\n")
|
||||||
|
|
||||||
|
print("Secrets loaded into environment.")
|
||||||
|
|
||||||
|
- name: Finalize and Cleanup zip/json
|
||||||
|
if: always() # Run even if previous steps fail
|
||||||
|
uses: fjogeleit/http-request-action@v1
|
||||||
|
with:
|
||||||
|
url: ${{ env.STATUS_URL }}
|
||||||
|
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:
|
||||||
@@ -125,7 +135,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' }}
|
||||||
@@ -158,73 +168,73 @@ jobs:
|
|||||||
cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak
|
cp ./flutter/macos/Runner/Configs/AppInfo.xcconfig ./flutter/macos/Runner/Configs/AppInfo.xcconfig.bak
|
||||||
|
|
||||||
# MACSTUFF Update Info.plist
|
# MACSTUFF Update Info.plist
|
||||||
sed -i '' -e 's|<key>CFBundleName</key>.*<string>.*</string>|<key>CFBundleName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
sed -i '' -e 's|<key>CFBundleName</key>.*<string>.*</string>|<key>CFBundleName</key>\n\t<string>${{ env.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
sed -i '' -e 's|<key>CFBundleDisplayName</key>.*<string>.*</string>|<key>CFBundleDisplayName</key>\n\t<string>${{ inputs.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
sed -i '' -e 's|<key>CFBundleDisplayName</key>.*<string>.*</string>|<key>CFBundleDisplayName</key>\n\t<string>${{ env.appname }}</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
sed -i '' -e 's|<key>CFBundleIdentifier</key>.*<string>.*</string>|<key>CFBundleIdentifier</key>\n\t<string>com.${{ inputs.appname }}.app</string>|' ./flutter/macos/Runner/Info.plist
|
sed -i '' -e 's|<key>CFBundleIdentifier</key>.*<string>.*</string>|<key>CFBundleIdentifier</key>\n\t<string>com.${{ env.appname }}.app</string>|' ./flutter/macos/Runner/Info.plist
|
||||||
# sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ inputs.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
# sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ env.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
||||||
|
|
||||||
# MACSTUFF Update AppInfo.xcconfig
|
# MACSTUFF Update AppInfo.xcconfig
|
||||||
sed -i '' -e 's|PRODUCT_NAME = .*|PRODUCT_NAME = ${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
sed -i '' -e 's|PRODUCT_NAME = .*|PRODUCT_NAME = ${{ env.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
||||||
sed -i '' -e 's|PRODUCT_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
sed -i '' -e 's|PRODUCT_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ env.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
||||||
sed -i '' -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
sed -i '' -e 's|Purslane Ltd.|${{ env.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig
|
||||||
# Keep DEVELOPMENT_TEAM if it exists, don't blank it out
|
# Keep DEVELOPMENT_TEAM if it exists, don't blank it out
|
||||||
|
|
||||||
sed -i -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./Cargo.toml
|
sed -i -e 's|Purslane Ltd.|${{ env.appname }}|' ./Cargo.toml
|
||||||
sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./libs/portable/Cargo.toml
|
sed -i -e 's|Purslane Ltd|${{ env.appname }}|' ./libs/portable/Cargo.toml
|
||||||
|
|
||||||
# Update Xcode project settings
|
# Update Xcode project settings
|
||||||
sed -i '' -e 's/PRODUCT_NAME = "RustDesk"/PRODUCT_NAME = "${{ inputs.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
|
sed -i '' -e 's/PRODUCT_NAME = "RustDesk"/PRODUCT_NAME = "${{ env.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
|
||||||
sed -i '' -e 's/PRODUCT_BUNDLE_IDENTIFIER = ".*"/PRODUCT_BUNDLE_IDENTIFIER = "com.${{ inputs.appname }}.app"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
|
sed -i '' -e 's/PRODUCT_BUNDLE_IDENTIFIER = ".*"/PRODUCT_BUNDLE_IDENTIFIER = "com.${{ env.appname }}.app"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj
|
||||||
# Don't modify DEVELOPMENT_TEAM in project.pbxproj
|
# Don't modify DEVELOPMENT_TEAM in project.pbxproj
|
||||||
|
|
||||||
# Update CMake settings
|
# Update CMake settings
|
||||||
if [ -f "./flutter/macos/CMakeLists.txt" ]; then
|
if [ -f "./flutter/macos/CMakeLists.txt" ]; then
|
||||||
sed -i '' -e 's/set(BINARY_NAME ".*")/set(BINARY_NAME "${{ inputs.appname }}")/' ./flutter/macos/CMakeLists.txt
|
sed -i '' -e 's/set(BINARY_NAME ".*")/set(BINARY_NAME "${{ env.appname }}")/' ./flutter/macos/CMakeLists.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update Podfile - keep the target as 'Runner'
|
# Update Podfile - keep the target as 'Runner'
|
||||||
# sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'${{ inputs.appname }}'"'"' do/' ./flutter/macos/Podfile
|
# sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'${{ env.appname }}'"'"' do/' ./flutter/macos/Podfile
|
||||||
sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'Runner'"'"' do/' ./flutter/macos/Podfile
|
sed -i '' -e 's/target '"'"'Runner'"'"' do/target '"'"'Runner'"'"' do/' ./flutter/macos/Podfile
|
||||||
|
|
||||||
cp ./src/lang/en.rs ./src/lang/en.rs.bak
|
cp ./src/lang/en.rs ./src/lang/en.rs.bak
|
||||||
cp ./src/lang/nl.rs ./src/lang/nl.rs.bak
|
cp ./src/lang/nl.rs ./src/lang/nl.rs.bak
|
||||||
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 }}|' {} \;
|
||||||
sed -i '' -e 's|RustDesk|${{ inputs.appname }}|' ./src/lang/nl.rs
|
sed -i '' -e 's|RustDesk|${{ env.appname }}|' ./src/lang/nl.rs
|
||||||
|
|
||||||
sed -i '' -e 's|https://rustdesk.com|${{ fromJson(inputs.extras).urlLink }}|' ./build.py
|
sed -i '' -e 's|https://rustdesk.com|${{ env.urlLink }}|' ./build.py
|
||||||
sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ fromJson(inputs.extras).urlLink }}'));|" ./flutter/lib/common.dart
|
sed -i '' -e "s|launchUrl(Uri.parse('https://rustdesk.com'));|launchUrl(Uri.parse('${{ env.urlLink }}'));|" ./flutter/lib/common.dart
|
||||||
sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ fromJson(inputs.extras).urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
sed -i '' -e "s|launchUrlString('https://rustdesk.com');|launchUrlString('${{ env.urlLink }}');|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||||
sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
sed -i '' -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ env.urlLink }}/privacy.html')|" ./flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||||
sed -i '' -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart
|
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('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./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|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
|
sed -i '' -e "s|https://rustdesk.com/privacy.html|${{ env.urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
|
||||||
|
|
||||||
- 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 }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
sed -i -e 's|https://rustdesk.com/download|${{ env.downloadLink }}|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
sed -i -e 's|https://rustdesk.com/download|${{ fromJson(inputs.extras).downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
sed -i -e 's|https://rustdesk.com/download|${{ env.downloadLink }}|' ./flutter/lib/mobile/pages/connection_page.dart
|
||||||
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
|
||||||
|
|
||||||
# Update slogan
|
# Update slogan
|
||||||
#sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ inputs.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
#sed -i '' '/<key>NSHumanReadableCopyright<\/key>/{n;s/<string>.*<\/string>/<string>Copyright 2025 ${{ env.appname }}. All rights reserved.<\/string>/;}' ./flutter/macos/Runner/Info.plist
|
||||||
|
|
||||||
# Update slogan - About in en.rs
|
# Update slogan - About in en.rs
|
||||||
sed -i '' -e 's/("Slogan_tip", "Made with heart in this chaotic world!")/("Slogan_tip", "Powered by ${{ inputs.appname }}")/' ./src/lang/en.rs
|
sed -i '' -e 's/("Slogan_tip", "Made with heart in this chaotic world!")/("Slogan_tip", "Powered by ${{ env.appname }}")/' ./src/lang/en.rs
|
||||||
sed -i '' -e 's/("About RustDesk", "")/("About RustDesk", "About ${{ inputs.appname }}")/' ./src/lang/en.rs
|
sed -i '' -e 's/("About RustDesk", "")/("About RustDesk", "About ${{ env.appname }}")/' ./src/lang/en.rs
|
||||||
|
|
||||||
|
|
||||||
# Update slogan - About in nl.rs
|
# Update slogan - About in nl.rs
|
||||||
sed -i '' -e 's/("Slogan_tip", "Ontwikkeld met het hart voor deze chaotische wereld!")/("Slogan_tip", "Powered by ${{ inputs.appname }}")/' ./src/lang/nl.rs
|
sed -i '' -e 's/("Slogan_tip", "Ontwikkeld met het hart voor deze chaotische wereld!")/("Slogan_tip", "Powered by ${{ env.appname }}")/' ./src/lang/nl.rs
|
||||||
sed -i '' -e 's/("Your Desktop", "Uw Bureaublad")/("Your Desktop", "Uw ${{ inputs.appname }}")/' ./src/lang/nl.rs
|
sed -i '' -e 's/("Your Desktop", "Uw Bureaublad")/("Your Desktop", "Uw ${{ env.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 RustDesk", "Over RustDesk")/("About RustDesk", "Over ${{ env.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 ${{ env.appname }}")/' ./src/lang/nl.rs
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
|
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff
|
||||||
git apply allowCustom.diff
|
git apply allowCustom.diff
|
||||||
@@ -244,7 +254,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 build runtime
|
- name: Install build runtime
|
||||||
run: |
|
run: |
|
||||||
@@ -288,7 +298,7 @@ jobs:
|
|||||||
prefix-key: ${{ matrix.job.os }}
|
prefix-key: ${{ matrix.job.os }}
|
||||||
|
|
||||||
- name: Magick stuff for macOS
|
- name: Magick stuff for macOS
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -302,8 +312,8 @@ jobs:
|
|||||||
# Download icon using curl with additional SSL options
|
# Download icon using curl with additional SSL options
|
||||||
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
|
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
|
||||||
-H "User-Agent: Mozilla/5.0" \
|
-H "User-Agent: Mozilla/5.0" \
|
||||||
"${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}" \
|
"${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}&uuid=${{ env.iconlink_uuid }}" \
|
||||||
-o ./res/icon.png || wget --no-check-certificate -O ./res/icon.png "${{ fromJson(inputs.iconlink).url }}/get_png?filename=${{ fromJson(inputs.iconlink).file }}&uuid=${{ fromJson(inputs.iconlink).uuid }}"
|
-o ./res/icon.png || wget --no-check-certificate -O ./res/icon.png "${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}&uuid=${{ env.iconlink_uuid }}"
|
||||||
|
|
||||||
# Backup existing files (if they exist)
|
# Backup existing files (if they exist)
|
||||||
[ -f "./res/32x32.png" ] && mv ./res/32x32.png ./res/32x32.png.bak
|
[ -f "./res/32x32.png" ] && mv ./res/32x32.png ./res/32x32.png.bak
|
||||||
@@ -398,7 +408,7 @@ jobs:
|
|||||||
ls -lh rustdesk/data/flutter_assets/assets/
|
ls -lh rustdesk/data/flutter_assets/assets/
|
||||||
|
|
||||||
- name: replace flutter icons
|
- name: replace flutter icons
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -406,8 +416,8 @@ jobs:
|
|||||||
# Create required directories and files
|
# Create required directories and files
|
||||||
mkdir -p web
|
mkdir -p web
|
||||||
mkdir -p assets
|
mkdir -p assets
|
||||||
echo '{"name":"${{ inputs.appname }}","short_name":"${{ inputs.appname }}","start_url":"/","display":"standalone","background_color":"#ffffff","theme_color":"#ffffff","description":"A remote desktop software."}' > web/manifest.json
|
echo '{"name":"${{ env.appname }}","short_name":"${{ env.appname }}","start_url":"/","display":"standalone","background_color":"#ffffff","theme_color":"#ffffff","description":"A remote desktop software."}' > web/manifest.json
|
||||||
echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>${{ inputs.appname }}</title></head><body></body></html>' > web/index.html
|
echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>${{ env.appname }}</title></head><body></body></html>' > web/index.html
|
||||||
|
|
||||||
# Ensure the AppIcon.appiconset directory exists
|
# Ensure the AppIcon.appiconset directory exists
|
||||||
mkdir -p macos/Runner/Assets.xcassets/AppIcon.appiconset
|
mkdir -p macos/Runner/Assets.xcassets/AppIcon.appiconset
|
||||||
@@ -422,7 +432,7 @@ jobs:
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: ui.rs
|
- name: ui.rs
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -435,35 +445,35 @@ jobs:
|
|||||||
|
|
||||||
- name: fix connection delay
|
- name: fix connection delay
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
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: add cycle monitors to toolbar
|
- name: add cycle monitors to toolbar
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: fromJson(inputs.extras).cycleMonitor == 'true'
|
if: env.cycleMonitor == 'true'
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff
|
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff
|
||||||
git apply cycle_monitor.diff
|
git apply cycle_monitor.diff
|
||||||
|
|
||||||
- name: use X for offline display instead of orange circle
|
- name: use X for offline display instead of orange circle
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: fromJson(inputs.extras).xOffline == 'true'
|
if: env.xOffline == 'true'
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff
|
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff
|
||||||
git apply xoffline.diff
|
git apply xoffline.diff
|
||||||
|
|
||||||
- name: hide-cm
|
- name: hide-cm
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: fromJson(inputs.extras).hidecm == 'true'
|
if: env.hidecm == 'true'
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
|
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
|
||||||
git apply hidecm.diff
|
git apply hidecm.diff
|
||||||
|
|
||||||
- name: removeNewVersionNotif
|
- name: removeNewVersionNotif
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: fromJson(inputs.extras).removeNewVersionNotif == 'true'
|
if: env.removeNewVersionNotif == 'true'
|
||||||
run: |
|
run: |
|
||||||
sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart
|
||||||
sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
|
sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs
|
||||||
@@ -474,7 +484,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: Restore bridge files
|
- name: Restore bridge files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
@@ -510,7 +520,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": "25% complete"}'
|
data: '{"uuid": "${{ env.uuid }}", "status": "25% complete"}'
|
||||||
|
|
||||||
- name: Create MacOS directory structure
|
- name: Create MacOS directory structure
|
||||||
run: |
|
run: |
|
||||||
@@ -525,7 +535,7 @@ jobs:
|
|||||||
sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml
|
sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml
|
||||||
sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj
|
sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj
|
||||||
fi
|
fi
|
||||||
sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py
|
sed -i -e "s/RustDesk.app/\"${{ env.appname }}.app\"/" build.py
|
||||||
./build.py --flutter --hwcodec --unix-file-copy-paste ${{ matrix.job.extra-build-args }}
|
./build.py --flutter --hwcodec --unix-file-copy-paste ${{ matrix.job.extra-build-args }}
|
||||||
|
|
||||||
# - name: Copy service file
|
# - name: Copy service file
|
||||||
@@ -538,7 +548,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: Install rcodesign tool
|
- name: Install rcodesign tool
|
||||||
if: env.MACOS_P12_BASE64 != null
|
if: env.MACOS_P12_BASE64 != null
|
||||||
@@ -566,7 +576,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: Show version information (Rust, cargo, Clang)
|
- name: Show version information (Rust, cargo, Clang)
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -579,7 +589,7 @@ jobs:
|
|||||||
rustc -V
|
rustc -V
|
||||||
|
|
||||||
- name: icon svg handling
|
- name: icon svg handling
|
||||||
if: ${{ inputs.iconlink != 'false' }}
|
if: ${{ env.iconlink_url != 'false' }}
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -595,7 +605,7 @@ jobs:
|
|||||||
rm ./temp_icon.pbm
|
rm ./temp_icon.pbm
|
||||||
|
|
||||||
- name: logo handling
|
- name: logo handling
|
||||||
if: ${{ inputs.logolink != 'false' }}
|
if: ${{ env.logolink_url != 'false' }}
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -603,11 +613,11 @@ jobs:
|
|||||||
mkdir -p "$ASSETS_DIR"
|
mkdir -p "$ASSETS_DIR"
|
||||||
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
|
curl -k -L --tlsv1.2 --proto =https --ssl-reqd \
|
||||||
-H "User-Agent: Mozilla/5.0" \
|
-H "User-Agent: Mozilla/5.0" \
|
||||||
"${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}" \
|
"${{ env.logolink_url }}/get_png?filename=${{ env.logolink_file }}&uuid=${{ env.logolink_uuid }}" \
|
||||||
-o "$ASSETS_DIR/logo.png" || \
|
-o "$ASSETS_DIR/logo.png" || \
|
||||||
wget --no-check-certificate \
|
wget --no-check-certificate \
|
||||||
-O "$ASSETS_DIR/logo.png" \
|
-O "$ASSETS_DIR/logo.png" \
|
||||||
"${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}&uuid=${{ fromJson(inputs.logolink).uuid }}"
|
"${{ env.logolink_url }}/get_png?filename=${{ env.logolink_file }}&uuid=${{ env.logolink_uuid }}"
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -615,7 +625,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: Sign macOS app bundle
|
- name: Sign macOS app bundle
|
||||||
if: env.MACOS_P12_BASE64 != ''
|
if: env.MACOS_P12_BASE64 != ''
|
||||||
@@ -628,21 +638,21 @@ jobs:
|
|||||||
# Rename RustDesk.app to the custom app name first
|
# Rename RustDesk.app to the custom app name first
|
||||||
if [ -d "RustDesk.app" ]; then
|
if [ -d "RustDesk.app" ]; then
|
||||||
# First rename the app if it's still called RustDesk.app
|
# First rename the app if it's still called RustDesk.app
|
||||||
mv "RustDesk.app" "${{ inputs.appname }}.app"
|
mv "RustDesk.app" "${{ env.appname }}.app"
|
||||||
echo "Renamed RustDesk.app to ${{ inputs.appname }}.app"
|
echo "Renamed RustDesk.app to ${{ env.appname }}.app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "App bundle contents after rename:"
|
echo "App bundle contents after rename:"
|
||||||
ls -la "${{ inputs.appname }}.app" || echo "App not found"
|
ls -la "${{ env.appname }}.app" || echo "App not found"
|
||||||
ls -la "${{ inputs.appname }}.app/Contents" || echo "Contents not found"
|
ls -la "${{ env.appname }}.app/Contents" || echo "Contents not found"
|
||||||
|
|
||||||
# Decode the certificate
|
# Decode the certificate
|
||||||
echo "${{ secrets.MACOS_P12_BASE64 }}" | base64 --decode > certificate.p12
|
echo "${{ secrets.MACOS_P12_BASE64 }}" | base64 --decode > certificate.p12
|
||||||
|
|
||||||
# Sign the app bundle and its contents
|
# Sign the app bundle and its contents
|
||||||
if [ -d "${{ inputs.appname }}.app/Contents/MacOS" ]; then
|
if [ -d "${{ env.appname }}.app/Contents/MacOS" ]; then
|
||||||
echo "Signing main executable..."
|
echo "Signing main executable..."
|
||||||
MAIN_EXECUTABLE="${{ inputs.appname }}.app/Contents/MacOS/${{ inputs.appname }}"
|
MAIN_EXECUTABLE="${{ env.appname }}.app/Contents/MacOS/${{ env.appname }}"
|
||||||
if [ -f "$MAIN_EXECUTABLE" ]; then
|
if [ -f "$MAIN_EXECUTABLE" ]; then
|
||||||
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
||||||
--code-signature-flags runtime "$MAIN_EXECUTABLE"
|
--code-signature-flags runtime "$MAIN_EXECUTABLE"
|
||||||
@@ -650,23 +660,23 @@ jobs:
|
|||||||
echo "Main executable not found at expected path: $MAIN_EXECUTABLE"
|
echo "Main executable not found at expected path: $MAIN_EXECUTABLE"
|
||||||
# Try to find the actual executable
|
# Try to find the actual executable
|
||||||
echo "Available executables in MacOS directory:"
|
echo "Available executables in MacOS directory:"
|
||||||
ls -la "${{ inputs.appname }}.app/Contents/MacOS/"
|
ls -la "${{ env.appname }}.app/Contents/MacOS/"
|
||||||
ACTUAL_EXECUTABLE=$(ls "${{ inputs.appname }}.app/Contents/MacOS/" | head -n 1)
|
ACTUAL_EXECUTABLE=$(ls "${{ env.appname }}.app/Contents/MacOS/" | head -n 1)
|
||||||
if [ -n "$ACTUAL_EXECUTABLE" ]; then
|
if [ -n "$ACTUAL_EXECUTABLE" ]; then
|
||||||
echo "Found executable: $ACTUAL_EXECUTABLE"
|
echo "Found executable: $ACTUAL_EXECUTABLE"
|
||||||
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
||||||
--code-signature-flags runtime "${{ inputs.appname }}.app/Contents/MacOS/$ACTUAL_EXECUTABLE"
|
--code-signature-flags runtime "${{ env.appname }}.app/Contents/MacOS/$ACTUAL_EXECUTABLE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Signing frameworks..."
|
echo "Signing frameworks..."
|
||||||
find "${{ inputs.appname }}.app/Contents/Frameworks" -type f -not -name ".*" -exec \
|
find "${{ env.appname }}.app/Contents/Frameworks" -type f -not -name ".*" -exec \
|
||||||
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
||||||
--code-signature-flags runtime {} \;
|
--code-signature-flags runtime {} \;
|
||||||
|
|
||||||
echo "Signing main bundle..."
|
echo "Signing main bundle..."
|
||||||
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
rcodesign sign --p12-file certificate.p12 --p12-password "${{ secrets.MACOS_P12_PASSWORD }}" \
|
||||||
--code-signature-flags runtime "${{ inputs.appname }}.app"
|
--code-signature-flags runtime "${{ env.appname }}.app"
|
||||||
else
|
else
|
||||||
echo "Error: Invalid app bundle structure"
|
echo "Error: Invalid app bundle structure"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -684,24 +694,24 @@ jobs:
|
|||||||
# Find the actual .app bundle
|
# Find the actual .app bundle
|
||||||
if [ -d "RustDesk.app" ]; then
|
if [ -d "RustDesk.app" ]; then
|
||||||
# First rename the app if it's still called RustDesk.app
|
# First rename the app if it's still called RustDesk.app
|
||||||
mv "RustDesk.app" "${{ inputs.appname }}.app"
|
mv "RustDesk.app" "${{ env.appname }}.app"
|
||||||
fi
|
fi
|
||||||
if [ ! -d "${{ inputs.appname }}.app" ]; then
|
if [ ! -d "${{ env.appname }}.app" ]; then
|
||||||
echo "Could not find .app bundle!"
|
echo "Could not find .app bundle!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Creating DMG for ${{ inputs.appname }}.app"
|
echo "Creating DMG for ${{ env.appname }}.app"
|
||||||
create-dmg \
|
create-dmg \
|
||||||
--volname "${{ inputs.appname }}" \
|
--volname "${{ env.appname }}" \
|
||||||
--window-pos 200 120 \
|
--window-pos 200 120 \
|
||||||
--window-size 800 400 \
|
--window-size 800 400 \
|
||||||
--icon-size 100 \
|
--icon-size 100 \
|
||||||
--icon "${{ inputs.appname }}.app" 200 190 \
|
--icon "${{ env.appname }}.app" 200 190 \
|
||||||
--hide-extension "${{ inputs.appname }}.app" \
|
--hide-extension "${{ env.appname }}.app" \
|
||||||
--app-drop-link 600 185 \
|
--app-drop-link 600 185 \
|
||||||
"${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" \
|
"${{ env.appname }}-${{ matrix.job.arch }}.dmg" \
|
||||||
"${{ inputs.appname }}.app"
|
"${{ env.appname }}.app"
|
||||||
mv "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg" $GITHUB_WORKSPACE/
|
mv "${{ env.appname }}-${{ matrix.job.arch }}.dmg" $GITHUB_WORKSPACE/
|
||||||
|
|
||||||
- name: Rename rustdesk
|
- name: Rename rustdesk
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
@@ -711,38 +721,38 @@ jobs:
|
|||||||
ls -la
|
ls -la
|
||||||
|
|
||||||
# Find the DMG file dynamically
|
# Find the DMG file dynamically
|
||||||
DMG_FILE=$(find . -name "${{ inputs.appname }}-${{ matrix.job.arch }}.dmg")
|
DMG_FILE=$(find . -name "${{ env.appname }}-${{ matrix.job.arch }}.dmg")
|
||||||
|
|
||||||
if [ -n "$DMG_FILE" ]; then
|
if [ -n "$DMG_FILE" ]; then
|
||||||
echo "Found DMG file: $DMG_FILE"
|
echo "Found DMG file: $DMG_FILE"
|
||||||
mv "$DMG_FILE" "${{ inputs.filename }}-${{ matrix.job.arch }}.dmg"
|
mv "$DMG_FILE" "${{ env.filename }}-${{ matrix.job.arch }}.dmg"
|
||||||
echo "Renamed to ${{ inputs.filename }}-${{ matrix.job.arch }}.dmg"
|
echo "Renamed to ${{ env.filename }}-${{ matrix.job.arch }}.dmg"
|
||||||
else
|
else
|
||||||
echo "No DMG file found matching the pattern"
|
echo "No DMG file found matching the pattern"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- 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 \
|
curl -i -X POST \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-H "Content-Type: multipart/form-data" \
|
||||||
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
|
-H "Authorization: Bearer ${{ env.token }}" \
|
||||||
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" \
|
-F "file=@$GITHUB_WORKSPACE/${{ env.filename }}-${{ matrix.job.arch }}.dmg" \
|
||||||
-F "uuid=${{ inputs.uuid }}" \
|
-F "uuid=${{ env.uuid }}" \
|
||||||
"${{ secrets.GENURL }}/save_custom_client"
|
"${{ 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 \
|
curl -i -X POST \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-H "Content-Type: multipart/form-data" \
|
||||||
-H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" \
|
-H "Authorization: Bearer ${{ env.token }}" \
|
||||||
-F "file=@$GITHUB_WORKSPACE/${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" \
|
-F "file=@$GITHUB_WORKSPACE/${{ env.filename }}-${{ matrix.job.arch }}.dmg" \
|
||||||
"${{ inputs.apiServer }}/api/save_custom_client"
|
"${{ env.apiServer }}/api/save_custom_client"
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
@@ -750,7 +760,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()
|
||||||
@@ -759,7 +769,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()
|
||||||
@@ -768,4 +778,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