1
0
mirror of https://git.lyx.org/repos/lyx.git synced 2024-12-31 15:46:16 +00:00

* move system-specific file locations to settings.nsh

* updates for new dependencies packages
* use NSISdl plug-in for downloads

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37719 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2011-02-17 19:14:18 +00:00
parent 87cf82e545
commit a7ad2b86c0
6 changed files with 21 additions and 72 deletions
development/Win32/packaging/installer

View File

@ -8,50 +8,22 @@ Configuration of LyX installer
SetCompressor /SOLID lzma
#--------------------------------
# Location of LyX files and dependencies
!ifdef FilesLyX
!define FILES_LYX "${FilesLyX}"
!else
!define FILES_LYX "..\..\..\..\..\lyx-20-install"
!endif
!ifdef FilesDeps
!define FILES_DEPS "${FilesDeps}"
!else
!define FILES_DEPS "..\..\..\..\..\deps20"
!endif
!ifdef FilesBundle
!define FILES_BUNDLE "${FilesBundle}"
!else
!define FILES_BUNDLE "..\..\..\..\..\depsbundle"
!endif
!define FILES_QT "C:\Qt\qt-everywhere-opensource-src-4.7.1"
#--------------------------------
# File locations
!define FILES_LICENSE "license.rtf"
!define FILES_ICONS "..\icons"
!define FILES_LAUNCHER "..\..\launcher"
!define FILES_PDFVIEW "..\..\pdfview"
!define FILES_PDFVIEW "${FILES_DEPS}\bin"
!define FILES_MSVC "${FILES_DEPS}\bin"
!define FILES_PYTHON "${FILES_DEPS}\python"
!define FILES_IMAGEMAGICK "${FILES_DEPS}\imagemagick"
!define FILES_GHOSTSCRIPT "${FILES_DEPS}\ghostscript"
!define FILES_NETPBM "${FILES_DEPS}\netpbm"
!define FILES_DTL "${FILES_DEPS}\dtl"
!define FILES_DVIPOST "${FILES_DEPS}\dvipost"
!define FILES_DVIPOST_PKG "${FILES_DVIPOST}"
!define FILES_PDFTOOLS "${FILES_DEPS}\pdftools"
!define FILES_METAFILE2EPS "${FILES_DEPS}\metafile2eps"
!define FILES_NSISPLUGINS "${FILES_DEPS}\nsis"
!define FILES_NETPBM "${FILES_DEPS}\bin"
!define FILES_DTL "${FILES_DEPS}\bin"
!define FILES_DVIPOST "${FILES_DEPS}\bin"
!define FILES_DVIPOST_PKG "${FILES_DEPS}\tex"
!define FILES_PDFTOOLS "${FILES_DEPS}\bin"
!define FILES_METAFILE2EPS "${FILES_DEPS}\bin"
#--------------------------------
# Locations of components to download

View File

@ -75,6 +75,8 @@ Lists of files to include in the installer
!macro FileListPDFViewBin COMMAND DIRECTORY
${FILE}pdfview.exe"
${FILE}System.dll"
${FILE}Console.dll"
!macroend
@ -264,18 +266,6 @@ Lists of files to include in the installer
!macroend
!macro FileListNSISPluginsStandard COMMAND DIRECTORY
${FILE}System.dll"
!macroend
!macro FileListNSISPlugins COMMAND DIRECTORY
${FILE}Console.dll"
!macroend
!macro FileListMetaFile2EPS COMMAND DIRECTORY
${FILE}metafile2eps.exe"

View File

@ -8,29 +8,16 @@ Compatible with NSIS 2.46
!include settings.nsh
#--------------------------------
# Header files
!include include\declarations.nsh
!include include\variables.nsh
!include include\nsis.nsh
!include include\filelist.nsh
!include include\detection.nsh
!include include\gui.nsh
!include include\init.nsh
#--------------------------------
# Setup
!include setup\install.nsh
!include setup\uninstall.nsh
!include setup\configure.nsh
#--------------------------------
# User interface (wizard pages)
!include gui\external.nsh
!include gui\reinstall.nsh

