[BOOTDATA] Add an "Install ReactOS" shortcut to the Live environment desktop

The shortcut spawns CMD.EXE in the background and runs a specific
command-line that determines where the reactos.exe installer is:

  cmd.exe /D /E:ON /C "start %SystemDrive%\%PROCESSOR_ARCHITECTURE:x86=I386%\reactos.exe"

An alternative could be:

  cmd.exe /D /C "for /F %f in ('"if %PROCESSOR_ARCHITECTURE%==x86 (echo I386) else (echo %PROCESSOR_ARCHITECTURE%)"') do start %SystemDrive%\%f\reactos.exe"

(In this second case an exact value comparison is made, contrary
to the first case where all instances of "x86" would be replaced.)

The reason for using CMD.EXE, is that the `PROCESSOR_ARCHITECTURE`
environment variable contains the "almost" correct value for the
architecture directory name where reactos.exe can be found, except
for the x86 case where `PROCESSOR_ARCHITECTURE` is set to "x86"
(as on Windows) but the directory is named "I386" (as on Windows again).
This commit is contained in:
Hermès Bélusca-Maïto
2026-05-13 22:22:44 +02:00
parent 8eea7255fd
commit 85f2a67a9e

View File

@@ -111,6 +111,15 @@ set(dir_startmenu_entertainment "${dir_startmenu_accessories}/Entertainment")
set(dir_startmenu_systemtools "${dir_startmenu_accessories}/System Tools")
set(dir_quicklaunch "Profiles/Default User/Application Data/Microsoft/Internet Explorer/Quick Launch")
cmdenvvar(envvar_systemdrive "SystemDrive" TRUE)
cmdenvvar(envvar_archdir "PROCESSOR_ARCHITECTURE:x86=I386" TRUE)
add_livecd_shortcut("Install ReactOS"
"shell:system\\cmd.exe"
CMDLINE_ARGS "/D /E:ON /C \"start ${envvar_systemdrive}\\${envvar_archdir}\\reactos.exe\""
ICON "${envvar_systemroot}\\system32\\msiexec.exe"
MINIMIZE
DESTINATION "${dir_allusers_desktop}")
add_livecd_shortcut("Read Me"
"shell:windows\\readme.txt"
ICON "${envvar_systemroot}\\system32\\shell32.dll" ICON_INDEX -152