diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index ce748e9..89848b1 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -277,6 +277,8 @@ jobs: sed -i -e 's|OriginalFilename = "rustdesk.exe"|OriginalFilename = "${{ inputs.appname }}.exe"|' ./libs/portable/Cargo.toml find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \; sed -i -e '/-p tmpdeb\/usr\/lib\/rustdesk/d' ./build.py + sed -i -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./Cargo.toml + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./libs/portable/Cargo.toml - name: allow custom.txt continue-on-error: true diff --git a/.github/workflows/generator-macos.yml b/.github/workflows/generator-macos.yml index 99d36d9..6c5c23f 100644 --- a/.github/workflows/generator-macos.yml +++ b/.github/workflows/generator-macos.yml @@ -180,8 +180,11 @@ jobs: # 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_BUNDLE_IDENTIFIER = .*|PRODUCT_BUNDLE_IDENTIFIER = com.${{ inputs.appname }}.app|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig - #sed -i '' -e 's|PRODUCT_COPYRIGHT = .*|PRODUCT_COPYRIGHT = Copyright 2025 ${{ inputs.appname }}. All rights reserved.|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig + sed -i '' -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./flutter/macos/Runner/Configs/AppInfo.xcconfig # 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|${{ inputs.appname }}|' ./libs/portable/Cargo.toml # Update Xcode project settings sed -i '' -e 's/PRODUCT_NAME = "RustDesk"/PRODUCT_NAME = "${{ inputs.appname }}"/' ./flutter/macos/Runner.xcodeproj/project.pbxproj diff --git a/.github/workflows/generator-windows.yml b/.github/workflows/generator-windows.yml index 6361ed2..0ec650e 100644 --- a/.github/workflows/generator-windows.yml +++ b/.github/workflows/generator-windows.yml @@ -177,19 +177,29 @@ jobs: 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 + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./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|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 + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./libs/portable/Cargo.toml # ./flutter/windows/runner/Runner.rc sed -i -e 's|"RustDesk Remote Desktop"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|VALUE "InternalName", "${{ inputs.appname }}" "\0"|' ./flutter/windows/runner/Runner.rc sed -i -e 's|"Copyright © 2025 Purslane Ltd. All rights reserved."|"Copyright © 2025"|' ./flutter/windows/runner/Runner.rc + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./flutter/windows/runner/Runner.rc sed -i -e 's|"rustdesk.exe"|"${{ inputs.filename }}"|' ./flutter/windows/runner/Runner.rc sed -i -e 's|"RustDesk"|"${{ inputs.appname }}"|' ./flutter/windows/runner/Runner.rc # ./src/lang/en.rs find ./src/lang -name "*.rs" -exec sed -i -e 's|RustDesk|${{ inputs.appname }}|' {} \; + # ./flutter/lib/desktop/pages/desktop_setting_page.dart + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./flutter/lib/desktop/pages/desktop_setting_page.dart + #./res/setup.nsi + sed -i -e 's|Purslane Ltd.|${{ inputs.appname }}|' ./res/setup.nsi + #./res/msi/preprocess.py + sed -i -e 's|PURSLANE|${{ inputs.appname }}|' ./res/msi/preprocess.py + sed -i -e 's|Purslane Ltd|${{ inputs.appname }}|' ./res/msi/preprocess.py - name: change url to custom if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com' @@ -203,6 +213,7 @@ jobs: 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|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).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/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi - name: change download link to custom if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download' diff --git a/rdgenerator/templates/generator.html b/rdgenerator/templates/generator.html index 3495ee8..d3df31a 100644 --- a/rdgenerator/templates/generator.html +++ b/rdgenerator/templates/generator.html @@ -398,24 +398,33 @@ try { const formData = JSON.parse(e.target.result); for (const key in formData) { - const element = document.querySelector(`[name="${key}"]`); + // More robust selector: checks for name OR id + const elements = document.querySelectorAll(`[name="${key}"], [id="${key}"]`); - if (element) { // Check if the element exists - if (element.type === 'checkbox' || element.type === 'radio') { - element.checked = formData[key]; // Set checked property - } else if (element.type !== 'file') { //for other elements - element.value = formData[key]; - } + if (elements.length > 0) { // Check if any element(s) exist + elements.forEach(element => { // Loop through all matching elements (important for radios) + if (element.type === 'radio') { + if (element.value === String(formData[key])) { // Compare value, crucial for radios + element.checked = true; + } else { + element.checked = false; // Uncheck others in the group + } + } else if (element.type === 'checkbox') { + element.checked = formData[key]; + } else if (element.type !== 'file') { + element.value = formData[key]; + } - // Handle image previews (as before) - if (key === 'iconfile' && formData[key]) { - document.getElementById('id_iconbase64').value = formData[key] - document.getElementById('icon-preview').innerHTML = ``; - } - if (key === 'logofile' && formData[key]) { - document.getElementById('id_logobase64').value = formData[key] - document.getElementById('logo-preview').innerHTML = ``; - } + // Handle image previews (as before) + if (key === 'iconfile' && formData[key]) { + document.getElementById('id_iconbase64').value = formData[key]; + document.getElementById('icon-preview').innerHTML = ``; + } + if (key === 'logofile' && formData[key]) { + document.getElementById('id_logobase64').value = formData[key]; + document.getElementById('logo-preview').innerHTML = ``; + } + }); } } } catch (error) {