Commits

Anonymous committed 808a2d8

- Windows 64 bit: Diff-Ext-for-KDiff3 context menu now installed as 32
bit and 64 bit versions to allow other 32 bit programs to use it too.
- Windows 64 bit specific installer.

Comments (0)

Files changed (7)

-Version 0.9.97 - 2012-07-14
+Version 0.9.97 - 2012-08-05
 ===========================
 - Memory usage optimized for comparison of large directories. (ca. 1/5 needed)
 - On Windows use config file .kdiff3rc next to kdiff3.exe if exists.
 - Change an encoding in diff text window via click on encoding label. (Patch by Alexey Kostromin)
 - Fix for tab-key moving focus instead of adding a tab character in MergeResultWindow.
 - Regression test framework (by Maurice van der Pot)
-- Documentation patch (by Burkard Lück)
+- Documentation patch (by Burkard Lueck)
 - Select text in Find dialog (by Eike Sauer)
 - If text is selected in either input or output window use that in Find dialog.
 - Added default directory anti patterns ".hg" and ".git" and file anti patterns ".rej" and ".bak" for better mercurial and git integration.
 - Command line option --cs doesn't change the config value permanently anymore.
 - On KDE: Not creating a KDiff3Part anymore.
 - Windows (Vista or Win 7): Shell context menu in directory comparison view now again displays text.
+- Windows 64 bit: Diff-Ext-for-KDiff3 context menu now installed as 32 bit and 64 bit versions to allow other 32 bit programs to use it too.
+- Windows 64 bit specific installer.
 
 Version 0.9.96 - 2011-09-02
 ===========================

kdiff3/diff_ext_for_kdiff3/Makefile

   CXXFLAGS ?= -g
 else
   CXXFLAGS ?= -Os
-  LDFLAGS += -s
+  LDFLAGS += -s -static-libgcc
 endif
 CXXFLAGS += -pedantic -Wall -W -D_UNICODE -DUNICODE
 
 	
 include .depend
 
-clean: clean-custom
-	${RM}  $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
+clean:
+	del  .depend $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
 
 $(DLL): $(OBJ)
 	dllwrap.exe \

kdiff3/diff_ext_for_kdiff3/diff_ext.cpp

       else if(id == m_id_About) 
       {
          LOG();
+         std::wstring sBits = i18n("(32 Bit)");
+         if (sizeof(void*)==8)
+             sBits = i18n("(64 Bit)");
          MessageBox( _hwnd, (i18n("Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n")
             + i18n("This software is distributable under the BSD license.\n")
-            + i18n("Some extensions for KDiff3 by Joachim Eibl.\n")
+            + i18n("Some extensions for KDiff3 (c) 2006-2012 by Joachim Eibl.\n")
             + i18n("Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n")
             + i18n("Homepage for KDiff3: http://kdiff3.sourceforge.net")).c_str()
-            , i18n("About Diff-Ext for KDiff3").c_str(), MB_OK );
+            , (i18n("About Diff-Ext for KDiff3 ")+sBits).c_str(), MB_OK );
       } 
       else 
       {
 }
 
 STDMETHODIMP
-DIFF_EXT::GetCommandString(UINT idCmd, UINT uFlags, UINT*, LPSTR pszName, UINT cchMax) 
+DIFF_EXT::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT*, LPSTR pszName, UINT cchMax)
 {
    // LOG(); // Gets called very often
    HRESULT ret = NOERROR;

kdiff3/diff_ext_for_kdiff3/diff_ext.h

     //IShell members
     STDMETHODIMP QueryContextMenu(HMENU menu, UINT index, UINT cmd_first, UINT cmd_last, UINT flags);
     STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO info);
-    STDMETHODIMP GetCommandString(UINT cmd, UINT flags, UINT* reserved, LPSTR name, UINT name_length);
+    STDMETHODIMP GetCommandString(UINT_PTR cmd, UINT flags, UINT* reserved, LPSTR name, UINT name_length);
 
     //IShellExtInit methods
     STDMETHODIMP Initialize(LPCITEMIDLIST folder, IDataObject* subj, HKEY key);

kdiff3/diff_ext_for_kdiff3/server.cpp

  *
  */
 
+#define _WIN32_WINNT 0x0502
 #define _CRT_NON_CONFORMING_SWPRINTFS 
 #define _CRT_SECURE_NO_DEPRECATE
 

kdiff3/windows_installer/Kdiff3-64bit.nsi