View File

@ -6,7 +6,6 @@ These typically need to be modified for each LyX release
*/
#--------------------------------
# Version number
@ -32,6 +31,14 @@ These typically need to be modified for each LyX release
!define /date MinimalExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}svn-%Y%m%d-Installer-Minimal.exe"
!endif
#--------------------------------
# File locations
!define FILES_LYX "C:\LyX\lyx-20-install"
!define FILES_DEPS "C:\LyX\lyx-20-build\msvc2010-deps\deps20"
!define FILES_BUNDLE "C:\LyX\depsbundle"
!define FILES_QT "C:\Qt\qt-everywhere-opensource-src-4.7.1"
#--------------------------------
# MiKTeX
# Sizes in KB

View File

@ -11,6 +11,7 @@ Installation of program files, dictionaries and external components
Var PythonCompileFile
Var PythonCompileReturn
Var DownloadResult
Section -ProgramFiles SecProgramFiles
@ -26,7 +27,6 @@ Section -ProgramFiles SecProgramFiles
# Binaries
SetOutPath "$INSTDIR\bin"
!insertmacro FileListLyXBin File "${FILES_LYX}\bin\"
!insertmacro FileListLyXLauncher File "${FILES_LAUNCHER}\"
!insertmacro FileListQtBin File "${FILES_QT}\bin\"
!insertmacro FileListDll File "${FILES_DEPS}\bin\"
!insertmacro FileListMSVC File "${FILES_MSVC}\"
@ -35,8 +35,6 @@ Section -ProgramFiles SecProgramFiles
!insertmacro FileListDvipostBin File "${FILES_DVIPOST}\"
!insertmacro FileListPDFViewBin File "${FILES_PDFVIEW}\"
!insertmacro FileListPDFToolsBin File "${FILES_PDFTOOLS}\"
!insertmacro FileListNSISPluginsStandard File "${NSISDIR}\Plugins\"
!insertmacro FileListNSISPlugins File "${FILES_NSISPLUGINS}\"
!insertmacro FileListMetaFile2EPS File "${FILES_METAFILE2EPS}\"
# Resources
@ -75,8 +73,6 @@ Section -ProgramFiles SecProgramFiles
!insertmacro FileListGhostscript File "${FILES_GHOSTSCRIPT}\"
!insertmacro FileListMSVC File "${FILES_MSVC}\"
!endif
# Create uninstaller
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
@ -87,7 +83,7 @@ SectionEnd
!macro DOWNLOAD_FILE RET ID FILENAME APPEND
# Downloads a file using the Inetc plug-in (HTTP or FTP)
# Downloads a file
# RET = Return value (OK if succesful)
# ID = Name of the download in settings.nsh
@ -95,12 +91,12 @@ SectionEnd
# APPEND = Filename to append to server location in settings.nsh
# Try first time
Inetc::get "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" /END
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)
Inetc::get "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" /END
NSISdl::download "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}"
Pop ${RET}
${EndIf}

View File

@ -12,7 +12,6 @@ Section "un.Program Files" un.SecProgramFiles
# Binaries
!insertmacro FileListLyXBin Delete "$INSTDIR\bin\"
!insertmacro FileListLyXLauncher Delete "$INSTDIR\bin\"
!insertmacro FileListQtBin Delete "$INSTDIR\bin\"
!insertmacro FileListDll Delete "$INSTDIR\bin\"
!insertmacro FileListMSVC Delete "$INSTDIR\bin\"
@ -21,8 +20,6 @@ Section "un.Program Files" un.SecProgramFiles
!insertmacro FileListDvipostBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFToolsBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFViewBin Delete "$INSTDIR\bin\"
!insertmacro FileListNSISPluginsStandard Delete "$INSTDIR\bin\"
!insertmacro FileListNSISPlugins Delete "$INSTDIR\bin\"
!insertmacro FileListMetaFile2EPS Delete "$INSTDIR\bin\"
RMDir "$INSTDIR\bin"