]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/installer/include/declarations.nsh
adf23f5878891b91a32a13fd8269f3d9e4dd1fc7
[lyx.git] / development / Win32 / packaging / installer / include / declarations.nsh
1 /*
2
3 Declarations
4
5 */
6
7 !include "settings.user.nsh"
8 !include "settings.nsh"
9
10 #--------------------------------
11 #Defines based on settings
12
13 !ifndef SETUPTYPE_BUNDLE
14   !define SETUPTYPE_NAME DOWNLOAD
15 !else
16   !define SETUPTYPE_NAME INSTALL
17 !endif
18
19 #--------------------------------
20 #Standard header files
21
22 !include "MUI.nsh"
23 !include "LogicLib.nsh"
24 !include "StrFunc.nsh"
25 !include "FileFunc.nsh"
26 !include "WordFunc.nsh"
27 !include "Sections.nsh"
28 !include "WinVer.nsh"
29
30 #--------------------------------
31 #Windows constants
32
33 !define SHCNE_ASSOCCHANGED 0x08000000
34 !define SHCNF_IDLIST 0x0000
35
36 #--------------------------------
37 #Windows Vista settings
38
39 RequestExecutionLevel highest
40
41 #--------------------------------
42 #Reserve Files
43 #These files should come first in the compressed data (for faster GUI)
44
45 ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
46 ReserveFile "dialogs\user.ini"
47 ReserveFile "dialogs\external.ini"
48 ReserveFile "dialogs\viewer.ini"
49 ReserveFile "dialogs\langselect.ini"
50 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
51 ReserveFile "${FILES_DVIPOST_PKG}\dvipost.sty"
52
53 #--------------------------------
54 #Variables
55
56 Var AdminOrPowerUser
57 Var CurrentUserInstall
58
59 Var PathLaTeX
60 Var PathImageMagick
61 Var PathGhostscript
62 Var PathViewer
63
64 Var SetupLaTeX
65 Var SetupImageMagick
66 Var SetupGhostscript
67 Var SetupViewer
68
69 Var SizeLaTeX
70 Var SizeImageMagick
71 Var SizeGhostscript
72 Var SizeViewer
73
74 Var LangName
75 Var LangISOCode
76
77 Var AspellHive
78   
79 #--------------------------------
80 #Include standard functions
81
82 !insertmacro FUNCTION_STRING_StrStr
83
84 !insertmacro GetParent
85 !insertmacro VersionCompare
86 !insertmacro WordFind2X
87
88 #--------------------------------
89 #Macros  
90
91 !macro ReDef NAME VALUE
92
93   #Redefine a pre-processor definition
94
95   !ifdef `${NAME}`
96     !undef `${NAME}`
97   !endif
98
99   !define `${NAME}` `${VALUE}`
100
101 !macroend
102   
103 !macro CallFunc FUNCTION INPUT VAROUT
104   
105   #Calls a function that modifies a single value on the stack
106
107   Push ${INPUT}
108     Call ${FUNCTION}
109   Pop ${VAROUT}
110
111 !macroend
112
113 #--------------------------------
114 #LyX installer header files  
115
116 !include "include\download.nsh"
117 !include "include\init.nsh"
118 !include "include\windows.nsh"
119 !include "include\lang.nsh"
120 !include "include\gui.nsh"
121 !include "include\detection.nsh"
122 !include "include\filelists.nsh"