X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FWin32%2Fpackaging%2Finstaller%2Finclude%2Fdeclarations.nsh;h=428141c8a2625283cd1563e1212cc858686b51d6;hb=96956421bbce481bc08286c73b042894215f757c;hp=42b686b3054c4fe90d96c9711b4f911d3803d8de;hpb=adc618f6e7fe5036d7f2055054314c47498fef45;p=lyx.git diff --git a/development/Win32/packaging/installer/include/declarations.nsh b/development/Win32/packaging/installer/include/declarations.nsh index 42b686b305..428141c8a2 100644 --- a/development/Win32/packaging/installer/include/declarations.nsh +++ b/development/Win32/packaging/installer/include/declarations.nsh @@ -1,116 +1,154 @@ /* -Declarations +declaration.nsh + +Configuration of LyX installer */ -!include "settings.user.nsh" -!include "settings.nsh" +SetCompressor /SOLID lzma #-------------------------------- -#Defines based on settings +# Location of LyX files and dependencies + +!ifdef FilesLyX + !define FILES_LYX "${FilesLyX}" +!else + !define FILES_LYX "..\..\..\..\build-msvc" +!endif + +!ifdef FilesDeps + !define FILES_DEPS "${FilesDeps}" +!else + !define FILES_DEPS "..\..\..\..\lyx-windows-deps-msvc2008" +!endif -!ifndef SETUPTYPE_BUNDLE - !define SETUPTYPE_NAME DOWNLOAD +!ifdef FilesBundle + !define FILES_BUNDLE "${FilesBundle}" !else - !define SETUPTYPE_NAME INSTALL + !define FILES_BUNDLE "..\..\..\..\lyx-windows-bundle-deps" !endif #-------------------------------- -#Standard header files +# File locations + +!define FILES_LICENSE "license.rtf" + +!define FILES_ICONS "..\icons" +!define FILES_LAUNCHER "..\..\launcher" +!define FILES_PDFVIEW "..\..\pdfview" -!include "MUI.nsh" -!include "LogicLib.nsh" -!include "StrFunc.nsh" -!include "FileFunc.nsh" -!include "WordFunc.nsh" -!include "Sections.nsh" -!include "WinVer.nsh" +!define FILES_MSVC "$%SystemRoot%\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375" +!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_AIKSAURUS "${FILES_DEPS}\aiksaurus\" +!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_PSPRINTER "${FILES_DEPS}\metafile2eps\PSPrinter" + +!define FILES_QT "${FILES_DEPS}\qt-4" +!define FILES_ASPELLDATA "${FILES_DEPS}\aspell" + +!define FILES_NSISPLUGINS "${FILES_DEPS}\nsis" #-------------------------------- -#Windows constants +# Locations of components to download -!define SHCNE_ASSOCCHANGED 0x08000000 -!define SHCNF_IDLIST 0x0000 +!define MIRROR_SF1 "http://superb-west.dl.sourceforge.net/sourceforge" +!define MIRROR_SF2 "http://mesh.dl.sourceforge.net/sourceforge" + +!macro SourceForgeMirror ID FILENAME + !define DOWNLOAD_${ID} "${MIRROR_SF1}/${FILENAME}" + !define DOWNLOADALT_${ID} "${MIRROR_SF2}/${FILENAME}" +!macroend + +!insertmacro SourceForgeMirror LATEX "miktex/${SETUPFILE_LATEX}" +!insertmacro SourceForgeMirror IMAGEMAGICK "imagemagick/${SETUPFILE_IMAGEMAGICK}" +!insertmacro SourceForgeMirror GHOSTSCRIPT "ghostscript/${SETUPFILE_GHOSTSCRIPT}" + +!define DOWNLOAD_ASPELLDICTS "ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows" +!define DOWNLOADALT_ASPELLDICTS "http://www.lyx.org/~bpeng/aspell6-windows" #-------------------------------- -#Reserve Files -#These files should come first in the compressed data (for faster GUI) +# Locations of setup files for components (for bundled setup) -ReserveFile "${NSISDIR}\Plugins\UserInfo.dll" -ReserveFile "dialogs\user.ini" -ReserveFile "dialogs\external.ini" -ReserveFile "dialogs\viewer.ini" -ReserveFile "dialogs\langselect.ini" -!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS -ReserveFile "${FILES_DVIPOST_PKG}\dvipost.sty" +!define INSTALL_LATEX "${SETUPFILE_LATEX}" +!define INSTALL_IMAGEMAGICK "${SETUPFILE_IMAGEMAGICK}" +!define INSTALL_GHOSTSCRIPT "${SETUPFILE_GHOSTSCRIPT}" #-------------------------------- -#Variables +# Names and version -Var AdminOrPowerUser -Var CurrentUserInstall +!define APP_NAME "LyX" +!define /date APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}svn %Y%m%d" +!define APP_VERSION_NUMBER "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}.${APP_VERSION_BUILD}" +!define APP_SERIES_NAME "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}" +!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}" +!define APP_DIR "${APP_NAME}${APP_SERIES_KEY}" +!define APP_DIR_USERDATA "${APP_NAME}${APP_SERIES_KEY}" +!define APP_INFO "${APP_NAME} - The Document Processor" +!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2008 LyX Team" -Var PathLaTeX -Var PathImageMagick -Var PathGhostscript -Var PathViewer +!define APP_RUN "bin\LyXLauncher.exe" -Var SetupLaTeX -Var SetupImageMagick -Var SetupGhostscript -Var SetupViewer +!define APP_REGKEY "Software\${APP_NAME}${APP_SERIES_KEY}" +!define APP_REGKEY_SETUP "Software\${APP_NAME}${APP_SERIES_KEY}\Setup" +!define APP_REGKEY_SETTINGS "Software\${APP_NAME}${APP_SERIES_KEY}\Settings" -Var SizeLaTeX -Var SizeImageMagick -Var SizeGhostscript -Var SizeViewer +!define APP_REGNAME_DOC "LyX.Document" -Var LangName -Var LangISOCode +!define APP_EXT ".lyx" +!define APP_MIME_TYPE "application/lyx" -Var AspellHive - #-------------------------------- -#Include standard functions +# Setup settings -!insertmacro FUNCTION_STRING_StrStr +# Output file name can be configured using command line paramaters like +# /DExeFile=/path/to/installer -!insertmacro GetParent -!insertmacro VersionCompare -!insertmacro WordFind2X +!ifndef SETUPTYPE + !define SETUPTYPE STANDARD +!endif -#-------------------------------- -#Macros +!if ${SETUPTYPE} == MINIMAL -!macro ReDef NAME VALUE + !define SETUP_EXE ${MinimalExeFile} + +!else if ${SETUPTYPE} == STANDARD - #Redefine a pre-processor definition + !define SETUP_EXE ${ExeFile} + !define BUNDLE_IMAGEMAGICK + !define BUNDLE_GHOSTSCRIPT - !ifdef `${NAME}` - !undef `${NAME}` - !endif +!else if ${SETUPTYPE} == BUNDLE - !define `${NAME}` `${VALUE}` + !define SETUP_EXE ${BundleExeFile} + !define BUNDLE_IMAGEMAGICK + !define BUNDLE_GHOSTSCRIPT + !define BUNDLESETUP_LATEX -!macroend - -!macro CallFunc FUNCTION INPUT VAROUT - - #Calls a function that modifies a single value on the stack +!endif - Push ${INPUT} - Call ${FUNCTION} - Pop ${VAROUT} +!define SETUP_ICON "${FILES_ICONS}\lyx.ico" +!define SETUP_HEADERIMAGE "graphics\header.bmp" +!define SETUP_WIZARDIMAGE "graphics\wizard.bmp" +!define SETUP_UNINSTALLER "Uninstall-${APP_NAME}.exe" +!define SETUP_UNINSTALLER_KEY "${APP_NAME}" -!macroend +#-------------------------------- +# Names of binaries to identify compontents + +!define BIN_LATEX "tex.exe" +!define BIN_IMAGEMAGICK "convert.exe" +!define BIN_GHOSTSCRIPT "gswin32c.exe" +!define BIN_BIBTEXEDITOR "JabRef.exe" #-------------------------------- -#LyX installer header files - -!include "include\init.nsh" -!include "include\windows.nsh" -!include "include\lang.nsh" -!include "include\gui.nsh" -!include "include\detection.nsh" -!include "include\filelists.nsh" +# Custom NSIS plug-ins + +!addplugindir "${FILES_NSISPLUGINS}"