]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/installer/include/declarations.nsh
b7f5ac8a38b1159ceb3408ebed2ddf44e2ea0152
[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 #Reserve Files
38 #These files should come first in the compressed data (for faster GUI)
39
40 ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
41 ReserveFile "dialogs\user.ini"
42 ReserveFile "dialogs\external.ini"
43 ReserveFile "dialogs\viewer.ini"
44 ReserveFile "dialogs\langselect.ini"
45 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
46 ReserveFile "${FILES_DVIPOST_PKG}\dvipost.sty"
47
48 #--------------------------------
49 #Variables
50
51 Var AdminOrPowerUser
52 Var CurrentUserInstall
53
54 Var PathLaTeX
55 Var PathImageMagick
56 Var PathGhostscript
57 Var PathViewer
58
59 Var SetupLaTeX
60 Var SetupImageMagick
61 Var SetupGhostscript
62 Var SetupViewer
63
64 Var SizeLaTeX
65 Var SizeImageMagick
66 Var SizeGhostscript
67 Var SizeViewer
68
69 Var LangName
70 Var LangISOCode
71
72 Var AspellHive
73   
74 #--------------------------------
75 #Include standard functions
76
77 !insertmacro FUNCTION_STRING_StrStr
78
79 !insertmacro GetParent
80 !insertmacro VersionCompare
81 !insertmacro WordFind2X
82
83 #--------------------------------
84 #Macros  
85
86 !macro ReDef NAME VALUE
87
88   #Redefine a pre-processor definition
89
90   !ifdef `${NAME}`
91     !undef `${NAME}`
92   !endif
93
94   !define `${NAME}` `${VALUE}`
95
96 !macroend
97   
98 !macro CallFunc FUNCTION INPUT VAROUT
99   
100   #Calls a function that modifies a single value on the stack
101
102   Push ${INPUT}
103     Call ${FUNCTION}
104   Pop ${VAROUT}
105
106 !macroend
107
108 #--------------------------------
109 #LyX installer header files  
110
111 !include "include\download.nsh"
112 !include "include\init.nsh"
113 !include "include\windows.nsh"
114 !include "include\lang.nsh"
115 !include "include\gui.nsh"
116 !include "include\detection.nsh"
117 !include "include\filelists.nsh"