Code

update translation, installer missed 2 files - manually added
[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 files are 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\share\extensions
501   File /a "..\..\inkscape\share\extensions\pdf_output.inx.txt"
502   File /a "..\..\inkscape\share\extensions\pdf_output_via_gs_on_win32.inx.txt"
503   SetOutPath $INSTDIR\modules
504   File /nonfatal /a /r "..\..\inkscape\modules\*.*"
505   SetOutPath $INSTDIR\python
506   File /nonfatal /a /r "..\..\inkscape\python\*.*"
508   
509 SectionEnd
511 Section $(lng_GTKFiles) SecGTK
513   DetailPrint "Installing GTK Files ..."
514   
515   SectionIn 1 2 3 RO
516   SetOutPath $INSTDIR
517   SetOverwrite on
518   File /a /r "..\..\inkscape\*.dll"
519   File /a /r /x "locale" "..\..\inkscape\lib"
520   File /a /r "..\..\inkscape\etc"
521 SectionEnd
523 Section $(lng_Alluser) SecAlluser
524   ; disable this option in Win95/Win98/WinME
525   SectionIn 1 2 3 
526   StrCpy $MultiUser "1"
527 SectionEnd
529 SectionGroup $(lng_Shortcuts) SecShortcuts
531 Section $(lng_Desktop) SecDesktop
532   SectionIn 1 2 3
533   ClearErrors
534   CreateShortCut "$DESKTOP\Inkscape.lnk" "$INSTDIR\inkscape.exe"
535   IfErrors 0 +2
536     DetailPrint "Uups! Problems creating desktop shortcuts"
537 SectionEnd
539 Section $(lng_Quicklaunch) SecQuicklaunch
540   SectionIn 1 2 3
541   ClearErrors
542   StrCmp $QUICKLAUNCH $TEMP +2
543     CreateShortCut "$QUICKLAUNCH\Inkscape.lnk" "$INSTDIR\inkscape.exe"
544   IfErrors 0 +2
545     DetailPrint "Uups! Problems creating quicklaunch shortcuts"
546 SectionEnd
548 Section $(lng_SVGWriter) SecSVGWriter 
549   SectionIn 1 2 3
550   ; create file associations, test before if needed
551   DetailPrint "creating file associations"
552   ClearErrors
553   ReadRegStr $0 HKCR ".svg" ""
554   StrCmp $0 "" 0 +3
555     WriteRegStr HKCR ".svg" "" "svgfile"
556     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
557   ReadRegStr $0 HKCR ".svgz" ""
558   StrCmp $0 "" 0 +3
559     WriteRegStr HKCR ".svgz" "" "svgfile"
560     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
561   IfErrors 0 +2
562     DetailPrint "Uups! Problems creating file assoziations for svg writer"
563   
564   DetailPrint "creating default editor"
565   ClearErrors
566   ReadRegStr $0 HKCR ".svg" ""
567   WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
568   ReadRegStr $0 HKCR ".svgz" ""
569   WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
570   IfErrors 0 +2
571     DetailPrint "Uups! Problems creating default editor"
572 SectionEnd
574 Section $(lng_ContextMenu) SecContextMenu
575   SectionIn 1 2 3
576   ; create file associations, test before if needed
577   DetailPrint "creating file associations"
578   ClearErrors
579   ReadRegStr $0 HKCR ".svg" ""
580   StrCmp $0 "" 0 +3
581     WriteRegStr HKCR ".svg" "" "svgfile"
582     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
583   ReadRegStr $0 HKCR ".svgz" ""
584   StrCmp $0 "" 0 +3
585     WriteRegStr HKCR ".svgz" "" "svgfile"
586     WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file"
587   IfErrors 0 +2
588     DetailPrint "Uups! Problems creating file assoziations for context menu"
589   
590   DetailPrint "creating context menue"
591   ClearErrors
592   ReadRegStr $0 HKCR ".svg" ""
593   WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
594   ReadRegStr $0 HKCR ".svgz" ""
595   WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
596   IfErrors 0 +2
597     DetailPrint "Uups! Problems creating context menue integration"
599 SectionEnd
601 SectionGroupEnd
603 SectionGroup $(lng_Addfiles) SecAddfiles
605 Section $(lng_Examples) SecExamples
606   SectionIn 1 2
607   SetOutPath $INSTDIR\share
608   File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\examples"
609 SectionEnd
611 Section $(lng_Tutorials) SecTutorials
612   SectionIn 1 2
613   SetOutPath $INSTDIR\share
614   File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\tutorials"
615 SectionEnd
617 SectionGroupEnd
619 SectionGroup /e $(lng_Languages) SecLanguages
621 Section $(lng_am) SecAmharic
622   !insertmacro Language am am
623 SectionEnd
625 Section $(lng_az) SecAzerbaijani
626   !insertmacro Language az az
627 SectionEnd
629 Section $(lng_be) SecByelorussian
630   !insertmacro Language be be
631 SectionEnd
633 Section $(lng_ca) SecCatalan
634   !insertmacro Language ca ca
635 SectionEnd
637 Section $(lng_cs) SecCzech
638   !insertmacro Language cs cs
639 SectionEnd
641 Section $(lng_da) SecDanish
642   !insertmacro Language da da
643 SectionEnd
645 Section $(lng_de) SecGerman
646   !insertmacro Language 'de' 'de'
647 SectionEnd
649 Section $(lng_el) SecGreek
650   !insertmacro Language el el
651 SectionEnd
653 Section $(lng_en) SecEnglish
654   SectionIn 1 2 3 RO
655 SectionEnd
657 Section $(lng_es) SecSpanish
658   !insertmacro Language 'es' 'es'
659 SectionEnd
661 Section $(lng_es_MX) SecSpanishMexico
662   !insertmacro Language 'es_MX' 'es_MX'
663 SectionEnd
665 Section $(lng_et) SecEstonian
666   !insertmacro Language et et
667 SectionEnd
669 Section $(lng_fr) SecFrench
670   !insertmacro Language 'fr' 'fr'
671 SectionEnd
673 Section $(lng_ga) SecIrish
674   !insertmacro Language ga ga
675 SectionEnd
677 Section $(lng_gl) SecGallegan
678   !insertmacro Language gl gl
679   SectionIn 1 2 3
680 SectionEnd
682 Section $(lng_hu) SecHungarian
683   !insertmacro Language hu hu
684   SectionIn 1 2 3
685 SectionEnd
687 Section $(lng_it) SecItalian
688   !insertmacro Language it it
689   SectionIn 1 2 3
690 SectionEnd
692 Section $(lng_ja) SecJapanese
693   !insertmacro Language 'ja' 'jp'
694 SectionEnd
696 Section $(lng_ko) SecKorean
697   !insertmacro Language 'ko' 'ko'
698 SectionEnd
700 Section $(lng_lt) SecLithuanian
701   !insertmacro Language 'lt' 'lt'
702 SectionEnd
704 Section $(lng_mk) SecMacedonian
705   !insertmacro Language mk mk
706 SectionEnd
708 Section $(lng_nb) SecNorwegianBokmal
709   !insertmacro Language nb nb
710 SectionEnd
712 Section $(lng_nl) SecDutch
713   !insertmacro Language nl nl
714 SectionEnd
716 Section $(lng_nn) SecNorwegianNynorsk
717   !insertmacro Language nn nn
718 SectionEnd
720 Section $(lng_pa) SecPanjabi
721   !insertmacro Language pa pa
722 SectionEnd
724 Section $(lng_pl) SecPolish
725   !insertmacro Language pl pl
726 SectionEnd
728 Section $(lng_pt) SecPortuguese
729   !insertmacro Language pt pt
730 SectionEnd
732 Section $(lng_pt_BR) SecPortugueseBrazil
733   !insertmacro Language pt_BR pt_BR
734 SectionEnd
736 Section $(lng_ru) SecRussian
737   !insertmacro Language ru ru
738 SectionEnd
740 Section $(lng_sk) SecSlovak
741   !insertmacro Language sk sk
742 SectionEnd
744 Section $(lng_sl) SecSlovenian
745   !insertmacro Language sl sl
746 SectionEnd
748 Section $(lng_sr) SecSerbian
749   !insertmacro Language sr sr
750 SectionEnd
752 Section $(lng_sr@Latn) SecSerbianLatin
753   !insertmacro Language 'sr@Latn' 'sr@Latn'
754 SectionEnd
756 Section $(lng_sv) SecSwedish
757   !insertmacro Language sv sv
758 SectionEnd
760 Section $(lng_tr) SecTurkish
761   !insertmacro Language tr tr
762 SectionEnd
764 Section $(lng_uk) SecUkrainian
765   !insertmacro Language uk uk
766 SectionEnd
768 Section $(lng_zh_CN) SecChineseSimplified
769   !insertmacro Language zh_CN zh_CN
770 SectionEnd
772 Section $(lng_zh_TW) SecChineseTaiwan
773   !insertmacro Language zh_TW zh_TW
774 SectionEnd
776 SectionGroupEnd
779 Section -FinalizeInstallation
780   StrCmp $MultiUser "1" "" SingleUser
781     DetailPrint "admin mode, registry root will be HKLM"
782     SetShellVarContext all
783     Goto endSingleUser
784   SingleUser:
785     DetailPrint "single user mode, registry root will be HKCU"
786     SetShellVarContext current
787   endSingleUser:                
789   ; check for writing registry
790   ClearErrors
791   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\inkscape.exe"  
792   ;IfErrors 0 +4
793   ;  DetailPrint "fatal: failed to write to ${PRODUCT_DIR_REGKEY}"
794   ;  DetailPrint "aborting installation"
795   ;     Abort
796   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "MultiUser" "$MultiUser"  
797   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "askMultiUser" "$askMultiUser"
798   WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "User" "$User"
799   IfErrors 0 +2
800     DetailPrint "fatal: failed to write to registry installation info"
802   ; start menu entries
803   ClearErrors
804   CreateDirectory "$SMPROGRAMS\Inkscape"
805   CreateShortCut "$SMPROGRAMS\Inkscape\Inkscape.lnk" "$INSTDIR\inkscape.exe"
806   CreateShortCut "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" "$INSTDIR\uninst.exe"
807   IfErrors 0 +2
808     DetailPrint "fatal: failed to write to start menu info"
810   ; uninstall settings
811   ClearErrors
812   WriteUninstaller "$INSTDIR\uninst.exe"
813   WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst.exe"'
814   WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
815   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}"
816   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Inkscape.exe,0"
817   WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
818   WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" "1"
819   WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" "1"
820   IfErrors 0 +2
821     DetailPrint "fatal: failed to write to registry un-installation info"
822 SectionEnd
823  
824 ; Last the Descriptions
825 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
826   !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} $(lng_CoreDesc)
827   !insertmacro MUI_DESCRIPTION_TEXT ${SecGTK} $(lng_GTKFilesDesc)
828   !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(lng_ShortcutsDesc)
829   !insertmacro MUI_DESCRIPTION_TEXT ${SecAlluser} $(lng_AlluserDesc) 
830   !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(lng_DesktopDesc)
831   !insertmacro MUI_DESCRIPTION_TEXT ${SecQuicklaunch} $(lng_QuicklaunchDesc)
832   !insertmacro MUI_DESCRIPTION_TEXT ${SecSVGWriter} $(lng_SVGWriterDesc)
833   !insertmacro MUI_DESCRIPTION_TEXT ${SecContextMenu} $(lng_ContextMenuDesc)
834   !insertmacro MUI_DESCRIPTION_TEXT ${SecAddfiles} $(lng_AddfilesDesc)
835   !insertmacro MUI_DESCRIPTION_TEXT ${SecExamples} $(lng_ExamplesDesc)
836   !insertmacro MUI_DESCRIPTION_TEXT ${SecTutorials} $(lng_TutorialsDesc)
837   !insertmacro MUI_DESCRIPTION_TEXT ${SecLanguages} $(lng_LanguagesDesc)
838 !insertmacro MUI_FUNCTION_DESCRIPTION_END
840 !macro Parameter key Section
841   Push ${key}
842   Push ""
843   Call GetParameterValue
844   Pop $1
845   StrCmp $1 "OFF" 0 +5
846     SectionGetFlags ${Section} $0
847     IntOp $2 ${SF_SELECTED} ~
848     IntOp $0 $0 & $2
849     SectionSetFlags ${Section} $0
850   StrCmp $1 "ON" 0 +4
851     SectionGetFlags ${Section} $0
852     IntOp $0 $0 | ${SF_SELECTED}
853     SectionSetFlags ${Section} $0
854 !macroend
856 Function .onInit
857   ;Extract InstallOptions INI files
858   StrCpy $AskMultiUser "1"
859   StrCpy $MultiUser "0"
860   ; this resets AskMultiUser if Win95/98/ME
861   Call GetWindowsVersion
862   Pop $R0
863   DetailPrint "detected operating system $R0"
864   ;MessageBox MB_OK "operating system: $R0; AskMultiuser: $AskMultiUser"
865   
866   ; hide all user section if win98
867   StrCmp $AskMultiUser "1" +2
868     SectionSetText ${SecAlluser} ""
870   ; hide if quick launch if not available
871   StrCmp $QUICKLAUNCH $TEMP 0 +2
872     SectionSetText ${SecQuicklaunch} ""
874   ;check if user is admin
875   ClearErrors
876         UserInfo::GetName
877         IfErrors info_Win9x
878         Pop $0
879         StrCpy $User $0
880         UserInfo::GetAccountType
881         Pop $1
882         StrCmp $1 "Admin" info_done
884         MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_NO_ADMIN)"
886         Goto info_done
888         info_Win9x:
889                 # This one means you don't need to care about admin or
890                 # not admin because Windows 9x doesn't either
891                 MessageBox MB_OK|MB_ICONEXCLAMATION $(lng_NOT_SUPPORTED)
893         info_done:
895   ;check for previous installation
896   ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User"
897   StrCmp $0 "" +1 +2
898   ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User"
899   ;check user if applicable
900   StrCmp $0 "" +3
901     StrCmp $0 $User +2
902           MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)"
903         
904   ; proccess command line parameter
905   !insertmacro Parameter "GTK" ${SecGTK}
906   !insertmacro Parameter "SHORTCUTS" ${secShortcuts}
907   !insertmacro Parameter "ALLUSER" ${SecAlluser}
908   !insertmacro Parameter "DESKTOP" ${SecDesktop}
909   !insertmacro Parameter "QUICKLAUNCH" ${SecQUICKlaunch}
910   !insertmacro Parameter "SVGEDITOR" ${SecSVGWriter}
911   !insertmacro Parameter "CONTEXTMENUE" ${SecContextMenu}
912   !insertmacro Parameter "ADDFILES" ${SecAddfiles}
913   !insertmacro Parameter "EXAMPLES" ${SecExamples}
914   !insertmacro Parameter "TUTORIALS" ${SecTutorials}
915   !insertmacro Parameter "LANGUAGES" ${SecLanguages}
916   !insertmacro Parameter "am" ${SecAmharic}
917   !insertmacro Parameter "az" ${SecAzerbaijani}
918   !insertmacro Parameter "be" ${SecByelorussian}
919   !insertmacro Parameter "ca" ${SecCatalan}
920   !insertmacro Parameter "cs" ${SecCzech}
921   !insertmacro Parameter "da" ${SecDanish}
922   !insertmacro Parameter "de" ${SecGerman}
923   !insertmacro Parameter "el" ${SecGreek}
924   !insertmacro Parameter "es" ${SecSpanish}
925   !insertmacro Parameter "es_MX" ${SecSpanishMexico}
926   !insertmacro Parameter "et" ${SecEstonian}
927   !insertmacro Parameter "fr" ${SecFrench}
928   !insertmacro Parameter "ga" ${SecIrish}
929   !insertmacro Parameter "gl" ${SecGallegan}
930   !insertmacro Parameter "hu" ${SecHungarian}
931   !insertmacro Parameter "it" ${SecItalian}
932   !insertmacro Parameter "ja" ${SecJapanese}
933   !insertmacro Parameter "ko" ${SecKorean}
934   !insertmacro Parameter "mk" ${SecMacedonian}
935   !insertmacro Parameter "nb" ${SecNorwegianBokmal}
936   !insertmacro Parameter "nl" ${SecDutch}
937   !insertmacro Parameter "nn" ${SecNorwegianNynorsk}
938   !insertmacro Parameter "pa" ${SecPanjabi}
939   !insertmacro Parameter "pl" ${SecPolish}
940   !insertmacro Parameter "pt" ${SecPortuguese}
941   !insertmacro Parameter "pt_BR" ${SecPortugueseBrazil}
942   !insertmacro Parameter "ru" ${SecRussian}
943   !insertmacro Parameter "sk" ${SecSlovak}
944   !insertmacro Parameter "sl" ${SecSlovenian}
945   !insertmacro Parameter "sr" ${SecSerbian}
946   !insertmacro Parameter "sr@Latn" ${SecSerbianLatin}
947   !insertmacro Parameter "sv" ${SecSwedish}
948   !insertmacro Parameter "tr" ${SecTurkish}
949   !insertmacro Parameter "uk" ${SecUkrainian}
950   !insertmacro Parameter "zh_CN" ${SecChineseSimplified}
951   !insertmacro Parameter "zh_TW" ${SecChineseTaiwan}
952   
953   Push "?"
954   Push "TEST"
955   Call GetParameterValue
956   Pop $1
957   StrCmp $1 "TEST" +3
958     MessageBox MB_OK "possible parameters for installer:$\r$\n \
959       /?: this help screen$\r$\n \
960       /S: silent$\r$\n \
961       /D=(directory): where to install inkscape$\r$\n \
962       /GTK=(OFF/ON): GTK+ Runtime environment$\r$\n \
963       /SHORTCUTS=(OFF/ON): shortcuts to start inkscape$\r$\n \
964       /ALLUSER=(OFF/ON): for all users on the computer$\r$\n \
965       /DESKTOP=(OFF/ON): Desktop icon$\r$\n \
966       /QUICKLAUNCH=(OFF/ON): quick launch icon$\r$\n \
967       /SVGEDITOR=(OFF/ON): default SVG editor$\r$\n \
968       /CONTEXTMENUE=(OFF/ON): context menue integration$\r$\n \
969       /ADDFILES=(OFF/ON): additional files$\r$\n \
970       /EXAMPLES=(OFF/ON): examples$\r$\n \
971       /TUTORIALS=(OFF/ON): tutorials$\r$\n \
972       /LANGUAGES=(OFF/ON): translated menues, examples, etc.$\r$\n \
973       /[locale code]=(OFF/ON): e.g am, es, es_MX as in Inkscape supported"
974     Abort
975 FunctionEnd
977 Function .onSelChange
978 FunctionEnd
980 ; --------------------------------------------------
982 Function un.CustomPageUninstall
983   !insertmacro MUI_HEADER_TEXT "$(lng_UInstOpt)" "$(lng_UInstOpt1)"
984   !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 1" "Text" "$APPDATA\Inkscape\preferences.xml"
985   !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 2" "Text" "$(lng_PurgePrefs)"
987   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "inkscape.nsi.uninstall"
988   !insertmacro MUI_INSTALLOPTIONS_READ $MultiUser "inkscape.nsi.uninstall" "Field 2" "State"
989   DetailPrint "keepfiles = $MultiUser" 
990           ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" 
992 FunctionEnd
995 Function un.onInit
997   ClearErrors
998   StrCpy $User ""
999         UserInfo::GetName
1000         IfErrors +3
1001         Pop $0
1002         StrCpy $User $0
1004   StrCpy $askMultiUser "1"
1005   StrCpy $MultiUser "1"
1006  
1007   ; Test if this was a multiuser installation
1008   ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" ""
1009   StrCmp $0  "$INSTDIR\inkscape.exe" 0 +5  
1010     ReadRegStr $MultiUser HKLM "${PRODUCT_DIR_REGKEY}" "MultiUser"
1011     ReadRegStr $askMultiUser HKLM "${PRODUCT_DIR_REGKEY}" "askMultiUser"
1012         ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User"
1013         Goto +4
1014   ReadRegStr $MultiUser HKCU "${PRODUCT_DIR_REGKEY}" "MultiUser"
1015   ReadRegStr $askMultiUser HKCU "${PRODUCT_DIR_REGKEY}" "askMultiUser"
1016   ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User"
1017   ;check user if applicable
1018   StrCmp $0 "" +3
1019     StrCmp $0 $User +2
1020           MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)"
1021     
1022  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "inkscape.nsi.uninstall"
1024  ;check whether Multi user installation ?
1025  SetShellVarContext all
1026  StrCmp $MultiUser "0" 0 +2 
1027  SetShellVarContext current
1028  ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" 
1029    
1030 FunctionEnd
1032 Section Uninstall
1034   ; remove personal settings
1035   Delete "$APPDATA\Inkscape\extension-errors.log"
1036   StrCmp $MultiUser "0" 0 endPurge  ; multiuser assigned in dialog
1037     DetailPrint "purge personal settings in $APPDATA\Inkscape"
1038     RMDir /r "$APPDATA\Inkscape"
1039   endPurge:
1041   ; Remove file associations for svg editor
1042   DetailPrint "removing file associations for svg editor"
1043   ClearErrors
1044   ReadRegStr $0 HKCR ".svg" ""
1045   DetailPrint ".svg associated as $0"
1046   IfErrors endUninstSVGEdit  
1047     ReadRegStr $1 HKCR "$0\shell\edit\command" ""
1048         IfErrors 0 +2  
1049       DetailPrint "svg editor is $1"
1050     StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1051       DetailPrint "removing default .svg editor"
1052       DeleteRegKey HKCR "$0\shell\edit\command"
1053     DeleteRegKey /ifempty HKCR "$0\shell\edit"
1054     DeleteRegKey /ifempty HKCR "$0\shell"
1055     DeleteRegKey /ifempty HKCR "$0"
1056   endUninstSVGEdit:
1057   
1058   ClearErrors
1059   ReadRegStr $2 HKCR ".svgz" ""
1060   DetailPrint ".svgz associated as $2"
1061   IfErrors endUninstSVGZEdit  
1062     ReadRegStr $3 HKCR "$2\shell\edit\command" ""
1063     IfErrors 0 +2  
1064       DetailPrint "svgz editor is $1"
1065     StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1066       DetailPrint "removing default .svgz editor"
1067       DeleteRegKey HKCR "$2\shell\edit\command"
1068     DeleteRegKey /ifempty HKCR "$2\shell\edit"
1069     DeleteRegKey /ifempty HKCR "$2\shell"
1070     DeleteRegKey /ifempty HKCR "$2"
1071   endUninstSVGZEdit:
1072   
1073   ; Remove file associations for svg editor
1074   DetailPrint "removing file associations for svg editor"
1075   ClearErrors
1076   ReadRegStr $0 HKCR ".svg" ""
1077   IfErrors endUninstSVGView
1078     ReadRegStr $1 HKCR "$0\shell\open\command" ""
1079     IfErrors 0 +2  
1080       DetailPrint "svg viewer is $1"
1081     StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1082       DetailPrint "removing default .svg viewer"
1083       DeleteRegKey HKCR "$0\shell\open\command"
1084     DeleteRegKey /ifempty HKCR "$0\shell\open"
1085     DeleteRegKey /ifempty HKCR "$0\shell"
1086     DeleteRegKey /ifempty HKCR "$0"
1087   endUninstSVGView:
1088   
1089   ClearErrors
1090   ReadRegStr $2 HKCR ".svgz" ""
1091   IfErrors endUninstSVGZView
1092     ReadRegStr $3 HKCR "$2\shell\open\command" ""
1093     IfErrors 0 +2  
1094       DetailPrint "svgz viewer is $1"
1095     StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
1096       DetailPrint "removing default .svgz viewer"
1097       DeleteRegKey HKCR "$2\shell\open\command"
1098     DeleteRegKey /ifempty HKCR "$2\shell\open"
1099     DeleteRegKey /ifempty HKCR "$2\shell"
1100     DeleteRegKey /ifempty HKCR "$2"
1101   endUninstSVGZView:
1102   
1103   ; Remove file associations for context menue
1104   DetailPrint "removing file associations for svg editor"
1105   ClearErrors
1106   ReadRegStr $0 HKCR ".svg" ""
1107   IfErrors endUninstSVGContext
1108   DetailPrint "removing default .svg context menue"
1109   DeleteRegKey HKCR "$0\shell\${PRODUCT_NAME}"
1110   DeleteRegKey /ifempty HKCR "$0\shell"
1111   DeleteRegKey /ifempty HKCR "$0"
1112   endUninstSVGContext:
1113   
1114   ClearErrors
1115   ReadRegStr $2 HKCR ".svgz" ""
1116   IfErrors endUninstSVGZContext
1117   DetailPrint "removing default .svgzcontext menue"
1118   DeleteRegKey HKCR "$2\shell\${PRODUCT_NAME}"
1119   DeleteRegKey /ifempty HKCR "$2\shell"
1120   DeleteRegKey /ifempty HKCR "$2"
1121   endUninstSVGZContext:
1123   ReadRegStr $1 HKCR "$0" ""
1124   StrCmp $1 "" 0 +3
1125     DetailPrint "removing filetype .svg $0"
1126     DeleteRegKey HKCR ".svg"
1127   
1128   ReadRegStr $3 HKCR "$2" ""
1129   StrCmp $3 "" 0 +3
1130     DetailPrint "removing filetype .svgz $2"
1131     DeleteRegKey HKCR ".svgz"
1132   
1133     
1134   SetShellVarContext all
1135   DetailPrint "removing product regkey"
1136   DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
1137   DetailPrint "removing uninstall info"
1138   DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
1139   DetailPrint "removing shortcuts"
1140   Delete "$DESKTOP\Inkscape.lnk"
1141   Delete "$QUICKLAUNCH\Inkscape.lnk"
1142   Delete "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk"
1143   Delete "$SMPROGRAMS\Inkscape\Inkscape.lnk"
1144   RMDir  "$SMPROGRAMS\Inkscape"
1146   SetShellVarContext current
1147   DetailPrint "removing product regkey"
1148   DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
1149   DetailPrint "removing uninstall info"
1150   DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
1151   DetailPrint "removing shortcuts"
1152   Delete "$DESKTOP\Inkscape.lnk"
1153   Delete "$QUICKLAUNCH\Inkscape.lnk"
1154   Delete "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk"
1155   Delete "$SMPROGRAMS\Inkscape\Inkscape.lnk"
1156   RMDir  "$SMPROGRAMS\Inkscape"
1158   DetailPrint "removing uninstall info"
1159   RMDir /r "$INSTDIR"
1161   SetAutoClose false
1163 SectionEnd