; The default installation directory
InstallDir $PROGRAMFILES\Synfig
-; Registry key to check for directory (so if you install again, it will
-; overwrite the old one automatically)
-InstallDirRegKey HKLM "Software\Voria_@PACKAGE_TARNAME@" "Install_Dir"
-
!define MUI_ABORTWARNING
!define SHCNE_ASSOCCHANGED 0x8000000
SectionIn RO
SetOutPath "$INSTDIR\share\pixmaps"
- File "images\*.png"
+ !include "images\images.nsh"
SetOutPath "$INSTDIR\share\pixmaps"
- File "images\*.ico"
+ !include "images\icons.nsh"
SetOutPath "$INSTDIR\bin"
File "src\synfigapp\.libs\libsynfigapp-0.dll"
FileClose $0
WriteRegStr HKLM "${PRODUCT_REG_KEY}" "Path" "$INSTDIR"
- WriteRegStr HKLM "${PRODUCT_REG_KEY}" "Version" "@PRODUCT_VERSION@"
+ WriteRegStr HKLM "${PRODUCT_REG_KEY}" "Version" "@PACKAGE_VERSION@"
; Write the uninstall keys for Windows
WriteRegStr HKLM "${PRODUCT_UNINSTALL_KEY}" "DisplayName" "@PACKAGE_NAME@"
WriteRegStr HKCR ".sif" "Content Type" "image/x-sif"
WriteRegStr HKCR ".sif" "PerceivedType" "image"
- WriteRegStr HKCR ".sif.gz" "" "Synfig.Composition"
- WriteRegStr HKCR ".sif.gz" "Content Type" "image/x-sifz"
- WriteRegStr HKCR ".sif.gz" "PerceivedType" "image"
+ WriteRegStr HKCR ".sifz" "" "Synfig.Composition"
+ WriteRegStr HKCR ".sifz" "Content Type" "image/x-sifz"
+ WriteRegStr HKCR ".sifz" "PerceivedType" "image"
WriteRegStr HKCR "Synfig.Composition" "" "Synfig Composition File"
WriteRegStr HKCR "Synfig.Composition\DefaultIcon" "" "$INSTDIR\share\pixmaps\sif_icon.ico"
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
+ SetShellVarContext All
CreateDirectory "$SMPROGRAMS\Voria"
CreateShortCut "$SMPROGRAMS\Voria\Uninstall Synfig Studio.lnk" "$INSTDIR\uninstall-@PACKAGE_TARNAME@.exe" "" "$INSTDIR\uninstall-@PACKAGE_TARNAME@.exe" 0
CreateShortCut "$SMPROGRAMS\Voria\Synfig Studio.lnk" "$INSTDIR\bin\synfigstudio.exe" "" "$INSTDIR\share\pixmaps\synfig_icon.ico" 0
DeleteRegKey HKCR "Synfig.Composition\shell"
DeleteRegKey HKCR "Synfig.Composition"
DeleteRegKey HKCR ".sif"
- DeleteRegKey HKCR ".sif.gz"
+ DeleteRegKey HKCR ".sifz"
; Remove registry keys
DeleteRegKey HKLM "${PRODUCT_REG_KEY}"
DeleteRegKey HKLM "${PRODUCT_UNINSTALL_KEY}"
+ ; Remove images and icons
+ !include "images\unimages.nsh"
+ !include "images\unicons.nsh"
+ RMDir "$INSTDIR\share\pixmaps"
+ RMDir "$INSTDIR\share"
+
; Remove files and uninstaller
Delete "$INSTDIR\${PRODUCT_UNINSTALL_EXE}"
Delete $INSTDIR\bin\synfigstudio.exe
Delete $INSTDIR\bin\libsynfigapp-0.dll
- RMDir $INSTDIR\bin
+ RMDir "$INSTDIR\bin"
; Remove shortcuts, if any
+ SetShellVarContext All
Delete "$SMPROGRAMS\Voria\Uninstall Synfig Studio.lnk"
Delete "$SMPROGRAMS\Voria\Synfig Studio.lnk"