Code

several warnings
[inkscape.git] / packaging / win32 / inkscape.nsi
1 ; #######################################
2 ; Inkscape NSIS installer project file
3 ; Used as of 0.40
4 ; #######################################
6 ; #######################################
7 ; DEFINES
8 ; #######################################
9 !define PRODUCT_NAME "Inkscape"
10 !define PRODUCT_VERSION "0.43+devel"
11 !define PRODUCT_PUBLISHER "Inkscape Organization"
12 !define PRODUCT_WEB_SITE "http://www.inkscape.org"
13 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe"
14 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
18 ; #######################################
19 ; MUI   SETTINGS
20 ; #######################################
21 ; MUI 1.67 compatible ------
22 SetCompressor /SOLID lzma
23 !include "MUI.nsh"
24 !include "sections.nsh"
25 !define MUI_ABORTWARNING
26 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
27 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
28 !define MUI_HEADERIMAGE
29 !define MUI_HEADERIMAGE_BITMAP "header.bmp"
30 !define MUI_COMPONENTSPAGE_SMALLDESC
33 ; Welcome page
34 !insertmacro MUI_PAGE_WELCOME
35 ; License page
36 ; !define MUI_LICENSEPAGE_RADIOBUTTONS
37 LicenseForceSelection off
38 !define MUI_LICENSEPAGE_BUTTON $(lng_LICENSE_BUTTON)
39 !define MUI_LICENSEPAGE_TEXT_BOTTOM $(lng_LICENSE_BOTTOM_TEXT)
40 !insertmacro MUI_PAGE_LICENSE "..\..\Copying"
41 !insertmacro MUI_PAGE_COMPONENTS
42 ; InstType $(lng_Full)
43 ; InstType $(lng_Optimal)
44 ; InstType $(lng_Minimal)
45 ; Directory page
46 !insertmacro MUI_PAGE_DIRECTORY
47 ; Instfiles page
48 !insertmacro MUI_PAGE_INSTFILES
49 ; Finish page
50 !define MUI_FINISHPAGE_RUN "$INSTDIR\inkscape.exe"
51 !insertmacro MUI_PAGE_FINISH
53 ; Uninstaller pages
54 !insertmacro MUI_UNPAGE_CONFIRM
55 UninstPage custom un.CustomPageUninstall
56 !insertmacro MUI_UNPAGE_INSTFILES
57 ShowUninstDetails hide
58 !insertmacro MUI_UNPAGE_FINISH
60 ; #######################################
61 ; STRING   LOCALIZATION
62 ; #######################################
63 ; Thanks to Adib Taraben and Luca Bruno for getting this started
64 ; Add your translation here!  :-)
65 ; I had wanted to list the languages alphabetically, but apparently
66 ; the first is the default.  So putting English first is just being
67 ; practical.  It is not chauvinism or hubris, I swear!  ;-)
68 ; default language first
70 ; Language files
71 !include "english.nsh" 
72 ;!include "catalan.nsh" 
73 !include "czech.nsh" 
74 ;!include "french.nsh" 
75 !include "german.nsh" 
76 !include "italian.nsh" 
77 ;!include "polish.nsh" 
79 ReserveFile "inkscape.nsi.uninstall"
82 ; #######################################
83 ; SETTINGS
84 ; #######################################
86 Name              "${PRODUCT_NAME} ${PRODUCT_VERSION}"
87 Caption           $(lng_Caption)
88 OutFile           "Inkscape-${PRODUCT_VERSION}-1.win32.exe"
89 InstallDir        "$PROGRAMFILES\Inkscape"
90 InstallDirRegKey  HKLM "${PRODUCT_DIR_REGKEY}" ""
91 ShowInstDetails   hide
92 ShowUnInstDetails hide
94 var askMultiUser
95 Var MultiUser
96 var User
98 ; #######################################
99 ;  I N S T A L L E R    S E C T I O N S
100 ; #######################################
102 ; Turn off old selected section
103 ; GetWindowsVersion
105 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
106 ; Updated by Joost Verburg
107 ; Updated for Windows 98 SE by Matthew Win Tibbals 5-21-03
109 ; Returns on top of stack
111 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
112 ; or
113 ; '' (Unknown Windows Version)
115 ; Usage:
116 ;   Call GetWindowsVersion
117 ;   Pop $R0
118 ;   ; at this point $R0 is "NT 4.0" or whatnot
119 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
120 Function GetWindowsVersion
121  
122   Push $R0
123   Push $R1
124  
125   ClearErrors
126  
127   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
128  
129   IfErrors 0 lbl_winnt
130  
131   ; we are not NT
132   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
133  
134   StrCpy $R1 $R0 1
135   StrCmp $R1 '4' 0 lbl_error
136  
137   StrCpy $R1 $R0 3
138  
139   StrCmp $R1 '4.0' lbl_win32_95
140   StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
141  
142   lbl_win32_95:
143     StrCpy $R0 '95'
144         StrCpy $AskMultiUser "0"
145   Goto lbl_done
146  
147   lbl_win32_98:
148     StrCpy $R0 '98'
149         StrCpy $AskMultiUser "0"
150   Goto lbl_done
151   lbl_win32_ME:
152     StrCpy $R0 'ME'
153         StrCpy $AskMultiUser "0"
154   Goto lbl_done
155  
156   lbl_winnt:
157  
158   StrCpy $R1 $R0 1
159  
160   StrCmp $R1 '3' lbl_winnt_x
161   StrCmp $R1 '4' lbl_winnt_x
162  
163   StrCpy $R1 $R0 3
164  
165   StrCmp $R1 '5.0' lbl_winnt_2000
166   StrCmp $R1 '5.1' lbl_winnt_XP
167   StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
168  
169   lbl_winnt_x:
170     StrCpy $R0 "NT $R0" 6
171   Goto lbl_done
172  
173   lbl_winnt_2000:
174     Strcpy $R0 '2000'
175   Goto lbl_done
176  
177   lbl_winnt_XP:
178     Strcpy $R0 'XP'
179   Goto lbl_done
180  
181   lbl_winnt_2003:
182     Strcpy $R0 '2003'
183   Goto lbl_done
184  
185   lbl_error:
186     Strcpy $R0 ''
187   lbl_done:
188  
189   Pop $R1
190   Exch $R0
192 FunctionEnd
194 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
196  ; StrStr
197  ; input, top of stack = string to search for
198  ;        top of stack-1 = string to search in
199  ; output, top of stack (replaces with the portion of the string remaining)
200  ; modifies no other variables.
201  ;
202  ; Usage:
203  ;   Push "this is a long ass string"
204  ;   Push "ass"
205  ;   Call StrStr
206  ;   Pop $R0
207  ;  ($R0 at this point is "ass string")
209  Function StrStr
210    Exch $R1 ; st=haystack,old$R1, $R1=needle
211    Exch    ; st=old$R1,haystack
212    Exch $R2 ; st=old$R1,old$R2, $R2=haystack
213    Push $R3
214    Push $R4
215    Push $R5
216    StrLen $R3 $R1
217    StrCpy $R4 0
218    ; $R1=needle
219    ; $R2=haystack
220    ; $R3=len(needle)
221    ; $R4=cnt
222    ; $R5=tmp
223    loop:
224      StrCpy $R5 $R2 $R3 $R4
225      StrCmp $R5 $R1 done
226      StrCmp $R5 "" done
227      IntOp $R4 $R4 + 1
228      Goto loop
229  done:
230    StrCpy $R1 $R2 "" $R4
231    Pop $R5
232    Pop $R4
233    Pop $R3
234    Pop $R2
235    Exch $R1
236  FunctionEnd
238 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
240  ; GetParameters
241  ; input, none
242  ; output, top of stack (replaces, with e.g. whatever)
243  ; modifies no other variables.
244  
245  Function GetParameters
246  
247    Push $R0
248    Push $R1
249    Push $R2
250    Push $R3
251    
252    StrCpy $R2 1
253    StrLen $R3 $CMDLINE
254    
255    ;Check for quote or space
256    StrCpy $R0 $CMDLINE $R2
257    StrCmp $R0 '"' 0 +3
258      StrCpy $R1 '"'
259      Goto loop
260    StrCpy $R1 " "
261    
262    loop:
263      IntOp $R2 $R2 + 1
264      StrCpy $R0 $CMDLINE 1 $R2
265      StrCmp $R0 $R1 get
266      StrCmp $R2 $R3 get
267      Goto loop
268    
269    get:
270      IntOp $R2 $R2 + 1
271      StrCpy $R0 $CMDLINE 1 $R2
272      StrCmp $R0 " " get
273      StrCpy $R0 $CMDLINE "" $R2
274    
275    Pop $R3
276    Pop $R2
277    Pop $R1
278    Exch $R0
279  
280  FunctionEnd
282 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
283 ; GetParameterValue
284 ; Chris Morgan<cmorgan@alum.wpi.edu> 5/10/2004
285 ; -Updated 4/7/2005 to add support for retrieving a command line switch
286 ;  and additional documentation
288 ; Searches the command line input, retrieved using GetParameters, for the
289 ; value of an option given the option name.  If no option is found the
290 ; default value is placed on the top of the stack upon function return.
292 ; This function can also be used to detect the existence of just a
293 ; command line switch like /OUTPUT  Pass the default and "OUTPUT"
294 ; on the stack like normal.  An empty return string "" will indicate
295 ; that the switch was found, the default value indicates that
296 ; neither a parameter or switch was found.
298 ; Inputs - Top of stack is default if parameter isn't found,
299 ;  second in stack is parameter to search for, ex. "OUTPUT"
300 ; Outputs - Top of the stack contains the value of this parameter
301 ;  So if the command line contained /OUTPUT=somedirectory, "somedirectory"
302 ;  will be on the top of the stack when this function returns
304 ; Register usage
305 ;$R0 - default return value if the parameter isn't found
306 ;$R1 - input parameter, for example OUTPUT from the above example
307 ;$R2 - the length of the search, this is the search parameter+2
308 ;      as we have '/OUTPUT='
309 ;$R3 - the command line string
310 ;$R4 - result from StrStr calls
311 ;$R5 - search for ' ' or '"'
312  
313 Function GetParameterValue
314   Exch $R0  ; get the top of the stack(default parameter) into R0
315   Exch      ; exchange the top of the stack(default) with
316             ; the second in the stack(parameter to search for)
317   Exch $R1  ; get the top of the stack(search parameter) into $R1
318  
319   ;Preserve on the stack the registers used in this function
320   Push $R2
321   Push $R3
322   Push $R4
323   Push $R5
324  
325   Strlen $R2 $R1+2    ; store the length of the search string into R2
326  
327   Call GetParameters  ; get the command line parameters
328   Pop $R3             ; store the command line string in R3
329  
330   # search for quoted search string
331   StrCpy $R5 '"'      ; later on we want to search for a open quote
332   Push $R3            ; push the 'search in' string onto the stack
333   Push '"/$R1='       ; push the 'search for'
334   Call StrStr         ; search for the quoted parameter value
335   Pop $R4
336   StrCpy $R4 $R4 "" 1   ; skip over open quote character, "" means no maxlen
337   StrCmp $R4 "" "" next ; if we didn't find an empty string go to next
338  
339   # search for non-quoted search string
340   StrCpy $R5 ' '      ; later on we want to search for a space since we
341                       ; didn't start with an open quote '"' we shouldn't
342                       ; look for a close quote '"'
343   Push $R3            ; push the command line back on the stack for searching
344   Push '/$R1='        ; search for the non-quoted search string
345   Call StrStr
346   Pop $R4
347  
348   ; $R4 now contains the parameter string starting at the search string,
349   ; if it was found
350 next:
351   StrCmp $R4 "" check_for_switch ; if we didn't find anything then look for
352                                  ; usage as a command line switch
353   # copy the value after /$R1= by using StrCpy with an offset of $R2,
354   # the length of '/OUTPUT='
355   StrCpy $R0 $R4 "" $R2  ; copy commandline text beyond parameter into $R0
356   # search for the next parameter so we can trim this extra text off
357   Push $R0
358   Push $R5            ; search for either the first space ' ', or the first
359                       ; quote '"'
360                       ; if we found '"/output' then we want to find the
361                       ; ending ", as in '"/output=somevalue"'
362                       ; if we found '/output' then we want to find the first
363                       ; space after '/output=somevalue'
364   Call StrStr         ; search for the next parameter
365   Pop $R4
366   StrCmp $R4 "" done  ; if 'somevalue' is missing, we are done
367   StrLen $R4 $R4      ; get the length of 'somevalue' so we can copy this
368                       ; text into our output buffer
369   StrCpy $R0 $R0 -$R4 ; using the length of the string beyond the value,
370                       ; copy only the value into $R0
371   goto done           ; if we are in the parameter retrieval path skip over
372                       ; the check for a command line switch
373  
374 ; See if the parameter was specified as a command line switch, like '/output'
375 check_for_switch:
376   Push $R3            ; push the command line back on the stack for searching
377   Push '/$R1'         ; search for the non-quoted search string
378   Call StrStr
379   Pop $R4
380   StrCmp $R4 "" done  ; if we didn't find anything then use the default
381   StrCpy $R0 ""       ; otherwise copy in an empty string since we found the
382                       ; parameter, just didn't find a value
383  
384 done:
385   Pop $R5
386   Pop $R4
387   Pop $R3
388   Pop $R2
389   Pop $R1
390   Exch $R0 ; put the value in $R0 at the top of the stack
391 FunctionEnd
393 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
395 !macro Language polng lng
396   SectionIn 1 2 3
397   SetOutPath $INSTDIR
398   File /nonfatal /a "..\..\inkscape\*.${lng}.txt"
399   SetOutPath $INSTDIR\locale
400   File /nonfatal /a /r "..\..\inkscape\locale\${polng}"
401   SetOutPath $INSTDIR\lib\locale
402   File /nonfatal /a /r "..\..\inkscape\lib\locale\${polng}"
403   ; the keyboard tables
404   SetOutPath $INSTDIR\share\screens
405   File /nonfatal /a /r "..\..\inkscape\share\screens\keys.${polng}.svg"  
406   SetOutPath $INSTDIR\share\templates
407   File /nonfatal /a /r "..\..\inkscape\share\templates\default.${polng}.svg"  
408   SetOutPath $INSTDIR\doc
409   File /nonfatal /a /r "..\..\inkscape\doc\keys.${polng}.xml"  
410   File /nonfatal /a /r "..\..\inkscape\doc\keys.${polng}.html"  
411   SectionGetFlags ${SecTutorials} $R1 
412   IntOp $R1 $R1 & ${SF_SELECTED} 
413   IntCmp $R1 ${SF_SELECTED} 0 skip_tutorials 
414     SetOutPath $INSTDIR\share\tutorials
415     File /nonfatal /a "..\..\inkscape\share\tutorials\*.${polng}.*"
416   skip_tutorials:
417 !macroend
419 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
424 ;--------------------------------
425 ; Installer Sections
427 Section -removeInkscape
428   ; check for an old installation and clean that dlls and stuff
429   ClearErrors
430   IfFileExists $INSTDIR\etc 0 doDeleteLib
431     DetailPrint "$INSTDIR\etc exists, will be removed"
432     RmDir /r $INSTDIR\etc
433         IfErrors 0 +4
434       DetailPrint "fatal: failed to delete $INSTDIR\etc"
435       DetailPrint "aborting installation"
436           Abort
437   doDeleteLib:
439   ClearErrors
440   IfFileExists $INSTDIR\lib 0 doDeleteLocale
441     DetailPrint "$INSTDIR\lib exists, will be removed"  
442     RmDir /r $INSTDIR\lib
443         IfErrors 0 +4
444       DetailPrint "fatal: failed to delete $INSTDIR\lib"
445       DetailPrint "aborting installation"
446           Abort
447   doDeleteLocale:
449   ClearErrors
450   IfFileExists $INSTDIR\locale 0 doDeleteDll
451     DetailPrint "$INSTDIR\locale exists, will be removed"
452     RmDir /r $INSTDIR\locale
453         IfErrors 0 +4
454       DetailPrint "fatal: failed to delete $INSTDIR\locale"
455       DetailPrint "aborting installation"
456           Abort
457   doDeleteDll:
459   ClearErrors
460   FindFirst $0 $1 $INSTDIR\*.dll
461     FindNextLoop:
462     StrCmp $1 "" FindNextDone
463     DetailPrint "$INSTDIR\$1 exists, will be removed"
464     Delete $INSTDIR\$1
465     IfErrors 0 +4
466       DetailPrint "fatal: failed to delete $INSTDIR\$1"
467       DetailPrint "aborting installation"
468       Abort
469     FindNext $0 $1
470     Goto FindNextLoop
471   FindNextDone:
472 SectionEnd
474 Section $(lng_Core) SecCore
476   DetailPrint "Installing Inkscape Core Files ..."
478   SectionIn 1 2 3 RO
479   SetOutPath $INSTDIR
480   SetOverwrite on
481   SetAutoClose false
483   File /a "..\..\inkscape\ink*.exe"
484   File /a "..\..\inkscape\AUTHORS"
485   File /a "..\..\inkscape\COPYING"
486   File /a "..\..\inkscape\COPYING.LIB"
487   File /a "..\..\inkscape\NEWS"
488   File /a "..\..\inkscape\HACKING.txt"
489   File /a "..\..\inkscape\README"
490   File /a "..\..\inkscape\README.txt"
491   File /a "..\..\inkscape\TRANSLATORS"
492   File /nonfatal /a /r "..\..\inkscape\data"
493   File /nonfatal /a /r "..\..\inkscape\doc"
494   File /nonfatal /a /r "..\..\inkscape\plugins"
495   File /nonfatal /a /r /x *.??*.???* /x "examples" /x "tutorials" "..\..\inkscape\share"
496   ; this file is added because it slips through the filter
497   SetOutPath $INSTDIR\share\clipart
498   File /a "..\..\inkscape\share\clipart\inkscape.logo.svg"
499   File /a "..\..\inkscape\share\clipart\inkscape.logo.classic.svg"  
500   SetOutPath $INSTDIR\modules
501   File /nonfatal /a /r "..\..\inkscape\modules\*.*"
502   SetOutPath $INSTDIR\python
503   File /nonfatal /a /r "..\..\inkscape\python\*.*"
505   
506 SectionEnd
508 Section $(lng_GTKFiles) SecGTK
510   DetailPrint "Installing GTK Files ..."
511   
512   SectionIn 1 2 3 RO
513   SetOutPath $INSTDIR
514   SetOverwrite on
515   File /a /r "..\..\inkscape\*.dll"
516   File /a /r /x "locale" "..\..\inkscape\lib"
517   File /a /r "..\..\inkscape\etc"
518 SectionEnd
520 Section $(lng_Alluser) SecAlluser
521   ; disable this option in Win95/Win98/WinME
522   SectionIn 1 2 3 
523   StrCpy $MultiUser "1"
524 SectionEnd
526 SectionGroup $(lng_Shortcuts) SecShortcuts
528 Section $(lng_Desktop) SecDesktop
529   SectionIn 1 2 3
530   ClearErrors
531   CreateShortCut "$DESKTOP\Inkscape.lnk" "$INSTDIR\inkscape.exe"
532   IfErrors 0 +2
533     DetailPrint "Uups! Problems creating desktop shortcuts"
534 SectionEnd
536 Section $(lng_Quicklaunch) SecQuicklaunch
537   SectionIn 1 2 3
538   ClearErrors
539   StrCmp $QUICKLAUNCH $TEMP +2
540     CreateShortCut "$QUICKLAUNCH\Inkscape.lnk" "$INSTDIR\inkscape.exe"
541   IfErrors 0 +2
542     DetailPrint "Uups! Problems creating quicklaunch shortcuts"
543 SectionEnd
545 Section $(lng_SVGWriter) SecSVGWriter 
546   SectionIn 1 2 3
547   ; create file associations, test before if needed
548   DetailPrint "creating file associations"
549   ClearErrors
550   ReadRegStr $0 HKCR ".svg" ""
551   StrCmp $0 "" 0 +3
552     WriteRegStr HKCR ".svg" "" "svgfile"
553     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
554   ReadRegStr $0 HKCR ".svgz" ""
555   StrCmp $0 "" 0 +3
556     WriteRegStr HKCR ".svgz" "" "svgfile"
557     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
558   IfErrors 0 +2
559     DetailPrint "Uups! Problems creating file assoziations for svg writer"
560   
561   DetailPrint "creating default editor"
562   ClearErrors
563   ReadRegStr $0 HKCR ".svg" ""
564   WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
565   ReadRegStr $0 HKCR ".svgz" ""
566   WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
567   IfErrors 0 +2
568     DetailPrint "Uups! Problems creating default editor"
569 SectionEnd
571 Section $(lng_ContextMenu) SecContextMenu
572   SectionIn 1 2 3
573   ; create file associations, test before if needed
574   DetailPrint "creating file associations"
575   ClearErrors
576   ReadRegStr $0 HKCR ".svg" ""
577   StrCmp $0 "" 0 +3
578     WriteRegStr HKCR ".svg" "" "svgfile"
579     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
580   ReadRegStr $0 HKCR ".svgz" ""
581   StrCmp $0 "" 0 +3
582     WriteRegStr HKCR ".svgz" "" "svgfile"
583     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
584   IfErrors 0 +2
585     DetailPrint "Uups! Problems creating file assoziations for context menu"
586   
587   DetailPrint "creating context menue"
588   ClearErrors
589   ReadRegStr $0 HKCR ".svg" ""
590   WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
591   ReadRegStr $0 HKCR ".svgz" ""
592   WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
593   IfErrors 0 +2
594     DetailPrint "Uups! Problems creating context menue integration"
596 SectionEnd
598 SectionGroupEnd
600 SectionGroup $(lng_Addfiles) SecAddfiles
602 Section $(lng_Examples) SecExamples
603   SectionIn 1 2
604   SetOutPath $INSTDIR\share
605   File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\examples"
606 SectionEnd
608 Section $(lng_Tutorials) SecTutorials
609   SectionIn 1 2
610   SetOutPath $INSTDIR\share
611   File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\tutorials"
612 SectionEnd
614 SectionGroupEnd
616 SectionGroup /e $(lng_Languages) SecLanguages
618 Section $(lng_am) SecAmharic
619   !insertmacro Language am am
620 SectionEnd
622 Section $(lng_az) SecAzerbaijani
623   !insertmacro Language az az
624 SectionEnd
626 Section $(lng_be) SecByelorussian
627   !insertmacro Language be be
628 SectionEnd
630 Section $(lng_ca) SecCatalan
631   !insertmacro Language ca ca
632 SectionEnd
634 Section $(lng_cs) SecCzech
635   !insertmacro Language cs cs
636 SectionEnd
638 Section $(lng_da) SecDanish
639   !insertmacro Language da da
640 SectionEnd
642 Section $(lng_de) SecGerman
643   !insertmacro Language 'de' 'de'
644 SectionEnd
646 Section $(lng_el) SecGreek
647   !insertmacro Language el el
648 SectionEnd
650 Section $(lng_en) SecEnglish
651   SectionIn 1 2 3 RO
652 SectionEnd
654 Section $(lng_es) SecSpanish
655   !insertmacro Language 'es' 'es'
656 SectionEnd
658 Section $(lng_es_MX) SecSpanishMexico
659   !insertmacro Language 'es_MX' 'es_MX'
660 SectionEnd
662 Section $(lng_et) SecEstonian
663   !insertmacro Language et et
664 SectionEnd
666 Section $(lng_fr) SecFrench
667   !insertmacro Language 'fr' 'fr'
668 SectionEnd
670 Section $(lng_ga) SecIrish
671   !insertmacro Language ga ga
672 SectionEnd
674 Section $(lng_gl) SecGallegan
675   !insertmacro Language gl gl
676   SectionIn 1 2 3
677 SectionEnd
679 Section $(lng_hu) SecHungarian
680   !insertmacro Language hu hu
681   SectionIn 1 2 3
682 SectionEnd
684 Section $(lng_it) SecItalian
685   !insertmacro Language it it
686   SectionIn 1 2 3
687 SectionEnd
689 Section $(lng_ja) SecJapanese
690   !insertmacro Language 'ja' 'jp'
691 SectionEnd
693 Section $(lng_ko) SecKorean
694   !insertmacro Language 'ko' 'ko'
695 SectionEnd
697 Section $(lng_lt) SecLithuanian
698   !insertmacro Language 'lt' 'lt'
699 SectionEnd
701 Section $(lng_mk) SecMacedonian
702   !insertmacro Language mk mk
703 SectionEnd
705 Section $(lng_nb) SecNorwegianBokmal
706   !insertmacro Language nb nb
707 SectionEnd
709 Section $(lng_nl) SecDutch
710   !insertmacro Language nl nl
711 SectionEnd
713 Section $(lng_nn) SecNorwegianNynorsk
714   !insertmacro Language nn nn
715 SectionEnd
717 Section $(lng_pa) SecPanjabi
718   !insertmacro Language pa pa
719 SectionEnd
721 Section $(lng_pl) SecPolish
722   !insertmacro Language pl pl
723 SectionEnd
725 Section $(lng_pt) SecPortuguese
726   !insertmacro Language pt pt
727 SectionEnd
729 Section $(lng_pt_BR) SecPortugueseBrazil
730   !insertmacro Language pt_BR pt_BR
731 SectionEnd
733 Section $(lng_ru) SecRussian
734   !insertmacro Language ru ru
735 SectionEnd
737 Section $(lng_sk) SecSlovak
738   !insertmacro Language sk sk
739 SectionEnd
741 Section $(lng_sl) SecSlovenian
742   !insertmacro Language sl sl
743 SectionEnd
745 Section $(lng_sr) SecSerbian
746   !insertmacro Language sr sr
747 SectionEnd
749 Section $(lng_sr@Latn) SecSerbianLatin
750   !insertmacro Language 'sr@Latn' 'sr@Latn'
751 SectionEnd
753 Section $(lng_sv) SecSwedish
754   !insertmacro Language sv sv
755 SectionEnd
757 Section $(lng_tr) SecTurkish
758   !insertmacro Language tr tr
759 SectionEnd
761 Section $(lng_uk) SecUkrainian
762   !insertmacro Language uk uk
763 SectionEnd
765 Section $(lng_zh_CN) SecChineseSimplified
766   !insertmacro Language zh_CN zh_CN
767 SectionEnd
769 Section $(lng_zh_TW) SecChineseTaiwan
770   !insertmacro Language zh_TW zh_TW
771 SectionEnd
773 Section -FinalizeInstallation
774   StrCmp $MultiUser "1" "" SingleUser
775     DetailPrint "admin mode, registry root will be HKLM"
776     SetShellVarContext all
777     Goto endSingleUser
778   SingleUser:
779     DetailPrint "single user mode, registry root will be HKCU"
780     SetShellVarContext current
781   endSingleUser:                
783   ; check for writing registry
784   ClearErrors
785   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\inkscape.exe"  
786   ;IfErrors 0 +4
787   ;  DetailPrint "fatal: failed to write to ${PRODUCT_DIR_REGKEY}"
788   ;  DetailPrint "aborting installation"
789   ;     Abort
790   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "MultiUser" "$MultiUser"  
791   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "askMultiUser" "$askMultiUser"
792   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "User" "$User"
793   IfErrors 0 +2
794     DetailPrint "fatal: failed to write to registry installation info"
796   ; start menu entries
797   ClearErrors
798   CreateDirectory "$SMPROGRAMS\Inkscape"
799   CreateShortCut "$SMPROGRAMS\Inkscape\Inkscape.lnk" "$INSTDIR\inkscape.exe"
800   CreateShortCut "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" "$INSTDIR\uninst.exe"
801   IfErrors 0 +2
802     DetailPrint "fatal: failed to write to start menu info"
804   ; uninstall settings
805   ClearErrors
806   WriteUninstaller "$INSTDIR\uninst.exe"
807   WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst.exe"'
808   WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
809   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}"
810   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Inkscape.exe,0"
811   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
812   WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" "1"
813   WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" "1"
814   IfErrors 0 +2
815     DetailPrint "fatal: failed to write to registry un-installation info"
816 SectionEnd
818 SectionGroupEnd
819  
820 ; Last the Descriptions
821 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
822   !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} $(lng_CoreDesc)
823   !insertmacro MUI_DESCRIPTION_TEXT ${SecGTK} $(lng_GTKFilesDesc)
824   !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(lng_ShortcutsDesc)
825   !insertmacro MUI_DESCRIPTION_TEXT ${SecAlluser} $(lng_AlluserDesc) 
826   !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(lng_DesktopDesc)
827   !insertmacro MUI_DESCRIPTION_TEXT ${SecQuicklaunch} $(lng_QuicklaunchDesc)
828   !insertmacro MUI_DESCRIPTION_TEXT ${SecSVGWriter} $(lng_SVGWriterDesc)
829   !insertmacro MUI_DESCRIPTION_TEXT ${SecContextMenu} $(lng_ContextMenuDesc)
830   !insertmacro MUI_DESCRIPTION_TEXT ${SecAddfiles} $(lng_AddfilesDesc)
831   !insertmacro MUI_DESCRIPTION_TEXT ${SecExamples} $(lng_ExamplesDesc)
832   !insertmacro MUI_DESCRIPTION_TEXT ${SecTutorials} $(lng_TutorialsDesc)
833   !insertmacro MUI_DESCRIPTION_TEXT ${SecLanguages} $(lng_LanguagesDesc)
834 !insertmacro MUI_FUNCTION_DESCRIPTION_END
836 !macro Parameter key Section
837   Push ${key}
838   Push ""
839   Call GetParameterValue
840   Pop $1
841   StrCmp $1 "OFF" 0 +5
842     SectionGetFlags ${Section} $0
843     IntOp $2 ${SF_SELECTED} ~
844     IntOp $0 $0 & $2
845     SectionSetFlags ${Section} $0
846   StrCmp $1 "ON" 0 +4
847     SectionGetFlags ${Section} $0
848     IntOp $0 $0 | ${SF_SELECTED}
849     SectionSetFlags ${Section} $0
850 !macroend
852 Function .onInit
853   ;Extract InstallOptions INI files
854   StrCpy $AskMultiUser "1"
855   StrCpy $MultiUser "0"
856   ; this resets AskMultiUser if Win95/98/ME
857   Call GetWindowsVersion
858   Pop $R0
859   DetailPrint "detected operating system $R0"
860   ;MessageBox MB_OK "operating system: $R0; AskMultiuser: $AskMultiUser"
861   
862   ; hide all user section if win98
863   StrCmp $AskMultiUser "1" +2
864     SectionSetText ${SecAlluser} ""
866   ; hide if quick launch if not available
867   StrCmp $QUICKLAUNCH $TEMP 0 +2
868     SectionSetText ${SecQuicklaunch} ""
870   ;check if user is admin
871   ClearErrors
872         UserInfo::GetName
873         IfErrors info_Win9x
874         Pop $0
875         StrCpy $User $0
876         UserInfo::GetAccountType
877         Pop $1
878         StrCmp $1 "Admin" info_done
880         MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_NO_ADMIN)"
882         Goto info_done
884         info_Win9x:
885                 # This one means you don't need to care about admin or
886                 # not admin because Windows 9x doesn't either
887                 MessageBox MB_OK|MB_ICONEXCLAMATION $(lng_NOT_SUPPORTED)
889         info_done:
891   ;check for previous installation
892   ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User"
893   StrCmp $0 "" +1 +2
894   ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User"
895   ;check user if applicable
896   StrCmp $0 "" +3
897     StrCmp $0 $User +2
898           MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)"
899         
900   ; proccess command line parameter
901   !insertmacro Parameter "GTK" ${SecGTK}
902   !insertmacro Parameter "SHORTCUTS" ${secShortcuts}
903   !insertmacro Parameter "ALLUSER" ${SecAlluser}
904   !insertmacro Parameter "DESKTOP" ${SecDesktop}
905   !insertmacro Parameter "QUICKLAUNCH" ${SecQUICKlaunch}
906   !insertmacro Parameter "SVGEDITOR" ${SecSVGWriter}
907   !insertmacro Parameter "CONTEXTMENUE" ${SecContextMenu}
908   !insertmacro Parameter "ADDFILES" ${SecAddfiles}
909   !insertmacro Parameter "EXAMPLES" ${SecExamples}
910   !insertmacro Parameter "TUTORIALS" ${SecTutorials}
911   !insertmacro Parameter "LANGUAGES" ${SecLanguages}
912   !insertmacro Parameter "am" ${SecAmharic}
913   !insertmacro Parameter "az" ${SecAzerbaijani}
914   !insertmacro Parameter "be" ${SecByelorussian}
915   !insertmacro Parameter "ca" ${SecCatalan}
916   !insertmacro Parameter "cs" ${SecCzech}
917   !insertmacro Parameter "da" ${SecDanish}
918   !insertmacro Parameter "de" ${SecGerman}
919   !insertmacro Parameter "el" ${SecGreek}
920   !insertmacro Parameter "es" ${SecSpanish}
921   !insertmacro Parameter "es_MX" ${SecSpanishMexico}
922   !insertmacro Parameter "et" ${SecEstonian}
923   !insertmacro Parameter "fr" ${SecFrench}
924   !insertmacro Parameter "ga" ${SecIrish}
925   !insertmacro Parameter "gl" ${SecGallegan}
926   !insertmacro Parameter "hu" ${SecHungarian}
927   !insertmacro Parameter "it" ${SecItalian}
928   !insertmacro Parameter "ja" ${SecJapanese}
929   !insertmacro Parameter "ko" ${SecKorean}
930   !insertmacro Parameter "mk" ${SecMacedonian}
931   !insertmacro Parameter "nb" ${SecNorwegianBokmal}
932   !insertmacro Parameter "nl" ${SecDutch}
933   !insertmacro Parameter "nn" ${SecNorwegianNynorsk}
934   !insertmacro Parameter "pa" ${SecPanjabi}
935   !insertmacro Parameter "pl" ${SecPolish}
936   !insertmacro Parameter "pt" ${SecPortuguese}
937   !insertmacro Parameter "pt_BR" ${SecPortugueseBrazil}
938   !insertmacro Parameter "ru" ${SecRussian}
939   !insertmacro Parameter "sk" ${SecSlovak}
940   !insertmacro Parameter "sl" ${SecSlovenian}
941   !insertmacro Parameter "sr" ${SecSerbian}
942   !insertmacro Parameter "sr@Latn" ${SecSerbianLatin}
943   !insertmacro Parameter "sv" ${SecSwedish}
944   !insertmacro Parameter "tr" ${SecTurkish}
945   !insertmacro Parameter "uk" ${SecUkrainian}
946   !insertmacro Parameter "zh_CN" ${SecChineseSimplified}
947   !insertmacro Parameter "zh_TW" ${SecChineseTaiwan}
948   
949   Push "?"
950   Push "TEST"
951   Call GetParameterValue
952   Pop $1
953   StrCmp $1 "TEST" +3
954     MessageBox MB_OK "possible parameters for installer:$\r$\n \
955       /?: this help screen$\r$\n \
956       /S: silent$\r$\n \
957       /D=(directory): where to install inkscape$\r$\n \
958       /GTK=(OFF/ON): GTK+ Runtime environment$\r$\n \
959       /SHORTCUTS=(OFF/ON): shortcuts to start inkscape$\r$\n \
960       /ALLUSER=(OFF/ON): for all users on the computer$\r$\n \
961       /DESKTOP=(OFF/ON): Desktop icon$\r$\n \
962       /QUICKLAUNCH=(OFF/ON): quick launch icon$\r$\n \
963       /SVGEDITOR=(OFF/ON): default SVG editor$\r$\n \
964       /CONTEXTMENUE=(OFF/ON): context menue integration$\r$\n \
965       /ADDFILES=(OFF/ON): additional files$\r$\n \
966       /EXAMPLES=(OFF/ON): examples$\r$\n \
967       /TUTORIALS=(OFF/ON): tutorials$\r$\n \
968       /LANGUAGES=(OFF/ON): translated menues, examples, etc.$\r$\n \
969       /[locale code]=(OFF/ON): e.g am, es, es_MX as in Inkscape supported"
970     Abort
971 FunctionEnd
973 Function .onSelChange
974 FunctionEnd
976 ; --------------------------------------------------
978 Function un.CustomPageUninstall
979   !insertmacro MUI_HEADER_TEXT "$(lng_UInstOpt)" "$(lng_UInstOpt1)"
980   !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 1" "Text" "$APPDATA\Inkscape\preferences.xml"
981   !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 2" "Text" "$(lng_PurgePrefs)"
983   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "inkscape.nsi.uninstall"
984   !insertmacro MUI_INSTALLOPTIONS_READ $MultiUser "inkscape.nsi.uninstall" "Field 2" "State"
985   DetailPrint "keepfiles = $MultiUser" 
986           ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" 
988 FunctionEnd
991 Function un.onInit
993   ClearErrors
994   StrCpy $User ""
995         UserInfo::GetName
996         IfErrors +3
997         Pop $0
998         StrCpy $User $0
1000   StrCpy $askMultiUser "1"
1001   StrCpy $MultiUser "1"
1002  
1003   ; Test if this was a multiuser installation
1004   ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" ""
1005   StrCmp $0  "$INSTDIR\inkscape.exe" 0 +5  
1006     ReadRegStr $MultiUser HKLM "${PRODUCT_DIR_REGKEY}" "MultiUser"
1007     ReadRegStr $askMultiUser HKLM "${PRODUCT_DIR_REGKEY}" "askMultiUser"
1008         ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User"
1009         Goto +4
1010   ReadRegStr $MultiUser HKCU "${PRODUCT_DIR_REGKEY}" "MultiUser"
1011   ReadRegStr $askMultiUser HKCU "${PRODUCT_DIR_REGKEY}" "askMultiUser"
1012   ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User"
1013   ;check user if applicable
1014   StrCmp $0 "" +3
1015     StrCmp $0 $User +2
1016           MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)"
1017     
1018  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "inkscape.nsi.uninstall"
1020  ;check whether Multi user installation ?
1021  SetShellVarContext all
1022  StrCmp $MultiUser "0" 0 +2 
1023  SetShellVarContext current
1024  ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" 
1025    
1026 FunctionEnd
1028 Section Uninstall
1030   ; remove personal settings
1031   Delete "$APPDATA\Inkscape\extension-errors.log"
1032   StrCmp $MultiUser "0" 0 endPurge  ; multiuser assigned in dialog
1033     DetailPrint "purge personal settings in $APPDATA\Inkscape"
1034     RMDir /r "$APPDATA\Inkscape"
1035   endPurge:
1037   ; Remove file associations for svg editor
1038   DetailPrint "removing file associations for svg editor"
1039   ClearErrors
1040   ReadRegStr $0 HKCR ".svg" ""
1041   DetailPrint ".svg associated as $0"
1042   IfErrors endUninstSVGEdit  
1043     ReadRegStr $1 HKCR "$0\shell\edit\command" ""
1044         IfErrors 0 +2  
1045       DetailPrint "svg editor is $1"
1046     StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1047       DetailPrint "removing default .svg editor"
1048       DeleteRegKey HKCR "$0\shell\edit\command"
1049     DeleteRegKey /ifempty HKCR "$0\shell\edit"
1050     DeleteRegKey /ifempty HKCR "$0\shell"
1051     DeleteRegKey /ifempty HKCR "$0"
1052   endUninstSVGEdit:
1053   
1054   ClearErrors
1055   ReadRegStr $2 HKCR ".svgz" ""
1056   DetailPrint ".svgz associated as $2"
1057   IfErrors endUninstSVGZEdit  
1058     ReadRegStr $3 HKCR "$2\shell\edit\command" ""
1059     IfErrors 0 +2  
1060       DetailPrint "svgz editor is $1"
1061     StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1062       DetailPrint "removing default .svgz editor"
1063       DeleteRegKey HKCR "$2\shell\edit\command"
1064     DeleteRegKey /ifempty HKCR "$2\shell\edit"
1065     DeleteRegKey /ifempty HKCR "$2\shell"
1066     DeleteRegKey /ifempty HKCR "$2"
1067   endUninstSVGZEdit:
1068   
1069   ; Remove file associations for svg editor
1070   DetailPrint "removing file associations for svg editor"
1071   ClearErrors
1072   ReadRegStr $0 HKCR ".svg" ""
1073   IfErrors endUninstSVGView
1074     ReadRegStr $1 HKCR "$0\shell\open\command" ""
1075     IfErrors 0 +2  
1076       DetailPrint "svg viewer is $1"
1077     StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1078       DetailPrint "removing default .svg viewer"
1079       DeleteRegKey HKCR "$0\shell\open\command"
1080     DeleteRegKey /ifempty HKCR "$0\shell\open"
1081     DeleteRegKey /ifempty HKCR "$0\shell"
1082     DeleteRegKey /ifempty HKCR "$0"
1083   endUninstSVGView:
1084   
1085   ClearErrors
1086   ReadRegStr $2 HKCR ".svgz" ""
1087   IfErrors endUninstSVGZView
1088     ReadRegStr $3 HKCR "$2\shell\open\command" ""
1089     IfErrors 0 +2  
1090       DetailPrint "svgz viewer is $1"
1091     StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1092       DetailPrint "removing default .svgz viewer"
1093       DeleteRegKey HKCR "$2\shell\open\command"
1094     DeleteRegKey /ifempty HKCR "$2\shell\open"
1095     DeleteRegKey /ifempty HKCR "$2\shell"
1096     DeleteRegKey /ifempty HKCR "$2"
1097   endUninstSVGZView:
1098   
1099   ; Remove file associations for context menue
1100   DetailPrint "removing file associations for svg editor"
1101   ClearErrors
1102   ReadRegStr $0 HKCR ".svg" ""
1103   IfErrors endUninstSVGContext
1104   DetailPrint "removing default .svg context menue"
1105   DeleteRegKey HKCR "$0\shell\${PRODUCT_NAME}"
1106   DeleteRegKey /ifempty HKCR "$0\shell"
1107   DeleteRegKey /ifempty HKCR "$0"
1108   endUninstSVGContext:
1109   
1110   ClearErrors
1111   ReadRegStr $2 HKCR ".svgz" ""
1112   IfErrors endUninstSVGZContext
1113   DetailPrint "removing default .svgzcontext menue"
1114   DeleteRegKey HKCR "$2\shell\${PRODUCT_NAME}"
1115   DeleteRegKey /ifempty HKCR "$2\shell"
1116   DeleteRegKey /ifempty HKCR "$2"
1117   endUninstSVGZContext:
1119   ReadRegStr $1 HKCR "$0" ""
1120   StrCmp $1 "" 0 +3
1121     DetailPrint "removing filetype .svg $0"
1122     DeleteRegKey HKCR ".svg"
1123   
1124   ReadRegStr $3 HKCR "$2" ""
1125   StrCmp $3 "" 0 +3
1126     DetailPrint "removing filetype .svgz $2"
1127     DeleteRegKey HKCR ".svgz"
1128   
1129     
1130   DetailPrint "removing product regkey"
1131   DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
1132   DetailPrint "removing uninstall info"
1133   DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
1135   DetailPrint "removing shortcuts"
1136   Delete "$DESKTOP\Inkscape.lnk"
1137   Delete "$QUICKLAUNCH\Inkscape.lnk"
1138   Delete "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk"
1139   Delete "$SMPROGRAMS\Inkscape\Inkscape.lnk"
1140   RMDir  "$SMPROGRAMS\Inkscape"
1142   DetailPrint "removing uninstall info"
1143   RMDir /r "$INSTDIR"
1145   SetAutoClose false
1147 SectionEnd