# # # patch "ChangeLog" # from [d7a13100a506b347c766e75306666276d8b0a2c9] # to [caaddd1da4a7a3c866a4a1a1c6a07eb8bf213abb] # # patch "Makefile.am" # from [0fe0305dff23eda19e6a9a126865e406c4a49b99] # to [95a955f0412ceabf8b020b17c2d4f8215a7f4e0e] # # patch "win32/monotone.iss" # from [cdea47c809feae66dab4a7ae6e3843503202e3a0] # to [919742aeefbe971205ef26b0fcae127fa3e8c09e] # ============================================================ --- ChangeLog d7a13100a506b347c766e75306666276d8b0a2c9 +++ ChangeLog caaddd1da4a7a3c866a4a1a1c6a07eb8bf213abb @@ -1,3 +1,10 @@ +2006-06-20 Matthew Gregan + + * win32/monotone.iss: Add monotone logo to wizard (generated from + figures/monotone-logo.svg). Sanity check key ID, branch name, and + workspace path. + * Makefile.am: Include win32/modpath.iss in EXTRA_DIST. + 2006-06-20 Nathaniel Smith * INSTALL: Update a little bit, in particular, give a newer boost ============================================================ --- Makefile.am 0fe0305dff23eda19e6a9a126865e406c4a49b99 +++ Makefile.am 95a955f0412ceabf8b020b17c2d4f8215a7f4e0e @@ -422,7 +422,7 @@ contrib/monotone-cvs-ignore.lua \ contrib/usher.cc \ $(wildcard $(srcdir)/examples/*) \ - win32/monotone.iss \ + win32/monotone.iss win32/modpath.iss \ $(wildcard $(srcdir)/debian/*) MAKEINFOFLAGS=-I $(top_builddir) ============================================================ --- win32/monotone.iss cdea47c809feae66dab4a7ae6e3843503202e3a0 +++ win32/monotone.iss 919742aeefbe971205ef26b0fcae127fa3e8c09e @@ -11,10 +11,11 @@ MinVersion=4.0,4.0 OutputDir=. AllowNoIcons=1 -Compression=lzma/fast +Compression=lzma/ultra SolidCompression=yes LicenseFile="..\COPYING" ChangesEnvironment=true +WizardImageFile=monotone.bmp [Files] Source: "..\..\monotone.release\mtn.exe"; DestDir: "{app}"; Flags: ignoreversion @@ -44,61 +45,59 @@ program Setup; var - DBChecked : Boolean; - DBDidntExist : Boolean; - KeyIDPage : TInputQueryWizardPage; - BranchWorkspacePage : TInputQueryWizardPage; + DBChecked: Boolean; + DBDidntExist: Boolean; + KeyIDPage: TInputQueryWizardPage; + BranchWorkspacePage: TInputQueryWizardPage; function InitializeSetup(): Boolean; begin - DBChecked := false; - Result := true; + DBChecked := False; + Result := True; end; -function GetDBPath(db: String) : String; -var - path: String; +function GetDBPath(db: String): String; +var path: String; begin - path := GetShellFolder(false, sfDocs); + path := GetShellFolder(False, sfDocs); path := path + '\monotone\' + db; Result := path; end; -function GetKeyID(Default: String) : String; +function DBDoesntExist(): Boolean; +var path: String; begin - Result := KeyIDPage.Values[0]; + if (DBChecked = True) then + Result := DBDidntExist + else begin + path := GetDBPath('monotone.mtn'); + DBDidntExist := not FileOrDirExists(path); + DBChecked := True; + Result := DBDidntExist; + end; end; -function GetBranchName(Default: String) : String; +function ForceDBPath(db: String): String; +var path: String; begin - Result := BranchWorkspacePage.Values[0]; + path := GetDBPath(''); + ForceDirectories(path); + Result := path + db; end; -function GetWorkspacePath(Default: String) : String; +function GetKeyID(Default: String): String; begin - Result := BranchWorkspacePage.Values[1]; + Result := KeyIDPage.Values[0]; end; -function DBDoesntExist() : Boolean; -var - path: String; +function GetBranchName(Default: String): String; begin - if (DBChecked) then begin - Result := DBDidntExist; - exit; - end; - path := GetDBPath('monotone.mtn'); - DBDidntExist := not FileOrDirExists(path); - DBChecked := true; - Result := DBDidntExist; + Result := BranchWorkspacePage.Values[0]; end; -function ForceDBPath(db: String) : String; -var path: String; +function GetWorkspacePath(Default: String): String; begin - path := GetDBPath(''); - ForceDirectories(path); - Result := path + db; + Result := BranchWorkspacePage.Values[1]; end; procedure InitializeWizard; @@ -122,9 +121,30 @@ else if (IsTaskSelected('initdb\createws') = False) and (PageID = BranchWorkspacePage.ID) then Result := True else - Result := False + Result := False; end; +function NextButtonClick(CurPageID: Integer): Boolean; +begin + if CurPageID = KeyIDPage.ID then begin + if KeyIDPage.Values[0] = '' then begin + MsgBox('You must enter a valid key ID', mbError, MB_OK); + Result := False; + end else + Result := True; + end else if CurPageId = BranchWorkspacePage.ID then begin + if BranchWorkspacePage.Values[0] = '' then begin + MsgBox('You must enter a valid branch name', mbError, MB_OK); + Result := False; + end else if BranchWorkspacePage.Values[1] = '' then begin + MsgBox('You must enter a valid workspace path', mbError, MB_OK); + Result := False; + end else + Result := True; + end else + Result := True; +end; + function ModPathDir(): String; begin Result := ExpandConstant('{app}');