struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / scripts / sdcc.nsi
blob95621b8d7a37458acf343a7c342b18ce18588da8
1 # sdcc.nsi - NSIS installer script for SDCC
3 # Copyright (c) 2003-2013 Borut Razem
5 # This file is part of sdcc.
7 # This software is provided 'as-is', without any express or implied
8 # warranty. In no event will the authors be held liable for any damages
9 # arising from the use of this software.
11 # Permission is granted to anyone to use this software for any purpose,
12 # including commercial applications, and to alter it and redistribute it
13 # freely, subject to the following restrictions:
15 # 1. The origin of this software must not be misrepresented; you must not
16 # claim that you wrote the original software. If you use this software
17 # in a product, an acknowledgment in the product documentation would be
18 # appreciated but is not required.
19 # 2. Altered source versions must be plainly marked as such, and must not be
20 # misrepresented as being the original software.
21 # 3. This notice may not be removed or altered from any source distribution.
23 # Borut Razem
24 # borut.razem@siol.net
26 # How to create WIN32 setup.exe
28 # - unpack WIN32 mingw daily snapshot sdcc-snapshot-i586-mingw32msvc-yyyymmdd-rrrr.zip
29 # to a clean directory (the option to create directories should be enabled).
30 # A sub directory sdcc is created (referenced as PKGDIR in continuation).
31 # - copy files sdcc/support/scripts/sdcc.ico and sdcc/support/scripts/sdcc.nsi
32 # (this file) from the sdcc Subversion snapshot to the PKGDIR directory
33 # - copy file COPYING and COPYING3 from the sdcc Subversion snapshot to the PKGDIR directory,
34 # rename it to COPYING.txt and COPYING3.txt and convert it to DOS format:
35 # unix2dos COPYING.txt
36 # unix2dos COPYING3.txt
37 # unix2dos doc/ChangeLog_head.txt
38 # unix2dos doc/README.TXT
39 # - run NSIS installer from PKGDIR directory:
40 # "c:\Program Files\NSIS\makensis.exe" -DVER_MAJOR=<SDCC_VER_MAJOR> -DVER_MINOR=<SDCC_VER_MINOR> -DVER_REVISION=<SDCC_VER_DEVEL> -DVER_BUILD=<SDCC_REVISION> sdcc.nsi
41 # replace <VER_XXX> with the appropriate values, for example for SDCC 2.7.4:
42 # <SDCC_VER_MAJOR> = 2
43 # <SDCC_VER_MINOR> = 7
44 # <SDCC_VER_DEVEL> = 4
45 # replace <SDCC_REVISION> with the current svn revision number.
46 # Define -DWIN64 if createing a 64bit package.
47 # - A setup file setup.exe is created in PKGDIR directory.
48 # Rename it to sdcc-yyyymmdd-rrrr-setup.exe and upload it
49 # to sdcc download repository at sourceforge.net
52 # How to create WIN32 release setup.exe package
54 # - unpack WIN32 mingw daily snapshot sdcc-snapshot-i586-mingw32msvc-yyyymmdd-rrrr.zip
55 # to a clean directory (the option to create directories should be enabled).
56 # A sub directory sdcc is created (referenced as PKGDIR in continuation).
57 # - remove the PKGDIR/doc/ directory
58 # - unpack sdcc-doc-yyyymmdd-rrrr.zip to the PKGDIR/doc directory
59 # - copy files sdcc/support/scripts/sdcc.ico and sdcc/support/scripts/sdcc.nsi
60 # (this file) from the sdcc Subversion snapshot to the PKGDIR directory
61 # - copy file COPYING and COPYING3 from the sdcc Subversion snapshot to the PKGDIR directory,
62 # rename it to COPYING.txt and COPYING3.txt and convert it to DOS format:
63 # unix2dos COPYING.txt
64 # unix2dos COPYING3.txt
65 # unix2dos doc/ChangeLog.txt
66 # unix2dos doc/README.TXT
67 # - run NSIS installer from PKGDIR directory:
68 # "c:\Program Files\NSIS\makensis.exe" -DFULL_DOC -DVER_MAJOR=<VER_MAJOR> -DVER_MINOR=<VER_MINOR> -DVER_REVISION=<VER_PATCH> -DVER_BUILD=<REVISION> sdcc.nsi
69 # replace <VER_XXX> with the appropriate values, for example for SDCC 3.0.0:
70 # <SDCC_VER_MAJOR> = 3
71 # <SDCC_VER_MINOR> = 0
72 # <SDCC_VER_DEVEL> = 0
73 # replace <SDCC_REVISION> with the current svn revision number.
74 # Define -DWIN64 if createing a 64bit package.
75 # - A setup file setup.exe is created in PKGDIR directory.
76 # Rename it to sdcc-x.x.x-setup.exe and upload it
77 # to sdcc download repository at sourceforge.net
79 # For debugging define -DSDCC.DEBUG command line option
81 ;--------------------------------
82 ; Debugging Macros
84 !ifdef SDCC.DEBUG
85 Var SDCC.FunctionName
86 Var SDCC.StrStack0
87 Var SDCC.StrStack1
88 Var SDCC.StrStack2
89 Var SDCC.StrStack3
90 Var SDCC.StrStack4
92 !define SDCC.PushStr "!insertmacro MACRO_SDCC_PushStr"
93 !macro MACRO_SDCC_PushStr NAME
94 StrCpy $SDCC.StrStack4 $SDCC.StrStack3
95 StrCpy $SDCC.StrStack3 $SDCC.StrStack2
96 StrCpy $SDCC.StrStack2 $SDCC.StrStack1
97 StrCpy $SDCC.StrStack1 $SDCC.StrStack0
98 StrCpy $SDCC.StrStack0 $SDCC.FunctionName
99 StrCpy $SDCC.FunctionName "${NAME}"
100 !macroend
102 !define SDCC.PopStr "!insertmacro MACRO_SDCC_PopStr"
103 !macro MACRO_SDCC_PopStr
104 StrCpy $SDCC.FunctionName $SDCC.StrStack0
105 StrCpy $SDCC.StrStack0 $SDCC.StrStack1
106 StrCpy $SDCC.StrStack1 $SDCC.StrStack2
107 StrCpy $SDCC.StrStack2 $SDCC.StrStack3
108 StrCpy $SDCC.StrStack3 $SDCC.StrStack4
109 !macroend
110 !endif
112 !define DebugMsg "!insertmacro MACRO_SDCC_DebugMsg"
113 !macro MACRO_SDCC_DebugMsg MSG
114 !ifdef SDCC.DEBUG
115 MessageBox MB_OK "*** $SDCC.FunctionName: ${MSG} ***"
116 !endif
117 !macroend
119 !define Function "!insertmacro MACRO_SDCC_Function"
120 !macro MACRO_SDCC_Function NAME
121 Function "${NAME}"
122 !ifdef SDCC.DEBUG
123 ${SDCC.PushStr} ${NAME}
124 !endif
125 !macroend
127 !define FunctionEnd "!insertmacro MACRO_SDCC_FunctionEnd"
128 !macro MACRO_SDCC_FunctionEnd
129 !ifdef SDCC.DEBUG
130 ${SDCC.PopStr}
131 !endif
132 FunctionEnd
133 !macroend
135 !define Section "!insertmacro MACRO_SDCC_Section"
136 !macro MACRO_SDCC_Section NAME ID
137 Section "${NAME}" "${ID}"
138 !ifdef SDCC.DEBUG
139 ${SDCC.PushStr} "${NAME}"
140 !endif
141 !macroend
143 !define UnselectedSection "!insertmacro MACRO_SDCC_UnselectedSection"
144 !macro MACRO_SDCC_UnselectedSection NAME ID
145 Section /o ${NAME} ${ID}
146 !ifdef SDCC.DEBUG
147 ${SDCC.PushStr} "${NAME}"
148 !endif
149 !macroend
151 !define SectionEnd "!insertmacro MACRO_SDCC_SectionEnd"
152 !macro MACRO_SDCC_SectionEnd
153 !ifdef SDCC.DEBUG
154 ${SDCC.PopStr}
155 !endif
156 SectionEnd
157 !macroend
160 !define PRODUCT_NAME "SDCC"
162 ; Version
163 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
164 !define PRODUCT_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}"
165 !else
166 !define PRODUCT_VERSION "XX.XX"
167 !endif
169 SetCompressor /SOLID lzma
171 !define SDCC_ROOT "."
173 !define DEV_ROOT "${SDCC_ROOT}"
175 InstType "Full (Bin, ucSim, SDCDB, Doc, Lib, Src)"
176 InstType "Medium (Bin, ucSim, SDCDB, Doc, Lib)"
177 InstType "Compact (Bin, ucSim, SDCDB, Doc)"
179 ;--------------------------------
180 ; Configuration
182 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
183 !define UNINST_ROOT_KEY HKLM
184 !define SDCC_ROOT_KEY HKLM
186 ;--------------------------------
187 ; Header Files
189 !include MUI2.nsh
190 !include WordFunc.nsh
191 !include StrFunc.nsh
192 !include WinVer.nsh
193 !include x64.nsh
194 ${StrStr}
195 ${UnStrStr}
197 ;--------------------------------
198 ; Functions
200 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
201 !insertmacro VersionCompare
202 !endif
204 ;--------------------------------
205 ; Variables
207 Var SDCC.PathToRemove
209 ;--------------------------------
210 ; Configuration
212 ; MUI Settings
213 !define MUI_ABORTWARNING
214 !define MUI_ICON ".\sdcc.ico"
216 ; Welcome page
217 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of $(^NameDA).$\r$\n$\r$\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.$\r$\n$\r$\n$_CLICK"
218 !insertmacro MUI_PAGE_WELCOME
220 ; License page
221 !insertmacro MUI_PAGE_LICENSE "${SDCC_ROOT}\COPYING.txt"
223 ; Uninstall/reinstall page
224 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
225 Page custom SDCC.PageReinstall SDCC.PageLeaveReinstall
226 !endif
228 ; StartMenu page
229 !define MUI_STARTMENUPAGE_DEFAULTFOLDER ${PRODUCT_NAME}
230 !define MUI_STARTMENUPAGE_REGISTRY_ROOT ${UNINST_ROOT_KEY}
231 !define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
232 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "NSIS:StartMenuDir"
233 !define MUI_STARTMENUPAGE_NODISABLE
234 Var MUI_STARTMENUPAGE_VARIABLE
235 !insertmacro MUI_PAGE_STARTMENU Application $MUI_STARTMENUPAGE_VARIABLE
237 ; Components page
238 !define MUI_COMPONENTSPAGE_SMALLDESC
239 !insertmacro MUI_PAGE_COMPONENTS
241 ; Directory page
242 !insertmacro MUI_PAGE_DIRECTORY
244 ; Instfiles page
245 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE "SDCC.InstFilesLeave"
246 !insertmacro MUI_PAGE_INSTFILES
248 ${Function} SDCC.InstFilesLeave
249 ; Remove old path if reinstallation
250 ${If} $SDCC.PathToRemove != ""
251 ${DebugMsg} "removing path $SDCC.PathToRemove"
252 Push $SDCC.PathToRemove
253 Call SDCC.RemoveFromPath
254 ${EndIf}
255 ${FunctionEnd}
257 ; Finish page - add to path
258 !define MUI_FINISHPAGE_TEXT "Confirm the checkbox if you want to add SDCC binary directory to the PATH environment variable"
259 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Add $INSTDIR\bin to the PATH"
260 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION SDCC.AddBinToPath
261 !define MUI_FINISHPAGE_SHOWREADME
262 !define MUI_FINISHPAGE_BUTTON "Next"
263 !insertmacro MUI_PAGE_FINISH
265 ; Finish page - reboot
266 !insertmacro MUI_PAGE_FINISH
268 ${Function} SDCC.AddBinToPath
269 ; Add new path
270 ${DebugMsg} "adding path $INSTDIR\bin"
271 Push "$INSTDIR\bin"
272 Call SDCC.AddToPath
273 ${FunctionEnd}
275 ; Uninstaller pages
276 !insertmacro MUI_UNPAGE_CONFIRM
277 !insertmacro MUI_UNPAGE_INSTFILES
278 !insertmacro MUI_UNPAGE_FINISH
280 ; Language files
281 !insertmacro MUI_LANGUAGE "English"
283 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
284 BrandingText ""
285 OutFile "setup.exe"
286 RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
287 ;;;;ShowInstDetails show
288 ;;;;ShowUnInstDetails show
291 ${Function} .onInit
292 ${DebugMsg} "Pre INSTDIR = $INSTDIR"
294 ${If} ${RunningX64}
295 !ifdef WIN64
296 StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCT_NAME}"
297 SetRegView 64
298 !else
299 StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCT_NAME}"
300 SetRegView 32
301 !endif
302 ${Else}
303 !ifdef WIN64
304 MessageBox MB_OK|MB_ICONSTOP \
305 "This installation package is not supported on this platform. Contact your application vendor."
306 Abort
307 !endif
308 StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCT_NAME}"
309 ${Endif}
311 !ifndef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
312 ; Old unistallation method
313 ; Uninstall the old version, if present
314 ReadRegStr $R0 ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
315 ${If} $R0 != ""
316 MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
317 "$(^Name) is already installed. $\n$\nClick 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
318 IDOK +2
319 Abort
321 ; Run the uninstaller
322 ClearErrors
323 ExecWait '$R0'
324 ${Else}
325 ; Install the new version
326 MessageBox MB_YESNO|MB_ICONQUESTION "This will install $(^Name). Do you wish to continue?" \
327 IDYES +2
328 Abort
329 ${Endif}
330 !else
331 ; If the registry key exists it is an uninstallation or reinstallation:
332 ; take the old installation directory
333 Push $R0
335 ReadRegStr $R0 ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "InstallLocation"
336 ${IfNot} ${Errors}
337 StrCpy $INSTDIR $R0
338 StrCpy $SDCC.PathToRemove "$INSTDIR\bin"
339 ${EndIf}
341 Pop $R0
342 !endif
343 ${DebugMsg} "Post INSTDIR = $INSTDIR"
344 ${FunctionEnd}
346 ${Function} un.onInit
347 ${DebugMsg} "Pre INSTDIR = $INSTDIR"
349 ${If} ${RunningX64}
350 !ifdef WIN64
351 SetRegView 64
352 !else
353 SetRegView 32
354 !endif
355 ${Endif}
357 Push $R0
358 ReadRegStr $R0 ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "InstallLocation"
359 ${IfNot} ${Errors}
360 StrCpy $INSTDIR $R0
361 ${EndIf}
362 Pop $R0
364 ${DebugMsg} "Post INSTDIR = $INSTDIR"
366 ${FunctionEnd}
368 ${Section} -Common SECCOMMON
369 SetOutPath "$INSTDIR"
370 File ".\sdcc.ico"
371 File "${SDCC_ROOT}\COPYING.txt"
372 File "${SDCC_ROOT}\COPYING3.txt"
373 ${SectionEnd}
375 ${Section} "SDCC application files" SEC01
376 SectionIn 1 2 3 RO
377 SetOutPath "$INSTDIR\bin"
378 File "${SDCC_ROOT}\bin\sdasgb.exe"
379 File "${SDCC_ROOT}\bin\sdas6808.exe"
380 File "${SDCC_ROOT}\bin\sdasz80.exe"
381 File "${SDCC_ROOT}\bin\sdas8051.exe"
382 File "${SDCC_ROOT}\bin\sdas390.exe"
383 File "${SDCC_ROOT}\bin\sdasrab.exe"
384 File "${SDCC_ROOT}\bin\sdasstm8.exe"
385 File "${SDCC_ROOT}\bin\sdaspdk13.exe"
386 File "${SDCC_ROOT}\bin\sdaspdk14.exe"
387 File "${SDCC_ROOT}\bin\sdaspdk15.exe"
388 File "${SDCC_ROOT}\bin\sdastlcs90.exe"
389 File "${SDCC_ROOT}\bin\sdas6500.exe"
390 File "${SDCC_ROOT}\bin\sdasf8.exe"
391 File "${SDCC_ROOT}\bin\sdld.exe"
392 File "${SDCC_ROOT}\bin\sdldgb.exe"
393 File "${SDCC_ROOT}\bin\sdld6808.exe"
394 File "${SDCC_ROOT}\bin\sdldz80.exe"
395 File "${SDCC_ROOT}\bin\sdldstm8.exe"
396 File "${SDCC_ROOT}\bin\sdldpdk.exe"
397 File "${SDCC_ROOT}\bin\sdldf8.exe"
398 File "${SDCC_ROOT}\bin\sdar.exe"
399 File "${SDCC_ROOT}\bin\sdranlib.exe"
400 File "${SDCC_ROOT}\bin\sdnm.exe"
401 File "${SDCC_ROOT}\bin\sdobjcopy.exe"
402 File "${SDCC_ROOT}\bin\makebin.exe"
403 File "${SDCC_ROOT}\bin\packihx.exe"
404 File "${SDCC_ROOT}\bin\sdcc.exe"
405 File "${SDCC_ROOT}\bin\sdcpp.exe"
406 File "${SDCC_ROOT}\libexec\sdcc\cc1"
407 File "${SDCC_ROOT}\bin\as2gbmap.cmd"
408 File "${SDCC_ROOT}\bin\readline5.dll"
409 File "${SDCC_ROOT}\bin\libgcc_s_*-1.dll"
410 File "${SDCC_ROOT}\bin\libstdc++-6.dll"
411 !ifdef WIN64
412 File "${SDCC_ROOT}\bin\libwinpthread-1.dll"
413 !endif
414 ${SectionEnd}
416 ${Section} "ucSim application files" SEC02
417 SectionIn 1 2 3
418 SetOutPath "$INSTDIR\bin"
419 File "${SDCC_ROOT}\bin\s51.exe"
420 File "${SDCC_ROOT}\bin\ucsim_51.exe"
421 File "${SDCC_ROOT}\bin\ucsim_m68hc08.exe"
422 File "${SDCC_ROOT}\bin\ucsim_mos6502.exe"
423 File "${SDCC_ROOT}\bin\ucsim_pdk.exe"
424 File "${SDCC_ROOT}\bin\ucsim_rxk.exe"
425 File "${SDCC_ROOT}\bin\ucsim_stm8.exe"
426 File "${SDCC_ROOT}\bin\ucsim_tlcs.exe"
427 File "${SDCC_ROOT}\bin\ucsim_z80.exe"
428 File "${SDCC_ROOT}\bin\ucsim_f8.exe"
429 ${SectionEnd}
431 ${Section} "SDCDB files" SEC03
432 SectionIn 1 2 3
433 File "${SDCC_ROOT}\bin\sdcdb.exe"
434 File "${SDCC_ROOT}\bin\sdcdb.el"
435 File "${SDCC_ROOT}\bin\sdcdbsrc.el"
436 ${SectionEnd}
438 ${Section} "SDCC documentation" SEC04
439 SectionIn 1 2 3
440 SetOutPath "$INSTDIR\doc"
441 !ifdef FULL_DOC
442 File /r "${SDCC_ROOT}\doc\*"
443 !else
444 File "${SDCC_ROOT}\doc\ChangeLog_head.txt"
445 File "${SDCC_ROOT}\doc\README.TXT"
446 !endif
447 ${SectionEnd}
449 ${Section} "SDCC include files" SEC05
450 SectionIn 1 2
451 SetOutPath "$INSTDIR\include\asm\default"
452 File "${DEV_ROOT}\include\asm\default\features.h"
453 SetOutPath "$INSTDIR\include\asm\ds390"
454 File "${DEV_ROOT}\include\asm\ds390\features.h"
455 SetOutPath "$INSTDIR\include\asm\sm83"
456 File "${DEV_ROOT}\include\asm\sm83\features.h"
457 SetOutPath "$INSTDIR\include\asm\mcs51"
458 File "${DEV_ROOT}\include\asm\mcs51\features.h"
459 SetOutPath "$INSTDIR\include\asm\pic14"
460 File "${DEV_ROOT}\include\asm\pic14\features.h"
461 SetOutPath "$INSTDIR\include\asm\pic16"
462 File "${DEV_ROOT}\include\asm\pic16\features.h"
463 SetOutPath "$INSTDIR\include\asm\z80"
464 File "${DEV_ROOT}\include\asm\z80\features.h"
465 SetOutPath "$INSTDIR\include\asm\r2k"
466 File "${DEV_ROOT}\include\asm\r2k\features.h"
467 SetOutPath "$INSTDIR\include\asm\r3ka"
468 File "${DEV_ROOT}\include\asm\r3ka\features.h"
469 SetOutPath "$INSTDIR\include\asm\stm8"
470 File "${DEV_ROOT}\include\asm\stm8\features.h"
471 SetOutPath "$INSTDIR\include\asm\f8"
472 File "${DEV_ROOT}\include\asm\f8\features.h"
474 SetOutPath "$INSTDIR\include\ds390"
475 File "${DEV_ROOT}\include\ds390\*.h"
476 SetOutPath "$INSTDIR\include\ds400"
477 File "${DEV_ROOT}\include\ds400\*.h"
478 SetOutPath "$INSTDIR\include\hc08"
479 File "${DEV_ROOT}\include\hc08\*.h"
480 SetOutPath "$INSTDIR\include\mcs51"
481 File "${DEV_ROOT}\include\mcs51\*.h"
482 SetOutPath "$INSTDIR\include\pic14"
483 File "${DEV_ROOT}\include\pic14\*.h"
484 File "${DEV_ROOT}\include\pic14\*.txt"
485 File "${DEV_ROOT}\include\pic14\*.inc"
486 SetOutPath "$INSTDIR\include\pic16"
487 File "${DEV_ROOT}\include\pic16\*.h"
488 File "${DEV_ROOT}\include\pic16\*.txt"
489 SetOutPath "$INSTDIR\include\z180"
490 File "${DEV_ROOT}\include\z180\*.h"
492 SetOutPath "$INSTDIR\include"
493 File "${DEV_ROOT}\include\*.h"
495 SetOutPath "$INSTDIR\non-free\include\pic14"
496 File "${DEV_ROOT}\non-free\include\pic14\*.h"
497 SetOutPath "$INSTDIR\non-free\include\pic16"
498 File "${DEV_ROOT}\non-free\include\pic16\*.h"
499 ${SectionEnd}
501 ${Section} "SDCC DS390 library" SEC06
502 SectionIn 1 2
503 SetOutPath "$INSTDIR\lib\ds390"
504 File "${DEV_ROOT}\lib\ds390\*.*"
505 ${SectionEnd}
507 ${Section} "SDCC DS400 library" SEC07
508 SectionIn 1 2
509 SetOutPath "$INSTDIR\lib\ds400"
510 File "${DEV_ROOT}\lib\ds400\*.*"
511 ${SectionEnd}
513 ${Section} "SDCC SM83 library" SEC08
514 SectionIn 1 2
515 SetOutPath "$INSTDIR\lib\sm83"
516 File "${DEV_ROOT}\lib\sm83\*.*"
517 ${SectionEnd}
519 ${Section} "SDCC Z180 library" SEC09
520 SectionIn 1 2
521 SetOutPath "$INSTDIR\lib\z180"
522 File "${DEV_ROOT}\lib\z180\*.*"
523 ${SectionEnd}
525 ${Section} "SDCC Rabbit 2000 library" SEC10
526 SectionIn 1 2
527 SetOutPath "$INSTDIR\lib\r2k"
528 File "${DEV_ROOT}\lib\r2k\*.*"
529 ${SectionEnd}
531 ${Section} "SDCC Rabbit 3000A library" SEC11
532 SectionIn 1 2
533 SetOutPath "$INSTDIR\lib\r3ka"
534 File "${DEV_ROOT}\lib\r3ka\*.*"
535 ${SectionEnd}
537 ${Section} "SDCC Z80 library" SEC12
538 SectionIn 1 2
539 SetOutPath "$INSTDIR\lib\z80"
540 File "${DEV_ROOT}\lib\z80\*.*"
541 ${SectionEnd}
543 ${Section} "SDCC mcs51 small model library" SEC13
544 SectionIn 1 2
545 SetOutPath "$INSTDIR\lib\small"
546 File "${DEV_ROOT}\lib\small\*.*"
547 ${SectionEnd}
549 ${Section} "SDCC mcs51 medium model library" SEC14
550 SectionIn 1 2
551 SetOutPath "$INSTDIR\lib\medium"
552 File "${DEV_ROOT}\lib\medium\*.*"
553 ${SectionEnd}
555 ${Section} "SDCC mcs51 large model library" SEC15
556 SectionIn 1 2
557 SetOutPath "$INSTDIR\lib\large"
558 File "${DEV_ROOT}\lib\large\*.*"
559 ${SectionEnd}
561 ${Section} "SDCC mcs51 huge model library" SEC16
562 SectionIn 1 2
563 SetOutPath "$INSTDIR\lib\huge"
564 File "${DEV_ROOT}\lib\huge\*.*"
565 ${SectionEnd}
567 ${Section} "SDCC mcs51 small-stack-auto model library" SEC17
568 SectionIn 1 2
569 SetOutPath "$INSTDIR\lib\small-stack-auto"
570 File "${DEV_ROOT}\lib\small-stack-auto\*.*"
571 ${SectionEnd}
573 ${Section} "SDCC mcs51 large-stack-auto model library" SEC18
574 SectionIn 1 2
575 SetOutPath "$INSTDIR\lib\large-stack-auto"
576 File "${DEV_ROOT}\lib\large-stack-auto\*.*"
577 ${SectionEnd}
579 ${Section} "SDCC HC08 library" SEC19
580 SectionIn 1 2
581 SetOutPath "$INSTDIR\lib\hc08"
582 File "${DEV_ROOT}\lib\hc08\*.*"
583 ${SectionEnd}
585 ${Section} "SDCC S08 library" SEC20
586 SectionIn 1 2
587 SetOutPath "$INSTDIR\lib\s08"
588 File "${DEV_ROOT}\lib\s08\*.*"
589 ${SectionEnd}
591 ${Section} "SDCC PIC16 library" SEC21
592 SectionIn 1 2
593 SetOutPath "$INSTDIR\lib\pic16"
594 File "${DEV_ROOT}\lib\pic16\*.o"
595 File "${DEV_ROOT}\lib\pic16\*.lib"
597 SetOutPath "$INSTDIR\non-free\lib\pic16"
598 File "${DEV_ROOT}\non-free\lib\pic16\*.lib"
599 ${SectionEnd}
601 ${Section} "SDCC PIC14 library" SEC22
602 SectionIn 1 2
603 SetOutPath "$INSTDIR\lib\pic14"
604 File "${DEV_ROOT}\lib\pic14\*.lib"
606 SetOutPath "$INSTDIR\non-free\lib\pic14"
607 File "${DEV_ROOT}\non-free\lib\pic14\*.lib"
608 ${SectionEnd}
610 ${Section} "SDCC STM8 medium model library" SEC23
611 SectionIn 1 2
612 SetOutPath "$INSTDIR\lib\stm8"
613 File "${DEV_ROOT}\lib\stm8\*.*"
614 ${SectionEnd}
616 ${Section} "SDCC TLCS90 library" SEC24
617 SectionIn 1 2
618 SetOutPath "$INSTDIR\lib\tlcs90"
619 File "${DEV_ROOT}\lib\tlcs90\*.*"
620 ${SectionEnd}
622 ${Section} "SDCC library sources" SEC25
623 SectionIn 1
624 SetOutPath "$INSTDIR\lib\src\ds390\examples"
625 File "${DEV_ROOT}\lib\src\ds390\examples\MOVED"
627 SetOutPath "$INSTDIR\lib\src\ds390"
628 File "${DEV_ROOT}\lib\src\ds390\*.c"
629 # File "${DEV_ROOT}\lib\src\ds390\Makefile"
631 SetOutPath "$INSTDIR\lib\src\ds400"
632 File "${DEV_ROOT}\lib\src\ds400\*.c"
633 # File "${DEV_ROOT}\lib\src\ds400\Makefile"
635 SetOutPath "$INSTDIR\lib\src\sm83"
636 File "${DEV_ROOT}\lib\src\sm83\*.s"
637 # File "${DEV_ROOT}\lib\src\sm83\Makefile"
639 SetOutPath "$INSTDIR\lib\src\z80"
640 File "${DEV_ROOT}\lib\src\z80\*.s"
641 # File "${DEV_ROOT}\lib\src\z80\Makefile"
643 SetOutPath "$INSTDIR\lib\src\z180"
644 File "${DEV_ROOT}\lib\src\z180\*.s"
645 # File "${DEV_ROOT}\lib\src\z180\Makefile"
647 SetOutPath "$INSTDIR\lib\src\r2k"
648 File "${DEV_ROOT}\lib\src\r2k\*.s"
649 # File "${DEV_ROOT}\lib\src\z180\Makefile"
651 SetOutPath "$INSTDIR\lib\src\r3ka"
652 File "${DEV_ROOT}\lib\src\r3ka\*.s"
653 # File "${DEV_ROOT}\lib\src\r3ka\Makefile"
655 SetOutPath "$INSTDIR\lib\src\hc08"
656 File "${DEV_ROOT}\lib\src\hc08\*.c"
657 # File "${DEV_ROOT}\lib\src\hc08\Makefile"
659 SetOutPath "$INSTDIR\lib\src\s08"
660 File "${DEV_ROOT}\lib\src\s08\*.c"
661 # File "${DEV_ROOT}\lib\src\s08\Makefile"
663 SetOutPath "$INSTDIR\lib\src\stm8"
664 # File "${DEV_ROOT}\lib\src\stm8\Makefile"
666 SetOutPath "$INSTDIR\lib\src\tlcs90"
667 File "${DEV_ROOT}\lib\src\tlcs90\*.s"
668 # File "${DEV_ROOT}\lib\src\tlcs90\Makefile"
670 SetOutPath "$INSTDIR\lib\src\mos6502"
671 File "${DEV_ROOT}\lib\src\mos6502\*.s"
672 # File "${DEV_ROOT}\lib\src\mos6502\Makefile"
674 SetOutPath "$INSTDIR\lib\src\mcs51"
675 File "${DEV_ROOT}\lib\src\mcs51\*.asm"
676 # File "${DEV_ROOT}\lib\src\mcs51\Makefile"
678 SetOutPath "$INSTDIR\lib\src\small"
679 # File "${DEV_ROOT}\lib\src\small\Makefile"
681 SetOutPath "$INSTDIR\lib\src\medium"
682 # File "${DEV_ROOT}\lib\src\medium\Makefile"
684 SetOutPath "$INSTDIR\lib\src\large"
685 # File "${DEV_ROOT}\lib\src\large\Makefile"
687 SetOutPath "$INSTDIR\lib\src\huge"
688 # File "${DEV_ROOT}\lib\src\huge\Makefile"
690 SetOutPath "$INSTDIR\lib\src\pic14"
691 # File "${DEV_ROOT}\lib\src\pic14\configure"
692 # File "${DEV_ROOT}\lib\src\pic14\configure.in"
693 # File "${DEV_ROOT}\lib\src\pic14\GPL"
694 # File "${DEV_ROOT}\lib\src\pic14\LGPL"
695 # File "${DEV_ROOT}\lib\src\pic14\Makefile"
696 # File "${DEV_ROOT}\lib\src\pic14\Makefile.common"
697 # File "${DEV_ROOT}\lib\src\pic14\Makefile.common.in"
698 # File "${DEV_ROOT}\lib\src\pic14\Makefile.rules"
699 # File "${DEV_ROOT}\lib\src\pic14\Makefile.subdir"
700 # File "${DEV_ROOT}\lib\src\pic14\NEWS"
701 # File "${DEV_ROOT}\lib\src\pic14\README"
702 File "${DEV_ROOT}\lib\src\pic14\TEMPLATE.c"
703 File "${DEV_ROOT}\lib\src\pic14\TEMPLATE.S"
705 SetOutPath "$INSTDIR\lib\src\pic14\libsdcc\regular"
706 File "${DEV_ROOT}\lib\src\pic14\libsdcc\regular\*.c"
707 File "${DEV_ROOT}\lib\src\pic14\libsdcc\regular\*.S"
708 File "${DEV_ROOT}\lib\src\pic14\libsdcc\regular\*.inc"
709 # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile"
711 SetOutPath "$INSTDIR\lib\src\pic14\libsdcc\enhanced"
712 File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.S"
713 File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc"
714 # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile"
716 SetOutPath "$INSTDIR\non-free\lib\src\pic14\libdev"
717 File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\*.c"
718 # File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\Makefile"
720 SetOutPath "$INSTDIR\lib\src\pic14\libm"
721 # File "${DEV_ROOT}\lib\src\pic14\libm\*.c"
723 SetOutPath "$INSTDIR\lib\src\pic16"
724 # File "${DEV_ROOT}\lib\src\pic16\configure"
725 # File "${DEV_ROOT}\lib\src\pic16\configure.in"
726 # File "${DEV_ROOT}\lib\src\pic16\COPYING"
727 # File "${DEV_ROOT}\lib\src\pic16\Makefile"
728 # File "${DEV_ROOT}\lib\src\pic16\Makefile.common"
729 # File "${DEV_ROOT}\lib\src\pic16\Makefile.common.in"
730 # File "${DEV_ROOT}\lib\src\pic16\Makefile.rules"
731 # File "${DEV_ROOT}\lib\src\pic16\Makefile.subdir"
732 # File "${DEV_ROOT}\lib\src\pic16\pics.all"
733 # File "${DEV_ROOT}\lib\src\pic16\pics.build"
734 # File "${DEV_ROOT}\lib\src\pic16\README"
736 SetOutPath "$INSTDIR\lib\src\pic16\debug"
737 # File "${DEV_ROOT}\lib\src\pic16\debug\Makefile"
739 SetOutPath "$INSTDIR\lib\src\pic16\debug\gstack"
740 # File "${DEV_ROOT}\lib\src\pic16\debug\gstack\Makefile"
741 File "${DEV_ROOT}\lib\src\pic16\debug\gstack\*.c"
743 SetOutPath "$INSTDIR\lib\src\pic16\libc"
744 # File "${DEV_ROOT}\lib\src\pic16\libc\Makefile"
746 SetOutPath "$INSTDIR\lib\src\pic16\libc\ctype"
747 File "${DEV_ROOT}\lib\src\pic16\libc\ctype\*.c"
748 # File "${DEV_ROOT}\lib\src\pic16\libc\ctype\Makefile"
750 SetOutPath "$INSTDIR\lib\src\pic16\libc\delay"
751 File "${DEV_ROOT}\lib\src\pic16\libc\delay\*.S"
752 # File "${DEV_ROOT}\lib\src\pic16\libc\delay\Makefile"
754 SetOutPath "$INSTDIR\lib\src\pic16\libc\stdio"
755 File "${DEV_ROOT}\lib\src\pic16\libc\stdio\*.c"
756 # File "${DEV_ROOT}\lib\src\pic16\libc\stdio\Makefile"
758 SetOutPath "$INSTDIR\lib\src\pic16\libc\stdlib"
759 File "${DEV_ROOT}\lib\src\pic16\libc\stdlib\*.c"
760 File "${DEV_ROOT}\lib\src\pic16\libc\stdlib\*.S"
761 # File "${DEV_ROOT}\lib\src\pic16\libc\stdlib\Makefile"
763 SetOutPath "$INSTDIR\lib\src\pic16\libc\string"
764 File "${DEV_ROOT}\lib\src\pic16\libc\string\*.c"
765 # File "${DEV_ROOT}\lib\src\pic16\libc\string\Makefile"
767 SetOutPath "$INSTDIR\lib\src\pic16\libc\utils"
768 File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S"
769 # File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile"
771 SetOutPath "$INSTDIR\non-free\lib\src\pic16\libdev"
772 File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\*.c"
773 # File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\Makefile"
775 SetOutPath "$INSTDIR\lib\src\pic16\libio"
776 File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore"
777 # File "${DEV_ROOT}\lib\src\pic16\libio\Makefile"
779 SetOutPath "$INSTDIR\lib\src\pic16\libio\adc"
780 File "${DEV_ROOT}\lib\src\pic16\libio\adc\*.c"
781 # File "${DEV_ROOT}\lib\src\pic16\libio\adc\Makefile"
783 SetOutPath "$INSTDIR\lib\src\pic16\libio\i2c"
784 File "${DEV_ROOT}\lib\src\pic16\libio\i2c\*.c"
785 # File "${DEV_ROOT}\lib\src\pic16\libio\i2c\Makefile"
787 SetOutPath "$INSTDIR\lib\src\pic16\libio\usart"
788 File "${DEV_ROOT}\lib\src\pic16\libio\usart\*.c"
789 # File "${DEV_ROOT}\lib\src\pic16\libio\usart\Makefile"
791 SetOutPath "$INSTDIR\lib\src\pic16\libm"
792 # File "${DEV_ROOT}\lib\src\pic16\libm\Makefile"
794 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc"
795 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\Makefile"
797 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\char"
798 File "${DEV_ROOT}\lib\src\pic16\libsdcc\char\*.c"
799 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\char\Makefile"
801 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\fixed16x16"
802 File "${DEV_ROOT}\lib\src\pic16\libsdcc\fixed16x16\*.c"
803 File "${DEV_ROOT}\lib\src\pic16\libsdcc\fixed16x16\*.S"
804 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\fixed16x16\Makefile"
806 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\gptr"
807 File "${DEV_ROOT}\lib\src\pic16\libsdcc\gptr\*.c"
808 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\gptr\Makefile"
810 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\int"
811 File "${DEV_ROOT}\lib\src\pic16\libsdcc\int\*.c"
812 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\int\Makefile"
814 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\long"
815 File "${DEV_ROOT}\lib\src\pic16\libsdcc\long\*.c"
816 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\long\Makefile"
818 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\lregs"
819 File "${DEV_ROOT}\lib\src\pic16\libsdcc\lregs\*.c"
820 # File "${DEV_ROOT}\lib\src\pic16\libsdcc\lregs\Makefile"
822 SetOutPath "$INSTDIR\lib\src\pic16\libsdcc\stack"
823 File "${DEV_ROOT}\lib\src\pic16\libsdcc\stack\*.S"
825 SetOutPath "$INSTDIR\lib\src\pic16\startup"
826 File "${DEV_ROOT}\lib\src\pic16\startup\*.c"
827 # File "${DEV_ROOT}\lib\src\pic16\startup\Makefile"
828 # File "${DEV_ROOT}\lib\src\pic16\startup\README"
830 SetOutPath "$INSTDIR\lib\src"
831 File "${DEV_ROOT}\lib\src\*.c"
832 ${SectionEnd}
834 ${Section} "SDCC STM8 large model library" SEC26
835 SectionIn 1 2
836 SetOutPath "$INSTDIR\lib\stm8-large"
837 File "${DEV_ROOT}\lib\stm8-large\*.*"
838 ${SectionEnd}
840 ${Section} "SDCC EZ80_Z80 library" SEC27
841 SectionIn 1 2
842 SetOutPath "$INSTDIR\lib\ez80_z80"
843 File "${DEV_ROOT}\lib\ez80_z80\*.*"
844 ${SectionEnd}
846 ${Section} "SDCC PDK13 library" SEC28
847 SectionIn 1 2
848 SetOutPath "$INSTDIR\lib\pdk13"
849 File "${DEV_ROOT}\lib\pdk13\*.*"
850 ${SectionEnd}
852 ${Section} "SDCC PDK14 library" SEC29
853 SectionIn 1 2
854 SetOutPath "$INSTDIR\lib\pdk14"
855 File "${DEV_ROOT}\lib\pdk14\*.*"
856 ${SectionEnd}
858 ${Section} "SDCC PDK15 library" SEC30
859 SectionIn 1 2
860 SetOutPath "$INSTDIR\lib\pdk15"
861 File "${DEV_ROOT}\lib\pdk15\*.*"
862 ${SectionEnd}
864 ${Section} "SDCC PDK15 stack-auto library" SEC31
865 SectionIn 1 2
866 SetOutPath "$INSTDIR\lib\pdk15-stack-auto"
867 File "${DEV_ROOT}\lib\pdk15-stack-auto\*.*"
868 ${SectionEnd}
870 ${Section} "SDCC Z80N library" SEC32
871 SectionIn 1 2
872 SetOutPath "$INSTDIR\lib\z80n"
873 File "${DEV_ROOT}\lib\z80n\*.*"
874 ${SectionEnd}
876 ${Section} "SDCC Rabbit 2000A library" SEC33
877 SectionIn 1 2
878 SetOutPath "$INSTDIR\lib\r2ka"
879 File "${DEV_ROOT}\lib\r2ka\*.*"
880 ${SectionEnd}
882 ${Section} "SDCC MOS 6502 library" SEC34
883 SectionIn 1 2
884 SetOutPath "$INSTDIR\lib\mos6502"
885 File "${DEV_ROOT}\lib\mos6502\*.*"
886 ${SectionEnd}
888 ${Section} "SDCC R800 library" SEC35
889 SectionIn 1 2
890 SetOutPath "$INSTDIR\lib\r800"
891 File "${DEV_ROOT}\lib\r800\*.*"
892 ${SectionEnd}
894 ${Section} "SDCC WDC 65C02 library" SEC36
895 SectionIn 1 2
896 SetOutPath "$INSTDIR\lib\mos65c02"
897 File "${DEV_ROOT}\lib\mos65c02\*.*"
898 ${SectionEnd}
900 ${Section} "SDCC S08 stack-auto library" SEC37
901 SectionIn 1 2
902 SetOutPath "$INSTDIR\lib\s08-stack-auto"
903 File "${DEV_ROOT}\lib\s08-stack-auto\*.*"
904 ${SectionEnd}
906 ${Section} "SDCC f8 library" SEC38
907 SectionIn 1 2
908 SetOutPath "$INSTDIR\lib\f8"
909 File "${DEV_ROOT}\lib\f8\*.*"
910 ${SectionEnd}
912 ;--------------------------------
913 ;Descriptions
915 ;Language strings
916 LangString DESC_SEC01 ${LANG_ENGLISH} "SDCC application files"
917 LangString DESC_SEC02 ${LANG_ENGLISH} "ucSim application files"
918 LangString DESC_SEC03 ${LANG_ENGLISH} "SDCDB files"
919 LangString DESC_SEC04 ${LANG_ENGLISH} "SDCC documentation"
920 LangString DESC_SEC05 ${LANG_ENGLISH} "SDCC include files"
921 LangString DESC_SEC06 ${LANG_ENGLISH} "SDCC DS390 library"
922 LangString DESC_SEC07 ${LANG_ENGLISH} "SDCC DS400 library"
923 LangString DESC_SEC08 ${LANG_ENGLISH} "SDCC SM83 library"
924 LangString DESC_SEC09 ${LANG_ENGLISH} "SDCC Z180 library"
925 LangString DESC_SEC10 ${LANG_ENGLISH} "SDCC Rabbit 2000 library"
926 LangString DESC_SEC11 ${LANG_ENGLISH} "SDCC Rabbit 3000A library"
927 LangString DESC_SEC12 ${LANG_ENGLISH} "SDCC Z80 library"
928 LangString DESC_SEC13 ${LANG_ENGLISH} "SDCC mcs51 small model library"
929 LangString DESC_SEC14 ${LANG_ENGLISH} "SDCC mcs51 medium model library"
930 LangString DESC_SEC15 ${LANG_ENGLISH} "SDCC mcs51 large model library"
931 LangString DESC_SEC16 ${LANG_ENGLISH} "SDCC mcs51 huge model library"
932 LangString DESC_SEC17 ${LANG_ENGLISH} "SDCC mcs51 small-stack-auto model library"
933 LangString DESC_SEC18 ${LANG_ENGLISH} "SDCC mcs51 large-stack-auto model library"
934 LangString DESC_SEC19 ${LANG_ENGLISH} "SDCC HC08 library"
935 LangString DESC_SEC20 ${LANG_ENGLISH} "SDCC S08 library"
936 LangString DESC_SEC21 ${LANG_ENGLISH} "SDCC PIC16 library"
937 LangString DESC_SEC22 ${LANG_ENGLISH} "SDCC PIC14 library"
938 LangString DESC_SEC23 ${LANG_ENGLISH} "SDCC STM8 medium model library"
939 LangString DESC_SEC24 ${LANG_ENGLISH} "SDCC TLCS90 library"
940 LangString DESC_SEC25 ${LANG_ENGLISH} "SDCC library sources"
941 LangString DESC_SEC26 ${LANG_ENGLISH} "SDCC STM8 large model library"
942 LangString DESC_SEC27 ${LANG_ENGLISH} "SDCC EZ80_Z80 library"
943 LangString DESC_SEC28 ${LANG_ENGLISH} "SDCC PDK13 library"
944 LangString DESC_SEC29 ${LANG_ENGLISH} "SDCC PDK14 library"
945 LangString DESC_SEC30 ${LANG_ENGLISH} "SDCC PDK15 library"
946 LangString DESC_SEC31 ${LANG_ENGLISH} "SDCC PDK15 stack-auto library"
947 LangString DESC_SEC32 ${LANG_ENGLISH} "SDCC Z80N library"
948 LangString DESC_SEC33 ${LANG_ENGLISH} "SDCC Rabbit 2000A library"
949 LangString DESC_SEC34 ${LANG_ENGLISH} "SDCC MOS 6502 library"
950 LangString DESC_SEC35 ${LANG_ENGLISH} "SDCC R800 library"
951 LangString DESC_SEC36 ${LANG_ENGLISH} "SDCC WDC 65C02 library"
952 LangString DESC_SEC37 ${LANG_ENGLISH} "SDCC S08 stack-auto library"
953 LangString DESC_SEC38 ${LANG_ENGLISH} "SDCC f8 library"
955 ;Assign language strings to sections
956 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
957 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(DESC_SEC01)
958 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(DESC_SEC02)
959 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(DESC_SEC03)
960 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $(DESC_SEC04)
961 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $(DESC_SEC05)
962 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $(DESC_SEC06)
963 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $(DESC_SEC07)
964 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $(DESC_SEC08)
965 !insertmacro MUI_DESCRIPTION_TEXT ${SEC09} $(DESC_SEC09)
966 !insertmacro MUI_DESCRIPTION_TEXT ${SEC10} $(DESC_SEC10)
967 !insertmacro MUI_DESCRIPTION_TEXT ${SEC11} $(DESC_SEC11)
968 !insertmacro MUI_DESCRIPTION_TEXT ${SEC12} $(DESC_SEC12)
969 !insertmacro MUI_DESCRIPTION_TEXT ${SEC27} $(DESC_SEC27)
970 !insertmacro MUI_DESCRIPTION_TEXT ${SEC13} $(DESC_SEC13)
971 !insertmacro MUI_DESCRIPTION_TEXT ${SEC14} $(DESC_SEC14)
972 !insertmacro MUI_DESCRIPTION_TEXT ${SEC15} $(DESC_SEC15)
973 !insertmacro MUI_DESCRIPTION_TEXT ${SEC16} $(DESC_SEC16)
974 !insertmacro MUI_DESCRIPTION_TEXT ${SEC17} $(DESC_SEC17)
975 !insertmacro MUI_DESCRIPTION_TEXT ${SEC18} $(DESC_SEC18)
976 !insertmacro MUI_DESCRIPTION_TEXT ${SEC19} $(DESC_SEC19)
977 !insertmacro MUI_DESCRIPTION_TEXT ${SEC20} $(DESC_SEC20)
978 !insertmacro MUI_DESCRIPTION_TEXT ${SEC21} $(DESC_SEC21)
979 !insertmacro MUI_DESCRIPTION_TEXT ${SEC22} $(DESC_SEC22)
980 !insertmacro MUI_DESCRIPTION_TEXT ${SEC23} $(DESC_SEC23)
981 !insertmacro MUI_DESCRIPTION_TEXT ${SEC26} $(DESC_SEC26)
982 !insertmacro MUI_DESCRIPTION_TEXT ${SEC24} $(DESC_SEC24)
983 !insertmacro MUI_DESCRIPTION_TEXT ${SEC25} $(DESC_SEC25)
984 !insertmacro MUI_DESCRIPTION_TEXT ${SEC16} $(DESC_SEC26)
985 !insertmacro MUI_DESCRIPTION_TEXT ${SEC17} $(DESC_SEC27)
986 !insertmacro MUI_DESCRIPTION_TEXT ${SEC18} $(DESC_SEC28)
987 !insertmacro MUI_DESCRIPTION_TEXT ${SEC19} $(DESC_SEC29)
988 !insertmacro MUI_DESCRIPTION_TEXT ${SEC20} $(DESC_SEC30)
989 !insertmacro MUI_DESCRIPTION_TEXT ${SEC31} $(DESC_SEC31)
990 !insertmacro MUI_DESCRIPTION_TEXT ${SEC32} $(DESC_SEC32)
991 !insertmacro MUI_DESCRIPTION_TEXT ${SEC33} $(DESC_SEC33)
992 !insertmacro MUI_DESCRIPTION_TEXT ${SEC34} $(DESC_SEC34)
993 !insertmacro MUI_DESCRIPTION_TEXT ${SEC35} $(DESC_SEC35)
994 !insertmacro MUI_DESCRIPTION_TEXT ${SEC36} $(DESC_SEC36)
995 !insertmacro MUI_DESCRIPTION_TEXT ${SEC37} $(DESC_SEC37)
996 !insertmacro MUI_FUNCTION_DESCRIPTION_END
997 ;--------------------------------
999 ${Section} -Icons SECICONS
1000 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
1001 CreateDirectory "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE"
1002 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Uninstall SDCC.lnk" "$INSTDIR\uninstall.exe"
1003 !ifdef FULL_DOC
1004 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Documentation.lnk" "$INSTDIR\doc\sdccman.pdf" "" "$INSTDIR\sdcc.ico" "" "" "" ""
1005 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\README.lnk" "$INSTDIR\doc\README.TXT" "" "$INSTDIR\sdcc.ico" "" "" "" ""
1006 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Change Log.lnk" "$INSTDIR\doc\ChangeLog.txt" "" "$INSTDIR\sdcc.ico" "" "" "" ""
1007 !else
1008 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Documentation.lnk" "$INSTDIR\doc\README.TXT" "" "$INSTDIR\sdcc.ico" "" "" "" ""
1009 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Change Log.lnk" "$INSTDIR\doc\ChangeLog_head.txt" "" "$INSTDIR\sdcc.ico" "" "" "" ""
1010 !endif
1011 CreateShortCut "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\GPL 2 License.lnk" "$INSTDIR\COPYING.txt"
1012 !insertmacro MUI_STARTMENU_WRITE_END
1013 ${SectionEnd}
1015 ${Section} -INI SECINI
1016 WriteIniStr "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\SDCC on the Web.url" "InternetShortcut" "URL" "http://sdcc.sourceforge.net/"
1017 !ifdef FULL_DOC
1018 WriteIniStr "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Latest Changes.url" "InternetShortcut" "URL" "http://svn.code.sf.net/p/sdcc/code/trunk/sdcc/ChangeLog"
1019 !endif
1020 ${SectionEnd}
1022 ${Section} -PostInstall SECPOSTINSTALL
1023 ; Add SDCC bin directory to path if silent mode
1024 ${If} ${Silent}
1025 Call SDCC.AddBinToPath
1026 ${EndIf}
1028 WriteRegStr ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "" $INSTDIR
1029 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
1030 WriteRegDword ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionMajor" "${VER_MAJOR}"
1031 WriteRegDword ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionMinor" "${VER_MINOR}"
1032 WriteRegDword ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionRevision" "${VER_REVISION}"
1033 WriteRegDword ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionBuild" "${VER_BUILD}"
1034 !endif
1036 WriteRegExpandStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninstall.exe"
1037 WriteRegExpandStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
1038 WriteRegStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME}"
1039 WriteRegStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "sdcc.sourceforge.net"
1040 WriteRegStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "http://sdcc.sourceforge.net/"
1041 WriteRegStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "HelpLink" "http://sdcc.sourceforge.net/"
1042 WriteRegStr ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "http://sdcc.sourceforge.net/"
1044 WriteUninstaller "$INSTDIR\uninstall.exe"
1045 ${SectionEnd}
1048 ;;;; Uninstaller code ;;;;
1050 ${Section} Uninstall SECUNINSTALL
1051 !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_STARTMENUPAGE_VARIABLE
1053 ${DebugMsg} "removing path $INSTDIR\bin"
1054 Push "$INSTDIR\bin"
1055 Call un.SDCC.RemoveFromPath
1057 ; Clean the registry
1058 DeleteRegKey ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1059 DeleteRegKey ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}"
1061 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\GPL 2 License.lnk"
1062 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Change Log.lnk"
1063 !ifdef FULL_DOC
1064 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Latest Changes.url"
1065 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\README.lnk"
1066 !endif
1067 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Documentation.lnk"
1068 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\Uninstall SDCC.lnk"
1069 Delete "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE\SDCC on the Web.url"
1071 RMDir "$SMPROGRAMS\$MUI_STARTMENUPAGE_VARIABLE"
1073 Delete "$INSTDIR\lib\src\huge\Makefile"
1075 Delete "$INSTDIR\lib\src\large\Makefile"
1077 Delete "$INSTDIR\lib\src\medium\Makefile"
1079 Delete "$INSTDIR\lib\src\small\Makefile"
1081 Delete "$INSTDIR\lib\src\mcs51\*.asm"
1082 Delete "$INSTDIR\lib\src\mcs51\Makefile"
1083 Delete "$INSTDIR\lib\src\mcs51\README"
1085 Delete "$INSTDIR\lib\src\hc08\*.c"
1086 Delete "$INSTDIR\lib\src\hc08\hc08.lib"
1087 Delete "$INSTDIR\lib\src\hc08\Makefile"
1089 Delete "$INSTDIR\lib\src\s08\*.c"
1090 Delete "$INSTDIR\lib\src\s08\s08.lib"
1091 Delete "$INSTDIR\lib\src\s08\Makefile"
1093 Delete "$INSTDIR\lib\src\stm8\stm8.lib"
1094 Delete "$INSTDIR\lib\src\stm8\Makefile"
1096 Delete "$INSTDIR\lib\src\stm8-large\stm8.lib"
1097 Delete "$INSTDIR\lib\src\stm8-large\Makefile"
1099 Delete "$INSTDIR\lib\src\z80\*.s"
1100 Delete "$INSTDIR\lib\src\z80\z80.lib"
1101 Delete "$INSTDIR\lib\src\z80\README"
1102 Delete "$INSTDIR\lib\src\z80\Makefile"
1104 Delete "$INSTDIR\lib\src\z180\*.s"
1105 Delete "$INSTDIR\lib\src\z180\z80.lib"
1106 Delete "$INSTDIR\lib\src\z180\README"
1107 Delete "$INSTDIR\lib\src\z180\Makefile"
1109 Delete "$INSTDIR\lib\src\sm83\*.s"
1110 Delete "$INSTDIR\lib\src\sm83\sm83.lib"
1111 Delete "$INSTDIR\lib\src\sm83\README"
1112 Delete "$INSTDIR\lib\src\sm83\Makefile"
1114 Delete "$INSTDIR\lib\src\r2k\*.s"
1116 Delete "$INSTDIR\lib\src\r2ka\*.s"
1118 Delete "$INSTDIR\lib\src\r3ka\*.s"
1120 Delete "$INSTDIR\lib\src\ez80_z80\*.s"
1121 Delete "$INSTDIR\lib\src\ez80_z80\ez80_z80.lib"
1122 Delete "$INSTDIR\lib\src\ez80_z80\README"
1123 Delete "$INSTDIR\lib\src\ez80_z80\Makefile"
1125 Delete "$INSTDIR\lib\src\ds390\*.c"
1126 Delete "$INSTDIR\lib\src\ds390\libds390.lib"
1127 Delete "$INSTDIR\lib\src\ds390\Makefile.dep"
1128 Delete "$INSTDIR\lib\src\ds390\Makefile"
1129 Delete "$INSTDIR\lib\src\ds390\examples\MOVED"
1131 Delete "$INSTDIR\lib\src\ds400\*.c"
1132 Delete "$INSTDIR\lib\src\ds400\libds400.lib"
1133 Delete "$INSTDIR\lib\src\ds400\Makefile.dep"
1134 Delete "$INSTDIR\lib\src\ds400\Makefile"
1136 Delete "$INSTDIR\lib\src\pdk13\pdk13.lib"
1137 Delete "$INSTDIR\lib\src\pdk13\Makefile"
1139 Delete "$INSTDIR\lib\src\pdk14\pdk14.lib"
1140 Delete "$INSTDIR\lib\src\pdk14\Makefile"
1142 Delete "$INSTDIR\lib\src\pdk15\pdk15.lib"
1143 Delete "$INSTDIR\lib\src\pdk15\Makefile"
1145 Delete "$INSTDIR\lib\src\pdk15-stack-auto\pdk15.lib"
1146 Delete "$INSTDIR\lib\src\pdk15-stack-auto\Makefile"
1148 Delete "$INSTDIR\lib\src\tlcs90\*.s"
1149 Delete "$INSTDIR\lib\src\tlcs90\tlcs90.lib"
1150 Delete "$INSTDIR\lib\src\tlcs90\README"
1151 Delete "$INSTDIR\lib\src\tlcs90\Makefile"
1153 Delete "$INSTDIR\lib\src\mos6502\*.s"
1154 Delete "$INSTDIR\lib\src\mos6502\mos6502.lib"
1155 Delete "$INSTDIR\lib\src\mos6502\Makefile"
1157 Delete "$INSTDIR\lib\src\z80n\*.s"
1158 Delete "$INSTDIR\lib\src\z80n\z80n.lib"
1159 Delete "$INSTDIR\lib\src\z80n\README"
1160 Delete "$INSTDIR\lib\src\z80n\Makefile"
1162 Delete "$INSTDIR\lib\src\r800n\*.s"
1163 Delete "$INSTDIR\lib\src\r800\r800.lib"
1164 Delete "$INSTDIR\lib\src\r800\README"
1165 Delete "$INSTDIR\lib\src\r800\Makefile"
1167 Delete "$INSTDIR\lib\src\mos65c02\*.s"
1168 Delete "$INSTDIR\lib\src\mos65c02\mos65c02.lib"
1169 Delete "$INSTDIR\lib\src\mos65c02\Makefile"
1171 Delete "$INSTDIR\lib\src\s08-stack-auto\pdk15.lib"
1172 Delete "$INSTDIR\lib\src\s08-stack-auto\Makefile"
1174 Delete "$INSTDIR\lib\src\f8\f8.lib"
1175 Delete "$INSTDIR\lib\src\f8\Makefile"
1177 Delete "$INSTDIR\lib\src\*.c"
1179 Delete "$INSTDIR\lib\pic14\*.lib"
1181 Delete "$INSTDIR\non-free\lib\pic14\*.lib"
1183 Delete "$INSTDIR\lib\pic16\*.o"
1184 Delete "$INSTDIR\lib\pic16\*.lib"
1186 Delete "$INSTDIR\non-free\lib\pic16\*.lib"
1188 Delete "$INSTDIR\lib\hc08\*.lib"
1190 Delete "$INSTDIR\lib\s08\*.lib"
1192 Delete "$INSTDIR\lib\stm8\*.lib"
1194 Delete "$INSTDIR\lib\stm8-large\*.lib"
1196 Delete "$INSTDIR\lib\z80\*.rel"
1197 Delete "$INSTDIR\lib\z80\*.lib"
1199 Delete "$INSTDIR\lib\z180\*.rel"
1200 Delete "$INSTDIR\lib\z180\*.lib"
1202 Delete "$INSTDIR\lib\r2k\*.rel"
1203 Delete "$INSTDIR\lib\r2k\*.lib"
1205 Delete "$INSTDIR\lib\r2ka\*.rel"
1206 Delete "$INSTDIR\lib\r2ka\*.lib"
1208 Delete "$INSTDIR\lib\r3ka\*.rel"
1209 Delete "$INSTDIR\lib\r3ka\*.lib"
1211 Delete "$INSTDIR\lib\ez80_z80\*.rel"
1212 Delete "$INSTDIR\lib\ez80_z80\*.lib"
1214 Delete "$INSTDIR\lib\small\*.lib"
1216 Delete "$INSTDIR\lib\medium\*.lib"
1218 Delete "$INSTDIR\lib\large\*.lib"
1220 Delete "$INSTDIR\lib\huge\*.lib"
1222 Delete "$INSTDIR\lib\small-stack-auto\*.lib"
1223 Delete "$INSTDIR\lib\large-stack-auto\*.lib"
1225 Delete "$INSTDIR\lib\sm83\*.rel"
1226 Delete "$INSTDIR\lib\sm83\*.lib"
1228 Delete "$INSTDIR\lib\ds390\*.lib"
1230 Delete "$INSTDIR\lib\ds400\*.lib"
1232 Delete "$INSTDIR\lib\pdk13\*.lib"
1234 Delete "$INSTDIR\lib\pdk14\*.lib"
1236 Delete "$INSTDIR\lib\pdk15\*.lib"
1238 Delete "$INSTDIR\lib\pdk15-stack-auto\*.lib"
1240 Delete "$INSTDIR\lib\tlcs90\*.rel"
1241 Delete "$INSTDIR\lib\tlcs90\*.lib"
1243 Delete "$INSTDIR\lib\mos6502\*.rel"
1244 Delete "$INSTDIR\lib\mos6502\*.lib"
1246 Delete "$INSTDIR\lib\z80n\*.rel"
1247 Delete "$INSTDIR\lib\z80n\*.lib"
1249 Delete "$INSTDIR\lib\r800\*.rel"
1250 Delete "$INSTDIR\lib\r800\*.lib"
1252 Delete "$INSTDIR\lib\mos65c02\*.rel"
1253 Delete "$INSTDIR\lib\mos65c02\*.lib"
1255 Delete "$INSTDIR\lib\s08-stack-auto\*.lib"
1257 Delete "$INSTDIR\lib\f8\*.lib"
1259 Delete "$INSTDIR\include\asm\z80\*.h"
1260 Delete "$INSTDIR\include\asm\r2k\*.h"
1261 Delete "$INSTDIR\include\asm\r3ka\*.h"
1262 Delete "$INSTDIR\include\asm\pic16\*.h"
1263 Delete "$INSTDIR\include\asm\pic14\*.h"
1264 Delete "$INSTDIR\include\asm\mcs51\*.h"
1265 Delete "$INSTDIR\include\asm\sm83\*.h"
1266 Delete "$INSTDIR\include\asm\ds390\*.h"
1267 Delete "$INSTDIR\include\asm\stm8\*.h"
1268 Delete "$INSTDIR\include\asm\default\*.h"
1269 Delete "$INSTDIR\include\z180\*.h"
1270 Delete "$INSTDIR\include\pic14\*.h"
1271 Delete "$INSTDIR\include\pic14\*.txt"
1272 Delete "$INSTDIR\include\pic14\*.inc"
1273 Delete "$INSTDIR\non-free\include\pic14\*.h"
1274 Delete "$INSTDIR\include\pic16\*.h"
1275 Delete "$INSTDIR\non-free\include\pic16\*.h"
1276 Delete "$INSTDIR\include\pic16\*.txt"
1277 Delete "$INSTDIR\include\mcs51\*.h"
1278 Delete "$INSTDIR\include\hc08\*.h"
1279 Delete "$INSTDIR\include\ds400\*.h"
1280 Delete "$INSTDIR\include\ds390\*.h"
1281 Delete "$INSTDIR\include\asm\f8\*.h"
1282 Delete "$INSTDIR\include\*.h"
1284 !ifndef FULL_DOC
1285 Delete "$INSTDIR\doc\README.TXT"
1286 Delete "$INSTDIR\doc\ChangeLog_head.txt"
1287 !endif
1289 Delete "$INSTDIR\bin\sdasgb.exe"
1290 Delete "$INSTDIR\bin\sdas6808.exe"
1291 Delete "$INSTDIR\bin\sdasz80.exe"
1292 Delete "$INSTDIR\bin\sdas8051.exe"
1293 Delete "$INSTDIR\bin\sdas390.exe"
1294 Delete "$INSTDIR\bin\sdasrab.exe"
1295 Delete "$INSTDIR\bin\sdasstm8.exe"
1296 Delete "$INSTDIR\bin\sdaspdk13.exe"
1297 Delete "$INSTDIR\bin\sdaspdk14.exe"
1298 Delete "$INSTDIR\bin\sdaspdk15.exe"
1299 Delete "$INSTDIR\bin\sdastlcs90.exe"
1300 Delete "$INSTDIR\bin\sdas6500.exe"
1301 Delete "$INSTDIR\bin\sdasf8.exe"
1302 Delete "$INSTDIR\bin\sdld.exe"
1303 Delete "$INSTDIR\bin\sdldgb.exe"
1304 Delete "$INSTDIR\bin\sdld6808.exe"
1305 Delete "$INSTDIR\bin\sdldz80.exe"
1306 Delete "$INSTDIR\bin\sdldstm8.exe"
1307 Delete "$INSTDIR\bin\sdldpdk.exe"
1308 Delete "$INSTDIR\bin\sdldf8.exe"
1309 Delete "$INSTDIR\bin\sdar.exe"
1310 Delete "$INSTDIR\bin\sdranlib.exe"
1311 Delete "$INSTDIR\bin\sdnm.exe"
1312 Delete "$INSTDIR\bin\sdobjcopy.exe"
1313 Delete "$INSTDIR\bin\makebin.exe"
1314 Delete "$INSTDIR\bin\packihx.exe"
1315 Delete "$INSTDIR\bin\sdcc.exe"
1316 Delete "$INSTDIR\bin\sdcpp.exe"
1317 Delete "$INSTDIR\bin\cc1"
1318 Delete "$INSTDIR\bin\as2gbmap.cmd"
1319 Delete "$INSTDIR\bin\readline5.dll"
1320 Delete "$INSTDIR\bin\libgcc_s_*-1.dll"
1321 Delete "$INSTDIR\bin\libstdc++-6.dll"
1322 !ifdef WIN64
1323 Delete "$INSTDIR\bin\libwinpthread-1.dll"
1324 !endif
1327 Delete "$INSTDIR\bin\s51.exe"
1328 Delete "$INSTDIR\bin\sz80.exe"
1329 Delete "$INSTDIR\bin\sstm8.exe"
1330 Delete "$INSTDIR\bin\sf8.exe"
1332 Delete "$INSTDIR\bin\ucsim_51.exe"
1333 Delete "$INSTDIR\bin\ucsim_m68hc08.exe"
1334 Delete "$INSTDIR\bin\ucsim_mos6502.exe"
1335 Delete "$INSTDIR\bin\ucsim_pdk.exe"
1336 Delete "$INSTDIR\bin\ucsim_rxk.exe"
1337 Delete "$INSTDIR\bin\ucsim_stm8.exe"
1338 Delete "$INSTDIR\bin\ucsim_tlcs.exe"
1339 Delete "$INSTDIR\bin\ucsim_z80.exe"
1340 Delete "$INSTDIR\bin\ucsim_f8.exe"
1342 Delete "$INSTDIR\bin\sdcdb.exe"
1343 Delete "$INSTDIR\bin\sdcdb.el"
1344 Delete "$INSTDIR\bin\sdcdbsrc.el"
1346 Delete "$INSTDIR\COPYING.txt"
1347 Delete "$INSTDIR\COPYING3.txt"
1348 Delete "$INSTDIR\sdcc.ico"
1349 Delete "$INSTDIR\uninstall.exe"
1351 RMDir /r "$INSTDIR\lib\src\pic14"
1352 RMDir /r "$INSTDIR\non-free\lib\src\pic14"
1353 RMDir /r "$INSTDIR\lib\src\pic16"
1354 RMDir /r "$INSTDIR\non-free\lib\src\pic16"
1355 RMDir "$INSTDIR\lib\src\small"
1356 RMDir "$INSTDIR\lib\src\medium"
1357 RMDir "$INSTDIR\lib\src\large"
1358 RMDir "$INSTDIR\lib\src\huge"
1359 RMDir "$INSTDIR\lib\src\mcs51"
1360 RMDir "$INSTDIR\lib\src\z80"
1361 RMDir "$INSTDIR\lib\src\z180"
1362 RMDir "$INSTDIR\lib\src\sm83"
1363 RMDir "$INSTDIR\lib\src\r2k"
1364 RMDir "$INSTDIR\lib\src\r2ka"
1365 RMDir "$INSTDIR\lib\src\r3ka"
1366 RMDir "$INSTDIR\lib\src\ez80_z80"
1367 RMDir "$INSTDIR\lib\src\ds390\examples"
1368 RMDir "$INSTDIR\lib\src\ds390"
1369 RMDir "$INSTDIR\lib\src\ds400"
1370 RMDir "$INSTDIR\lib\src\hc08"
1371 RMDir "$INSTDIR\lib\src\s08"
1372 RMDir "$INSTDIR\lib\src\stm8"
1373 RMDir "$INSTDIR\lib\src\stm8-large"
1374 RMDir "$INSTDIR\lib\src\pdk13"
1375 RMDir "$INSTDIR\lib\src\pdk14"
1376 RMDir "$INSTDIR\lib\src\pdk15"
1377 RMDir "$INSTDIR\lib\src\pdk15-stack-auto"
1378 RMDir "$INSTDIR\lib\src\tlcs90"
1379 RMDir "$INSTDIR\lib\src\mos6502"
1380 RMDir "$INSTDIR\lib\src\z80n"
1381 RMDir "$INSTDIR\lib\src\r800"
1382 RMDir "$INSTDIR\lib\src\mos65c02"
1383 RMDir "$INSTDIR\lib\src\s08-stack-auto"
1384 RMDir "$INSTDIR\lib\src\f8"
1385 RMDir "$INSTDIR\lib\src"
1386 RMDir "$INSTDIR\non-free\lib\src"
1388 RMDir "$INSTDIR\lib\pic14"
1389 RMDir "$INSTDIR\non-free\lib\pic14"
1390 RMDir "$INSTDIR\lib\pic16"
1391 RMDir "$INSTDIR\non-free\lib\pic16"
1392 RMDir "$INSTDIR\lib\z80"
1393 RMDir "$INSTDIR\lib\z180"
1394 RMDir "$INSTDIR\lib\r2k"
1395 RMDir "$INSTDIR\lib\r2ka"
1396 RMDir "$INSTDIR\lib\r3ka"
1397 RMDir "$INSTDIR\lib\ez80_z80"
1398 RMDir "$INSTDIR\lib\small"
1399 RMDir "$INSTDIR\lib\medium"
1400 RMDir "$INSTDIR\lib\large"
1401 RMDir "$INSTDIR\lib\huge"
1402 RMDir "$INSTDIR\lib\small-stack-auto"
1403 RMDir "$INSTDIR\lib\large-stack-auto"
1404 RMDir "$INSTDIR\lib\sm83"
1405 RMDir "$INSTDIR\lib\ds390"
1406 RMDir "$INSTDIR\lib\ds400"
1407 RMDir "$INSTDIR\lib\hc08"
1408 RMDir "$INSTDIR\lib\s08"
1409 RMDir "$INSTDIR\lib\stm8"
1410 RMDir "$INSTDIR\lib\stm8-large"
1411 RMDir "$INSTDIR\lib\pdk13"
1412 RMDir "$INSTDIR\lib\pdk14"
1413 RMDir "$INSTDIR\lib\pdk15"
1414 RMDir "$INSTDIR\lib\pdk15-stack-auto"
1415 RMDir "$INSTDIR\lib\tlcs90"
1416 RMDir "$INSTDIR\lib\mos6502"
1417 RMDir "$INSTDIR\lib\z80n"
1418 RMDir "$INSTDIR\lib\r800"
1419 RMDir "$INSTDIR\lib\mos65c02"
1420 RMDir "$INSTDIR\lib\s08-stack-auto"
1421 RMDir "$INSTDIR\lib\f8"
1422 RMDir "$INSTDIR\lib"
1423 RMDir "$INSTDIR\non-free\lib"
1425 RMDir "$INSTDIR\include\asm\z80"
1426 RMDir "$INSTDIR\include\asm\r2k"
1427 RMDir "$INSTDIR\include\asm\r3ka"
1428 RMDir "$INSTDIR\include\asm\pic16"
1429 RMDir "$INSTDIR\non-free\include\asm\pic16"
1430 RMDir "$INSTDIR\include\asm\pic14"
1431 RMDir "$INSTDIR\non-free\include\asm\pic14"
1432 RMDir "$INSTDIR\include\asm\mcs51"
1433 RMDir "$INSTDIR\include\asm\sm83"
1434 RMDir "$INSTDIR\include\asm\ds390"
1435 RMDir "$INSTDIR\include\asm\stm8"
1436 RMDir "$INSTDIR\include\asm\f8"
1437 RMDir "$INSTDIR\include\asm\default"
1438 RMDir "$INSTDIR\include\asm"
1439 RMDir "$INSTDIR\include\z180"
1440 RMDir "$INSTDIR\include\pic14"
1441 RMDir "$INSTDIR\non-free\include\pic14"
1442 RMDir "$INSTDIR\include\pic16"
1443 RMDir "$INSTDIR\non-free\include\pic16"
1444 RMDir "$INSTDIR\include\mcs51"
1445 RMDir "$INSTDIR\include\hc08"
1446 RMDir "$INSTDIR\include\ds400"
1447 RMDir "$INSTDIR\include\ds390"
1448 RMDir "$INSTDIR\include"
1449 RMDir "$INSTDIR\non-free\include"
1451 RMDir "$INSTDIR\non-free"
1453 !ifdef FULL_DOC
1454 RMDir /r "$INSTDIR\doc"
1455 !else
1456 RMDir "$INSTDIR\doc"
1457 !endif
1459 RMDir "$INSTDIR\bin"
1461 RMDir "$INSTDIR"
1462 ;;;; SetAutoClose true
1463 ${SectionEnd}
1465 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1466 ; Path Manipulation functions ;
1467 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1469 !verbose 3
1470 !include "WinMessages.nsh"
1471 !verbose 4
1473 ; AddToPath - Adds the given dir to the search path.
1474 ; Input - head of the stack
1475 ; Note - Win9x systems requires reboot
1477 ${Function} SDCC.AddToPath
1478 Exch $0
1479 Push $1
1480 Push $2
1481 Push $3
1483 ; don't add if the path doesn't exist
1484 ${If} ${FileExists} $0
1485 ${If} ${IsNT}
1486 ; On NT: read PATH from registry
1487 ReadRegStr $1 HKCU "Environment" "PATH"
1488 ${Else}
1489 ; Not on NT: read PATH from environment variable
1490 ReadEnvStr $1 PATH
1491 ${EndIf}
1493 ${StrStr} $2 "$1;" "$0;"
1494 ${If} $2 == ""
1495 ${StrStr} $2 "$1;" "$0\;"
1496 ${If} $2 == ""
1497 GetFullPathName /SHORT $3 $0
1498 ${StrStr} $2 "$1;" "$3;"
1499 ${If} $2 == ""
1500 ${StrStr} $2 "$1;" "$03\;"
1501 ${If} $2 == ""
1502 ${If} ${IsNT}
1503 ;System PATH variable is at:
1504 ;HKLM "/SYSTEM/CurrentControlSet/Control/Session Manager/Environment" "Path"
1505 ReadRegStr $1 HKCU "Environment" "PATH"
1506 StrCpy $2 $1 1 -1 ; copy last char
1507 ${If} $2 == ";" ; if last char == ;
1508 StrCpy $1 $1 -1 ; remove last char
1509 ${Endif}
1510 ${If} $1 != ""
1511 StrCpy $0 "$1;$0"
1512 ${Endif}
1513 WriteRegExpandStr HKCU "Environment" "PATH" $0
1514 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
1515 ${Else}
1516 ; Not on NT
1517 StrCpy $1 $WINDIR 2
1518 FileOpen $1 "$1\autoexec.bat" a
1519 FileSeek $1 -1 END
1520 FileReadByte $1 $2
1521 ${If} $2 = 26 ; DOS EOF
1522 FileSeek $1 -1 END ; write over EOF
1523 ${Endif}
1524 ${DebugMsg} "adding line $\r$\nSET PATH=%PATH%;$3$\r$\n"
1525 FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
1526 FileClose $1
1527 ${DebugMsg} "SetRebootFlag true"
1528 SetRebootFlag true
1529 ${Endif}
1530 ${Endif}
1531 ${Endif}
1532 ${Endif}
1533 ${Endif}
1534 ${EndIf}
1536 Pop $3
1537 Pop $2
1538 Pop $1
1539 Pop $0
1540 ${FunctionEnd}
1542 ; RemoveFromPath - Remove a given dir from the path
1543 ; Input: head of the stack
1545 !macro SDCC.RemoveFromPath un
1546 ${Function} ${un}SDCC.RemoveFromPath
1547 Exch $0
1548 Push $1
1549 Push $2
1550 Push $3
1551 Push $4
1552 Push $5
1553 Push $6
1555 IntFmt $6 "%c" 26 ; DOS EOF
1557 ${If} ${IsNT}
1558 ;System PATH variable is at:
1559 ;HKLM "/SYSTEM/CurrentControlSet/Control/Session Manager/Environment" "Path"
1560 ReadRegStr $1 HKCU "Environment" "PATH"
1561 StrCpy $5 $1 1 -1 ; copy last char
1562 ${If} $5 != ";" ; if last char != ;
1563 StrCpy $1 "$1;" ; append ;
1564 ${EndIf}
1565 Push $1
1566 Push "$0;"
1567 Call ${un}StrStr ; Find `$0;` in $1
1568 Pop $2 ; pos of our dir
1569 ${If} $2 != ""
1570 ; it is in path:
1571 ; $0 - path to add
1572 ; $1 - path var
1573 StrLen $3 "$0;"
1574 StrLen $4 $2
1575 StrCpy $5 $1 -$4 ; $5 is now the part before the path to remove
1576 StrCpy $6 $2 "" $3 ; $6 is now the part after the path to remove
1577 StrCpy $3 $5$6
1579 StrCpy $5 $3 1 -1 ; copy last char
1580 ${If} $5 == ";" ; if last char == ;
1581 StrCpy $3 $3 -1 ; remove last char
1582 ${EndIf}
1583 ${If} $3 != ""
1584 ; New PATH not empty: update the registry
1585 WriteRegExpandStr HKCU "Environment" "PATH" $3
1586 ${Else}
1587 ; New PATH empty: remove from the registry
1588 DeleteRegValue HKCU "Environment" "PATH"
1589 ${EndIf}
1590 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
1591 ${Endif}
1592 ${Else}
1593 ; Not on NT
1594 StrCpy $1 $WINDIR 2
1595 FileOpen $1 "$1\autoexec.bat" r
1596 GetTempFileName $4
1597 FileOpen $2 $4 w
1598 GetFullPathName /SHORT $0 $0
1599 StrCpy $0 "SET PATH=%PATH%;$0"
1601 nextLine:
1602 ; copy all lines except the line containing "SET PATH=%PATH%;$0"
1603 ; from autoexec.bat to the temporary file
1604 ClearErrors
1605 FileRead $1 $3
1606 ${IfNot} ${Errors}
1607 StrCpy $5 $3 1 -1 ; read last char
1608 ${If} $5 == $6 ; if DOS EOF
1609 StrCpy $3 $3 -1 ; remove DOS EOF so we can compare
1610 ${EndIf}
1611 ${If} $3 != "$0$\r$\n"
1612 ${AndIf} $3 != "$0$\n"
1613 ${AndIf} $3 != "$0"
1614 FileWrite $2 $3
1615 Goto nextLine
1616 ${Else}
1617 ; This is the line I'm looking for:
1618 ; don't copy it
1619 ${DebugMsg} "removing line $0"
1620 ${DebugMsg} "SetRebootFlag true"
1621 SetRebootFlag true
1622 Goto nextLine
1623 ${EndIf}
1624 ${EndIf}
1626 FileClose $2
1627 FileClose $1
1628 StrCpy $1 $WINDIR 2
1629 Delete "$1\autoexec.bat"
1630 CopyFiles /SILENT $4 "$1\autoexec.bat"
1631 Delete $4
1632 ${Endif}
1634 Pop $6
1635 Pop $5
1636 Pop $4
1637 Pop $3
1638 Pop $2
1639 Pop $1
1640 Pop $0
1641 ${FunctionEnd}
1642 !macroend
1643 !insertmacro SDCC.RemoveFromPath ""
1644 !insertmacro SDCC.RemoveFromPath "un."
1646 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1647 ; Uninstall/Reinstall page functions ;
1648 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1650 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
1652 Var ReinstallPageCheck
1654 ${Function} SDCC.PageReinstall
1656 ReadRegStr $R0 ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" ""
1658 ${If} $R0 == ""
1659 ReadRegStr $R0 ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
1660 ${If} $R0 == ""
1661 Abort
1662 ${EndIf}
1663 ${EndIf}
1665 ReadRegDWORD $R0 ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionMajor"
1666 ReadRegDWORD $R1 ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionMinor"
1667 ReadRegDWORD $R2 ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionRevision"
1668 ReadRegDWORD $R3 ${SDCC_ROOT_KEY} "Software\${PRODUCT_NAME}" "VersionBuild"
1669 StrCpy $R0 $R0.$R1.$R2.$R3
1671 ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0
1672 ${If} $R0 == 0
1673 StrCpy $R1 "${PRODUCT_NAME} ${PRODUCT_VERSION} is already installed. Select the operation you want to perform and click Next to continue."
1674 StrCpy $R2 "Add/Reinstall components"
1675 StrCpy $R3 "Uninstall ${PRODUCT_NAME}"
1676 !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
1677 StrCpy $R0 "2"
1678 ${ElseIf} $R0 == 1
1679 StrCpy $R1 "An older version of ${PRODUCT_NAME} is installed on your system. It's recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
1680 StrCpy $R2 "Uninstall before installing"
1681 StrCpy $R3 "Do not uninstall"
1682 !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_NAME}."
1683 StrCpy $R0 "1"
1684 ${ElseIf} $R0 == 2
1685 StrCpy $R1 "A newer version of ${PRODUCT_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
1686 StrCpy $R2 "Uninstall before installing"
1687 StrCpy $R3 "Do not uninstall"
1688 !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_NAME}."
1689 StrCpy $R0 "1"
1690 ${Else}
1691 Abort
1692 ${EndIf}
1694 nsDialogs::Create /NOUNLOAD 1018
1696 ${NSD_CreateLabel} 0 0 100% 24u $R1
1697 Pop $R1
1699 ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
1700 Pop $R2
1701 ${NSD_OnClick} $R2 SDCC.PageReinstallUpdateSelection
1703 ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3
1704 Pop $R3
1705 ${NSD_OnClick} $R3 SDCC.PageReinstallUpdateSelection
1707 ${If} $ReinstallPageCheck != 2
1708 SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
1709 ${Else}
1710 SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
1711 ${EndIf}
1713 nsDialogs::Show
1715 ${FunctionEnd}
1717 ${Function} SDCC.PageReinstallUpdateSelection
1719 Pop $R1
1721 ${NSD_GetState} $R2 $R1
1723 ${If} $R1 == ${BST_CHECKED}
1724 StrCpy $ReinstallPageCheck 1
1725 ${Else}
1726 StrCpy $ReinstallPageCheck 2
1727 ${EndIf}
1729 ${FunctionEnd}
1731 ${Function} SDCC.PageLeaveReinstall
1733 ${NSD_GetState} $R2 $R1
1735 ${DebugMsg} "R0 = $R0, R1 = $R1, R2 = $R2"
1737 ${If} $R0 == "1"
1738 ${AndIf} $R1 != "1"
1739 Goto reinst_done
1740 ${EndIf}
1742 ${If} $R0 == "2"
1743 ${AndIf} $R1 == 1
1744 Goto reinst_done
1745 ${EndIf}
1747 ReadRegStr $R1 ${UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
1749 ;Run uninstaller
1750 HideWindow
1752 ${If} $R0 == "2"
1753 ; Uninstall only: uninstaller should be removed
1754 ClearErrors
1755 ; ExecWait doesn't wait if _?=$INSTDIR is not defined!
1756 ExecWait '$R1'
1757 Quit
1758 ${Else}
1759 ; Uninstal & Reinstall: uninstaller will be rewritten
1760 ClearErrors
1761 ; ExecWait doesn't wait if _?=$INSTDIR is not defined!
1762 ExecWait '$R1 _?=$INSTDIR'
1763 ${EndIf}
1765 BringToFront
1767 reinst_done:
1769 ${FunctionEnd}
1771 !endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD