* remove reinstall page which is no longer necessary now spell checking dictionaries are integrated

* Metafile to EPS Converter 2.1 doesn't need dat file
* use NSISdl plug-in for downloading
* fix icon in Windows program uninstall list

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40111 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2011-10-31 02:13:11 +00:00
parent 120d030a89
commit a86f7f679d
6 changed files with 8 additions and 81 deletions

View File

@ -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

View File

@ -96,7 +96,6 @@ Lists of files to include in the installer
!macro FileListMetaFile2EPS COMMAND DIRECTORY
${FILE}metafile2eps.exe"
${FILE}metafile2eps.dat"
!macroend

View File

@ -35,7 +35,6 @@ BrandingText " "
!insertmacro MUI_PAGE_LICENSE "${FILES_LICENSE}"
!insertmacro MULTIUSER_PAGE_INSTALLMODE
Page custom PageReinstall PageReinstallValidate
Page custom PageExternalLaTeX PageExternalLaTeXValidate
!insertmacro MUI_PAGE_DIRECTORY

View File

@ -19,7 +19,6 @@ Compatible with NSIS 2.46
!include setup\uninstall.nsh
!include setup\configure.nsh
!include gui\external.nsh
!include gui\reinstall.nsh
#--------------------------------
# Output file

View File

@ -62,7 +62,7 @@ Section -InstallData
${REG_UNINSTALL} "UninstallString" '"$INSTDIR\${SETUP_UNINSTALLER}"'
${REG_UNINSTALL} "DisplayVersion" "${APP_VERSION}"
${REG_UNINSTALL} "DisplayIcon" "$INSTDIR\bin\LyXLauncher,0"
${REG_UNINSTALL} "DisplayIcon" "$INSTDIR\${APP_RUN},0"
${REG_UNINSTALL} "URLUpdateInfo" "http://www.lyx.org/"
${REG_UNINSTALL} "URLInfoAbout" "http://www.lyx.org/about/"
${REG_UNINSTALL} "Publisher" "LyX Team"
@ -141,8 +141,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}

View File

@ -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
@ -94,8 +90,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}
@ -155,8 +153,9 @@ Var PathCurrentUser
!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}