Custom-name substitution corrupts translation keys and misses occurrences
The change appname to custom step rewrites Cargo.toml, Runner.rc,
License.rtf and src/lang/*.rs with sed. I byte-compared its output
against a value-targeted replacement on real 1.4.9 sources
(appname with a space, stock everything else) and found three
defects. All below are reproducible with stock GNU sed.
1. Translation keys get corrupted (ru.rs and friends)
The lang rewrite is a blanket s|RustDesk|<appname>| without the
g flag, so it hits the first occurrence per line — which in
("key", "value") tuples is often the key:
# stock 1.4.9 src/lang/ru.rs
("Keep RustDesk background service", "...")
("Show RustDesk", "...")
("About RustDesk", "...")
# after the workflow step (appname "RustDesk GTO")
("Keep RustDesk GTO background service", "...") # key broken:
# lookup fails, falls back to English
("Show RustDesk GTO", "...") # same
("About RustDesk GTO", "...") # same
The translated values on those same lines keep saying RustDesk
(second occurrence untouched). So one step both breaks lookups and
misses the branding it was supposed to apply.
2. Second occurrences missed everywhere (en.rs, License.rtf)
Same missing g: install_tip keeps install RustDesk to the system, and the MSI license text keeps RustDesk-IDs /
performance of RustDesk software license agreement — stock name
ships inside the installer users actually read.
Note the dilemma: just adding g would corrupt more keys (see 1),
so the step needs value-targeted replacement, not a flag.
3. InternalName pattern never matches (Runner.rc)
sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|...|' ./flutter/windows/runner/Runner.rc
Against 1.4.9's Runner.rc this matches nothing (different spacing
around \0), so InternalName silently stays rustdesk in every
custom build. (Side note: sed also strips the files' BOM; harmless
for rustc, but признак того же подхода.)
Proposal
Happy to PR this in whatever shape you prefer — e.g. g + key
safelist, or a small value-targeted script. I have byte-level
before/after fixtures for all of the above if useful.
Custom-name substitution corrupts translation keys and misses occurrences
The
change appname to customstep rewritesCargo.toml,Runner.rc,License.rtfandsrc/lang/*.rswith sed. I byte-compared its outputagainst a value-targeted replacement on real 1.4.9 sources
(
appnamewith a space, stock everything else) and found threedefects. All below are reproducible with stock GNU sed.
1. Translation keys get corrupted (ru.rs and friends)
The lang rewrite is a blanket
s|RustDesk|<appname>|without thegflag, so it hits the first occurrence per line — which in("key", "value")tuples is often the key:The translated values on those same lines keep saying
RustDesk(second occurrence untouched). So one step both breaks lookups and
misses the branding it was supposed to apply.
2. Second occurrences missed everywhere (en.rs, License.rtf)
Same missing
g:install_tipkeepsinstall RustDesk to the system, and the MSI license text keepsRustDesk-IDs/performance of RustDesk software license agreement— stock nameships inside the installer users actually read.
Note the dilemma: just adding
gwould corrupt more keys (see 1),so the step needs value-targeted replacement, not a flag.
3.
InternalNamepattern never matches (Runner.rc)sed -i -e 's|VALUE "InternalName", "rustdesk" "\0"|...|' ./flutter/windows/runner/Runner.rcAgainst 1.4.9's
Runner.rcthis matches nothing (different spacingaround
\0), soInternalNamesilently staysrustdeskin everycustom build. (Side note: sed also strips the files' BOM; harmless
for rustc, but признак того же подхода.)
Proposal
Happy to PR this in whatever shape you prefer — e.g.
g+ keysafelist, or a small value-targeted script. I have byte-level
before/after fixtures for all of the above if useful.