diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2013-04-15 19:18:33 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2013-04-15 19:18:33 +0000 |
commit | 86cf5bb0eb3a1ee72b3e40fb1dcf2297465fa4ff (patch) | |
tree | 3a228e27aea1ba84d66e83e7988ef4d2cc5b81fe /Master/tlpkg/libexec/install-tl.nsi | |
parent | 3f002f2d7ccf252e5e9db23dff154fe5f6bcad38 (diff) |
Better feedback nsis installer
git-svn-id: svn://tug.org/texlive/trunk@29952 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/libexec/install-tl.nsi')
-rw-r--r-- | Master/tlpkg/libexec/install-tl.nsi | 68 |
1 files changed, 44 insertions, 24 deletions
diff --git a/Master/tlpkg/libexec/install-tl.nsi b/Master/tlpkg/libexec/install-tl.nsi index dae017f7297..301a629f86a 100644 --- a/Master/tlpkg/libexec/install-tl.nsi +++ b/Master/tlpkg/libexec/install-tl.nsi @@ -34,6 +34,7 @@ SubCaption 4 ": Unpacking..." XPStyle on RequestExecutionLevel user +; With this compressor, 7zip can unpack the exe SetCompressor /SOLID bzip2 ; Controls: installation type @@ -56,12 +57,9 @@ Var Admin_warning Var Completed_text CompletedText $Completed_text Var InstOrUnpack -;Var NextOrUnpack -;MiscButtonText "" $NextOrUnpack "" "" -InstallButtonText $InstOrUnpack -; for local testing: -Var REPO +; parameters to nsis installer are passed along to install-tl.bat +Var PARMS Page custom tlOptionsPage tlOptionsPageLeave Page directory dirPre "" dirLeave @@ -75,10 +73,10 @@ Function .onInit "Windows XP earliest supported version; aborting..." Abort ${EndIf} - + InitPluginsDir StrCpy $INSTDIR $PLUGINSDIR - + UserInfo::GetAccountType Pop $0 ${If} $0 == "Admin" @@ -162,7 +160,7 @@ Function tlOptionsPageLeave ${If} $Radio_Value == "unpack" StrCpy $INSTDIR "$DESKTOP" StrCpy $Completed_text \ - "Done; next run install-tl.bat or install-tl-advanced.bat." + "Done unpacking; next run install-tl.bat or install-tl-advanced.bat." StrCpy $InstOrUnpack "Unpack" ;StrCpy $NextOrUnpack "Next" ${Else} @@ -215,13 +213,13 @@ Function ConfirmPage ${If} $Radio_Value == "unpack" ${NSD_CreateLabel} 0 30% 100% 80u \ - "The main installer will be unpacked into $INSTDIR\${INST_TL_NAME}.$\r$\n$\r$\ninstall-tl.bat and install-tl-advanced.bat will start the main installer." + "The main installer will be unpacked into $INSTDIR\${INST_TL_NAME}.$\r$\n$\r$\nStart the main installer with install-tl.bat or install-tl-advanced.bat." ${ElseIf} $Radio_Value == "advanced" ${NSD_CreateLabel} 0 30% 100% 80u \ - "Click 'Install' to start the main installer,$\r$\nwhich lets you select components and an installation directory.$\r$\n$\r$\nUnpacking the main installer may take a moment..." + "Click 'Install' to start the main installer,$\r$\nwhich lets you select components and an installation directory.$\r$\n$\r$\nUnpacking the main installer may take a few moments..." ${Else} ${NSD_CreateLabel} 0 30% 100% 80u \ - "Click 'Install' to start the main installer,$\r$\nwhich lets you select an installation directory.$\r$\n$\r$\nUnpacking the main installer may take a moment..." + "Click 'Install' to start the main installer,$\r$\nwhich lets you select an installation directory.$\r$\n$\r$\nUnpacking the main installer may take a few moments..." ${EndIf} Pop $Explain @@ -235,16 +233,12 @@ FunctionEnd Section - ${GetParameters} $REPO - ${If} $REPO != "" - StrCpy $REPO "-repository $REPO" + ${GetParameters} $PARMS + ${If} $PARMS != "" + DetailPrint $PARMS ${EndIf} - ; for local testing: - ; StrCpy $REPO "-repository U:\systems\texlive\tlnet" - ; StrCpy $REPO "-repository D:\tlnet" - + ; Detailprint $Radio_Value - ; DetailPrint '-- $REPO --' ${If} $Radio_Value == "unpack" SetOutPath $INSTDIR ${Else} @@ -255,15 +249,41 @@ Section CreateDirectory $INSTDIR\${INST_TL_NAME} - ; production code: - File /r ${INST_TL_NAME} ; Quick interface testing: ; File /oname=${INST_TL_NAME}\README ${INST_TL_NAME}\README + ; production code: + File /r ${INST_TL_NAME} + + ${If} $Radio_Value != "unpack" + ; create a copy of install-tl.bat which exits with an exit code + Push $0 + File /oname=${INST_TL_NAME}\inst_mod.bat ${INST_TL_NAME}\install-tl.bat + FileOpen $0 ${INST_TL_NAME}\inst_mod.bat a + FileSeek $0 0 END + FileWrite $0 "if errorlevel 1 (exit 1) else (exit 0)" + FileClose $0 + Pop $0 + DetailPrint "Starting the main installer:" + ${EndIf} ${If} $Radio_Value == "advanced" - nsExec::Exec '"$INSTDIR\${INST_TL_NAME}\install-tl.bat" -gui perltk $REPO' + DetailPrint '"$INSTDIR\${INST_TL_NAME}\inst_mod.bat" -gui perltk $PARMS' + nsExec::ExecToLog '"$INSTDIR\${INST_TL_NAME}\inst_mod.bat" -gui perltk $PARMS' + Pop $0 ${ElseIf} $Radio_Value == "simple" - nsExec::Exec '"$INSTDIR\${INST_TL_NAME}\install-tl.bat" $REPO' + DetailPrint '"$INSTDIR\${INST_TL_NAME}\inst_mod.bat" $PARMS' + nsExec::ExecToLog '"$INSTDIR\${INST_TL_NAME}\inst_mod.bat" $PARMS' + Pop $0 + ${EndIf} + ${If} $Radio_Value != "unpack" + ${If} $0 == "error" + MessageBox MB_ICONSTOP|MB_OK "Error; see details" + ${ElseIf} $0 == "timeout" + MessageBox MB_ICONSTOP|MB_OK "Timeout" + ${ElseIf} $0 <> 0 + MessageBox MB_ICONSTOP|MB_OK "Error; for better info, unpack,$\r$\nthen run install.bat or install-advanced.bat." + ; ${Else} + ; MessageBox MB_ICONSTOP|MB_OK "No error" + ${EndIf} ${EndIf} - SectionEnd |