changeset 32:734a2093deab

Implementation of the Intergration into Explorer
author friseb123
date Sat, 11 Oct 2003 18:03:52 +0000
parents c3f2fd864e45
children 940450647630
files kdiff3/src/kdiff3.nsi
diffstat 1 files changed, 25 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/kdiff3/src/kdiff3.nsi	Sat Oct 11 14:03:25 2003 +0000
+++ b/kdiff3/src/kdiff3.nsi	Sat Oct 11 18:03:52 2003 +0000
@@ -14,6 +14,8 @@
 !endif
 !include "MUI.nsh"
 
+
+
 ;--------------------------------
 ;Configuration
     InstallDir "$PROGRAMFILES\KDiff3"
@@ -157,7 +159,9 @@
     WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${MUI_PRODUCT}" "" "$INSTDIR"
     WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "DisplayName" "${MUI_PRODUCT} (remove only)"
     WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "UninstallString" '"$INSTDIR\uninst.exe"'
+  DetailPrint "Writing files"
     File "kdiff3.exe"
+    File "..\binaries\windows\diff.exe"
     File "..\COPYING"
     File "${WINDOWS_DIR}\system32\msvcp70.dll"
     File "${WINDOWS_DIR}\system32\msvcr70.dll"
@@ -166,7 +170,7 @@
 
   !insertmacro MUI_STARTMENU_WRITE_BEGIN
     
-    ;Create shortcuts
+    DetailPrint "Creating shortcuts"
     CreateDirectory "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
     CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\KDiff3.lnk" "$INSTDIR\kdiff3.exe"
     CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstal.lnk" "$INSTDIR\uninst.exe"
@@ -180,16 +184,18 @@
     
   ;Store install folder
   WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
-  
+    CreateShortCut "$QUICKLAUNCH\KDiff3.lnk" "$INSTDIR\kdiff3.exe"
+     
 SectionEnd
  
 Section "Documentation"
 
+    DetailPrint "Writing the documentation"
     SetOutPath "$INSTDIR"
     File /r tmp\kdiff3.sourceforge.net\doc
     SetOutPath "$INSTDIR"
     CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Documentation.lnk" "$INSTDIR\doc\index.html"
-    
+    WriteRegStr HKCR "Application\kdiff3.exe\shell\open\command" "" '"$INSTDIR\kdiff3.exe" "%1"'    
 SectionEnd
 
 SubSection "Integration"
@@ -200,6 +206,12 @@
   WriteRegBin HKCU "Software\WinCvs\wincvs\CVS settings" "P_DiffUseExtDiff" 01
 
 SectionEnd 
+Section "Explorer"
+  DetailPrint "Integration to Explorer"
+  WriteRegStr HKCR "Directory\shell}\KDiff3" "" '&KDiff3'
+  WriteRegStr HKCR "Directory\shell\KDiff3\command" "" '"$INSTDIR\kdiff3.exe" "%1"'
+    CreateShortCut "$SMPROGRAMS\..\..\SendTo\KDiff3.lnk" '"$INSTDIR\kdiff3.exe"'
+SectionEnd 
 SubSectionEnd
  
 ;Display the Finish header
@@ -250,14 +262,16 @@
 
   RMDir "$INSTDIR"
   Delete "$INSTDIR\uninst.exe"
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}"
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\oldb_auto_file\shell\open\command" 
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\osio_auto_file\shell\open\command" 
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\FriSebSoftware\KDiff3" 
-DeleteRegKey HKEY_CLASSES_ROOT  ".oldb" 
-DeleteRegKey HKEY_CLASSES_ROOT  ".osio" 
-RMDir /r "$INSTDIR"
-!insertmacro MUI_UNFINISHHEADER
+    DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}"
+
+  Delete "$QUICKLAUNCH\KDiff3.lnk"
+    RMDir /r "$INSTDIR"
+  DetailPrint "Integration to Explorer"
+  DeleteRegKey HKCR "Directory\shell\KDiff3\command"
+  DeleteRegKey HKCR "Directory\shell\KDiff3"
+  Delete "$SMPROGRAMS\..\..\SendTo\KDiff3.lnk"
+
+    !insertmacro MUI_UNFINISHHEADER
 
 SectionEnd