Debian Codegraph @

Include/WinCore.nsh

raw
1 /*
2
3 WinCore.nsh & Win\*.nsh - Collection of common windows defines
4
5 !define __WIN_NOINC_xxx to exclude a windows header file
6 !define __WIN_MS_xxx to exclude specific things (The original #ifdef xxx checks can be found in the official Microsoft headers)
7
8 */
9
10 !ifndef __WIN_WINDOWS__INC
11 !define __WIN_WINDOWS__INC
12 !verbose push
13 !verbose 3
14
15
16
17 !include Win\WinDef.nsh
18 !include Win\WinError.nsh
19 !include Win\WinNT.nsh
20 !include Win\WinUser.nsh
21
22 !ifndef __WIN_MS_NOWINMESSAGES
23 !include WinMessages.nsh
24 !endif
25
26
27
28
29
30 /**************************************************
31 WinBase.h
32 **************************************************/
33 !ifndef __WIN_NOINC_WINBASE
34 !define /ifndef INVALID_HANDLE_VALUE -1
35 !define /ifndef INVALID_FILE_SIZE 0xFFFFFFFF
36 !define /ifndef INVALID_SET_FILE_POINTER -1
37 !define /ifndef INVALID_FILE_ATTRIBUTES -1
38
39 !define WAIT_FAILED 0xFFFFFFFF
40 !define WAIT_OBJECT_0 0 ;((STATUS_WAIT_0 ) + 0 )
41
42 !define WAIT_ABANDONED 0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
43 !define WAIT_ABANDONED_0 0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
44
45 !define DRIVE_UNKNOWN 0
46 !define DRIVE_NO_ROOT_DIR 1
47 !define DRIVE_REMOVABLE 2
48 !define DRIVE_FIXED 3
49 !define DRIVE_REMOTE 4
50 !define DRIVE_CDROM 5
51 !define DRIVE_RAMDISK 6
52
53 !define FILE_TYPE_UNKNOWN 0x0000
54 !define FILE_TYPE_DISK 0x0001
55 !define FILE_TYPE_CHAR 0x0002
56 !define FILE_TYPE_PIPE 0x0003
57 !define FILE_TYPE_REMOTE 0x8000
58
59 !define STD_INPUT_HANDLE -10
60 !define STD_OUTPUT_HANDLE -11
61 !define STD_ERROR_HANDLE -12
62
63 #define IGNORE 0 ; Ignore signal
64 !define INFINITE 0xFFFFFFFF ; Infinite timeout
65
66 !endif /* __WIN_NOINC_WINBASE */
67
68
69
70
71
72 /**************************************************
73 WinGDI.h
74 **************************************************/
75 !ifndef __WIN_MS_NOGDI & __WIN_NOINC_WINGDI
76 !define HORZRES 8
77 !define VERTRES 10
78 !define BITSPIXEL 12
79 !define LOGPIXELSX 88
80 !define LOGPIXELSY 90
81 !define COLORRES 108
82 !define VREFRESH 116
83 !define DESKTOPVERTRES 117
84 !define DESKTOPHORZRES 118
85 !endif /* __WIN_MS_NOGDI & __WIN_NOINC_WINGDI */
86
87
88
89
90
91 /**************************************************
92 WinReg.h
93 **************************************************/
94 !ifndef __WIN_NOINC_WINREG
95 !ifndef __WIN_NOHKEY & HKEY_CLASSES_ROOT & HKEY_CURRENT_USER & HKEY_LOCAL_MACHINE & HKEY_USERS
96 !define HKEY_CLASSES_ROOT 0x80000000
97 !define HKEY_CURRENT_USER 0x80000001
98 !define HKEY_LOCAL_MACHINE 0x80000002
99 !define HKEY_USERS 0x80000003
100 !define HKEY_PERFORMANCE_DATA 0x80000004
101 !define HKEY_PERFORMANCE_TEXT 0x80000050
102 !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
103 !define HKEY_CURRENT_CONFIG 0x80000005
104 !define HKEY_DYN_DATA 0x80000006
105 !ifndef __WIN_NOSHORTHKEY & HKCR & HKCU & HKLM
106 !define HKCR ${HKEY_CLASSES_ROOT}
107 !define HKCU ${HKEY_CURRENT_USER}
108 !define HKLM ${HKEY_LOCAL_MACHINE}
109 !endif
110 !endif
111 !endif /* __WIN_NOINC_WINREG */
112
113
114
115
116
117 /**************************************************
118 WindowsX.h
119 **************************************************/
120 !ifndef __WIN_NOINC_WINDOWSX
121 !ifndef GET_X_LPARAM & GET_Y_LPARAM
122 !macro _Win_GET_X_LPARAM _outvar _in
123 IntOp ${_outvar} "${_in}" << 16 ;We can't just use LOWORD, we need to keep the sign,
124 IntOp ${_outvar} ${_outvar} >> 16 ;so we let NSIS sign extend for us
125 !macroend
126 !define GET_X_LPARAM "!insertmacro _Win_GET_X_LPARAM "
127 !macro _Win_GET_Y_LPARAM _outvar _in
128 IntOp ${_outvar} "${_in}" >> 16
129 !macroend
130 !define GET_Y_LPARAM "!insertmacro _Win_GET_Y_LPARAM "
131 !endif
132 !endif /* __WIN_NOINC_WINDOWSX */
133
134
135
136
137
138 /**************************************************
139 ShlObj.h
140 **************************************************/
141 !ifndef __WIN_NOINC_SHLOBJ
142 !ifndef __WIN_NOSHELLFOLDERCSIDL
143 !define CSIDL_DESKTOP 0x0000
144 !define CSIDL_INTERNET 0x0001 ;Internet Explorer (icon on desktop)
145 !define CSIDL_PROGRAMS 0x0002 ;Start Menu\Programs
146 !define CSIDL_CONTROLS 0x0003 ;My Computer\Control Panel
147 !define CSIDL_PRINTERS 0x0004 ;My Computer\Printers
148 !define CSIDL_PERSONAL 0x0005 ;My Documents
149 !define CSIDL_FAVORITES 0x0006 ;<user name>\Favorites
150 !define CSIDL_STARTUP 0x0007 ;Start Menu\Programs\Startup
151 !define CSIDL_RECENT 0x0008 ;<user name>\Recent
152 !define CSIDL_SENDTO 0x0009 ;<user name>\SendTo
153 !define CSIDL_BITBUCKET 0x000a ;<desktop>\Recycle Bin
154 !define CSIDL_STARTMENU 0x000b ;<user name>\Start Menu
155 !define CSIDL_MYDOCUMENTS 0x000c ;logical "My Documents" desktop icon
156 !define CSIDL_MYMUSIC 0x000d ;"My Music" folder
157 !define CSIDL_MYVIDEO 0x000e ;"My Videos" folder
158 !define CSIDL_DESKTOPDIRECTORY 0x0010 ;<user name>\Desktop
159 !define CSIDL_DRIVES 0x0011 ;My Computer
160 !define CSIDL_NETWORK 0x0012 ;Network Neighborhood
161 !define CSIDL_NETHOOD 0x0013 ;<user name>\nethood
162 !define CSIDL_FONTS 0x0014 ;windows\fonts
163 !define CSIDL_TEMPLATES 0x0015
164 !define CSIDL_COMMON_STARTMENU 0x0016 ;All Users\Start Menu
165 !define CSIDL_COMMON_PROGRAMS 0x0017 ;All Users\Start Menu\Programs
166 !define CSIDL_COMMON_STARTUP 0x0018 ;All Users\Startup
167 !define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 ;All Users\Desktop
168 !define CSIDL_APPDATA 0x001a ;<user name>\Application Data
169 !define CSIDL_PRINTHOOD 0x001b ;<user name>\PrintHood
170 !define CSIDL_LOCAL_APPDATA 0x001c ;<user name>\Local Settings\Application Data (non roaming)
171 !define CSIDL_ALTSTARTUP 0x001d ;non localized startup
172 !define CSIDL_COMMON_ALTSTARTUP 0x001e ;non localized common startup
173 !define CSIDL_COMMON_FAVORITES 0x001f
174 !define CSIDL_INTERNET_CACHE 0x0020
175 !define CSIDL_COOKIES 0x0021
176 !define CSIDL_HISTORY 0x0022
177 !define CSIDL_COMMON_APPDATA 0x0023 ;All Users\Application Data
178 !define CSIDL_WINDOWS 0x0024 ;GetWindowsDirectory
179 !define CSIDL_SYSTEM 0x0025 ;GetSystemDirectory
180 !define CSIDL_PROGRAM_FILES 0x0026 ;C:\Program Files
181 !define CSIDL_MYPICTURES 0x0027
182 !define CSIDL_PROFILE 0x0028 ;USERPROFILE
183 !define CSIDL_SYSTEMX86 0x0029 ;x86 system directory on RISC
184 !define CSIDL_PROGRAM_FILESX86 0x002a ;x86 C:\Program Files on RISC
185 !define CSIDL_PROGRAM_FILES_COMMON 0x002b ;C:\Program Files\Common
186 !define CSIDL_PROGRAM_FILES_COMMONX86 0x002c ;x86 Program Files\Common on RISC
187 !define CSIDL_COMMON_TEMPLATES 0x002d ;All Users\Templates
188 !define CSIDL_COMMON_DOCUMENTS 0x002e ;All Users\Documents
189 !define CSIDL_COMMON_ADMINTOOLS 0x002f ;All Users\Start Menu\Programs\Administrative Tools
190 !define CSIDL_ADMINTOOLS 0x0030 ;<user name>\Start Menu\Programs\Administrative Tools
191 !define CSIDL_CONNECTIONS 0x0031 ;Network and Dial-up Connections
192 !define CSIDL_COMMON_MUSIC 0x0035 ;All Users\My Music
193 !define CSIDL_COMMON_PICTURES 0x0036 ;All Users\My Pictures
194 !define CSIDL_COMMON_VIDEO 0x0037 ;All Users\My Video
195 !define CSIDL_RESOURCES 0x0038 ;Resource Directory
196 !define CSIDL_RESOURCES_LOCALIZED 0x0039 ;Localized Resource Directory
197 !define CSIDL_COMMON_OEM_LINKS 0x003a ;Links to All Users OEM specific apps
198 !define CSIDL_CDBURN_AREA 0x003b ;USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
199 !define CSIDL_COMPUTERSNEARME 0x003d ;Computers Near Me (computered from Workgroup membership)
200 !define CSIDL_FLAG_CREATE 0x8000 ;combine with CSIDL_ value to force folder creation in SHGetFolderPath()
201 !define CSIDL_FLAG_DONT_VERIFY 0x4000 ;combine with CSIDL_ value to return an unverified folder path
202 !define CSIDL_FLAG_NO_ALIAS 0x1000 ;combine with CSIDL_ value to insure non-alias versions of the pidl
203 !define CSIDL_FLAG_PER_USER_INIT 0x0800 ;combine with CSIDL_ value to indicate per-user init (eg. upgrade)
204 !define CSIDL_FLAG_MASK 0xFF00
205 !endif /* __WIN_NOSHELLFOLDERCSIDL */
206 !endif /* __WIN_NOINC_SHLOBJ */
207
208
209
210
211
212 /**************************************************
213 Shobjidl.h
214 **************************************************/
215 !ifndef __WIN_NOINC_SHOBJIDL
216 ; ASSOCIATIONLEVEL
217 !define AL_MACHINE 0
218 !define AL_EFFECTIVE 1
219 !define AL_USER 2
220
221 ; ASSOCIATIONTYPE
222 !define AT_FILEEXTENSION 0
223 !define AT_URLPROTOCOL 1
224 !define AT_STARTMENUCLIENT 2
225 !define AT_MIMETYPE 3
226 !endif /* __WIN_NOINC_SHOBJIDL */
227
228
229
230
231
232 /**************************************************
233 ShlGuid.h
234 **************************************************/
235 !ifndef __WIN_NOINC_SHLGUID
236 !define FOLDERID_Public {DFDF76A2-C82A-4D63-906A-5644AC457385} ; Vista+ Fixed=%SystemDrive%\Users\Public
237 !define FOLDERID_Games {CAC52C1A-B53D-4edc-92D7-6B2E8AC19434} ; Vista+ && < 10 (1803) Virtual
238 !define FOLDERID_SavedGames {4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4} ; Vista+ PerUser=%USERPROFILE%\Saved Games
239 !define FOLDERID_GameTasks {054FAE61-4DD8-4787-80B6-090220C4B700} ; Vista+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\GameExplorer
240 !define FOLDERID_PublicGameTasks {DEBF2536-E1A8-4c59-B6A2-414586476AEA} ; Vista+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\GameExplorer
241 !define FOLDERID_Contacts {56784854-C6CB-462b-8169-88E350ACB882} ; Vista+ PerUser=%USERPROFILE%\Contacts
242 !define FOLDERID_Downloads {374DE290-123F-4565-9164-39C4925E467B} ; Vista+ PerUser=%USERPROFILE%\Downloads
243 !define FOLDERID_PublicDownloads {3D644C9B-1FB8-4f30-9B45-F670235F79C0} ; Vista+ Common=%PUBLIC%\Downloads
244 !define FOLDERID_UserProfiles {0762D272-C50A-4BB0-A382-697DCD729B80} ; Vista+ Fixed=%SystemDrive%\Users
245 !define FOLDERID_UserProgramFiles {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB} ; 7+ PerUser=%LOCALAPPDATA%\Programs
246 !define FOLDERID_UserProgramFilesCommon {BCBD3057-CA5C-4622-B42D-BC56DB0AE516} ; 7+ PerUser=%LOCALAPPDATA%\Programs\Common
247 !define FOLDERID_PublicLibraries {48DAF80B-E6CF-4F4E-B800-0E69D84EE384} ; 7+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\Libraries
248 !define FOLDERID_UserPinned {9E3995AB-1F9C-4F13-B827-48B24B6C7174} ; 7+ PerUser=%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned
249 !define FOLDERID_ImplicitAppShortcuts {BCB5256F-79F6-4CEE-B725-DC34E402FD46} ; 7+ PerUser=%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts
250 !define FOLDERID_DeviceMetadataStore {5CE4A5E9-E4EB-479D-B89F-130C02886155} ; 7+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\DeviceMetadataStore
251 !define FOLDERID_ApplicationShortcuts {A3918781-E5F2-4890-B3D9-A7E54332328C} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\Application Shortcuts
252 !define FOLDERID_RoamingTiles {00BCFC5A-ED94-4e48-96A1-3F6217F21990} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\RoamingTiles
253 !define FOLDERID_RoamedTileImages {AAA8D5A5-F1D6-4259-BAA8-78E7EF60835E} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\RoamedTileImages
254 !define FOLDERID_PublicUserTiles {0482af6c-08f1-4c34-8c90-e17ec98b1e17} ; 8.0+ Common=%PUBLIC%\AccountPictures
255 !define FOLDERID_AccountPictures {008ca0b1-55b4-4c56-b8a8-4de4b299d3be} ; 8.0+ PerUser=%APPDATA%\Microsoft\Windows\AccountPictures
256 !define FOLDERID_Screenshots {b7bede81-df94-4682-a7d8-57a52620b86f} ; 8.0+ PerUser=%USERPROFILE%\Pictures\Screenshots
257 !define FOLDERID_SkyDrive {A52BBA46-E9E1-435f-B3D9-28DAA648C0F6} ; 8.1+ PerUser=%USERPROFILE%\OneDrive
258 !define FOLDERID_AppDataProgramData {559D40A3-A036-40FA-AF61-84CB430A4D34} ; 10 (1709)+ PerUser=%LOCALAPPDATA%\ProgramData
259 !endif /* __WIN_NOINC_SHLGUID */
260
261
262 !verbose pop
263 !endif /* __WIN_WINDOWS__INC */