[Winmerge-svn] SF.net SVN: winmerge:[6035] branches/R2_10
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <sdo...@us...> - 2008-10-23 22:13:59
|
Revision: 6035 http://winmerge.svn.sourceforge.net/winmerge/?rev=6035&view=rev Author: sdottaka Date: 2008-10-23 22:13:48 +0000 (Thu, 23 Oct 2008) Log Message: ----------- TODO: [ 1460517 ] Use default settings from HKLM in registry Fixed the following problems: 1) After installing WinMerge, WinMerge's interface language is not Japanese but English. 2) WinMerge icon is not shown on Quick Launch bar. 3) After uninstalling WinMerge, the registry key 'HKEY_CURRENT_USER/Software/Thingamahoochie/WinMerge' is not deleted. 4) and I also noticed that TortoiseCVS and TortoiseSVN integrations have not been worked now. Modified Paths: -------------- branches/R2_10/Docs/Users/ChangeLog.txt branches/R2_10/Installer/InnoSetup/WinMerge.iss branches/R2_10/Src/OptionsInit.cpp Modified: branches/R2_10/Docs/Users/ChangeLog.txt =================================================================== --- branches/R2_10/Docs/Users/ChangeLog.txt 2008-10-23 21:54:49 UTC (rev 6034) +++ branches/R2_10/Docs/Users/ChangeLog.txt 2008-10-23 22:13:48 UTC (rev 6035) @@ -9,6 +9,8 @@ BugFix: Wrong cursor position when disabling selection margin (#2138555) BugFix: Showed a black line when disabling selection margin (#2068790) BugFix: Fix manual URL in Readme.txt (#2181628) + BugFix: There were some installer regressions + (eg. Installer didn't create Quick Launch icon) (#1460517) New translation: Galician (#2120685) Translation updates: - Ukrainian (#2131753) Modified: branches/R2_10/Installer/InnoSetup/WinMerge.iss =================================================================== --- branches/R2_10/Installer/InnoSetup/WinMerge.iss 2008-10-23 21:54:49 UTC (rev 6034) +++ branches/R2_10/Installer/InnoSetup/WinMerge.iss 2008-10-23 22:13:48 UTC (rev 6035) @@ -309,6 +309,7 @@ Name: {group}\{cm:UsersGuide}.lnk; Type: files; Check: not IsComponentSelected('Docs') ;This removes the quick launch icon in case the user chooses not to install it after previously having it installed +Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\WinMerge.lnk; Type: files; Check: not IsTaskSelected('QuickLauchIcon') Name: {commonappdata}\Microsoft\Internet Explorer\Quick Launch\WinMerge.lnk; Type: files; Check: not IsTaskSelected('QuickLauchIcon') ;This removes the desktop icon in case the user chooses not to install it after previously having it installed @@ -452,9 +453,11 @@ Name: {commondesktop}\WinMerge; Filename: {app}\{code:ExeName}; Tasks: desktopicon ;Quick Launch Icon -Name: {commonappdata}\Microsoft\Internet Explorer\Quick Launch\WinMerge; Filename: {app}\{code:ExeName}; Tasks: quicklaunchicon +Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\WinMerge; Filename: {app}\{code:ExeName}; Tasks: quicklaunchicon [Registry] +Root: HKCU; Subkey: Software\Thingamahoochie; Flags: uninsdeletekeyifempty +Root: HKCU; Subkey: Software\Thingamahoochie\WinMerge; Flags: uninsdeletekey Root: HKLM; Subkey: Software\Thingamahoochie; Flags: uninsdeletekeyifempty Root: HKLM; Subkey: Software\Thingamahoochie\WinMerge; Flags: uninsdeletekey @@ -498,20 +501,20 @@ Root: HKLM; SubKey: Software\Thingamahoochie\WinMerge; ValueType: dword; ValueName: ContextMenuEnabled; ValueData: 1; Tasks: ShellExtension; Check: not ShellMenuEnabled() ;If WinMerge.exe is installed then we'll automatically configure WinMerge as the differencing application -Root: HKLM; SubKey: Software\TortoiseCVS; ValueType: string; ValueName: External Diff Application; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS; ValueType: dword; ValueName: DiffAsUnicode; ValueData: $00000001; Flags: uninsdeletevalue; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS\Prefs\External Diff Application; ValueType: string; ValueName: _; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS\Prefs\External Diff2 Params; ValueType: string; ValueName: _; ValueData: """%1"" ""%2"""; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS; ValueType: string; ValueName: External Diff Application; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS; ValueType: dword; ValueName: DiffAsUnicode; ValueData: $00000001; Flags: uninsdeletevalue; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS\Prefs\External Diff Application; ValueType: string; ValueName: _; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS\Prefs\External Diff2 Params; ValueType: string; ValueName: _; ValueData: """%1"" ""%2"""; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS ;Tells TortoiseCVS to use WinMerge as its differencing application (this happens whether or not Tortoise is current installed, that way ;if it is installed at a later date this will automatically support it) -Root: HKLM; SubKey: Software\TortoiseCVS; ValueType: string; ValueName: External Merge Application; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS; ValueType: dword; ValueName: MergeAsUnicode; ValueData: $00000001; Flags: uninsdeletevalue; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS\Prefs\External Merge Application; ValueType: string; ValueName: _; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS -Root: HKLM; SubKey: Software\TortoiseCVS\Prefs\External Merge2 Params; ValueType: string; ValueName: _; ValueData: """%mine"" ""%yours"""; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS; ValueType: string; ValueName: External Merge Application; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS; ValueType: dword; ValueName: MergeAsUnicode; ValueData: $00000001; Flags: uninsdeletevalue; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS\Prefs\External Merge Application; ValueType: string; ValueName: _; ValueData: {app}\{code:ExeName}; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS +Root: HKCU; SubKey: Software\TortoiseCVS\Prefs\External Merge2 Params; ValueType: string; ValueName: _; ValueData: """%mine"" ""%yours"""; Flags: uninsdeletevalue dontcreatekey; Tasks: TortoiseCVS ;Set WinMerge as TortoiseSVN diff tool -Root: HKLM; SubKey: Software\TortoiseSVN; ValueType: string; ValueName: Diff; ValueData: {app}\{code:ExeName} -e -x -ub -dl %bname -dr %yname %base %mine; Flags: uninsdeletevalue; Tasks: TortoiseSVN +Root: HKCU; SubKey: Software\TortoiseSVN; ValueType: string; ValueName: Diff; ValueData: {app}\{code:ExeName} -e -x -ub -dl %bname -dr %yname %base %mine; Flags: uninsdeletevalue; Tasks: TortoiseSVN ;Whatever the user chooses at the [Select Setup Language] dialog should also determine what language WinMerge will start up in ;(unless the user already has a startup language specified) Modified: branches/R2_10/Src/OptionsInit.cpp =================================================================== --- branches/R2_10/Src/OptionsInit.cpp 2008-10-23 21:54:49 UTC (rev 6034) +++ branches/R2_10/Src/OptionsInit.cpp 2008-10-23 22:13:48 UTC (rev 6035) @@ -16,8 +16,8 @@ // Functions to copy values set by installer from HKLM to HKCU. static void CopyHKLMValues(); -static bool OpenHKLM(HKEY *key); -static bool OpenHKCU(HKEY *key); +static bool OpenHKLM(HKEY *key, LPCTSTR relpath = NULL); +static bool OpenHKCU(HKEY *key, LPCTSTR relpath = NULL); static bool IsFirstRun(HKEY key); static void CopyFromLMtoCU(HKEY lmKey, HKEY cuKey, LPCTSTR valname); static void ResetFirstRun(HKEY key); @@ -234,23 +234,34 @@ { CopyFromLMtoCU(LMKey, CUKey, _T("ContextMenuEnabled")); CopyFromLMtoCU(LMKey, CUKey, _T("Executable")); - CopyFromLMtoCU(LMKey, CUKey, _T("Locale\\LanguageId")); RegCloseKey(CUKey); } RegCloseKey(LMKey); } + if (OpenHKLM(&LMKey, _T("Locale"))) + { + if (OpenHKCU(&CUKey, _T("Locale"))) + { + CopyFromLMtoCU(LMKey, CUKey, _T("LanguageId")); + RegCloseKey(CUKey); + } + RegCloseKey(LMKey); + } } /** * @brief Open HKLM registry key. * @param [out] key Pointer to open HKLM key. + * @param [in] relative registry path to open. * @return true if opening succeeded. */ -static bool OpenHKLM(HKEY *key) +static bool OpenHKLM(HKEY *key, LPCTSTR relpath) { + TCHAR valuename[256] = _T("Software\\Thingamahoochie\\WinMerge\\"); + if (relpath) + lstrcat(valuename, relpath); LONG retval = RegOpenKeyEx(HKEY_LOCAL_MACHINE, - _T("Software\\Thingamahoochie\\WinMerge\\"), - 0, KEY_READ, key); + valuename, 0, KEY_READ, key); if (retval == ERROR_SUCCESS) { return true; @@ -262,13 +273,16 @@ * @brief Open HKCU registry key. * Opens the HKCU key for WinMerge. If the key does not exist, creates one. * @param [out] key Pointer to open HKCU key. + * @param [in] relative registry path to open. * @return true if opening succeeded. */ -static bool OpenHKCU(HKEY *key) +static bool OpenHKCU(HKEY *key, LPCTSTR relpath) { + TCHAR valuename[256] = _T("Software\\Thingamahoochie\\WinMerge\\"); + if (relpath) + lstrcat(valuename, relpath); LONG retval = RegOpenKeyEx(HKEY_CURRENT_USER, - _T("Software\\Thingamahoochie\\WinMerge\\"), - 0, KEY_ALL_ACCESS, key); + valuename, 0, KEY_ALL_ACCESS, key); if (retval == ERROR_SUCCESS) { return true; @@ -276,8 +290,7 @@ else if (retval == ERROR_FILE_NOT_FOUND) { retval = RegCreateKeyEx(HKEY_CURRENT_USER, - _T("Software\\Thingamahoochie\\WinMerge\\"), - 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL); + valuename, 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL); if (retval == ERROR_SUCCESS) return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |