Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / win32inst.nsi.in
index ab9f423..e13fda1 100644 (file)
@@ -18,10 +18,6 @@ OutFile "@PACKAGE_TARNAME@-@PACKAGE_VERSION@.exe"
 ; 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
@@ -57,10 +53,10 @@ Section "Synfig Studio"
   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\synfigapp\.libs\libsynfigapp-0.dll"
@@ -77,7 +73,7 @@ Section "Synfig Studio"
        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@"
@@ -91,12 +87,12 @@ Section "Synfig Studio"
        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\synfigstudio.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\synfigstudio.exe "%1"'
        
@@ -108,9 +104,10 @@ SectionEnd
 ; 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\bin\synfigstudio.exe" 0
+  CreateShortCut "$SMPROGRAMS\Voria\Synfig Studio.lnk" "$INSTDIR\bin\synfigstudio.exe" "" "$INSTDIR\share\pixmaps\synfig_icon.ico" 0
   
 SectionEnd
 
@@ -125,19 +122,26 @@ Section "Uninstall"
        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"