* Makefile.in: Add bz2 include/library support.
* filemanip.h: New file.
* choose.cc (find_tar_ext): New function. Returns TRUE if .tar.gz or .tar.bz2
found.
(scan2): Reorganize to use find_tar_ext, accomodating .bz2 extension.
(read_installed_db): Ditto.
(do_choose): Ditto.
* fromcwd.cc (found_file): Ditto.
(do_fromcwd): Ditto.
* tar.cc (class gzbz): New super class for uncompression support.
(gz): New class for gzip support.
(bz): New class for bzip2 support.
(tar_open): Use gzbz class to control file opening.
(tar_ftell): Ditto for returning position in file.
(skip_file): Ditto for reading file.
(tar_next_file): Ditto.
(tar_read_file): Ditto.
(tar_close): Ditto for close.
* zlib/configure.in: Force NM substitution.
* source.cc (do_source): Default to "Install from Internet".
* nio-file.cc (NetIO_File::NetIO_File): Use `get_file_size' instead of `stat'.
* choose.cc (list_click): Correct inability to select source code for download.
(scan2): Modify to skip source tarballs when scanning disk for installable
packages.
Corinna Vinschen [Thu, 15 Mar 2001 19:06:23 +0000 (19:06 +0000)]
* install.cc: install sources into /usr/src instead
of /, also include the sizes of source tarballs
in total_bytes.
* download.cc: include sizes of source tarballs in
total_download_bytes.
* choose.cc (paint): Modify message for nothing to download vs
nothing to install/update based on installation method.
(list_click): Modify to skip versions in selection process if
installing from local directory and installation file does not exist.
Also leaves Source Action set to N/A if the source file does not exist
and installing from local directory.
(check_existence): New method to check current existence of installation
files based on selected installation method.
(set_existence): New method to set the current existence of installation
files based on selected installation method.
(best_trust): Modify decision process for best trust to base decision on
current trust selected (IE: Prev, Curr, or Test), existence of file and
installation method selected.
(default_trust): Add logic to capture the current trust level and the
trust selected for the given package.
(set_full_list): Expand decision criteria for displaying a package in
the selection list to include file existence/non-existence and selected
installation method.
(build_labels): Modify criteria for label addition to include
installation method and file existence/non-existence.
(create_listview): Modify to establish package trust level for each
package before setting up the display list. Also modification to set
current trust button as the default.
(dialog_cmd): Set response for Prev, Curr, Test button push to perform
a reset of the selection list in addition to setting the default trust.
(get_package_version): New method to provide reusable code for
determining the package version from the file name for a specified
trust.
(scan2): Modify to use new method get_package_version and
also enhance handling of the build for the structures package and
extra.
(read_installed_db): Modify to use the new method
get_package_version and also enhance handling of the build for the
structures package and extra.
(do_choose): Add additional initialization of package and extra
structures. Modify to use read_installed_db all the time despite
install method. Modify output to setup.log.full log file to increase
readability by adding additional spacing, expanded code and available
versions.
* ini.h: Add new fields install_exists, source_exists and
partial_list_display to the structure definition for package.
* res.rc (IDD_CHOOSE): Modify choose dialog Prev, Curr, and Test
pushbuttons by replacing with Radio Buttons thus allowing the
operator to better determine which is selected.
Corinna Vinschen [Tue, 27 Feb 2001 12:27:58 +0000 (12:27 +0000)]
Changes by Brian Keener <bkeener@thesoftwaresource.com>
* download.cc (do_download): Add new variables total_download_bytes and
total_download_bytes_sofar for download progress meter. Add loop
to accumulate the total bytes to download from the selected packages.
* geturl.cc: Add state.h and diskfull.h to include list. Add new
variables gw_iprogress, gw_pprogress, gw_progress_text,
gw_pprogress_text, and gw_iprogress_text to allow for addition of
total packages download progress meter and disk full percent
progress meter. Add variables total_download_bytes and
total_download_bytes_sofar for use by progress meters.
(dialog_proc): Add new variables gw_iprogress, gw_pprogress,
gw_progress_text, gw_pprogress_text, and gw_iprogress_text to
allow for addition of total packages download progress meter and disk
full percent progress meter.
(init_dialog): Ditto.
(progress): Ditto.
(get_url_to_file): Ditto.
* geturl.h: Add external definition for total_download_bytes and
total_download_bytes_sofar.
* res.rc: Add two additional progress meters (IDC_DLS_IPROGRESS)
and (IDC_DLS_PPROGRESS) and three text objects (IDC_DLS_PROGRESS_TEXT)
and (IDC_DLS_IPROGRESS_TEXT, IDC_DLS_PPROGRESS_TEXT) for use in the
download meters.
* resource.h: Add new fields for progress meters and text and update
_APS_NEXT_CONTROL_VALUE.
Corinna Vinschen [Mon, 19 Feb 2001 18:02:19 +0000 (18:02 +0000)]
* download.cc (get_file_size): New function. Eliminates the need
to call `stat'.
(download_one): Call `get_file_size' instead of `stat'. This
workarounds a problem with mingw's `stat' call.
Earnie Boyd [Thu, 8 Feb 2001 01:59:42 +0000 (01:59 +0000)]
* Makefile.in: (%.o: %.rc): Specify --include-dir $(w32api_include).
This is to allow cinstall to build with 2.95.2-7 and to make the
use of headers consistent.
* choose.cc (paint): Use system background color for text output.
* Makefile.in: Use CXX for linking and for compiling .cc files.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
* desktop.cc: Include "ini.h" and "version.h".
(make_passwd_group): Skip the function on 9x/ME boxes when an
older version of Cygwin has been installed which doesn't
support mkpasswd/mkgroup on 9x/ME.
* install.cc: Move the `LOOP_PACKAGES' and `pi' macros to...
* ini.h: ...here.
DJ Delorie [Mon, 6 Nov 2000 17:04:14 +0000 (17:04 +0000)]
* install.cc (do_install): Add call to set_cygdrive_flags to sync
the mount modes.
* mount.cc (set_cygdrive_flags): New function.
(get_cygdrive_flags): Ditto.
(default_cygdrive): Ditto.
(set_cygdrive_flags): Ditto.
* mount.h: Add prototype for set_cygdrive_flags.
DJ Delorie [Sun, 22 Oct 2000 15:38:07 +0000 (15:38 +0000)]
* choose.cc (build_labels): Don't skip TRUST_PREV completely; only
ignore it wrt full_list if there's already a version installed.
(do_choose): Sort the list.
(package_sort): New.
DJ Delorie [Thu, 14 Sep 2000 15:56:31 +0000 (15:56 +0000)]
* res.rc: increased the size of the site dialog (IDD_SITE) & the
corresponding list box to provide for more URL's to be listed.
Modified the position of the Back, Next and Cancel buttons to
correspond to the new size of the dialog.
DJ Delorie [Fri, 8 Sep 2000 00:14:21 +0000 (00:14 +0000)]
* splash.cc: use version.h, not local decl
* res.rc: add "old version" message
* resource.h: ditto
* version.h: new
* fromcwd.cc (canonicalize_version): make global
* iniparse.y: add setup-version support
* inilex.l: add [exp] as alias for [test], add setup-version
* Makefile.in (version.c): add setup-version tag
* desktop.cc (do_desktop): remove 1.1 version number
(do_desktop_setup): ditto
* ini.cc (do_ini): zero out package list just in case we redo it.
DJ Delorie [Thu, 7 Sep 2000 01:45:12 +0000 (01:45 +0000)]
* desktop.cc: added logic to handle to the new dialog and to
default the setting for the new checkboxes based on whether the
desktop icon or start menu link already exist.
(desktop_icon): correction to desktop directories for desktop icon
creation. Additional logic added for Win95 which does not appear
to have Common Directories so if Common selected and null uses
normal directory.
(start_menu): Additional logic added for Win95 which does not
appear to have Common Directories so if Common selected and null
uses normal directory.
(do_desktop_setup): moved the saving of the icon, creation of the
bat file, profile, passwd, Start Menu link and desktop shortcut to
this method from do_desktop. Made the creation of the desktop
icon and start menu link conditional on settings of new dialog
created for desktop.
* install.cc (do_install): changed next from IDD_S_DESKTOP to
IDD_DESKTOP.
* main.cc (WinMain): changed case IDD_S_DESKTOP to IDD_DESKTOP.
* res.rc: added new resource to create a desktop dialog with 2
checkboxes for creating the desktop icon and start menu link.
* resource.h: changed IDD_S_DESKTOP to IDD_DESKTOP and added two
new controls: IDC_ROOT_MENU and IDC_ROOT_DESKTOP for new dialog.
* state.h: added root_menu and root_desktop for use in dialog.
DJ Delorie [Wed, 30 Aug 2000 01:05:42 +0000 (01:05 +0000)]
* choose.cc (scan_downloaded_files): scan for existing files, so
that the user only sees new downloads.
* nio-ie5.cc (NetIO_IE5): pre-check for wininet.dll, enable dial-up
* site.cc (do_site): if we can't download the mirror list, go back
to the net setup box to choose another transport.
* autoload.c: add more functions
* Makefile.in (ALL_DEP_LDLIBS): remove wininet.a
* resource.h: add WININET message
* net.cc (do_net): no longer default to IE5
* simpsock.h (class SimpleSocket): new, simplify socket operations
* simpsock.cc: ditto
* nio-http.h: new, for direct http protocol
* nio-http.cc: ditto
* nio-ftp.h: new, for direct http protocol
* nio-ftp.cc: ditto
* netio.cc (set_url): move initialization here to handle redirections
(open): add direct http/ftp
* netio.h (NetIO::set_url): new
* log.cc (log_save): create directory for log if needed
* hash.cc, hash.h: new
* Makefile: add hash.o
* choose.cc: enable "uninstall" option
* download.cc: invert action test to accomodate uninstalling
* ini.h: add ACTION_UNINSTALL
* install.cc: add uninstall functionality
* res.rc: make install tag changeable
* resource.h: add uninstall resources
DJ Delorie [Thu, 24 Aug 2000 21:50:14 +0000 (21:50 +0000)]
* fromcwd.cc (canonicalize_version): use multiple buffers so that multiple
calls won't use the same buffer.
* choose.cc (create_listview): don't default to full list if no changes
(base): return computed value, not temporary :-(
(do_choose): don't use installed.db if we're only downloading.
DJ Delorie [Thu, 24 Aug 2000 02:48:14 +0000 (02:48 +0000)]
* nio-ie5.cc (NetIO_IE5): Fix authentication logic
* nio-ie5.h (flush_io): new
* netio.cc (load_dialog): note when we're initializing the dialog
box, and ignore changes to the edit fields then.
DJ Delorie [Tue, 22 Aug 2000 00:45:45 +0000 (00:45 +0000)]
* README: Update
* fromcwd.cc (found_file): don't remember the canonicalized version
* choose.cc (paint): print "nothing to do" message when list is empty.
(build_labels): Use version "0.0" if no version is available.
(create_listview): default to full list if nothing to install/update.
(base): new, returns basename of file
(read_installed_db): compare base names, not full paths
DJ Delorie [Wed, 19 Jul 2000 01:01:04 +0000 (01:01 +0000)]
* autoload.c: new, autoload dlls that might not be available.
* Makefile.in (OBJS): add autoload.o
* res.rc: rewrite root options (text/binary, system/user) to be
more obvious.
DJ Delorie [Tue, 18 Jul 2000 22:48:11 +0000 (22:48 +0000)]
* site.cc (get_site_list): trim displayed URL, sort by domain
* net.cc (do_net): make IE5 default to checked, for now
* ini.cc (do_ini): if we can't load setup.ini, go back to the site list.
DJ Delorie [Mon, 17 Jul 2000 19:57:45 +0000 (19:57 +0000)]
* res.rc (IDD_OTHER_URL): reorder to give default focus to entry
* other.cc (dialog_cmd): save download site URL
* site.cc (get_root_dir): new
(save_mirror_site): new
(dialog_cmd): save download site URL
(get_site_list): make list big enough to add prev site
(get_initial_list_idx): new, read last-used URL from file and
append it to site_list
(do_site): call get_initial_list_idx
* concat.cc (concat): avoid segfault when first parm is null
DJ Delorie [Tue, 11 Jul 2000 21:27:08 +0000 (21:27 +0000)]
* desktop.cc: don't set PATH in cygwin.bat, create /etc/passwd
* geturl.cc: change math for percentage to avoid overflow
* install.cc: ditto
* download.cc: post "download complete" message.
* root.cc: pre-fill in defaults if needed, don't start
browse at root_dir unless it's set.
DJ Delorie [Tue, 11 Jul 2000 02:02:28 +0000 (02:02 +0000)]
* Makefile.in: add desktop.o and mklink2.o
* dialog.h: add do_desktop
* install.cc: create standard directories, call do_desktop
* res.rc: add cygwin.ico as a file also
* desktop.cc: new, do shortcuts, batch files, and icons
* mklink2.c: new, for COM
DJ Delorie [Thu, 8 Jun 2000 03:03:16 +0000 (03:03 +0000)]
* cygcalls.c: new, call cygwin1.dll functions directly
* cygcalls.h: header for same
* Makefile.in: add cygcalls.[ch], remove mount/cygpath/umount
exes, fix cinstall.rc dependencies.
* path.c: remove unneeded code
* setup.c: use cygcalls instead of xcreate_process.
uncompress embedded files with zlib
add "-d" for "download only"
add "-h" for help
postpone mount changes until very end
add download progress indicators
pack multi-column listings more
auto-delete temp files
customize banner message according to options
prompt user for text/binary mounts
add warnings about empty setup directory, root installs, etc
DJ Delorie [Wed, 24 May 2000 16:04:36 +0000 (16:04 +0000)]
* tar.c: New file; built-in tar using zlib.
* tar.h: New file; header for same.
* ctar.c: New file; test program for same.
* Makefile.in: add built-in tar, remove tar.exe and gzip.exe
* path.c (pathcat): convert slashes and canonicalize, instead of aborting
* setup.c (tarx): add support for built-in tar
(main): accept unix-style slashes, check root dir for drive letters,
warn about installing in /, make sure cwd is empty for internet installs,
defer mounts to end of install, support built-in tar.
Fix compiler warnings throughout.
* pkg.c (init_pkgs): Make static 'stuff' global_pkgstuff for use in
get_pkg_stuff.
* setup.c: Make 'root' global.
(istargz): Return pointer to "stem" of matched .tar.gz file.
(tarx): Special case cygwin-20000301 to == cygwin-1.1.0.tar.gz. Remove bogus
check_for_installed check.
(recurse_dirs): Add preliminary support for .bat file execution.
(create_uninstall): Eliminate unneeded parameter.
(do_start_menu): Ditto.
(mkmount): Ditto.
(get_pkg_stuff): Ditto. Check for currently installed cygwin by scanning for
the version number. Eliminate unneeded argument to create_uninstall.
(getdownloadsource): Add 'name' to list of names rather than url.
(main): Eliminate unneeded argument in get_pkg_stuff. Eliminate unneeded
argument in mkmount and do_start_menu.
DJ Delorie [Fri, 19 May 2000 00:05:25 +0000 (00:05 +0000)]
* setup.c (optionprompt): allow multi-column, clean up message
about more options, be more robust about user input.
(getdownloadsource): make the mirror URL a macro.
(main): do mounts after done prompting user.
* setup.c (cleanup): Inverse order of deletion stands a better chance of
deleting cygpath.exe. Still seems to suffer from occasional races, though.
(cleanup_on_signal): Perform convoluted dance to accomodate win95 and w2k.
(output_file): Defend against an unlikely handle leak.
(main): Don't set up signal handling until we have something special to do.
* path.c (kill_cygpath): Delete function.
(exit_cygpath): Make more defensive so that it can be called at any time.
(cygpath_pipe): Don't set up signal here. Do it in main().
* setup.c (istargz): New function.
(recurse_dirs): Look for *.gz pattern rather than *tar.gz since *tar.gz
inexplicably fails on samba mounted partitions. Use istargz to match tar.gz
tail.
(processdirlisting) Use istargz to match tar.gz tail.
(cleanup): Renamed from filedel.
(cleanup_on_signal): New function. Called on CTRL-C.
(main): Record handle of main thread so that it can be suspended when CTRL-C
occurs. Set up cleanup_on_signal signal handler.
* path.c (exit_cygpath): Wait for subprocess to exit before returning.
(cygpath_pipe): Don't call exit_cygpath. Let main atexit routine do that.
* pkg.c (init_pkgs): Accept root argument. Make registry key "cygwin
root"-specific.
* setup.c (filedel): Call exit_cygpath here so that we can be assured that
cygpath subprocess has died. This allows us to delete cygpath.exe and
cygwin1.dll.
(optionprompt): Initialize response to -1 so that second screen of mirrors will
appear.
(get_pkg_stuff): Don't attempt to use HKCLU. Pass root to init_pkgs.
* setup.h: Reflect init_pkgs prototype change.
* pkg.c (init_pkgs): Accept an argument to control what root registry key
should be used.
* setup.c (get_pkg_stuff): Use HKCLU registry key if default fails.
* setup.h: Reflect init_pkgs prototype change.
* pkg.c: New file.
* error.c (winerror): Respond to gcc warning.
* path.c (cygpath_pipe): Ditto.
* setup.c (filedel): Call sa_cleanup on deleteme.
(create_shortcut): Coerce argument to eliminate compiler warning.
(tarx): Use installed version of cygwin1.dll, overriding tar file name.
(refmatches): New function. Tests if ref is contained in a list of packages to
install.
(filematches): New function. Tests if filename matches one of a list of
packages to install.
(recurse_dirs): Accept list of packages to install. Generalize tar.gz test to
accomodate _tar.gz.
(prompt): Ensure that stdout is flushed prior to asking for input.
(findhref): Initialize variables to quiet a compiler warning.
(processdirlisting): Accept list of packages to install. Special case cygwin
tar file version number.
(downloaddir): Accept list of packages to install.
(downloadfrom): Ditto.
(create_uninstall): Eliminate unneeded variables. Quote arguments to regtool.
(do_start_menu): Don't create uninstall bat file if updating or user specified
a list of packages.
(mkmount): Eliminate unneeded variables.
(get_pkg_stuff): New function. Checks for previous unversioned installation.
(main): Accept -u and -f options and package names on the command line. Use
get_pkg_stuff to initialize package information. Umount /etc. Call
recurse_dirs and downloadfrom with list of package to install. Ensure that all
/usr/local directories are created. Output installation time to setup.log.
* setup.h: Add some prototypes.
* xsystem.c (xcreate_process): Eliminate unneeded variable.
* setup.c (optionprompt): Don't overlap display of already seen options on next
page.
(geturl): Print name of site which we're connecting to rather than "ftp site".
(processdirlisting): Avoid URLs that contain a /. or ./ . Is this test too
simplistic?
(do_start_menu): Use pathcat to build path to <root>\bin to avoid problems when
user chooses x:\ as their root.
(main): For now, default to "non-update" mode. Allow -u option to signify an
update.
* pkg.c: New file.
* setup.c (tarx): Skip already installed or older packages. Report when a
package has been updated.
(processdirlisting): Skip already installed or older packages.
(main): Detect -f option for forced installation. Initialize pkg stuff if
appropriate.
* setup.h: Add pkg definitions.