mirror of
https://github.com/reactos/reactos.git
synced 2026-06-21 05:06:03 +08:00
CORE-15156, CORE-19691, CORE-19692 Finally get rid of the livecd_start.cmd hack introduced waaaay back in commitff6d7b0236(r54514)! See also commitsea682b6909(r54512) and71867403fd(r54513). For target paths, use the shell "special shell folder" syntax: `shell:windows\...` or `shell:system\...`, introduced in commit7b081be46d(PR #7158) by Whindmar Saksit. Specify an explicit icon path and index for the "Read Me.lnk" shortcut. Includes ideas from PR #7154 by Katayama Hirofumi MZ. The generated shell links are confirmed to work on ReactOS, but also on Windows 2003 and Windows 7. - Change the MKSHELLLINK icon parameter syntax to be: `-i [icon_path[,nr]]` where, either both `icon_path` and icon index are given, separated by a comma ',' , or, either the `icon_path` is given but the index is optional (default: 0), or, only the icon index is given, in which case the icon path is set to the target instead. - Use a `VERBATIM` command-line for `add_custom_command()`, so that *nix builds can cope with parameters containing backslashes. - The shortcut target path, working directory, command-line arguments, and icon path all may specify explicit Win32 environment variables (like `%SystemRoot%`, `%HOMEDRIVE%`, etc.). Because these environment variables are specified as data given to the build tool via CMake, **AND** we have to workaround keeping these variables unexpanded when they are transmitted to the tool via CMD.EXE (on builds made on Windows), specify these variables in an "escaped" format, using `^%` instead: `^%SystemRoot^%`, etc. Additionally these paths may be explicitly quoted and passed that way to the MKSHELLLINK tool. In order to deal with both unquoting the strings and unescaping the environment variables, introduce a helper function and invoke them on the aforementioned strings.