+!define KDIFF3_64BIT
+
+!include "Kdiff3.nsi"

kdiff3/windows_installer/kdiff3.nsi

 ;Apdapted for KDiff3 by Sebastien Fricker and Joachim Eibl
 ;Requires nsis_v2.19
 
-!define KDIFF3_VERSION "0.9.96"
+!define KDIFF3_VERSION "0.9.97"
 !define DIFF_EXT32_CLSID "{9F8528E4-AB20-456E-84E5-3CE69D8720F3}"
 !define DIFF_EXT64_CLSID "{34471FFB-4002-438b-8952-E4588D0C0FE9}"
 
+!ifdef KDIFF3_64BIT
+  !define BITS 64
+!else
+  !define BITS 32
+!endif
+
+!define SetupFileName "KDiff3-${BITS}bit-Setup_${KDIFF3_VERSION}.exe"
+
 ;--------------------------------
 ;Include Modern UI
 
 
   ;Name and file
   Name "KDiff3"
-  OutFile "KDiff3Setup_${KDIFF3_VERSION}.exe"
+  OutFile ${SetupFileName}
 
   ;Default installation folder
+  !ifdef KDIFF3_64BIT
+  ;SetRegView 64
+  InstallDir "$PROGRAMFILES64\KDiff3"
+  !else
   InstallDir "$PROGRAMFILES\KDiff3"
-  
+  !endif
   ;Get installation folder from registry if available
   InstallDirRegKey HKCU "Software\KDiff3" ""
   
   Var MUI_TEMP
   Var STARTMENU_FOLDER
   Var DIFF_EXT_CLSID
+  Var DIFF_EXT_ID
   Var DIFF_EXT_DLL
   Var DIFF_EXT_OLD_DLL
   
   
   ;ADD YOUR OWN FILES HERE...
     DetailPrint "Writing files"
-    File "kdiff3.exe"
+    File  "${BITS}bit\kdiff3.exe"
+    File  "${BITS}bit\kdiff3.exe.manifest"
+    File  "${BITS}bit\qt.conf"
     File "COPYING.txt"
     File "Readme_Win.txt"
     File "ChangeLog.txt"
-  Delete "$INSTDIR\kdiff3-QT4.exe"
+    SetOutPath "$INSTDIR\bin"
+    File /r "${BITS}bit\bin\*.*"
+    SetOutPath "$INSTDIR"
+    Delete "$INSTDIR\kdiff3-QT4.exe"
   
   ;Store installation folder
   WriteRegStr HKCU "Software\KDiff3" "" $INSTDIR
 
 Section "Utilities" SecUtilities
     DetailPrint "Writing the command line utilities (GNU sed, diff, diff3, etc.)"
-    SetOutPath "$INSTDIR"
-    File /r bin
+    SetOutPath "$INSTDIR\bin"
+    File /r "bin\*.*"
 SectionEnd
 
 SubSection "Integration" SecIntegration
 
 Section "Diff-Ext" SecIntegrationDiffExtForKDiff3
   DetailPrint "Diff-Ext for KDiff3"
-
+  SetOutPath "$INSTDIR"
 ${If} ${RunningX64}
   StrCpy $DIFF_EXT_CLSID ${DIFF_EXT64_CLSID}
   StrCpy $DIFF_EXT_DLL "diff_ext_for_kdiff3_64.dll"
   StrCpy $DIFF_EXT_OLD_DLL "diff_ext_for_kdiff3_64_old.dll"
-${Else}
+  StrCpy $DIFF_EXT_ID "diff-ext-for-kdiff3-64"
+  IfFileExists "$INSTDIR\$DIFF_EXT_OLD_DLL" 0 +2
+     Delete "$INSTDIR\$DIFF_EXT_OLD_DLL"
+
+  IfFileExists "$INSTDIR\$DIFF_EXT_DLL" 0 +2
+     Rename "$INSTDIR\$DIFF_EXT_DLL" "$INSTDIR\$DIFF_EXT_OLD_DLL"
+  File "64bit\diff_ext_for_kdiff3_64.dll"
+
+  SetRegView 64
+
+  WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID"                ""  "$DIFF_EXT_ID"
+  WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID\InProcServer32" ""  "$INSTDIR\$DIFF_EXT_DLL"
+  WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID\InProcServer32" "ThreadingModel" "Apartment"
+  WriteRegStr SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "$DIFF_EXT_CLSID" "$DIFF_EXT_ID"
+  WriteRegStr SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
+  WriteRegStr SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
+
+  SetRegView 32
+
+${EndIf}
   StrCpy $DIFF_EXT_CLSID ${DIFF_EXT32_CLSID}
   StrCpy $DIFF_EXT_DLL "diff_ext_for_kdiff3.dll"
   StrCpy $DIFF_EXT_OLD_DLL "diff_ext_for_kdiff3_old.dll"
