Updated installer wrapper to use StdUtils and wait for the actual installer to terminate.

This commit is contained in:
LoRd_MuldeR 2011-10-03 12:52:12 +02:00
parent 0e31ec7cad
commit 66c70657ef
2 changed files with 43 additions and 7 deletions

View File

@ -97,6 +97,14 @@ SubCaption 4 " "
!packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
;--------------------------------
;Reserved Files
;--------------------------------
ReserveFile "${NSISDIR}\Plugins\System.dll"
ReserveFile "${NSISDIR}\Plugins\StdUtils.dll"
;--------------------------------
;Version Info
;--------------------------------
@ -151,6 +159,35 @@ Section "-LaunchTheInstaller"
RunTryAgain:
DetailPrint "Exec: $PLUGINSDIR\LameXP-Install.exe"
StdUtils::ExecShellWait /NOUNLOAD '$R9' "open" "$PLUGINSDIR\LameXP-Install.exe"
Pop $R1
DetailPrint "Result: $R1"
StrCmp $R1 "error" RunFailed
StrCmp $R1 "no_wait" RunSuccess
Sleep 333
HideWindow
StdUtils::WaitForProc /NOUNLOAD $R1
Goto RunSuccess
; --------
RunFailed:
MessageBox MB_ABORTRETRYIGNORE|MB_DEFBUTTON2|MB_ICONSTOP|MB_TOPMOST "Failed to launch the installer. Please try again!" IDRETRY RunTryAgain IDIGNORE RunFallback
SetDetailsPrint both
DetailPrint "Failed to launch installer :-("
SetDetailsPrint listonly
StdUtils::Unload
Abort "Aborted."
; --------
RunFallback:
ClearErrors
ExecShell "open" "$PLUGINSDIR\LameXP-Install.exe" '$R9' SW_SHOWNORMAL
IfErrors 0 RunSuccess
@ -159,13 +196,12 @@ Section "-LaunchTheInstaller"
ExecShell "" "$PLUGINSDIR\LameXP-Install.exe" '$R9' SW_SHOWNORMAL
IfErrors 0 RunSuccess
MessageBox MB_RETRYCANCEL|MB_ICONSTOP|MB_TOPMOST "Failed to launch installer. Please try again!" IDRETRY RunTryAgain
Goto RunFailed
SetDetailsPrint both
DetailPrint "Failed to launch installer :-("
SetDetailsPrint listonly
Abort "Aborted."
; --------
RunSuccess:
Delete /REBOOTOK "$PLUGINSDIR\LameXP-Install.exe"
StdUtils::Unload
SectionEnd

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 712
#define VER_LAMEXP_BUILD 713
///////////////////////////////////////////////////////////////////////////////
// Tools versions