diff --git a/contrib/win32/mercurial.ini b/contrib/win32/mercurial.ini --- a/contrib/win32/mercurial.ini +++ b/contrib/win32/mercurial.ini @@ -5,6 +5,13 @@ [ui] editor = notepad +; show changed files and be a bit more verbose if True +; verbose = True + +; username data to appear in commits +; it usually takes the form: Joe User +; username = Joe User + ; By default, we try to encode and decode all files that do not ; contain ASCII NUL characters. What this means is that we try to set @@ -37,5 +44,6 @@ hgext.win32text = ; Alternatively, you can explicitly specify each file extension that ; you want decoded (any you omit will be left untouched), like this: +; **.txt = dumbdecode: -; **.txt = dumbdecode: + diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss --- a/contrib/win32/mercurial.iss +++ b/contrib/win32/mercurial.iss @@ -1,8 +1,7 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - [Setup] -AppCopyright=Copyright 2005-2008 Matt Mackall and others +AppCopyright=Copyright 2005-2009 Matt Mackall and others AppName=Mercurial AppVerName=Mercurial snapshot InfoAfterFile=contrib/win32/postinstall.txt @@ -18,7 +17,7 @@ OutputBaseFilename=Mercurial-snapshot DefaultDirName={pf}\Mercurial SourceDir=..\.. VersionInfoDescription=Mercurial distributed SCM -VersionInfoCopyright=Copyright 2005-2008 Matt Mackall and others +VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others VersionInfoCompany=Matt Mackall and others InternalCompressLevel=max SolidCompression=true @@ -32,7 +31,8 @@ Source: contrib\mercurial.el; DestDir: { Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim Source: contrib\zsh_completion; DestDir: {app}/Contrib Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme -Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite +Source: contrib\mergetools.hgrc; DestDir: {tmp}; +Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') Source: dist\library.zip; DestDir: {app} @@ -64,8 +64,32 @@ Filename: "{app}\add_path.exe"; Paramete [UninstallDelete] Type: files; Name: "{app}\hg.exe.local" +[Code] +var + WriteFile: Boolean; + CheckDone: Boolean; -[Code] +function CheckFile(): Boolean; +begin + if not CheckDone then begin + WriteFile := True; + if FileExists(ExpandConstant(CurrentFileName)) then begin + WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; + end; + CheckDone := True; + end; + Result := WriteFile; +end; + +procedure ConcatenateFiles(); +var + MergeConfigs: TArrayOfString; +begin + if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin + SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); + end; +end; + procedure Touch(fn: String); begin SaveStringToFile(ExpandConstant(fn), '', False);