forked from shaytan/rdgen
fix windows registry for appname with spaces?
This commit is contained in:
26
.github/workflows/generator-windows.yml
vendored
26
.github/workflows/generator-windows.yml
vendored
@@ -195,6 +195,25 @@ jobs:
|
|||||||
# ./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|${{ inputs.appname }}|' {} \;
|
||||||
|
|
||||||
|
- name: fix registry if appname has a space
|
||||||
|
if: contains(inputs.appname, ' ')
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
#./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add {}|reg add \"{}\"|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\.{ext} /f|reg add \"HKEY_CLASSES_ROOT\\.{ext}\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\.{ext}\\DefaultIcon /f|reg add \"HKEY_CLASSES_ROOT\\.{ext}\\DefaultIcon\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\.{ext}\\shell /f|reg add \"HKEY_CLASSES_ROOT\\.{ext}\\shell\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\.{ext}\\shell\\open /f|reg add \"HKEY_CLASSES_ROOT\\.{ext}\\shell\\open\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\.{ext}\\shell\\open\\command|reg add \"HKEY_CLASSES_ROOT\\.{ext}\\shell\\open\\command\"|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\{ext} /f|reg add \"HKEY_CLASSES_ROOT\\{ext}\" /f|' ./src/platform.windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\{ext}\\shell /f|reg add \"HKEY_CLASSES_ROOT\\{ext}\\shell\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\{ext}\\shell\\open /f|reg add \"HKEY_CLASSES_ROOT\\{ext}\\shell\\open\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|reg add HKEY_CLASSES_ROOT\\{ext}\\shell\\open\\command /f|reg add \"HKEY_CLASSES_ROOT\\{ext}\\shell\\open\\command\" /f|' ./src/platform/windows.rs
|
||||||
|
sed -i -e 's|{subkey}|\"{subkey}\"|' ./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
|
||||||
|
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: fromJson(inputs.extras).compname != 'Purslane Ltd'
|
||||||
@@ -420,8 +439,11 @@ jobs:
|
|||||||
if: ${{ fromJson(inputs.extras).runasadmin == 'true' }}
|
if: ${{ fromJson(inputs.extras).runasadmin == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "SET_TARGET_PROPERTIES(\${BINARY_NAME} PROPERTIES LINK_FLAGS \"/MANIFESTUAC:\\\"level='requireAdministrator' uiAccess='false'\\\" /SUBSYSTEM:WINDOWS\")" >> ./flutter/windows/runner/CMakeLists.txt
|
sed -i '/<\/compatibility>/a \
|
||||||
sed -i '/administrator/d' res/manifest.xml
|
<security> \
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> \
|
||||||
|
</security>' ./flutter/windows/runner/runner.exe.manifest
|
||||||
|
|
||||||
|
|
||||||
- name: Report Status
|
- name: Report Status
|
||||||
uses: fjogeleit/http-request-action@v1
|
uses: fjogeleit/http-request-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user