tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
78.1k stars 2.31k forks source link

fix(windows): nsis failed to resolve resources with `$` in their name, closes #9657 #9659

Closed enkhjile closed 1 week ago

enkhjile commented 2 weeks ago

Registering a global escape function that replaces $ with $$ in Handlebars causes the build step to fail when resources contain $ in their names, because NSIS commands like File /a cannot resolve the escaped paths. #9657

I've added a helper that unescapes $$ back to $ and modified the corresponding resource expression in installer.nsi to use this helper.

If there are better solutions, I'd be happy to implement them.

amrbashir commented 1 week ago

Thanks for your contributions. I did a bit of experiments and seems like only the input to File, needs unescaped values so please revert changes to other places, also could you run cargo fmt inside tooling/bundler?

enkhjile commented 1 week ago

@amrbashir Thanks for your feedback. I have reverted the changes to the installer.nsi, except for the File sections, and have run cargo fmt.