Brian Dessent [Sat, 7 May 2005 04:27:08 +0000 (04:27 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* choose.cc (ChooserPage::OnInit): Initialize tooltips for this
dialog.
* proppage.h (PropertyPage::makeClickable): Update prototype to
reflect same argument name as function.
* proppage.cc (PropertyPage::DialogProc): Remove redundant 'break'
statements that follow 'return's. Add missing braces to case
statements. Call handler for TTN_GETDISPINFO.
* res.rc (IDS_TRUSTKEEP_TOOLTIP): Add new STRINGTABLE entry for
tooltip text.
(IDS_TRUSTPREV_TOOLTIP): Ditto.
(IDS_TRUSTCURR_TOOLTIP): Ditto.
(IDS_TRUSTEXP_TOOLTIP): Ditto.
(IDS_TRUSTPREV_TOOLTIP): Ditto.
(IDS_VIEWBUTTON_TOOLTIP): Ditto.
* resource.h: Likewise, add identifiers for tooltip resources.
* window.h: Add includes.
(Window::TooltipHandle): Add new private data structure.
(Window::TooltipStrings): Ditto.
(Window::ActivateTooltips): Define new function to support tooltip
functionality.
(Window::SetTooltipState): Ditto.
(Window::AddTooltip): Ditto.
(TooltipNotificationHandler): Ditto.
* window.cc (Window::Window): Initialize handle to NULL.
(Window::~Window): Call DestroyWindow on tooltip control if it was
activated.
(Window::ActivateTooltips): New function to activate the tooltip
control.
(Window::SetTooltipState): New function to allow toggling of
tooltips.
(Window::AddTooltip): New function that adds a tooltip to a given
control in a given window. Also implement overloaded versions that
provide simpler interface and the ability to use a string resource.
(Window::TooltipNotificationHandler): New function to handle
TTN_GETDISPINFO notification messages.
Brian Dessent [Sat, 7 May 2005 03:42:40 +0000 (03:42 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* resource.h: Reorganize. Group by type, and give each its own
range of IDs. Regenerate IDs accordingly.
(IDD_CHOOSER): Remove obsolete and unused symbol.
Brian Dessent [Thu, 5 May 2005 21:00:33 +0000 (21:00 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* ControlAdjuster.h: (enum ControlPosition): Declare new
resizing methods CP_STRETCH_LEFTHALF and CP_STRETCH_RIGHTHALF, and
their TOP/BOTTOM aliases.
* ControlAdjuster.cc: (ControlAdjuster::ControlInfo::adjust):
Implement CP_STRETCH_LEFTHALF and CP_STRETCH_RIGHTHALF, which
are designed to resize elements in a two-column layout.
* localdir.h: (class LocalDirPage): Remove constructor
implementation from here...
* localdir.cc: (LocalDirPage::LocalDirPage): ...to here, and call
AddControlsInfo on initialization.
(static LocaldirControlsInfo): Add. Define sizing rules for dialog
elements.
* proppage.h: Add includes. (PropertyPage::ClickableURL): Declare new
storage type for internal use by class. (PropertyPage::urls):
Likewise. (PropertyPage::urlWinProc): Add declaration.
(PropertyPage::makeClickable): Likewise.
* proppage.cc: Add includes. (PropertyPage::DialogProc): Implement
handler for WM_CTLCOLORSTATIC message. Supports static controls that
have been turned into clickable hyperlinks. (static
PropertyPage::urls): Declare. (PropertyPage::makeClickable):
Implement new member function that provides user interface for making
text into clickable URLs. (PropertyPage::urlWinProc): Implement new
private member function used as a windowproc for subclassing a static
control.
* resource.h: (IDC_SPLASH_URL, IDC_FILEMODES_LINK, IDC_ROOTDIR_GRP,
IDC_INSTALLFOR_GRP, IDC_ALLUSERS_TEXT, IDC_JUSTME_TEXT, IDC_MODE_GRP,
IDC_MODE_TEXT, IDC_MODE_BIN, IDC_LOCALDIR_GRP, IDC_SPLASH_TEXT,
IDC_SPLASH_ICON, IDC_SPLASH_COPYR): Add. Replaces anonymous
IDC_STATIC ids, so that controls can be referenced by the resizer.
* res.rc: (IDD_LOCAL_DIR): Rearrange controls to match top-down order
in the dialog. Fold long lines. Replace anonymous IDC_STATIC ids.
(IDD_ROOT): Reorder in same manner. Replace anonymous IDC_STATIC
ids. Add descriptive text of each option, and hyperlink for more
information. Mark suggested choice as "(RECOMMENDED)". Swap order
of 'unix'/'dos' radio buttons so that recommended choice is first in
both columns. (IDD_SPLASH): Reorder elements to match top-down
order of dialog, fold long lines. Add descriptive paragraph, remove
anonymous ids. Update copyright text, replace sources.redhat.com
with cygwin.com.
* root.h: (class RootPage): Remove constructor implementation from
here...
* root.cc: ...to here, and call AddControlInfo. (static
RootControlsInfo): Add. Populate with resizing data.
(RootPage::OnInit): Make text a clickable hyperlink.
* splash.h: (class SplashPage): Likewise, move constructor from
here...
* splash.cc: ...to here. Call AddControlInfo. (static
SplashControlsInfo): Add and populate. (SplashPage::Create): Make
link on splash page a clickable hyperlink.
* window.h: Add include. (class Window): Store allocated fonts with a
vector instead of fixed array. Change indentation of setParent to be
consistent.
* window.cc: (Window::Window): Remove FontCounter.
(Window::~Window): Likewise. Iterate over vector of fonts
instead. (Window::SetDlgItemFont): Use vector.
Brian Dessent [Thu, 5 May 2005 08:09:24 +0000 (08:09 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* res.rc: (IDC_CHOOSE): Widen 'view' button by 6px horizontally and
4px vertically. Adjust other controls to accomodate.
(CREATEPROCESS_MANIFEST_RESOURCE_ID): Define so that manifest is
included in the binary.
* setup.exe.manifest: New file. Results in common controls with
themed appearance on modern versions of Windows.
Max Bowsher [Wed, 4 May 2005 14:52:34 +0000 (14:52 +0000)]
2005-05-04 Max Bowsher <maxb@ukf.net>
* state.cc, state.h (net_method, net_proxy_host, net_proxy_port,)
(net_user, net_passwd, net_proxy_user, net_proxy_passwd,)
Inet_ftp_user, net_ftp_passwd):
Move these global variables to be static variables of the NetIO class.
Max Bowsher [Wed, 4 May 2005 09:58:24 +0000 (09:58 +0000)]
2005-05-03 Max Bowsher <maxb@ukf.net>
* package_version.cc (DependencyProcessor): Remove trivial class.
(select, processOneDependency): Do not use DependencyProcessor, just
pass parameters normally.
Max Bowsher [Tue, 3 May 2005 21:30:30 +0000 (21:30 +0000)]
2005-05-03 Max Bowsher <maxb@ukf.net>
* choose.h (ChooserPage::ifChecked): Remove.
(ChooserPage::changeTrust): Convert from template to ordinary function.
* choose.cc (ChooserPage::changeTrust): As above, plus avoid the use
of custom class SetRequirement, when bind2nd(mem_fun(...),...) can
achieve the same effect.
* package_meta.h (SetRequirement): Remove, now unused.
Max Bowsher [Tue, 3 May 2005 20:58:45 +0000 (20:58 +0000)]
2005-05-03 Max Bowsher <maxb@ukf.net>
* package_meta.h (packagemeta::set_requirements):
Remove default argument which seems inappropriate.
* PickPackageLine.cc (PickPackageLine::click):
Make an argument explicit, and not that it seems like the wrong value.
Max Bowsher [Tue, 3 May 2005 17:11:20 +0000 (17:11 +0000)]
2005-05-03 Brian Dessent <brian@dessent.net>
Fix part of bug #853 - proxy port not remembered.
* net.cc (doing_loading): New static boolean.
(load_dialog): Use the boolean to prevent save_dialog() from taking
action due to field changes due to initialization.
(save_dialog): Check the boolean and respond appropriately.
Max Bowsher [Tue, 19 Apr 2005 10:13:54 +0000 (10:13 +0000)]
2005-04-19 Max Bowsher <maxb@ukf.net>
* postinstall.cc (RunFindVisitor::visitFile): Fix crash on
encountering a postinstall script with a name of 4 characters or less.
Bug introduced on 2004-12-25.
Max Bowsher [Tue, 5 Apr 2005 22:55:09 +0000 (22:55 +0000)]
2005-04-05 Max Bowsher <maxb@ukf.net>
The Big Cleanup: Phase "rfc1738"
* rfc1738.cc, rfc1738.h: Delete.
* csu_util/rfc1738.cc: Reimport latest version from upstream source.
Make thread-safe. Rewrite C++ wrapper in terms of std::string.
Document the divergences from the upstream source.
* csu_util/rfc1738.h: Recreate for the std::string version of the
C++ wrapper.
* Makefile.am (setup_SOURCES): Sync with added/removed files.
* IniParseFindVisitor.cc: Modify #includes.
(IniParseFindVisitor::visitFile): Change function name, as the new
C++ wrapper does not contain an irregularity that the old one did.
* download.cc: Modify #includes.
* ini.cc: Modify #includes.
Max Bowsher [Tue, 5 Apr 2005 21:37:53 +0000 (21:37 +0000)]
2005-04-05 Max Bowsher <maxb@ukf.net>
Remove setup's internal compression libraries, instead relying on the
mingw-foo packages which have been part of the Cygwin net distribution
for some time now. At the same time, reorganize the README file to
inform about the change, and make some additional tidy-ups there whilst
working there.
* GUIDELINES: Remove, contents transferred to README.
* README: Add build instructions. Delete unconfirmed and fixed bugs
sections. Incorporate the former contents of GUIDELINES.
Max Bowsher [Mon, 27 Dec 2004 14:44:35 +0000 (14:44 +0000)]
2004-12-27 Max Bowsher <maxb@ukf.net>
* compress.cc: Refine includes. Remove placeholder function
definitions. Make destructor an empty function.
* compress.h: Refine includes. Make placeholder functions pure
virtual. Add missing const on buffer argument to write function,
to match derived classes.
* compress_bz.cc, compress_gz.cc: Refine includes. Throw exception,
rather than logging and returning an error, when an unimplemented
function is called.
* compress_bz.h, compress_gz.h: Refine includes.
Max Bowsher [Sat, 25 Dec 2004 23:05:57 +0000 (23:05 +0000)]
2004-12-25 Max Bowsher <maxb@ukf.net>
The Big Cleanup: Phase "win32"
* win32.h: Major overhaul. Document why we use _WIN32_IE. Move out
fragment dealing with alloca() to the single file in which it is used.
Remove fragment dealing with _MAX_PATH, and convert all uses of it
elsewhere to MAX_PATH. Remove random include of <stdarg.h>. Remove
NOCOMATTRIBUTE, as setup contains no code which it affects. Remove
includes of <wininet.h> and <windowsx.h> - see later in this log.
(IsWindowsNT): New inline function, a much simpler implementation of
Win32::OS().
* win32.cc: Delete.
* Makefile.am (setup_SOURCES): Remove "win32.cc".
* AntiVirus.cc (detect), PickPackageLine.cc (PickPackageLine::paint),
* install.c (Installer::installOneSource):
Use IsWindowsNT(), not Win32::OS().
* main.cc (main): Use IsWindowsNT(), not locally defined iswinnt.
* PickView.cc (PickView::WindowProc), netio.cc (auth_proc),
* proppage.cc (PropertyPage::DialogProc):
Avoid using obfuscating macros from <windowsx.h>.
* archive.cc: Include or #define alloca() in the only file in which
it is used.
* nio-ie5.h: Include <wininet.h> here, where it is actually needed,
rather than in "win32.h" which is included almost everywhere.
* archive_tar.cc, archive_tar.h, cygpackage.cc, cygpackage.h,
* desktop.cc, find.cc, install.cc, main.cc, mklink2.c, mount.cc,
* script.cc: Use MAX_PATH, not _MAX_PATH.
Max Bowsher [Thu, 23 Dec 2004 18:12:12 +0000 (18:12 +0000)]
2004-12-23 Max Bowsher <maxb@ukf.net>
* choose.cc (ChooserPage::OnNext): Relegate some overly verbose
logging to an #ifdef DEBUG section.
* geturl.h (dismiss_url_status_dialog): Remove stale function
declaration, for which there is no definition.
* io_stream_cygfile.cc (io_stream_cygfile::io_stream_cygfile):
Motivated by the recent unexplained hang bug, add some extra logging.
Max Bowsher [Mon, 22 Nov 2004 18:15:34 +0000 (18:15 +0000)]
2004-11-22 Max Bowsher <maxb@ukf.net>
* MD5++.cc, MD5++.h: Remove this class.
* csu_util/MD5Sum.cc, csu_util/MD5Sum.h: New more complete MD5 class.
* Makefile.am (setup_SOURCES): Adjust to new files.
* download.cc (validateCachedPackage): Simplify, using the new class.
* install.cc (md5_one): Ditto.
* package_source.h (packagesource::md5): Change to be an object of the
new class.
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.