[Winmerge-svn] SF.net SVN: winmerge: [5158] trunk
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <ge...@us...> - 2008-03-17 21:47:11
|
Revision: 5158 http://winmerge.svn.sourceforge.net/winmerge/?rev=5158&view=rev Author: gerundt Date: 2008-03-17 14:46:54 -0700 (Mon, 17 Mar 2008) Log Message: ----------- PATCH: [ 1913949 ] Installer: Simplify DeletePreviousStartMenu() function Modified Paths: -------------- trunk/Docs/Users/ChangeLog.txt trunk/Installer/InnoSetup/WinMerge.iss Modified: trunk/Docs/Users/ChangeLog.txt =================================================================== --- trunk/Docs/Users/ChangeLog.txt 2008-03-17 21:40:21 UTC (rev 5157) +++ trunk/Docs/Users/ChangeLog.txt 2008-03-17 21:46:54 UTC (rev 5158) @@ -4,6 +4,7 @@ WinMerge 2.9.0.1 Installer: Use correct way to create start menu web link (#1913919) + Installer: Simplify DeletePreviousStartMenu() function (#1913949) BugFix: Installer could create a registry access error (#1909967) BugFix: The filter text box in Open-dialog sometimes displayed some garbage data (#1915424) Modified: trunk/Installer/InnoSetup/WinMerge.iss =================================================================== --- trunk/Installer/InnoSetup/WinMerge.iss 2008-03-17 21:40:21 UTC (rev 5157) +++ trunk/Installer/InnoSetup/WinMerge.iss 2008-03-17 21:46:54 UTC (rev 5158) @@ -854,58 +854,24 @@ StringChange(strNew, ExpandConstant('{commonprograms}\'), '') {if the user does have a previous start menu location then..} - If strOld <> '' THen + If strOld <> '' Then Begin {If the current and previous start menu locations are different then...} - If Uppercase(strOld) <> UpperCase(strNew) Then - Begin - strMessage := ExpandConstant('{cm:DeletePreviousStartMenu}'); + If Uppercase(strOld) <> UpperCase(strNew) Then + Begin + strMessage := ExpandConstant('{cm:DeletePreviousStartMenu}'); strMessage := Format(strMessage, [strOld, strNew]); - {Display a dialog asking the user if they'd like to delete the previous start menu group} - {If they'd like to delete the previous start menu group then...} - If Msgbox(strMessage, mbConfirmation, mb_YesNo) = mrYes Then - Begin - strOld := ExpandConstant('{commonprograms}\') + strOld; - - {Removes each of the start menu icons to make the folder empty} - strShortcut := strOld + '\' + ExpandConstant('{cm:ReadMe}') + '.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\Read Me.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\' + ExpandConstant('{cm:UninstallProgram,WinMerge}') + '.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\Uninstall WinMerge.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\' + ExpandConstant('{cm:UsersGuide}') + '.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\User''s Guide.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\' + ExpandConstant('{cm:ProgramOnTheWeb,WinMerge}') + '.url'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\Winmerge on the Web.lnk'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\Winmerge on the Web.url'; - DeleteFile(strShortcut) - - strShortcut := strOld + '\WinMerge.lnk'; - DeleteFile(strShortcut) - - {Deletes the empty start menu directory (This has to already be empty in order for this to work, hence the - file deletions above)} - RemoveDir(strOld) - end; - {end; } - end; - end; + {Display a dialog asking the user if they'd like to delete the previous start menu group} + {If they'd like to delete the previous start menu group then...} + If Msgbox(strMessage, mbConfirmation, mb_YesNo) = mrYes Then + Begin + strOld := ExpandConstant('{commonprograms}\') + strOld; + {Remove old start menu} + DelTree(strOld, True, True, True); + End; + End; + End; End; {This event procedure is queed each time the user changes pages within the installer} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |