Robert Collins [Sat, 26 Jul 2003 09:16:51 +0000 (09:16 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Save used local cache dir from initial run of setup, so the user doesn't
need to retype it.
* localdir.h (LocalDirSetting): UserSetting class for the local cache dir.
* localdir.cc (LocalDirSetting::save): Replace save_local_dir, and update callers.
Robert Collins [Sat, 26 Jul 2003 09:01:35 +0000 (09:01 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Save used site from initial run of setup, so the user doesn't need to
retype it.
* main.cc (main): Load and save all user settings.
* site.cc (SiteSetting::save): Migrate logic from save_site_url.
(SitePage::OnNext): Use ChosenSites.save() to remove uneeded save_site_url call.
(save_site_url): Delete.
* site.h (save_site_url): Remove declaration.
* .cvsignore: Update autoconf generated files.
Robert Collins [Sat, 26 Jul 2003 07:08:44 +0000 (07:08 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* tests/Makefile.am: Driver for test suite.
* tests/UserSettingTest.cc: Test UserSetting interface.
* tests/UserSettingsTest.cc: Test UserSettings interface.
* Makefile.am: Add the tests dir to recurse into.
* configure.in: Ditto.
* UserSetting.h: Add load and save methods to allow global serialisation.
Add explicit copy and assignment operators to prevent synthetics.
Make the constructor protected to prevent direct instantiation.
* UserSettings.h (UserSettings::loadAllSettings): New method.
(UserSettings::savedAllSettings): New method.
* UserSettings.cc: Implement new methods.
* site.cc: Implement stubs for new required UserSetting methods.
* site.h (ChosenSite): Ditto.
* Ran automake.
Robert Collins [Sat, 26 Jul 2003 07:08:43 +0000 (07:08 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* tests/Makefile.am: Driver for test suite.
* tests/UserSettingTest.cc: Test UserSetting interface.
* tests/UserSettingsTest.cc: Test UserSettings interface.
* Makefile.am: Add the tests dir to recurse into.
* configure.in: Ditto.
* UserSetting.h: Add load and save methods to allow global serialisation.
Add explicit copy and assignment operators to prevent synthetics.
Make the constructor protected to prevent direct instantiation.
* UserSettings.h (UserSettings::loadAllSettings): New method.
(UserSettings::savedAllSettings): New method.
* UserSettings.cc: Implement new methods.
* site.cc: Implement stubs for new required UserSetting methods.
* site.h (ChosenSite): Ditto.
* Ran automake.
Max Bowsher [Sat, 19 Jul 2003 09:29:54 +0000 (09:29 +0000)]
2003-07-18 Max Bowsher <maxb@ukf.net>
* res.rc: Make caption of every dialog page begin with "Cygwin Setup".
This aids recognition when minimized.
Prompted by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>.
Max Bowsher [Sun, 22 Jun 2003 21:30:54 +0000 (21:30 +0000)]
2003-06-22 Max Bowsher <maxb@ukf.net>
* Makefile.am: Clarify comment.
Derive AM_CFLAGS from AM_CXXFLAGS, rather than the other way around.
(AM_CXXFLAGS): Remove -Wmissing-declarations - it is a C-only warning.
(AM_CFLAGS): Add -Winline, and -Wmissing-declarations.
Robert Collins [Sat, 12 Apr 2003 13:18:53 +0000 (13:18 +0000)]
2003-04-12 Robert Collins <rbtcollins@hotmail.com>
* postinstall.cc (RunScript::operator()): Use new run syntax.
* script.h (Script::run): Eliminate to_log parameter.
* script.cc (Script::run): Ditto.
(run_script): Use new run syntax.
Robert Collins [Sat, 12 Apr 2003 00:39:37 +0000 (00:39 +0000)]
2003-04-12 Robert Collins <rbtcollins@hotmail.com>
* PickCategoryLine.cc (PickCategoryLine::click): Tell packagemeta we
are about to perform a visit.
* PickPackageLine.cc (PickPackageLine::click): Tell packagemeta we
are about to perform a visit.
* package_db.cc (packagedb::markUnVisited): Convenience wrapper -
mark all packages as unvisited.
* package_db.h (packagedb::markUnVisited): Declare.
* package_meta.cc (packagemeta::PrepareForVisit): New static method
to prepare for a loop-free visit.
(packagemeta::packagemeta): Adjust for new member.
(packagemeta::set_requirements): Only visit a node once.
(packagemeta::visited): Get and Set methods for new member visited_.
* package_meta.h (packagemeta::PrepareForVisit): Declare.
(packagemeta::visited): Declare.
(packagemeta::visited_): Declare.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultDACL): Adjust commented code for auto_ptr use.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::NoteFailedAPI): Helper function.
Use throughout NTSecurity routines.
(NTSecurity::setDefaultDACL): Use dynamic memory for ACL storage.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultDACL): Disable ~ 50% of remaining active code.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::GroupInfo): Extract group query code.
(NTSecurity::setDefaultDACL): Disable ~ 50% of code.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Disable ~ 50% of security code.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Remove double declaration of sz.
User TokenGroupCollection to abstract token searching logic, eliminate isadmin
and isuser temporary variables.
(TokenGroupCollection): New class for querying token group information.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Extract esid initialisation.
Move local variables to just before first use.
SetTokenInformationFailures where being handled inconsistently.
Remove assignments from if statements.
(NTSecurity::esid): Rename to everyOneSID.
(NTSecurity::initialiseEveryOneSID): new method.
(NTSecurity::setDefaultDACL): Extract method for default DACL logic.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (SIDWrapper): Manage SID memory.
(HANDLEWrapper): Likewise for HANDLES.
(NTSecurity): Worker class for set_default_sec().
(set_default_sec): Move body into NTSecurity::setDefaultSecurity().
(NTSecurity::setDefaultSecurity): Eliminate goto out: via memory managing objects.
Robert Collins [Wed, 26 Mar 2003 10:02:04 +0000 (10:02 +0000)]
2003-03-26 Robert Collins <rbtcollins@hotmail.com>
* package_version.cc (_defaultversion::accessible): Override and make always false.
(_packageversion::accessible): Fix a couple of logic bugs resulting in incorrect trues.
* package_version.h (_packageversion::accessible): Make virtual.
Max Bowsher [Tue, 25 Mar 2003 20:57:13 +0000 (20:57 +0000)]
2003-03-25 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* threebar.h (WM_APP_START_POSTINSTALL): New message.
(WM_APP_POSTINSTALL_THREAD_COMPLETE): New message.
* threebar.cc (ThreeBarProgressPage::OnMessageApp):
Add handling for WM_APP_START_POSTINSTALL and
WM_APP_POSTINSTALL_THREAD_COMPLETE.
* install.cc (do_install_thread): Set next_dialog to
IDD_S_POSTINSTALL.
* desktop.cc (DesktopSetupPage::OnFinish): Move the
do_postinstall call to ThreeBarProgressPage::OnMessageApp.
* script.h (Script::fullName): New member function.
(Script::run): New member function.
(Script::ETCPostinstall): New static member constant.
* script.cc (Script::fullName): Implement.
(Script::run): Implement.
(Script::ETCPostinstall): Define.
(Script::isAScript): Use ETCPostinstall instead of a
hardcoded string constant.
(run): Enable "#if 0"'d code.
* postinstall.cc (Progress): New extern variable.
(RunFindVisitor::visitFile): Add script to vector
instead of running.
(RunFindVisitor::_scripts): New member variable.
(RunScript): New helper class for use in for_each.
(do_postinstall_thread): Rename do_postinstall to. Add
Progress bar and text setting. Add package count.
(do_postinstall_reflector): New static function.
(do_postinstall): Rename to do_postinstall_thread.
Create a thread instead.
Max Bowsher [Thu, 20 Mar 2003 10:02:51 +0000 (10:02 +0000)]
2003-03-18 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* script.cc (run): Add file_out parameter.
Redirect output of subprocess to file, creating the
path if necessary. Minimize the script window.
(run_script): Add optional to_log boolean parameter.
If to_log, redirect output to temporary file and then
import it into LOG_BABBLE.
(OutputLog): New helper class.
(operator<<): New operation on OutputLog.
* script.h (run_script): Add optional to_log parameter.
* postinstall.cc (RunFindVisitor::visitFile): Instruct
run_script() to log script output.
(do_postinstall): Ditto.
Robert Collins [Wed, 19 Mar 2003 00:14:46 +0000 (00:14 +0000)]
2003-03-19 Robert Collins <rbtcollins@hotmail.com>
* configure.in: Bump version number.
* Makefile.am: Add DefaultFormatter.h to installed files.
* src/OptionSet.cc (OptionSet::ParameterUsage): Use new
default DefaultFormatter to format parameters.
* include/getopt++/OptionSet.h: Update copyright.
* include/getopt++/DefaultFormatter.h: Format the help from an Option.
* tests/testoption.cc: Include a -h|--help option to test help
formatting.
Insert copyright statement.
* tests/optioniterator.cc: Insert copyright statement.
Max Bowsher [Tue, 18 Mar 2003 22:43:15 +0000 (22:43 +0000)]
2003-03-18 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* postinstall.cc (do_postinstall): Filter out '*.done'.
* FilterVisitor.h: New header file. Declare the
FilterVisitor, Filter, and ExcludeNameFilter classes.
* FilterVisitor.cc: New file. Implement FilterVisitor,
Filter, and ExcludeNameFilter.
* String++.h (String::matches): New instance function.
* String++.cc (String::matches): Implement.
(strmatch) Import and adapt for <buf,len> strings.
* Makefile.am (setup_SOURCES): Add FilterVisitor.cc and
FilterVisitor.h to value.
Max Bowsher [Tue, 18 Mar 2003 14:53:09 +0000 (14:53 +0000)]
2002-03-18 Max Bowsher <maxb@ukf.net>
* LogFile.cc (LogFile::exit): Use CRT exit() instead of ExitProcess().
Use passed exit_code even if been_here.
Remove incorrect _CYGWIN_ preprocessor conditional.
Robert Collins [Tue, 18 Mar 2003 10:24:14 +0000 (10:24 +0000)]
2003-03-18 Robert Collins <rbtcollins@hotmail.com>
* include/getopt++/OptionSet.h (OptionSet): Convert to use a vector.
* src/OptionSet.cc: Convert array to vector use throughout.
(OptionSet::optionsInSet): Implement external access to the available
options.
Robert Collins [Mon, 17 Mar 2003 22:23:33 +0000 (22:23 +0000)]
2003-03-16 Robert Collins <rbtcollins@hotmail.com>
* package_db.h (PackageDBConnectedIterator): Typedef for connected loop detection collection iterator.
* package_db.cc (ConnectedLoopDetector): An implementation of R.E. Tarjans strongly connected set visitor algorithm.
* postinstall.cc (do_postinstall): Use the new iterator for visiting postinstall scripts.
2003-03-16 Robert Collins <rbtcollins@hotmail.com>
* install.cc: Introduce Installer class.
(init_dialog): Rename to Installer::initDialog.
(progress): Rename to Installer::progress.
(standard_dirs): Rename to Installer::StandardDirs.
(uninstall_one): Rename to Installer::uninstallOne.
(replace_one): Rename to Installer::replaceOne.
(log_ror_failure): Rename to Installer::replaceOnRebootFailed.
(log_ror_success): Rename to Installer::replaceOnRebootSucceeded.
(install_one_source): Rename to Installer::installOneSource.
Note script files as they are installed.
* package_version.cc (packageversion::addScript): Implement.
(packageversion::scripts): Implement.
* package_version.h (packageversion::addScript): Record the presence of a script.
* script.h (Script): New class to track scripts.
* postinstall.cc (do_postinstall): Iterate through the package listed scripts before searching for scripts.
* String++.cc (String::substr): Second argument needed to be signed.
* String++.h (String::substr): Second argument needed to be signed.
Max Bowsher [Fri, 14 Mar 2003 00:10:53 +0000 (00:10 +0000)]
2003-03-14 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* install.cc (install_one_source): Add logging for successful
replace-on-reboot scheduling. Factor out duplicate code.
Set rebootneeded on Win9x.
(log_ror_failure): New static function.
(log_ror_success): New static function.
Robert Collins [Wed, 12 Mar 2003 22:15:25 +0000 (22:15 +0000)]
2003-03-13 Robert Collins <rbtcollins@hotmail.com>
* install.cc (do_install_thread): Use a query method rather than temp variable do_skip.
2003-03-09 Pavel Tsekov <ptsekov at gmx dot net>
* install.cc (do_install_thread): Use IDS_SKIP_PACKAGE
instead of IDS_CORRUPT_PACKAGE when asking the user to take
action if the hash verification check fails for a source package.
Do not increase the value of 'total_bytes' variable if the
user chooses to skip over a package, which failed the hash
verification.
Robert Collins [Mon, 10 Mar 2003 08:50:16 +0000 (08:50 +0000)]
2003-03-10 Robert Collins <rbtcollins@hotmail.com>
* Exception.h: Add a logic error exception id.
* Makefile.am: Add new sources.
* UserSettings.cc: New file.
* UserSettings.h: New file.
* UserSetting.cc: New file.
* UserSetting.h: New file.
* site.h: Add a SiteSetting as example of a UserSetting.
* site.cc (ChosenSites): Add a instance of SiteSetting to trigger registration.
Robert Collins [Sun, 9 Mar 2003 02:17:49 +0000 (02:17 +0000)]
2003-03-09 Robert Collins <rbtcollins@hotmail.com>
* package_version.cc (_defaultversion::pick(bool)): Override this and do nothing.
(packageversion::pick(bool): Use a mutator function rather than direct member access.
* package_version.h (_packageversion::pick(bool)): Move method from _packageversion.
Robert Collins [Sun, 9 Mar 2003 01:39:42 +0000 (01:39 +0000)]
2003-02-16 Pavel Tsekov <ptsekov@gmx.net>
* install.cc (install_one_source): Remove the MD5 verification
code.
Delay the creation of the package listing file.
(do_install_thread): Check the hashes for packages which need
to be installed before the uninstall step. Allow the user to
skip over packages, which fail the hash verification.
(md5_one): Define new function.
* res.rc (IDS_SKIP_PACKAGE): New string resource.
* resource.h (IDS_SKIP_PACKAG): New macro definition.
Robert Collins [Sun, 9 Mar 2003 01:28:52 +0000 (01:28 +0000)]
2003-02-16 Pavel Tsekov <ptsekov@gmx.net>
* Exception.h: Declare new constructor.
(Exception::_message): Change the type from 'const char *' to
'class String'.
(Exception::~Exception): Implement destructor (make gcc shut up).
* Exception.cc: Implement new constructor.
(Exception::what): Use String::cstr_oneuse ().
* download.cc (validateCachedPackage): Use the constructor, which
takes String& as its second argument, when throwing objects
of type Exception.
(check_for_cached): Ditto.
* install.cc (install_one_source): Ditto.
Max Bowsher [Fri, 7 Mar 2003 22:25:31 +0000 (22:25 +0000)]
2003-03-05 Max Bowsher <maxb@ukf.net>
* netio.cc (save_dialog): Allocate an empty string if the password is
null, so that an empty password is accepted elsewhere in setup.
(check_if_enable_ok): An empty password is OK.
Max Bowsher [Wed, 5 Mar 2003 00:53:05 +0000 (00:53 +0000)]
2003-03-05 Brian Keener <bkeener@thesoftwaresource.com>
* PickView.cc (PickView::views): Add two new views for Skipped
packages and Installed Packages not requiring update.
(PickView::set_headers () ): Ditto.
(PickView::clear_view (void) ): Ditto.
(PickView::views::caption () ): Add two new captions for the new
views added for Skipped and Installed Packages.
(PickView::scroll () ): Modify Scroll Bar property to Disable
instead of disappearing when there is nothing to Scroll.
* PickView.h: Add two new views for Skipped packages and Installed
packages to public class view.
* choose.cc (list_click () ): Modify Scroll Bar property to Disable
instead of disappearing when there is nothing to Scroll.
(listview_proc () ): Ditto.
(set_view_mode): Add two new views for Skipped Packages and Installed
Packages not requiring update. Modify Scroll Bar property to Disable
instead of disappearing when there is nothing to scroll.
* res.rc (IDD_CHOOSE): Reposition Radio Buttons, View Selection
Button and View Button Caption to make room for longer captions.
Max Bowsher [Fri, 28 Feb 2003 22:31:28 +0000 (22:31 +0000)]
2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
* main.cc (set_default_dacl): Replace with set_default_sec.
(set_default_sec): Attempt to change the default group to
Users or Administrators if it is None, in addition to setting
Everyone in the default DACL.
(main): Call set_default_sec instead of set_default_dacl.
Max Bowsher [Wed, 15 Jan 2003 22:29:16 +0000 (22:29 +0000)]
2003-01-15 Max Bowsher <maxb@ukf.net>
* mkdir.cc [_CYGWIN_]: Implement what was pseudocode.
* io_stream.h [__CYGWIN__]: Don't typedef ssize_t.
* proppage.h: Include "win32.h" instead of <windows.h>.
Robert Collins [Tue, 26 Nov 2002 12:11:35 +0000 (12:11 +0000)]
2002-11-25 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
* window.h (Window::GetWindowRect): New method declaration.
(Window::GetClientRect): Ditto.
(Window::MoveWindow): Ditto.
(Window::ScreenToClient): Ditto.
* window.cc (REFLECTION_INFO): Remove.
(ReflectionInfo): Remove.
(Window::FirstWindowProcReflector): Use the WM_NCCREATE message instead
of the horrid REFLECTION_INFO hack to hook the Window instance to the
HWND instance.
(Window::WindowProcReflector): Use GetWindowLongPtr() now that it's
available.
(Window::Create): Change to use new WM_NCCREATE reflection procedure
above.
(Window::GetWindowRect): New method.
(Window::GetClientRect): New method.
(Window::MoveWindow): New method.
(Window::CenterWindow): Use new methods, also specify "::" for some non-
member functions with the same names.
(Window::ScreenToClient): New method.
Robert Collins [Mon, 25 Nov 2002 21:15:05 +0000 (21:15 +0000)]
2002-11-26 Robert Collins <rbtcollins@hotmail.com>
* IniDBBuilderPackage.cc (IniDBBuilderPackage::~IniDBBuilderPackage):
Sort the packages db once all the new packages have been added.
* IniDBBuilderPackage.h (IniDBBuilderPackage::~IniDBBuilderPackage):
Declare this.
Robert Collins [Mon, 25 Nov 2002 13:26:06 +0000 (13:26 +0000)]
2002-11-26 Robert Collins <rbtcollins@hotmail.com>
* choose.cc (ChooserPage::OnNext): Remove extracted comment.
* package_version.cc (processOneDependency): Return once selecting
a package (bugfix to prevous rework).
Log if the default trust fails the package specification.