; 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
;--------------------------------
-;!define MUI_WELCOMEFINISHPAGE_BITMAP "images\about_dialog.bmp"
+!define MUI_WELCOMEFINISHPAGE_BITMAP ".\images\installer_logo.bmp"
; Pages
!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "@srcdir@\alphalicense.txt"
+;!insertmacro MUI_PAGE_LICENSE "@srcdir@\alphalicense.txt"
+!insertmacro MUI_PAGE_LICENSE "@srcdir@\COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
SectionIn RO
SetOutPath "$INSTDIR\share\pixmaps"
- File "images\*.png"
+ !include "images\images.nsh"
- SetOutPath "$INSTDIR\share"
- File "images\*.ico"
+ SetOutPath "$INSTDIR\share\pixmaps"
+ !include "images\icons.nsh"
SetOutPath "$INSTDIR\bin"
- File "src\sinfgapp\.libs\libsinfgapp-0.dll"
- File "src\gtkmm\.libs\sinfgstudio.exe"
+ File "src\synfigapp\.libs\libsynfigapp-0.dll"
+ File "src\gtkmm\.libs\synfigstudio.exe"
FileOpen $0 $PROFILE\.gtkrc-2.0 a
FileSeek $0 0 END
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\bin\sinfgstudio.exe;1"
+ WriteRegStr HKCR "Synfig.Composition\DefaultIcon" "" "$INSTDIR\share\pixmaps\sif_icon.ico"
WriteRegStr HKCR "Synfig.Composition\shell" "" "open"
- WriteRegStr HKCR "Synfig.Composition\shell\open\command" "" '$INSTDIR\bin\sinfgstudio.exe "%1"'
+ WriteRegStr HKCR "Synfig.Composition\shell\open\command" "" '$INSTDIR\bin\synfigstudio.exe "%1"'
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
; 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\sinfgstudio.exe" "" "$INSTDIR\bin\sinfgstudio.exe" 0
+ CreateShortCut "$SMPROGRAMS\Voria\Synfig Studio.lnk" "$INSTDIR\bin\synfigstudio.exe" "" "$INSTDIR\share\pixmaps\synfig_icon.ico" 0
SectionEnd
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\sinfgstudio.exe
- Delete $INSTDIR\bin\libsinfgapp-0.dll
- RMDir $INSTDIR\bin
+ Delete $INSTDIR\bin\synfigstudio.exe
+ Delete $INSTDIR\bin\libsynfigapp-0.dll
+ RMDir "$INSTDIR\bin"
; Remove shortcuts, if any
+ SetShellVarContext All
Delete "$SMPROGRAMS\Voria\Uninstall Synfig Studio.lnk"
Delete "$SMPROGRAMS\Voria\Synfig Studio.lnk"