From 1f25841d5983e0ee96876fd6b3e41ebdc14798ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Sat, 21 May 2011 08:57:52 +0000 Subject: [PATCH] cmake: prepage ready-to-use nsis files generation git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38795 a592a061-630c-0410-9148-cb99ea01b6c8 --- .../installer/include/declarations.nsh.cmake | 99 +++++++++++++++++++ .../Win32/packaging/installer/lyx.nsi.cmake | 27 +++++ .../packaging/installer/settings.nsh.cmake | 48 +++++++++ 3 files changed, 174 insertions(+) create mode 100644 development/Win32/packaging/installer/include/declarations.nsh.cmake create mode 100644 development/Win32/packaging/installer/lyx.nsi.cmake create mode 100644 development/Win32/packaging/installer/settings.nsh.cmake diff --git a/development/Win32/packaging/installer/include/declarations.nsh.cmake b/development/Win32/packaging/installer/include/declarations.nsh.cmake new file mode 100644 index 0000000000..b9154bb3e3 --- /dev/null +++ b/development/Win32/packaging/installer/include/declarations.nsh.cmake @@ -0,0 +1,99 @@ +/* + +declaration.nsh + +Configuration of LyX installer + +*/ + +SetCompressor /SOLID lzma + +#-------------------------------- +# File locations + +!define FILES_LICENSE "license.rtf" +!define FILES_ICONS "..\icons" +!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}\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 + +# CTAN and SourceForge select a mirror automatically + +!define DOWNLOAD_LATEX "http://mirrors.ctan.org/systems/win32/miktex/setup/${SETUPFILE_LATEX}" + +#-------------------------------- +# Locations of setup files for components (for bundled setup) + +!define INSTALL_LATEX "${SETUPFILE_LATEX}" + +#-------------------------------- +# Names and version + +!define APP_NAME "LyX" +!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-2011 LyX Team" + +!define APP_RUN "bin\LyX.exe" + +!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" + +!define APP_REGNAME_DOC "LyX.Document" + +!define APP_EXT ".lyx" +!define APP_MIME_TYPE "application/lyx" + +#-------------------------------- +# Setup settings + +# Output file name can be configured using command line paramaters like +# /DExeFile=/path/to/installer + +!ifndef SETUPTYPE + !define SETUPTYPE STANDARD +!endif + +!if ${SETUPTYPE} == STANDARD + + !define SETUP_EXE ${ExeFile} + +!else if ${SETUPTYPE} == BUNDLE + + !define SETUP_EXE ${BundleExeFile} + !define BUNDLESETUP_LATEX + +!endif + +!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}${APP_SERIES_KEY}" + +#-------------------------------- +# Names of binaries to identify compontents + +!define BIN_LATEX "tex.exe" +!define BIN_BIBTEXEDITOR "JabRef.exe" + +#-------------------------------- +# Custom NSIS plug-ins + +!addplugindir "${FILES_NSISPLUGINS}" diff --git a/development/Win32/packaging/installer/lyx.nsi.cmake b/development/Win32/packaging/installer/lyx.nsi.cmake new file mode 100644 index 0000000000..4c5e85c69a --- /dev/null +++ b/development/Win32/packaging/installer/lyx.nsi.cmake @@ -0,0 +1,27 @@ +/* + +NSIS Script - LyX 2.0 Installer for Win32 +Authors: Joost Verburg, Angus Leeming, Uwe Stöhr +Compatible with NSIS 2.46 + +*/ + +!include settings.nsh + +!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 +!include setup\install.nsh +!include setup\uninstall.nsh +!include setup\configure.nsh +!include gui\external.nsh +!include gui\reinstall.nsh + +#-------------------------------- +# Output file + +Outfile "${SETUP_EXE}" diff --git a/development/Win32/packaging/installer/settings.nsh.cmake b/development/Win32/packaging/installer/settings.nsh.cmake new file mode 100644 index 0000000000..4e3ab349be --- /dev/null +++ b/development/Win32/packaging/installer/settings.nsh.cmake @@ -0,0 +1,48 @@ +/* + +Settings for LyX installer + +These typically need to be modified for each LyX release + +*/ + +#-------------------------------- +# Version number + +!define APP_VERSION_MAJOR 2 +!define APP_VERSION_MINOR 0 +!define APP_VERSION_REVISION 0 +!define APP_VERSION_BUILD 0 # Start with 1 for the installer releases of each version + +!define /date APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}svn %Y%m%d" # Version to display + +#-------------------------------- +# Installer file name + +# Typical names for the release are "LyX-2.0.0-1-Installer.exe" etc. + +!ifndef ExeFile + !define /date ExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}svn-%Y%m%d-Installer.exe" +!endif +!ifndef BundleExeFile + !define /date BundleExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}svn-%Y%m%d-Installer-Bundle.exe" +!endif +!ifndef MinimalExeFile + !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 + +!define SETUPFILE_LATEX "basic-miktex-2.9.4146.exe" +!define SIZE_DOWNLOAD_LATEX 160106 +!define SIZE_LATEX 380000