Max Bowsher [Tue, 28 Dec 2004 14:05:46 +0000 (14:05 +0000)]
2004-11-28 Max Bowsher <maxb@ukf.net>
* download.cc (check_for_cached): Re-introduce the silent skipping of
wrong-sized package files in local caches, as a "quick fix" that is no
worse than the status quo, to be able to make a release, whilst work
towards a proper fix continues on trunk.
cvs2svn [Mon, 22 Nov 2004 18:03:11 +0000 (18:03 +0000)]
This commit was manufactured by cvs2svn to create branch 'setup-200412'.
Sprout from master 2004-11-22 18:03:10 UTC Max Bowsher <maxb1@ukf.net> '2004-11-22 Max Bowsher <maxb@ukf.net>'
Cherrypick from IMPORT 2003-03-13 12:30:14 UTC Max Bowsher <maxb1@ukf.net> 'Import zlib-1.1.4':
zlib/zlib.html
Max Bowsher [Sat, 20 Nov 2004 16:59:54 +0000 (16:59 +0000)]
2004-11-20 Max Bowsher <maxb@ukf.net>
Repair the broken detection of wrongly-sized package files.
* download.cc (validateCachedPackage): Make static, since not used
elsewhere. Improve logging. Migrate file-size tests to here, alongside
the MD5 tests.
(check_for_cached): Remove broken testing of file-size, now covered by
the above. Code cleanups.
Max Bowsher [Fri, 19 Nov 2004 09:53:30 +0000 (09:53 +0000)]
2004-11-19 Max Bowsher <maxb@ukf.net>
* proppage.cc (PropertyPage::DialogProc): Wrap in a TOPLEVEL_CATCH
block, since allowing exceptions to unwind into the guts of Windows is
quite disasterous.
Max Bowsher [Fri, 19 Nov 2004 01:58:02 +0000 (01:58 +0000)]
2004-11-19 Max Bowsher <maxb@ukf.net>
* main.cc (main): Move option parsing code earlier - it must execute
before any significant object creations, which might test options in
their initialization.
Max Bowsher [Thu, 18 Nov 2004 01:19:09 +0000 (01:19 +0000)]
2004-11-18 Max Bowsher <maxb@ukf.net>
* archive.h (archive::~archive): Define a pure virtual destructor to
enforce the abstract nature of this class.
* archive.cc (archive::~archive): Pure virtual destructors require an
implementation! Add one.
* io_stream.h (io_stream::destroyed): Remove this severely
brain-damaged implementation of a weakly-enforced abstract class.
The pure virtual destructor was strongly enforcing the abstract nature
anyway.
* io_stream.cc (io_stream::~io_stream): Empty out horribly pointless
code from the pure virtual destructor.
* archive_tar.cc (archive_tar::~archive_tar): Remove all
reference to the removed "destroyed" member.
* archive_tar_file.cc (archive_tar_file::~archive_tar_file): Ditto.
* compress_bz.cc (compress_bz::~compress_bz): Ditto.
* compress_gz.cc (compress_gz::~compress_gz): Ditto.
* io_stream_cygfile.cc (io_stream_cygfile::~io_stream_cygfile): Ditto.
* io_stream_file.cc (io_stream_file::~io_stream_file): Ditto.
* io_stream_memory.cc (io_stream_memory::~io_stream_memory): Ditto.
Max Bowsher [Thu, 11 Nov 2004 21:42:05 +0000 (21:42 +0000)]
2004-11-11 Max Bowsher <maxb@ukf.net>
* libmd5-rfc: New directory, to hold code imported from the libmd5-rfc
project in a clearly delineated fashion.
* libmd5-rfc/README: New file.
* md5.c, md5.h: Delete...
* libmd5-rfc/md5.c, libmd5-rfc/md5.h: ...and replace with pristine
versions from upstream (only change is restoration of upstream CVS
keyword expansions).
* libmd5-rfc/md5main.c: New file.
* Makefile.ami (setup_SOURCES): Edit file paths.
* download.cc, install.cc: Edit include paths.
Max Bowsher [Thu, 11 Nov 2004 21:31:37 +0000 (21:31 +0000)]
2004-11-11 Max Bowsher <maxb@ukf.net>
* dialog.cc (fatal): Make capable of handling a passed-in error code,
as an alternative to calling GetLastError().
* dialog.h (fatal): Adjust prototype as above.
* mount.cc (create_mount): Use the above to correctly report errors.
Max Bowsher [Thu, 28 Oct 2004 21:27:07 +0000 (21:27 +0000)]
2004-10-28 Max Bowsher <maxb@ukf.net>
* LogFile.cc (LogFile::getFileName), splash.cc (SplashPage::Create),
threebar.cc (ThreeBarProgressPage::SetBar2):
Migrate from cistring and string resources
to String and string literals.
* localdir.cc: Remove unneeded #include of "cistring.h".
* cistring.cc, cistring.h: Remove this now-redundant class.
* Makefile.am: Remove mention of the above removed files.
* res.rc, resource.h: Remove obsolete strings and IDs, both those
obseleted by and obselete before the above changes.
* res.rc: Merge the 2 adjacent STRINGTABLEs.
Max Bowsher [Mon, 25 Oct 2004 18:34:31 +0000 (18:34 +0000)]
2004-10-25 Max Bowsher <maxb@ukf.net>
* main.cc (next_dialog): Remove this legacy global variable.
* download.cc (do_download_thread): Return a value instead of setting
a global variable, then returning void.
(do_download_reflector): Look for the next dialog code as a return
value instead of a global variable.
Max Bowsher [Mon, 30 Aug 2004 16:26:03 +0000 (16:26 +0000)]
2004-08-30 Max Bowsher <maxb@ukf.net>
Rework the implementation of not including -Werror for specific files,
to a way that does not require hardcoding modified automake output back
into its input.
* Makefile.am (AM_CXXFLAGS, BASECXXFLAGS): Seperate out -Werror.
(autoload.o): Drop this rule, -finline-functions is no longer required
and -Werror is acceptable here now we have __attribute__ ((used)).
(WARNONLY_CFLAGS, inilex.o): Drop these.
(EXTRA_PROGRAMS): Add a fake "warnonly" program.
(warnonly_CXXFLAGS): Set to the $(BASECXXFLAGS).
(warnonly_SOURCES): Set to "inilex.cc".
(EXTRA_setup_SOURCES): Set to $(warnonly_SOURCES).
(setup_SOURCES): Remove "inilex.cc".
(setup_LDADD): Add "warnonly-inilex.o".
Max Bowsher [Mon, 30 Aug 2004 16:17:52 +0000 (16:17 +0000)]
2004-08-30 Max Bowsher <maxb@ukf.net>
Move closer to GCC 3.4 compatibility.
* IOStreamProvider.h, io_stream_cygfile.cc, io_stream_cygfile.h,
io_stream_file.cc: Do not incorrectly use "enum" after it has been
hidden inside a typedef.
* archive.h: In "virtual func() = 0;", the 0 is a language construct,
not some symbol that might evaluate to 0, and gcc 3.4 enforces this.
* autoload.c (DllInfo.name): Silence warning by making const.
(DLL, autoload_common): __attribute__ ((used)) is now required to
prevent gcc being over-eager in it's optimization, and removing these
seemingly-unused (used only from assembly) functions.
Silences some warnings, too.
* Makefile.am (AM_CXXFLAGS, AM_CFLAGS): The options
-Wstrict-prototypes -Wmissing-prototypes do not apply to C++ and
g++ 3.4 complains about them.
Max Bowsher [Sun, 29 Aug 2004 16:59:40 +0000 (16:59 +0000)]
2004-08-29 Max Bowsher <maxb@ukf.net>
* Exception.h: Reformatting, #include more, remove incorrect and
less-than-useful comments.
(TOPLEVEL_CATCH): New preprocessor macro.
* LogFile.cc (LogFile::operator()): Throw an exception object, not a
char* string.
Wrap the top-level of each thread (including the main thread) in a
try...catch block, in order to display a useful error message if an
exception is not caught.
* download.cc (do_download_reflector): Here ...
* ini.cc (do_ini_thread_reflector): ... and here ...
* install.cc (do_install_reflector: ... and here ...
* main.cc (main): ... and here ...
* postinstall.cc (do_postinstall_thread): ... and here ...
* site.cc (do_download_site_info_thread): ... and here!
* msg.h: Include a missing header requirement.
* res.rc (IDS_UNCAUGHT_EXCEPTION, IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO):
New strings.
* resource.h (IDS_UNCAUGHT_EXCEPTION)
(IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO): New IDs.
Max Bowsher [Sat, 28 Aug 2004 00:13:12 +0000 (00:13 +0000)]
2004-08-28 Max Bowsher <maxb@ukf.net>
* res.rc (IDS_WINDOW_INIT_BADMSG): New string.
* resource.h (IDS_WINDOW_INIT_BADMSG): New string resource ID.
* window.cc (Window::FirstWindowProcReflector): Convert an abort()
into a descriptive error.
Max Bowsher [Wed, 18 Aug 2004 22:42:37 +0000 (22:42 +0000)]
2004-08-18 Max Bowsher <maxb@ukf.net>
"librsync is not wire-compatible with rsync 2.x, and is not likely
to be in the future." -- librsync.sourceforge.net
So, it is of no practical use to setup. Therefore, removing all
rsync related files and code from setup.
* rsync: Directory removed.
* Makefile.am: Remove rsync support from the buildsystem.
* configure.in: Ditto.
* README: Since it seems vanishingly unlikely that it will ever happen,
remove rsync support from the wishlist.
* io_stream_rsync.cc: Remove.
* io_stream_rsync.h: Remove.
Robert Collins [Sun, 25 Apr 2004 13:05:04 +0000 (13:05 +0000)]
2004-04-25 Robert Collins <rbtcollins@hotmail.com>
* IniDBBuilderPackage.cc (dumpAndList): Move out to packageversion for reuse.
* package_meta.cc (packagemeta::logAllVersions): log dependencies.
* package_version.cc (packageversion::depends): provide a const accessor.
(dumpAndList): Moved from INIDBBuilder.cc.
* package_version.h: declare new method and function.
Robert Collins [Sat, 1 Nov 2003 07:23:47 +0000 (07:23 +0000)]
2003-10-31 Frank Richter <frichter@gmx.li>
* localdir.cc (OnNext): When SelectDirectoryA() fails, display a
message with the error returned from the system instead of just
'could not change dir'. Also, offer the user to 'Retry', 'Ignore' the
error or 'Abort' the directory change.
Robert Collins [Sat, 1 Nov 2003 07:21:28 +0000 (07:21 +0000)]
2003-10-31 Frank Richter <frichter@gmx.li>
* propsheet.cc (PropSheetWndProc): Don't do child resizing if a the
window gets minimized. Otherwise some glitches (e.g. wrong child
sizes) occur.
Added support for WM_GETMINMAXINFO. Prevents the property sheet from
getting smaller than the original size.
* main.cc (HelpOption): New instance.
(main): Added help command line option handling.
* localdir.cc (LocalDirOption): New instance.
(LocalDirSetting::load): allow setting localdir from command line.
Robert Collins [Sun, 26 Oct 2003 19:38:30 +0000 (19:38 +0000)]
2003-10-16 Frank Richter <frichter@gmx.li>
* ControlAdjuster.cc: New file, helper to move elements of a dialog
along when the it's resized.
* ControlAdjuster.h: Ditto.
* Makefile.am: Add new source files.
* proppage.cc (PropertyPage::DialogProc): Adjust some common
controls (Cygwin icon top right, separator below) when a page is
resized.
(PropertyPage::PropertyPage): Dito.
* propsheet.cc (IsDialog): New. Test whether a window is a dialog.
Used internally by resize logic.
(EnumPages): New. Used internally by resize logic: resizes the
property sheet's individual pages.
(PropSheetWndProc): New. Hook for the propery sheet window proc.
(PropSheetProc): More style tweaks, add maximize box and thick border
as well. Hook into the property sheet's window proc.
(PropSheet::AdjustPageSize): New. Adjust the metrics of a single page
to fit nicely into the property sheet. Part of resize logic.
* res.rc (All dialogs): The top-right Cygwin icon and top separator
now have IDs distinct from IDC_STATIC, so their metrics can be
adjusted upon a resize. Also, all those Cygwin icons are at the exact
same spot now.
* choose.cc (ChooserPage::ChooserPage): Now the controls on the
chooser page move/size when the page size is changed.
* choose.h: Dito.
Max Bowsher [Sat, 2 Aug 2003 00:02:01 +0000 (00:02 +0000)]
2003-08-02 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
Changes modified by Max Bowsher <maxb@ukf.net>
* splash.cc (Copyright): Update copyright dates.
(SplashPage::OnInit): Remove call to SetDlgItemFont(). Now handled in
base class.
* proppage.h (PropertyPage::setTitleFont): Declare.
* proppage.cc (Copyright): Update copyright dates.
(PropertyPage::DialogProc WM_INITDIALOG): Move all font setting code,
including that from splash.cc into new function...
(PropertyPage::setTitleFont): Create, using moved code. Change font
"MS Sans Serif" to "MS Shell Dlg" in line with recent res.rc change.
Set font for IDC_STATIC_WELCOME_TITLE here, to allow easy re-use of
style for future "Finished" page.
Max Bowsher [Wed, 30 Jul 2003 21:49:53 +0000 (21:49 +0000)]
2003-07-30 Max Bowsher <maxb@ukf.net>
* ini.cc (do_ini_thread): Return bool.
(do_ini_thread_reflector): Put returned bool in lParam.
* threebar.cc (WM_APP_SETUP_INI_DOWNLOAD_COMPLETE): Rework for new
meaning of lParam. Replace erroneous use of do_fromcwd with
SetActivePageByID (IDD_SOURCE).
Robert Collins [Wed, 30 Jul 2003 09:04:27 +0000 (09:04 +0000)]
2003-07-30 Robert Collins <rbtcollins@hotmail.com>
* ConnectionSetting.cc: New file, persist connection type selection.
* ConnectionSetting.h: Ditto.
* net.cc: Hold a ConnectionSetting instance to trigger the logic.
(NetPage::OnInit): Don't force net_method to any value.
* Makefile.am: Add new source files.
Robert Collins [Wed, 30 Jul 2003 08:44:51 +0000 (08:44 +0000)]
2003-07-30 Robert Collins <rbtcollins@hotmail.com>
* SourceSetting.cc: New file, persist source selection.
* SourceSetting.h: Ditto.
* source.cc: Hold a Source setting instance to trigger the logic.
* Makefile.am: Add new source files.
Max Bowsher [Tue, 29 Jul 2003 14:14:06 +0000 (14:14 +0000)]
2003-07-29 Max Bowsher <maxb@ukf.net>
Based on a patch by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>.
* AntiVirus.cc (AntiVirusPage::wantsActivation): Define.
* AntiVirus.h (AntiVirusPage::wantsActivation): Declare.
* localdir.cc (LocalDirPage::OnBack): Remove logic subsumed by
RootPage::wantsActivation.
* proppage.cc (PropertyPage::DialogProc): Call wantsActivation(),
and skip to next page in sequence if activation is refused.
* proppage.h (PropertyPage::wantsActivation): Default implementation.
* root.cc (RootPage::wantsActivation): Define.
* root.h (RootPage::wantsActivation): Declare.
* source.cc: Don't include "AntiVirus.h".
(SourcePage::OnNext): Remove logic subsumed by
RootPage::wantsActivation.
(SourcePage::OnBack): Remove logic subsumed by
AntiVirusPage::wantsActivation.
* splash.cc: Don't include "AntiVirus.h" or "dialog.h".
(SplashPage::OnNext): Remove - subsumed by
AntiVirusPage::wantsActivation.
* splash.h (SplashPage::OnNext): Remove declaration.
Robert Collins [Tue, 29 Jul 2003 10:48:31 +0000 (10:48 +0000)]
2003-07-29 Robert Collins <rbtcollins@hotmail.com>
* PickView.h (PickView::refresh): New method.
* PickView.cc (PickView::refresh): Extracted from various
ChooserPage callers.
* choose.cc: Use PickView::refresh wherever possible.
Max Bowsher [Tue, 29 Jul 2003 09:54:13 +0000 (09:54 +0000)]
2003-07-29 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
* dialog.h (do_fromcwd): Change function declaration.
* fromcwd.cc (do_fromcwd): Change return type to bool. Eliminate
use of next_dialog, return true or false instead.
* localdir.cc (LocalDirPage::OnNext): Use do_fromcwd()'s return
value instead of next_dialog.
Robert Collins [Mon, 28 Jul 2003 08:32:07 +0000 (08:32 +0000)]
2003-07-28 Robert Collins <rbtcollins@hotmail.com>
* package_meta.h (packagemeta::addToCategoryAll): Declare.
* package_meta.cc (packagemeta::addToCategoryAll): New method,
separated to allow clear iteration.
* choose.cc (ChooserPage::fillMissingCategory): BUGFIX: "all" is
meant to be added unconditionally.
Robert Collins [Sun, 27 Jul 2003 13:18:01 +0000 (13:18 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* Generic.h: New file, home for generic programming tools.
(visit_if): Move here from package_meta.cc.
Adjust to be fully parameterised.
* package_meta.h (packagemeta::hasNoCategories): Query for generic
programming.
(packagemeta::setDefaultCategories): set categories for packages
with none.
* package_meta.cc: Move visit_if out. Adjust users for
full paramterised operation.
(packagemeta::hasNoCategories): Implement.
(packagemeta::setDefaultCategories): Implement.
* choose.cc (ChooserPage::fillMissingCategory): Use visit_if to
reduce duplicate code.
(ChooserPage::setExistence): Delete.
* choose.h (ChooserPage::setExistence): Rename to
packagedb::setExistence.
* package_db.h (packagedb::setExistence): Declare.
* package_db.cc (packagedb::setExistence): Copy from choose.cc
Robert Collins [Sun, 27 Jul 2003 10:29:53 +0000 (10:29 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* localdir.h (LocalDirPage::OnInit): Remove.
* localdir.cc (LocalDirPage::OnInit): Move to LocalDirSetting
::load().
(LocalDirSetting::load): Copied from LocalDirPage::OnInit.
* site.h (SitePage::OnInit): Remove.
(SitePage::getSavedSites): New member, replaces get_saved_sites.
(SitePage::registerSavedSite): New member, replaces
register_saved_site.
* site.cc (SitePage::OnInit): Move to SiteSetting::load().
(SiteSetting::load): Copied from SitePage::OnInit.
(SitePage::getSavedSites): Renamed from get_saved_sites.
(SitePage::registerSavedSite): Renamed from register_saved_site.
(do_download_site_info_thread): Don't look at the list size for
determining if the download was successful.
Robert Collins [Sun, 27 Jul 2003 10:13:11 +0000 (10:13 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* choose.h (ChooserPage::setViewMode): Remove HWND from
signature.
(ChooserPage::defaultTrust): Ditto.
Move to PickView.
(ChooserPage::ifChecked): Use Window helper function
IsButtonChecked.
* choose.cc (ChooserPage::setViewMode): Use chooser->GetHWND()
throughout.
Update all callers with new signature.
(ChooserPage::defaultTrust): Ditto.
Move to PickView.
* PickView.h (PickView::defaultTrust): Declare.
* PickView.cc (PickView::defaultTrust): Copy from chooser.cc.
Robert Collins [Sun, 27 Jul 2003 00:47:01 +0000 (00:47 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* choose.cc (create_listview): Use for_each instead of explicit iteration.
(create_listview): Rename to ChooserPage::createListview.
* package_meta.h (packagemeta::set_requirements): Explicitly separate the 1 and 2 parameter versions. CVS: ----------------------------------------------------------------------
Robert Collins [Sun, 27 Jul 2003 00:12:36 +0000 (00:12 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* String++.h (String::operator !=): Declare for char * and String.
* String++.cc (String::operator !=): Implement.
* package_meta.cc(StringConcatenator): Move above all users.
(_visit_if): Predicate support for visitors.
(packagemeta::getReadableCategoryList): Refactor to use
StringConcatenator with a predicate.
* choose.h: Remove unneeded c++ guards.
Robert Collins [Sat, 26 Jul 2003 13:12:16 +0000 (13:12 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Remove package specific code from choose.cc.
Update copyrights where appropriate.
* choose.cc(ChooserPage::OnNext): Extract logging to
packagemeta::logSelectionStatus.
* package_meta.cc(packagemeta::logSelectionStatus): Extract from
ChooserPage::OnNext.
(StringConcatenator): helper for logSelectionStatus.
(action_caption): Make const.
* package_meta.h(packagemeta): Declare logSelectionStatus.
(packagemeta::action_caption): Make const.
* package_version.cc(packageversion::sourcePackage): Make const.
* package_version.h(packageversion::sourcePackage): Make const.