Start Luminary from the setup's finish page through the shell
MUI2 runs the finish-page target with Exec, which passes the path straight to CreateProcess. The 0.5.4.1 bundle ships the PowerShell launcher, so that target is Luminary.vbs and the ticked "Start Luminary" box closed the installer without opening anything. ExecShell goes through the shell, so the .exe, .vbs and .cmd all start. The 0.5.4.1 setup is rebuilt from the same staged bundle, so the portable zip keeps its hash.
This commit is contained in:
@@ -95,6 +95,13 @@ VIAddVersionKey "LegalCopyright" "MIT licensed"
|
||||
!endif
|
||||
!define MUI_FINISHPAGE_RUN "${APP_LAUNCH}"
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}"
|
||||
; MUI starts the finish-page target with Exec, which hands the path straight to
|
||||
; CreateProcess. That only works for a real executable: when the bundle ships
|
||||
; the PowerShell launcher (no Go toolchain at build time) the target is
|
||||
; Luminary.vbs, and CreateProcess cannot start a script, so the ticked "Start
|
||||
; Luminary" box closed the installer and nothing opened. ExecShell goes through
|
||||
; the shell, so the exe, the .vbs and the .cmd all start.
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION "StartLuminaryOnFinish"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!if /FileExists "${SOURCE_DIR}/LICENSE"
|
||||
@@ -114,6 +121,10 @@ LangString DESC_Main ${LANG_ENGLISH} "The editor, film looks, bundled Node runti
|
||||
LangString DESC_Desktop ${LANG_ENGLISH} "Put a Luminary shortcut on the desktop."
|
||||
LangString DESC_Startup ${LANG_ENGLISH} "Start Luminary in the background when you sign in to Windows."
|
||||
|
||||
Function StartLuminaryOnFinish
|
||||
ExecShell "open" "${APP_LAUNCH}"
|
||||
FunctionEnd
|
||||
|
||||
Function .onInit
|
||||
; The launcher refuses these too, but the installer should say so before it
|
||||
; copies 250 MB onto an unsupported PC.
|
||||
|
||||
Reference in New Issue
Block a user