# # # patch "ChangeLog" # from [d263769707ff0a4da4b9d79ad629a3d79c1ca4ff] # to [5562dfcc729751c89c067fea6a850d151af192e6] # # patch "win32/monotone.iss" # from [6f1eb7fc98cad33c5d977477328195d7fb3b061c] # to [cbffbd9503da1d99c17d65ea9d53037ae9c4be8c] # ============================================================ --- ChangeLog d263769707ff0a4da4b9d79ad629a3d79c1ca4ff +++ ChangeLog 5562dfcc729751c89c067fea6a850d151af192e6 @@ -1,3 +1,11 @@ +2006-12-18 Matthew Gregan + + * win32/monotone.iss: Don't ask the user a bunch of questions + about repositories, keys, branches, and workspaces at a point + where they might not know the answers. Based on feedback from new + users on Win32, a simpler installer UI with an option to read the + documentation after the install is the way to go. + 2006-12-18 Matt Johnston * work.cc (get_revision_id): check that the workspace revision ============================================================ --- win32/monotone.iss 6f1eb7fc98cad33c5d977477328195d7fb3b061c +++ win32/monotone.iss cbffbd9503da1d99c17d65ea9d53037ae9c4be8c @@ -26,125 +26,16 @@ Source: "\mingw\bin\zlib1.dll"; DestDir: Source: "\mingw\bin\zlib1.dll"; DestDir: "{app}" [Tasks] -Name: initdb; Description: "Initialise a new database"; GroupDescription: "Get up and running"; Check: DBDoesntExist -Name: initdb\genkey; Description: "Generate a key for use with monotone"; GroupDescription: "Get up and running"; Check: DBDoesntExist -Name: initdb\createws; Description: "Create an initial workspace"; GroupDescription: "Get up and running"; Check: DBDoesntExist Name: modifypath; Description: "Add monotone to your path"; GroupDescription: "Get up and running"; Flags: unchecked Name: viewdocs; Description: "View the monotone documentation"; GroupDescription: "Get up and running" [Run] -Filename: "{app}\mtn.exe"; Tasks: initdb; StatusMsg: "Initialising database..."; WorkingDir: "{app}"; Parameters: "--db=""{code:ForceDBPath|monotone.mtn}"" db init" -Filename: "{app}\mtn.exe"; Tasks: initdb\genkey; StatusMsg: "Generating key..."; Flags: hidewizard; WorkingDir: "{app}"; Parameters: "--db=""{code:ForceDBPath|monotone.mtn}"" genkey {code:GetKeyID}" -Filename: "{app}\mtn.exe"; Tasks: initdb\createws; StatusMsg: "Creating inital workspace..."; WorkingDir: "{app}"; Parameters: "--db=""{code:ForceDBPath|monotone.mtn}"" --branch=""{code:GetBranchName}"" setup ""{code:GetWorkspacePath}""" Filename: "{app}\documentation\index.html"; Tasks: viewdocs; Flags: shellexec nowait; WorkingDir: "{app}\documentation" [Icons] Name: "{group}\monotone documentation"; Filename: "{app}\documentation\index.html"; WorkingDir: "{app}" [Code] -program Setup; - -var - DBChecked: Boolean; - DBDidntExist: Boolean; - KeyIDPage: TInputQueryWizardPage; - BranchWorkspacePage: TInputQueryWizardPage; - -function InitializeSetup(): Boolean; -begin - DBChecked := False; - Result := True; -end; - -function GetDBPath(db: String): String; -var path: String; -begin - path := GetShellFolder(False, sfDocs); - path := path + '\monotone\' + db; - Result := path; -end; - -function DBDoesntExist(): Boolean; -var path: String; -begin - if (DBChecked = True) then - Result := DBDidntExist - else begin - path := GetDBPath('monotone.mtn'); - DBDidntExist := not FileOrDirExists(path); - DBChecked := True; - Result := DBDidntExist; - end; -end; - -function ForceDBPath(db: String): String; -var path: String; -begin - path := GetDBPath(''); - ForceDirectories(path); - Result := path + db; -end; - -function GetKeyID(Default: String): String; -begin - Result := KeyIDPage.Values[0]; -end; - -function GetBranchName(Default: String): String; -begin - Result := BranchWorkspacePage.Values[0]; -end; - -function GetWorkspacePath(Default: String): String; -begin - Result := BranchWorkspacePage.Values[1]; -end; - -procedure InitializeWizard; -begin - KeyIDPage := CreateInputQueryPage(wpSelectTasks, 'Key ID', 'Key ID for use with monotone', - 'Which email address should your key be generated with?'); - KeyIDPage.Add('Key ID:', False); - - BranchWorkspacePage := CreateInputQueryPage(KeyIDPage.ID, 'Workspace initialisation', - 'Workspace path and branch name', - 'What branch name and workspace path would you' - + ' like to use for your initial workspace?'); - BranchWorkspacePage.Add('Branch name:', False); - BranchWorkspacePage.Add('Workspace path:', False); -end; - -function ShouldSkipPage(PageID: Integer): Boolean; -begin - if (IsTaskSelected('initdb\genkey') = False) and (PageID = KeyIDPage.ID) then - Result := True - else if (IsTaskSelected('initdb\createws') = False) and (PageID = BranchWorkspacePage.ID) then - Result := True - else - 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}');