-${EndIf}
+  StrCpy $DIFF_EXT_ID "diff-ext-for-kdiff3"
 
   IfFileExists "$INSTDIR\$DIFF_EXT_OLD_DLL" 0 +2
      Delete "$INSTDIR\$DIFF_EXT_OLD_DLL"
   IfFileExists "$INSTDIR\$DIFF_EXT_DLL" 0 +2
      Rename "$INSTDIR\$DIFF_EXT_DLL" "$INSTDIR\$DIFF_EXT_OLD_DLL"
 
-  
-${If} ${RunningX64}
-	File "diff_ext_for_kdiff3_64.dll"
-${Else}
-	File "diff_ext_for_kdiff3.dll"
-${EndIf}
+  File "32bit\diff_ext_for_kdiff3.dll"
 
   SetRegView 64
 
   WriteRegStr HKCU  "Software\KDiff3\diff-ext" "" ""
   WriteRegStr SHCTX "Software\KDiff3\diff-ext" "InstallDir" "$INSTDIR"
   WriteRegStr SHCTX "Software\KDiff3\diff-ext" "diffcommand" "$INSTDIR\kdiff3.exe"
-  WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID"                ""  "diff-ext-for-kdiff3"
+
+  SetRegView 32
+
+  WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID"                ""  "$DIFF_EXT_ID"
   WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID\InProcServer32" ""  "$INSTDIR\$DIFF_EXT_DLL"
   WriteRegStr SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID\InProcServer32" "ThreadingModel" "Apartment"
-  WriteRegStr SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\diff-ext-for-kdiff3" "" "$DIFF_EXT_CLSID"
-  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "$DIFF_EXT_CLSID" "diff-ext-for-kdiff3"
-  WriteRegStr SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\diff-ext-for-kdiff3" "" "$DIFF_EXT_CLSID"
-  WriteRegStr SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\diff-ext-for-kdiff3" "" "$DIFF_EXT_CLSID"
+  WriteRegStr SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "$DIFF_EXT_CLSID" "$DIFF_EXT_ID"
+  WriteRegStr SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
+  WriteRegStr SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\$DIFF_EXT_ID" "" "$DIFF_EXT_CLSID"
 
-  SetRegView 32
 
   File "DIFF-EXT-LICENSE.txt"  
   CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Diff-Ext License.lnk"    "$INSTDIR\DIFF-EXT-LICENSE.txt"
   ; diff_ext_for_kdiff3
 ${If} ${RunningX64}
   StrCpy $DIFF_EXT_CLSID ${DIFF_EXT64_CLSID}
-${Else}
-  StrCpy $DIFF_EXT_CLSID ${DIFF_EXT32_CLSID}
-${EndIf}
+  StrCpy $DIFF_EXT_ID "diff-ext-for-kdiff3-64"
   SetRegView 64
   DeleteRegKey SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID"
-  DeleteRegKey SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\diff-ext-for-kdiff3"
-  DeleteRegKey SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\diff-ext-for-kdiff3"
-  DeleteRegKey SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\diff-ext-for-kdiff3"
+  DeleteRegKey SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
+  DeleteRegKey SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
+  DeleteRegKey SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
   DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "$DIFF_EXT_CLSID"
   SetRegView 32
+${EndIf}
+
+  StrCpy $DIFF_EXT_CLSID ${DIFF_EXT32_CLSID}
+  StrCpy $DIFF_EXT_ID "diff-ext-for-kdiff3"
+  DeleteRegKey SHCTX "Software\Classes\CLSID\$DIFF_EXT_CLSID"
+  DeleteRegKey SHCTX "Software\Classes\*\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
+  DeleteRegKey SHCTX "Software\Classes\Folder\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
+  DeleteRegKey SHCTX "Software\Classes\Directory\shellex\ContextMenuHandlers\$DIFF_EXT_ID"
+  DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "$DIFF_EXT_CLSID"
 
   ; clearcase
   ccInstallHelper::nsisPlugin "uninstall" "$INSTDIR\kdiff3.exe"