Jon TURNEY [Sat, 13 Aug 2011 14:43:31 +0000 (14:43 +0000)]
* choose.cc (OnInit, createListview): Build the initial list of packages
to install in OnInit() not in CreateListView(). If packages were selected
on command line in unattended mode, just install those packages.
* package_db.h (packagedb):Add addCommandLinePackages() method
* package_db.cc (addCommandLinePackages): Add separate method to add these
so we can indicate if packages were added on the command line
Jon TURNEY [Sat, 13 Aug 2011 14:22:17 +0000 (14:22 +0000)]
* PickView.cc (defaultTrust): Move implementation which deals with
package db from here...
* package_db.cc (defaultTrust): ... to here.
* package_db.h (packagedb): ... a new member function.
Corinna Vinschen [Fri, 12 Aug 2011 15:43:17 +0000 (15:43 +0000)]
* cygwin-setup.ico: New file.
* cygwin-terminal.ico: New file.
* cygwin.ico: New icons.
* desktop.cc (make_link): Take additional argument to take arguments
for shortcut. Append arg to argbuf.
(start_menu): Take additional argument to take argments for shortcut.
Add to call to make_link.
(desktop_icon): Ditto.
(save_icon): Take path and name of resource as arguments. Replace
Cygwin icon if it's the old one.
(do_desktop_setup): Save Cygwin standalone and Cygwin terminal icons.
Rename desktop and start menu shortcut name to "Cygwin Terminal", use
the cygwin terminal icon for them, and point them to mintty.
* res.rc: Change splash icon to keep size of original icon.
(IDI_CYGWIN_SETUP): New entry.
(IDI_CYGWIN_TERMINAL): New entry.
(CYGWIN-SETUP.ICON): New entry.
(CYGWIN-TERMINAL.ICON): New entry.
* resource.h (IDI_CYGWIN_SETUP): Define.
(IDI_CYGWIN_TERMINAL): Define.
Jon TURNEY [Fri, 26 Nov 2010 14:21:43 +0000 (14:21 +0000)]
Change package_db collection of packages from vector to a map so we can look things up in it quickly
This allows packagedb::findBinary() and packagedb::findSource() to be re-written to locate packages
by name rather than searching the entire set, which makes a big difference to total execution time.
* IniDBBuilderPackage.cc (IniDBBuilderPackage): Remove db.packages vector
sorting.
(buildPackage, buildPackageSource): Change package collection from vector
to map.
* PickView.cc (setViewMode, init_headers, defaultTrust): Ditto.
* choose.cc (createListview, logResults, keepClicked)
(changeTrust): Ditto
* install.cc (do_install_thread): Ditto
* download.cc (do_download_thread): Ditto
* prereq.cc (isMet): Ditto
* package_meta.cc (ScanDownloadedFiles): Ditto
* package_db.h (packagedb): Ditto
* package_db.cc (packagedb, flush, markUnVisited, setExistence)
(fillMissingCategory): Ditto
(findBinary, findSource): Rewrite to locate packages in map rather than
searching the whole vector, for performance.
(ConnectedLoopFinder, doIt, visit): Rewrite to refer to package using a
packagemeta *, as an index into the vector of packages can no longer be
used.
Jon TURNEY [Mon, 22 Nov 2010 12:53:06 +0000 (12:53 +0000)]
* package_meta.h (packagemeta): Remove unused member variables for
storing timestamp of the setup.ini that package version came from.
* package_meta.cc (packagemeta): Ditto.
Jon TURNEY [Mon, 22 Nov 2010 12:49:50 +0000 (12:49 +0000)]
* package_version.h (packageversion): Add compareVersion() utility
function.
* package_version.cc (Vendor_version, Package_version)
(compareVersions): Implement the Vendor_version() and Package_version()
accessor functions. Add compareVersions() utility function.
* cygpackage.cc (setCanonicalVersion): Fix to extract vendor version
correctly.
* IniDBBuilderPackage.cc (add_correct_version): When multiple setup.ini's
offer different packages for the same stability level, use the package with
the highest version number rather than the package coming from the setup.ini
with the latest timestamp.
Jon TURNEY [Sat, 20 Nov 2010 13:15:50 +0000 (13:15 +0000)]
* choose.cc (OnNext): Remove PrereqChecker call, instead use new
WM_APP_PREREQ_CHECK state of Progress dialog.
* threebar.h (WM_APP_PREREQ_CHECK)
(WM_APP_PREREQ_CHECK_THREAD_COMPLETE): Add new messages.
* threebar.cc (OnActivate, OnMessageApp): Use single bar mode for
WM_APP_PREREQ_CHECK state. Handle new messages.
* dialog.h (do_prereq_check_thread): Add prototype.
* prereq.cc (isMet, do_prereq_check_thread)
(do_prereq_check_reflector, do_prereq_check): Add progress reporting
during isMet, and thread containing moved PrereqChecker code.
Throughout, change all occurrences of "PostMessage" to PostMessageNow. This
works around problem where w32api uses a #define which calls the Windows API
version of PostMessage directly, confusing g++ 3.4.4.
Jon TURNEY [Wed, 10 Nov 2010 20:23:43 +0000 (20:23 +0000)]
* ini.cc (GuiParseFeedback::progress, GuiParseFeedback::iniName):
Update all the text in the progress dialog whilst parsing .ini file,
not just the top line.
Jon TURNEY [Fri, 5 Nov 2010 22:53:23 +0000 (22:53 +0000)]
* compress_bz.h (compress): Add endReached flag.
* compress_bz.cc (read, compress_bz): Use endReached flag to return 0
for a read when EOF has been reached, after BZ2_bzDecompress returns
BZ_STREAM_END, rather than continue to try to call BZ2_bzDecompress
beyond the end of the compressed data, generating a BZ_SEQUENCE_ERROR.
* ini.cc (do_remote_ini): Now that bz2_stream doesn't always have a
spurious error, detect and report if an error occurred decompressing.
* propsheet.cc (PropSheet::SetActivePage): Remove :: from call to
PropSheet_SetCurSel.
(PropSheet::SetActivePageByID): Remove :: from call to
PropSheet_SetCurSelByID.
(PropSheet::SetButtons): Remove :: from call to PropSheet_SetWizButtons.
(PropSheet::PressButton): Remove :: from call to PropSheet_PressButton.
Jon TURNEY [Sun, 29 Aug 2010 10:08:56 +0000 (10:08 +0000)]
2010-08-29 Jon TURNEY <jon.turney@dronecode.org.uk>
* postinstall.cc (do_postinstall_thread): Don't run postinstall
scripts belonging to a just installed package twice.
* script.h (Script): Add operator ==
Andy Koppe [Wed, 18 Aug 2010 17:03:17 +0000 (17:03 +0000)]
* res.rc (IDD_PREREQ): Say "Resolving Dependencies" instead of
"Unmet Dependencies found"
* prereq.cc (PrereqPage::OnNext): Tone down message box about
missing dependencies.
Yaakov Selkowitz [Tue, 10 Aug 2010 20:38:01 +0000 (20:38 +0000)]
Fix compatibility with GCC 4.x.
* Makefile.am (setup_LDFLAGS): Pass -static to compiler instead of
linker so that libgcc is statically linked as well.
(autoload.o): Disable optimization.
* localdir.cc (browse_cb): Fix "jump to case label crosses
initialization" error.
* mklink2.cc (sfli): Fix "non-local variable uses anonymous type"
warning.
* ntdll.h: Fix "redeclared without dllimport attribute: previous
dllimport ignored" warnings.
* package_message.h (display): Fix "'exit' was not declared in this
scope" error.
Jon TURNEY [Thu, 29 Jul 2010 13:12:01 +0000 (13:12 +0000)]
* resource.h (IDD_POSTINSTALL, IDC_POSTINSTALL_EDIT): Add
resource identifiers for postinstall results page.
* res.rc (IDD_POSTINSTALL): Add dialog resource for postinstall
results page.
* postinstallresults.h: New file.
* postinstallresults.cc: New file.
* main.cc (main_display): Add a PostInstallResultsPage to the
wizard.
* Makefile.am (setup_SOURCES): Add new files.
* threebar.cc (OnMessageApp): Allow WM_APP_POSTINSTALL_THREAD_COMPLETE
to select the next page shown.
* postinstall.cc (do_postinstall_thread)
(do_postinstall_reflector): Collect results of running scripts
and compose a reporting message which we pass to the postinstall
results page. Select postinstall results page next if there are
results to show, otherwise desktop setup page as before.
* script.cc (run): Don't rename as .done scripts which didn't run
successfully.
Jon TURNEY [Thu, 29 Jul 2010 13:10:46 +0000 (13:10 +0000)]
* postinstall.cc (do_postinstall_thread)
(do_postinstall_reflector): Collect results of running scripts
and compose a reporting message which we pass to the postinstall
results page. Select postinstall results page next if there are
results to show, otherwise desktop setup page as before.
* PickPackageLine.cc (PickPackageLine::{click,set_action}):
Don't trigger automatic package selection when clicking on
packages or categories on chooser screen.
* PickCategoryLine.cc (PickCategoryLine::click): No more need to
prepare for automatic package selection with markUnVisited().
* res.rc: Drop "Warning!" from caption of Resolve Dependencies
screen.
Dave Korn [Sat, 17 Apr 2010 12:36:46 +0000 (12:36 +0000)]
* root.cc (RootPage::OnNext): Don't construct a packagedb here nor
do deferred initialisation of static packagedb::task.
* source.cc (save_dialog): Don't construct a packagedb here, and
set static packagedb::task directly instead of chosen_db_task.
* package_meta.cc (packagemeta::action_caption): Don't bother to
construct a packagedb here, just access packagedb::task directly.
* package_db.cc: Move 'static members' comment near static members.
(chosen_db_task): Delete.
* package_db.h (chosen_db_task): Don't declare extern.
(packagedb): Extend comments on class.
Dave Korn [Tue, 13 Apr 2010 17:49:11 +0000 (17:49 +0000)]
* PickView.h (PickView::set_vscroll_info): Add prototype.
(PickView::hasClientRect): Rename from this ...
(PickView::hasWindowRect): ... to this ...
(PickView::lastClientRect): ... and from this ...
(PickView::lastWindowRect): ... to this.
* PickView.cc (PickView::PickView): Adjust member init to match.
(PickView::set_vscroll_info): Abstract code to set vertical scroll
bar proportions from ...
(PickView::list_click): ... here. Call it. Fix comment typo.
(PickView::WindowProc): Update all renamed variables in WM_SIZE
case, and check also for a y delta, calling set_vscroll_info if so.
* README (HOW TO BUILD): Mention mingw-lib{gcrypt,lzma}-devel.
* res.rc (IDD_DESKTOP): Move Installation Status line,
IDC_STATUS_HEADER and IDC_STATUS up 20 units, make IDC_STATUS text
20 units taller and 40 units wider so that IDS_REBOOT_REQUIRED
message fits the screen.
* res.rc (IDD_SPLASH): Bump copyright years in IDC_SLASH_COPYR to
"2000-2010".
* install.cc (create_allow_protected_renames): New function to
create AllowProtectedRenames registry entry.
(Installer::installOne): Call create_allow_protected_renames if former
call to MoveFileEx was successful.
Charles Wilson [Tue, 30 Mar 2010 23:55:19 +0000 (23:55 +0000)]
Use external crypto libraries
* Makefile.am: Remove local libgcrypt and libgpg-error
source directories from AM_CPPFLAGS.
* configure.ac: Remove libgcrypt and libgpg-error subdirs
from AC_CONFIG_SUBDIRS. Remove now-unnecessary cruft.
* doconfigure: Specify gcc-3 and g++-3. Set PATH when $build
is cygwin, so that correct (mingw) libgcrypt and libgpg-error
config scripts can be used.
libgpg-error/: Remove all.
libgcrypt/: Remove all.
Charles Wilson [Sun, 14 Mar 2010 17:45:18 +0000 (17:45 +0000)]
Support xz and lzma decompression via liblzma
* Makefile.am: Add -DLZMA_API_STATIC to AM_CPPFLAGS,
-lzma to setup_LDADD, and -static-libtool-libs to
setup_LDFLAGS. Update setup_SOURCES.
* compress.cc: Update includes.
(compress::decompress): Use compress_xz rather than
compress_lzma; compress_xz supports both xz and lzma
decompression.
* compress_xz.h: New.
* compress_xz.cc: New.
* compress_lzma.h: Removed.
* compress_lzma.cc: Removed.
* lzma-sdk/LzmaDec.c: Removed.
* lzma-sdk/LzmaDec.h: Removed.
* lzma-sdk/Types.h: Removed.
Corinna Vinschen [Mon, 15 Feb 2010 17:44:11 +0000 (17:44 +0000)]
* filemanip.cc (transform_chars): Drop function.
(mklongpath): Call mbrtowc in a loop rather than just mbstowcs.
Transform characters on the fly. Fold multiple backslashes into one.
Drop trailing backslash.
Dave Korn [Mon, 15 Feb 2010 00:45:01 +0000 (00:45 +0000)]
* choose.cc (ChooserPage::PlaceDialog): Only skip resizing window
in fully-unattended mode, not chooser-only mode.
(ChooserPage::OnUnattended): Return appropriate status to run page
or not according to kind of unattended mode.
* choose.h (ChooserPage::OnUnattended): Remove inline implementation
and retain prototype only.
* main.cc (PackageManagerOption): New boolean option.
(main): Take it into account when setting unattended_mode.
* proppage.cc (PropertyPage::DialogProc): Use new enum type when
setting unattended_mode.
* state.cc (unattended_mode): Change from bool to enum attend_mode.
* state.h (enum attend_mode): Declare new enum type.
(unattended_mode): Update extern declaration to use it.
* desktop.cc (make_link): Use 0 default permissions when creating files
and directories.
* download.cc (download_one): Ditto.
* ini.cc (do_remote_ini): Ditto.
* localdir.cc (offer_to_create): Ditto.
* filemanip.cc (nt_wfopen): Use Windows default permissions if perms
is set to 0.
* mkdir.cc (mkdir_p): Ditto if mode is set to 0.
* desktop.cc (make_link): Preserve old way of doing things when is_legacy.
(make_cygwin_bat): Ditto.
(save_icon): Ditto.
* mount.cc (read_mounts): Ditto.
(set_root_dir): Ditto.
* root.cc (load_dialog): Ditto.
(save_dialog): Ditto.
* install.cc (Installer::installOne): Don't install anything if there is no
canonical file associated with source.
(do_install_thread): Set up old-style registry entries if is_legacy rather than
just keying on whether this is Windows NT.
* io_stream_file.cc (io_stream_file::exists): Redefine "exists" to mean "it's a
file".
* archive_tar.h (archive_tar_file::read_something): New member.
* archive_tar_file.cc (archive_tar_file::archive_tar_file): Don't reset state
unless we've actually read something.
(archive_tar_file::read): Set read_something variable here to indicate that
we've read something from the tar file.
* main.cc (dyn_AttachConsole): Make static.
(dyn_GetLongPathName): New variable.
(set_dynaddr): New function.
(set_cout): Don't set dyn_AttachConsole here.
(set_legacy): Don't attempt to call function which does not exist in older
versions of NT.
(main): Call set_dynaddr to set dynamic load addresses.
* ini.h: Use is_legacy to control setup.ini names.
* main.cc (set_legacy): New function.
(main): Call set_legacy with program name to determine if this is supposed to
be an installation of the legacy version of cygwin. Issue a warning on attempt
to install legacy on Windows NT class system.