diff --git a/development/Win32/packaging/installer/gui/reinstall.nsh b/development/Win32/packaging/installer/gui/reinstall.nsh deleted file mode 100644 index af1c11fcfd..0000000000 --- a/development/Win32/packaging/installer/gui/reinstall.nsh +++ /dev/null @@ -1,67 +0,0 @@ -/* - -reinstall.nsh - -Verify whether the LyX version of the installer is already installed. -If yes, ask the user whether the program files need to be reinstalled. - -*/ - -Var ReinstallPage -Var ReinstallPage.Info -Var ReinstallPage.CheckBox -Var ReinstallPage.CheckBox.State - -Var InstalledVersion - -# Page functions - -Function PageReinstall - - # Check whether this version is already installed - # If so, some registry key like Software/Lyx16 should exist - ReadRegStr $InstalledVersion SHELL_CONTEXT ${APP_REGKEY} "Version" - - ${If} $InstalledVersion != "${APP_VERSION_NUMBER}" - # Different version, go ahead - Abort - ${EndIf} - - # Same version is already installed, ask the user - - !insertmacro MUI_HEADER_TEXT $(TEXT_REINSTALL_TITLE) $(TEXT_REINSTALL_SUBTITLE) - - # Build the dialog - - nsDialogs::Create /NOUNLOAD 1018 - Pop $ReinstallPage - - ${NSD_CreateLabel} 0u 0u 300u 60u $(TEXT_REINSTALL_INFO) - Pop $ReinstallPage.Info - - ${NSD_CreateCheckBox} 20u 60u 280u 10u $(TEXT_REINSTALL_ENABLE) - Pop $ReinstallPage.CheckBox - - ${If} ${SectionIsSelected} ${SecProgramFiles} - ${NSD_SetState} $ReinstallPage.CheckBox ${BST_CHECKED} - ${Else} - ${NSD_SetState} $ReinstallPage.CheckBox ${BST_UNCHECKED} - ${EndIf} - - nsDialogs::Show - -FunctionEnd - -Function PageReinstallValidate - - # Get state of checkbox - ${NSD_GetState} $ReinstallPage.CheckBox $ReinstallPage.CheckBox.State - - # Set whether the programs files need to be installed - ${If} $ReinstallPage.CheckBox.State = ${BST_CHECKED} - !insertmacro SelectSection ${SecProgramFiles} - ${Else} - !insertmacro UnselectSection ${SecProgramFiles} - ${EndIf} - -FunctionEnd diff --git a/development/Win32/packaging/installer/include/filelist.nsh b/development/Win32/packaging/installer/include/filelist.nsh index dad6add375..24986f1026 100644 --- a/development/Win32/packaging/installer/include/filelist.nsh +++ b/development/Win32/packaging/installer/include/filelist.nsh @@ -93,7 +93,6 @@ Lists of files to include in the installer !macro FileListMetaFile2EPS COMMAND DIRECTORY ${FILE}metafile2eps.exe" - ${FILE}metafile2eps.dat" !macroend diff --git a/development/Win32/packaging/installer/include/gui.nsh b/development/Win32/packaging/installer/include/gui.nsh index 7f099d0bb7..b1c8aa4553 100644 --- a/development/Win32/packaging/installer/include/gui.nsh +++ b/development/Win32/packaging/installer/include/gui.nsh @@ -38,7 +38,6 @@ BrandingText " " !insertmacro MULTIUSER_PAGE_INSTALLMODE -Page custom PageReinstall PageReinstallValidate #Page custom PageExternalLaTeX PageExternalLaTeXValidate # Specify the installation directory. diff --git a/development/Win32/packaging/installer/lyx.nsi b/development/Win32/packaging/installer/lyx.nsi index 8a9096ca53..4c7e520835 100644 --- a/development/Win32/packaging/installer/lyx.nsi +++ b/development/Win32/packaging/installer/lyx.nsi @@ -6,11 +6,15 @@ Compatible with NSIS 2.46 */ +# Do a Cyclic Redundancy Check to make sure the installer +# was not corrupted by the download. CRCCheck force +# +# Make the installer as small as possible. SetCompressor /SOLID lzma # installer settings like version numbers -!include settings.nsh +!include settings.nsh # declarations of LyX's registry keys and installer variant !include include\declarations.nsh diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index a2228372f1..55704cc9c3 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -200,8 +200,6 @@ Section -PSPrinter ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"' # Install printer and driver ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"' - # Restore DEVMODE with proper settings - ExecWait '$PrinterConf /q /Sr /n "Metafile to EPS Converter" /a "$INSTDIR\bin\metafile2eps.dat" g' ${EndIf} diff --git a/development/Win32/packaging/installer/setup/install.nsh b/development/Win32/packaging/installer/setup/install.nsh index d406e05615..cd474353a8 100644 --- a/development/Win32/packaging/installer/setup/install.nsh +++ b/development/Win32/packaging/installer/setup/install.nsh @@ -46,10 +46,6 @@ Section -ProgramFiles SecProgramFiles SetOutPath "$INSTDIR" # recursively copy all files under Python File /r "${FILES_PYTHON}" - # add MSVC runtimes - #SetOutPath "$INSTDIR\python" - #!insertmacro FileListMSVC File "${FILES_MSVC}\" - # Compile all Pyton files to byte-code # The user using the scripts may not have write access @@ -147,8 +143,10 @@ SectionEnd NSISdl::download "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" Pop ${RET} # Return value (OK if succesful) - ${If} ${RET} != "OK" - # Download failed, try again (usally we get a different mirror) + ${If} ${RET} != "success" + ${AndIf} ${RET} != "cancel" + # Download failed, try once again before giving up + # (usally we get a different mirror) NSISdl::download "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" Pop ${RET} ${EndIf} @@ -208,8 +206,9 @@ SectionEnd !insertmacro DOWNLOAD_FILE $DownloadResult "${COMPONENT}" "${COMPONENT}Setup.exe" "" - ${If} $DownloadResult != "OK" - # Download failed + ${If} $DownloadResult != "success" + ${AndIf} $DownloadResult != "cancel" + # Download failed after trying twice - ask user MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_DOWNLOAD_FAILED_${COMPONENT}) ($DownloadResult)" IDYES download_${COMPONENT} Goto noinstall_${COMPONENT} ${EndIf}