]> cygwin.com Git - cygwin-apps/setup.git/log
cygwin-apps/setup.git
14 years ago Support xz and lzma decompression via liblzma
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.

14 years ago * nio-ftp.c (read): Read RETR status code on EOF to avoid
Corinna Vinschen [Sat, 13 Mar 2010 11:11:21 +0000 (11:11 +0000)]
* nio-ftp.c (read): Read RETR status code on EOF to avoid
deadlock with PASV.

14 years ago* Makefile.in: Output the name of the generated src target.
Christopher Faylor [Mon, 1 Mar 2010 21:31:41 +0000 (21:31 +0000)]
* Makefile.in: Output the name of the generated src target.

14 years ago* Makefile.in: Add a setup-src target.
Christopher Faylor [Mon, 1 Mar 2010 21:26:09 +0000 (21:26 +0000)]
* Makefile.in: Add a setup-src target.

14 years ago * filemanip.cc (mklongpath): Skip "." and ".." path components to
Corinna Vinschen [Mon, 1 Mar 2010 15:18:39 +0000 (15:18 +0000)]
* filemanip.cc (mklongpath): Skip "." and ".." path components to
avoid error messages.

14 years ago * filemanip.cc (mklongpath): Simplify backslash folding.
Corinna Vinschen [Mon, 15 Feb 2010 17:51:56 +0000 (17:51 +0000)]
* filemanip.cc (mklongpath): Simplify backslash folding.

14 years ago * filemanip.cc (transform_chars): Drop function.
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.

14 years ago * choose.cc (ChooserPage::PlaceDialog): Only skip resizing window
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.

14 years ago * win32.cc (NTSecurity::GetPosixPerms): Return NULL security descriptor
Corinna Vinschen [Thu, 4 Feb 2010 16:57:36 +0000 (16:57 +0000)]
* win32.cc (NTSecurity::GetPosixPerms): Return NULL security descriptor
if is_legacy is set.
(NTSecurity::SetPosixPerms): Remove.
* win32.h (NTSecurity::GetPosixPerms): Remove declaration.

14 years ago * desktop.cc (make_link): Use 0 default permissions when creating files
Corinna Vinschen [Tue, 2 Feb 2010 17:28:10 +0000 (17:28 +0000)]
* 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.

14 years ago* mount.cc (read_mounts_9x): Preserve old way of doing things when is_legacy.
Christopher Faylor [Fri, 29 Jan 2010 22:46:28 +0000 (22:46 +0000)]
* mount.cc (read_mounts_9x): Preserve old way of doing things when is_legacy.

14 years agoforced checkin
Christopher Faylor [Fri, 29 Jan 2010 15:00:55 +0000 (15:00 +0000)]
forced checkin

14 years ago* desktop.cc (make_link): Preserve old way of doing things when is_legacy.
Christopher Faylor [Thu, 28 Jan 2010 22:59:09 +0000 (22:59 +0000)]
* 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".

14 years ago* archive_tar.c (archive_tar_file::read): Always set read_something even for
Christopher Faylor [Sat, 16 Jan 2010 23:35:42 +0000 (23:35 +0000)]
* archive_tar.c (archive_tar_file::read): Always set read_something even for
zero-length files.

14 years ago* archive_tar.h (archive_tar_file::read_something): New member.
Christopher Faylor [Sat, 16 Jan 2010 19:51:48 +0000 (19:51 +0000)]
* 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.

14 years ago* localdir.cc (LocalDirPage::OnNext): Strip trailing slashes.
Christopher Faylor [Wed, 13 Jan 2010 15:56:48 +0000 (15:56 +0000)]
* localdir.cc (LocalDirPage::OnNext): Strip trailing slashes.

14 years ago* main.cc (dyn_AttachConsole): Make static.
Christopher Faylor [Sun, 27 Dec 2009 17:46:25 +0000 (17:46 +0000)]
* 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.

14 years ago* ini.h: Use is_legacy to control setup.ini names.
Christopher Faylor [Tue, 22 Dec 2009 17:12:46 +0000 (17:12 +0000)]
* 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.

14 years ago* package_message (packagemessage::display): Avoid displaying a message when in
Christopher Faylor [Tue, 22 Dec 2009 16:19:51 +0000 (16:19 +0000)]
* package_message (packagemessage::display): Avoid displaying a message when in
unattended mode.

14 years ago * win32.h (isdirsep): Define to replace local isslash definitions.
Corinna Vinschen [Tue, 22 Dec 2009 10:52:48 +0000 (10:52 +0000)]
* win32.h (isdirsep): Define to replace local isslash definitions.
* UserSettings.cc (UserSettings::open_settings): Remove isslash.
Use isdirsep instead of isslash.
* filemanip.cc (mklongpath): Ditto.
* root.cc (directory_is_rootdir): Ditto.
* localdir.cc (LocalDirSetting::save): Avoid consecutive backslashes
in setup log file paths.
* main.cc (main): Ditto.

14 years ago* choose.cc (ChooserPage::PlaceDialog): Put *correct* size in WINDOWPLACEMENT
Christopher Faylor [Tue, 22 Dec 2009 01:26:39 +0000 (01:26 +0000)]
* choose.cc (ChooserPage::PlaceDialog): Put *correct* size in WINDOWPLACEMENT
length field.

14 years ago Throughout, revert prototypes and methods set_mtime_and_mode to
Corinna Vinschen [Fri, 18 Dec 2009 11:59:54 +0000 (11:59 +0000)]
Throughout, revert prototypes and methods set_mtime_and_mode to
set_mtime and only care for the file timestamp.

Throughout, accommodate additional mode_t parameter in call to
io_stream::open.

* IOStreamProvider.h (IOStreamProvider::open): Add mode_t parameter.
* archive.cc (archive::extract_file): Reorder creation of in and tmp
to get the file mode from the tar archive earlier.  Call io_stream::open
with additional mode from tar archive.  Accommodate reversion to
set_mtime.
* filemanip.cc (nt_wfopen): Remove retry loop.  Instead initialize
OBJECT_ATTRIBUTES with matching POSIX perms according to incoming
perms to create correct ACL on file creation.  Remove subsequent call
to nt_sec.SetPosixPerms.
* io_stream.cc (io_stream::open): Take additional mode_t parameter
and connect through to IOStreamProvider's open.
* io_stream.h (io_stream::open): Add mode_t parameter.
* io_stream_cygfile.cc (CygFileProvider::open): Ditto.
(io_stream_cygfile::io_stream_cygfile): Ditto.  Call nt_wfopen with
incoming mode_t parameter.  Make sure .exe and .dll files always
have execute permissions set.
(io_stream_cygfile::set_mtime): Remove retry loop and open file with
just GENERIC_WRITE access.
* io_stream_cygfile.h (io_stream_cygfile::io_stream_cygfile): Add mode_t
parameter.
* io_stream_file.cc (FileProvider::open): Ditto.
(io_stream_file::io_stream_file): Ditto.  Call nt_wfopen with incoming
mode_t parameter.
* io_stream_file.h (io_stream_file::io_stream_file): Add mode_t
parameter.
* io_stream_memory.h (class io_stream_memory): Remove mode member.
Just return 0 from get_mode.
* mkdir.cc (mkdir_p): Remove retry loop.  Instead initialize
OBJECT_ATTRIBUTES with matching POSIX perms according to incoming
perms to create correct ACL on file creation.  Remove subsequent call
to nt_sec.SetPosixPerms.
* mklink2.cc (mkcygsymlink_nt): Remove retry loop.  Instead initialize
SECURITY_ATTRIBUTES with matching POSIX perms to create correct ACL on
file creation.
* win32.cc (NTSecurity::GetPosixPerms): New function to generate
POSIX ACL.  Default to current owner and current primary group for
owner/group permissions.
(NTSecurity::SetPosixPerms): Let GetPosixPerms create the DACL.
(NTSecurity::setAdminGroup): Set groupSID to admins SID if successful.
(NTSecurity::setDefaultSecurity): Store user SID in ownerSID member.
Default groupSID to original primary group.
* win32.h (struct acl_t): Define here.
(class NTSecurity): Rename ownerSID and groupSID to cr_ownerSID and
cr_groupSID.  Change throughout.  Add members ownerSID and groupSID.
Declare new method GetPosixPerms.

14 years ago * filemanip.cc (nt_wfopen): Only call nt_sec.SetPosixPerms if we have
Corinna Vinschen [Thu, 17 Dec 2009 16:31:23 +0000 (16:31 +0000)]
* filemanip.cc (nt_wfopen): Only call nt_sec.SetPosixPerms if we have
WRITE_DAC access.
* mkdir.cc (mkdir_p): Ditto.

14 years ago * filemanip.cc (nt_wfopen): Fix requested access rights. Retry
Corinna Vinschen [Thu, 17 Dec 2009 16:08:23 +0000 (16:08 +0000)]
* filemanip.cc (nt_wfopen): Fix requested access rights.  Retry
without WRITE_DAC access on access denied.  Add comment.
* io_stream_cygfile.cc (io_stream_cygfile::set_mtime_and_mode): Ditto.
* mkdir.cc (mkdir_p): Ditto.
* mklink2.cc (mkcygsymlink_nt): Ditto.

14 years ago * localdir.cc (LocalDirSetting::save): Call mkdir_p with isadir set
Corinna Vinschen [Thu, 17 Dec 2009 10:39:05 +0000 (10:39 +0000)]
* localdir.cc (LocalDirSetting::save): Call mkdir_p with isadir set
since /var/log is a dir.

14 years ago * UserSettings.cc (UserSettings::open_settings): Never add more than
Corinna Vinschen [Wed, 16 Dec 2009 17:15:43 +0000 (17:15 +0000)]
* UserSettings.cc (UserSettings::open_settings): Never add more than
one slash.
* filemanip.cc (tfx_chars): Align to Cygwin's transformation table.
* localdir.cc (LocalDirSetting::save): Call mkdir_p with DOS path.

14 years ago* package_message.h: New file.
Christopher Faylor [Wed, 16 Dec 2009 16:11:24 +0000 (16:11 +0000)]
* package_message.h: New file.

14 years agoAdd missing file.
Christopher Faylor [Wed, 16 Dec 2009 16:10:29 +0000 (16:10 +0000)]
Add missing file.

14 years ago* IniDBBuilder.h (buildMessage): Define for base class.
Christopher Faylor [Sun, 13 Dec 2009 19:23:43 +0000 (19:23 +0000)]
* IniDBBuilder.h (buildMessage): Define for base class.
* IniDBBuilderPackage.cc (IniDBBuilderPackage::buildMessage): Define.
* IniDBBuilderPackage.h (IniDBBuilderPackage::buildMessage): Declare.
* PickPackageLine.cc: Pass pointer to package to "pick" throughout, where
appropriate.
* PickView.cc: Ditto.
* install.cc: Ditto.
* package_meta.cc: Ditto.
* prereq.cc: Ditto.
* package_version.cc: Ditto.
(packageversion::pick): Add pkg pointer as second argument.  Display message
where appropriate.
* package_version.h (packageversion::pick): Add pkg pointer as second argument.
* package_meta.h (packagemeta::mesage): Define.
(packagemeta::set_message): Define.
* inilex.ll: Properly return MESSAGE token.
* iniparse.yy: Handle message: keyword.

14 years ago * localdir.cc (offer_to_create): New function.
Dave Korn [Tue, 8 Dec 2009 22:26:44 +0000 (22:26 +0000)]
* localdir.cc (offer_to_create): New function.
(browse_cb): Handle selection changed and validate failed
callbacks, and call offer_to_create where appropriate.
(browse): Set new dialog style flags in browser info.
(LocalDirPage::OnNext): Replace call to mkdir_p with offer to
create or error message dialog display, allow proceeding to
chooser even if local dir does not exist in unattend mode or
if user insists, and fix small memory leak.

* res.rc (IDS_MAYBE_MKDIR, IDS_CANT_MKDIR, IDS_NO_CWD): Define new
string resources.
* resource.h (IDS_MAYBE_MKDIR, IDS_CANT_MKDIR, IDS_NO_CWD): Define
corresponding resource ID numbers.

14 years ago * main.cc (WinMain): Disable running on Windows 9x. Show message box
Corinna Vinschen [Thu, 3 Dec 2009 11:27:50 +0000 (11:27 +0000)]
* main.cc (WinMain): Disable running on Windows 9x.  Show message box
instead and exit.

14 years ago (ChooserPage::createListview): When nothing is found in the "All"
Dave Korn [Thu, 3 Dec 2009 04:59:46 +0000 (04:59 +0000)]
(ChooserPage::createListview): When nothing is found in the "All"
category, pass an empty static dummy category object to the PickView
constructor, instead of trying to dereference not-found iterator.

14 years ago * io_stream_cygfile.cc (io_stream_cygfile::get_size): Don't try to
Corinna Vinschen [Mon, 23 Nov 2009 10:38:31 +0000 (10:38 +0000)]
* io_stream_cygfile.cc (io_stream_cygfile::get_size): Don't try to
close invalid handle.
* io_stream_file.cc (io_stream_file::get_size): Ditto

14 years ago * threebar.cc (ThreeBarProgressPage::OnMessageApp): Don't loop forever
Dave Korn [Sun, 22 Nov 2009 18:58:00 +0000 (18:58 +0000)]
* threebar.cc (ThreeBarProgressPage::OnMessageApp): Don't loop forever
retrying ini file download/parse if it errors in unattended mode.

14 years ago * package_meta.cc (CategoryOption): New StringOption for '-C'.
Dave Korn [Sun, 22 Nov 2009 02:20:15 +0000 (02:20 +0000)]
* package_meta.cc (CategoryOption): New StringOption for '-C'.
(parseNames): New helper subroutine abstracts string parsing from ...
(packagemeta::isManuallyWanted): Use it, and check for category names
from CategoryOption as well as individual package names.
* package_db.cc (packagedb::fillMissingCategory): Don't check for
manually-wanted packages until after initialising all the categories.

14 years ago * localdir.cc (LocalDirSetting::LocalDirSetting): Restore -l option.
Dave Korn [Wed, 4 Nov 2009 19:43:14 +0000 (19:43 +0000)]
* localdir.cc (LocalDirSetting::LocalDirSetting): Restore -l option.

14 years ago * site.cc: Add #include of BoolOption header from libgetopt.
Dave Korn [Wed, 4 Nov 2009 19:39:05 +0000 (19:39 +0000)]
* site.cc: Add #include of BoolOption header from libgetopt.
(OnlySiteOption): New BoolOption for command-line -O option.
(get_site_list): Respect BoolOption by not downloading mirror
list, nor using nor updating cached mirrors.

14 years ago * download.cc (do_download_thread): Only retry an incomplete download
Dave Korn [Wed, 4 Nov 2009 19:37:36 +0000 (19:37 +0000)]
* download.cc (do_download_thread): Only retry an incomplete download
a limited number of times in unattended mode.

14 years ago * main.cc (main_display): Use apartment-, not multi- threading model
Dave Korn [Wed, 4 Nov 2009 15:39:43 +0000 (15:39 +0000)]
* main.cc (main_display): Use apartment-, not multi- threading model
when initialiseing COM.

14 years ago * localdir.cc (browse): Make title text depend on what we do.
Corinna Vinschen [Wed, 4 Nov 2009 15:14:51 +0000 (15:14 +0000)]
* localdir.cc (browse): Make title text depend on what we do.
(LocalDirPage::OnNext): If we plan to download, try to create directory
before cd'ing into it.

14 years ago * mkdir.cc: Include sys/stat.h unconditionally.
Corinna Vinschen [Tue, 3 Nov 2009 13:53:47 +0000 (13:53 +0000)]
* mkdir.cc: Include sys/stat.h unconditionally.
(mkdir_p): Add S_IFDIR flag in call to nt_sec.SetPosixPerms.
* win32.cc: Include sys/stat.h.
(NTSecurity::SetPosixPerms): Add CREATOR OWNER, CREATOR GROUP, and
Everyone inheritance-only entries when setting a directory DACL.
(NTSecurity::initialiseWellKnownSIDs): Create SIDs for CREATOR OWNER and
CREATOR GROUP.
* win32.h (class NTSecurity): Add members ownerSID and groupSID.

14 years ago * main.cc (main): Make sure C runtime uses same codepage as GUI.
Corinna Vinschen [Sat, 3 Oct 2009 10:25:37 +0000 (10:25 +0000)]
* main.cc (main): Make sure C runtime uses same codepage as GUI.

14 years ago* main (set_cout): Really do attach to a console if stdout is "bad".
Christopher Faylor [Sun, 20 Sep 2009 16:41:30 +0000 (16:41 +0000)]
* main (set_cout): Really do attach to a console if stdout is "bad".

14 years ago* root.cc (string orig_root_dir): New variable.
Christopher Faylor [Sat, 19 Sep 2009 03:38:50 +0000 (03:38 +0000)]
* root.cc (string orig_root_dir): New variable.
(check_if_enable_next): Show warning against installing Cygwin into disk root
only if the root directory has actually been changed.
* res.rc: Make the root dir warning a bit more meaningful, and refrain from
using uppercase.
* choose.cc (ChooserPage::OnBack): Revert to non-maximized when returning to
mirror from package selection.

14 years ago * site.cc (get_site_list): Use empty string if user settings
Dave Korn [Fri, 18 Sep 2009 15:40:49 +0000 (15:40 +0000)]
* site.cc (get_site_list): Use empty string if user settings
return NULL pointer for cached mirrors list.
(SiteSetting::getSavedSites): Do nothing if user settings return
NULL pointer for last mirror URL.

14 years ago* site.cc (SiteSetting::registerSavedSite): Fix comment.
Christopher Faylor [Fri, 21 Aug 2009 04:15:01 +0000 (04:15 +0000)]
* site.cc (SiteSetting::registerSavedSite): Fix comment.

15 years ago* main.cc (set_cout): Don't reset stdout if we already have a stdout.
Christopher Faylor [Fri, 3 Jul 2009 19:39:02 +0000 (19:39 +0000)]
* main.cc (set_cout): Don't reset stdout if we already have a stdout.

15 years ago* choose.cc (ChooserPage::ChooserPage): Use more specific name for saving
Christopher Faylor [Fri, 3 Jul 2009 16:53:04 +0000 (16:53 +0000)]
* choose.cc (ChooserPage::ChooserPage): Use more specific name for saving
window settings.
(ChooserPage::~ChooserPage): Ditto.

15 years ago * PickView.h (PickView::total_delta_x): New int member.
Dave Korn [Wed, 1 Jul 2009 07:50:07 +0000 (07:50 +0000)]
* PickView.h (PickView::total_delta_x):  New int member.
(PickView::set_header_column_order):  Add prototype.
* PickView.cc (PickView::set_header_column_order):  New function,
broken out from ...
(PickView::set_headers):  ... here.  Call it.
(PickView::init_headers):  Apply total_delta_x to last_col width.
(PickView::PickView):  Initialise new total_delta_x member to zero.
(PickView::WindowProc):  Use set_header_column_order to find and
adjust final column for both sets of headers.

15 years agowhitespace cleanup.
Christopher Faylor [Tue, 30 Jun 2009 04:14:30 +0000 (04:14 +0000)]
whitespace cleanup.

15 years ago* SourceSetting.cc (SourceSetting::SourceSetting): Restore proper remembrane of
Christopher Faylor [Tue, 30 Jun 2009 04:03:12 +0000 (04:03 +0000)]
* SourceSetting.cc (SourceSetting::SourceSetting): Restore proper remembrane of
last source setting.
* choose.cc (ChooserPage::ChooserPage): Potentially retrieve dialog placement
info.
(ChooserPage::~ChooserPage): Save geometry settings if the user moved or
resized the page.
(ChooserPage::PlaceDialog): Rename from MaximizeDialog.  Accommodate changed
user placement settings.
(ChooserPage::OnActivate): MaximizeDialog -> PlaceDialog.
(ChooserPage::OnNext): Ditto.
* choose.h (ChooserPage::~ChooserPage): Define.
(ChooserPage::cmd_show): Delete.
(ChooserPage::saved_geom): New field.
(ChooserPage::window_placement): Ditto.
(ChooserPage::pre_chooser_placement): Ditto.
(ChooserPage::PlaceDialog): Rename from MaximizeDialog.

15 years ago* ConnectionSetting.cc (ConnectionSetting::ConnectionSetting): Remove old code
Christopher Faylor [Sun, 28 Jun 2009 17:36:44 +0000 (17:36 +0000)]
* ConnectionSetting.cc (ConnectionSetting::ConnectionSetting): Remove old code
which no longer makes sense when run from a constructor.
* SourceSetting.cc (SourceSetting::SourceSetting): Ditto.
* localdir.cc (LocalDirSetting::LocalDirSetting): Ditto.  Fix typo which caused
saved settings to be ignored.

15 years ago* UserSettings.cc (UserSettings::UserSettings): settings.rc -> setup.rc.
Christopher Faylor [Sun, 28 Jun 2009 16:40:22 +0000 (16:40 +0000)]
* UserSettings.cc (UserSettings::UserSettings): settings.rc -> setup.rc.

15 years ago * desktop.cc (DesktopSetupPage::OnInit): Drop CoInitialize call here.
Corinna Vinschen [Sun, 28 Jun 2009 10:26:14 +0000 (10:26 +0000)]
* desktop.cc (DesktopSetupPage::OnInit): Drop CoInitialize call here.
* main.cc (main_display): Use InitCommonControlsEx rather than
InitCommonControls per MSDN.  Call CoInitializeEx and create IShellLink
instance here to workaround a problem on Windows 7.  Release IShellLink
instance and call CoUninitialize on exit.
* mklink.cc (sl): Change to global variable.  Drop call to
CoCreateInstance here.  Check if sl is valid before using it.

15 years agoPreliminary option handling revamp. Throughout, change load/save methods to
Christopher Faylor [Sun, 28 Jun 2009 03:50:43 +0000 (03:50 +0000)]
Preliminary option handling revamp.  Throughout, change load/save methods to
constructors/destructors which use new UserSettings methods.  Do not inherit
from UserSetting class.
* KeysSetting.cc (ExtraKeysSetting *ExtraKeysSetting::global): Define.
(ExtraKeysSetting::ExtraKeysSetting): Initialize some class members use new
UserSettings methods.
(ExtraKeysSetting::~ExtraKeysSetting): Use new UserSettings method.
* Makefile.am (setup_SOURCES): Eliminate UserSetting.h and UserSetting.cc.
* UserSettings.cc: Complete rewrite.  Implements new UserSettings class
methods.
* UserSettings.h: Complete rewrite.  Defines new UserSettings class methods.
* crypto.cc (ExtraKeys): Delete.
(add_key_from_sexpr): Use ExtraKeysSetting::instance rather than ExtraKeys.
(verify_ini_file_sig): Ditto.
* io_stream.h (io_stream): Define virtual << operators.
* localdir.cc (localDir): Delete.
* main.cc: Include headers which declar new dynamically invoked classes.
(main_display): New function.  Controls order of option setting and property
page setup.  Add new class invocations to force option setting initializtion.
(main): Invoke new UserSettings class constructor to populate new settings
class.  Call main_display() to do most of the setup work.  Call Settings.save
() to save all settings.
* net.cc (theSetting): Delete.
* site.cc (SiteSetting::save): Record whether we've saved the information
already.
(get_site_list): Just use value returned from new UserSettings method rather
than parsing a file.
(SiteSetting::getSavedSites): Ditto.
(write_cache_list): Use UserSettings operator to store mirror cache.
(save_cache_file): Ditto.
* source.cc (theSetting): Delete.
* win32.h: gcc-4 accommodation.

15 years ago * res.rc (SETUP_STANDARD_DIALOG_W, SETUP_STANDARD_DIALOG_H,
Dave Korn [Fri, 26 Jun 2009 15:15:52 +0000 (15:15 +0000)]
* res.rc (SETUP_STANDARD_DIALOG_W, SETUP_STANDARD_DIALOG_H,
SETUP_SMALL_DIALOG_W, SETUP_SMALL_DIALOG_H):  Add constant defines
for dialog sizes.
(SETUP_STANDARD_DIALOG_DIMS, SETUP_SMALL_DIALOG_DIMS):  Add helper
macros for (W,H) pairs of dimensions.
(SETUP_HEADICON_X):  New global constant define.
(IDD_SOURCE, IDD_VIRUS, IDD_LOCAL, IDD_ROOT, IDD_SITE, IDD_NET,
IDD_INSTATUS, IDD_PROXY_AUTH, IDD_NET_AUTH, IDD_DESKTOP,
IDD_FTP_AUTH DIALOG, IDD_DROPPED):  Use the above for dialog sizes,
horizontal rules and icon positioning.
(SETUP_KPCE_W):  New define for radio-button size.
(SETUP_VIEWCAP_W, SETUP_VIEWCAP_X, SETUP_VIEW_W, SETUP_VIEW_X,
SETUP_EXP_X, SETUP_CURR_X, SETUP_PREV_X, SETUP_KEEP_X):  Add defines
for right-aligned controls.
(SETUP_SEARCH_X, SETUP_SEARCH_W, SETUP_SEARCHTEXT_X,
SETUP_SEARCHTEXT_W, SETUP_CLEAR_X, SETUP_CLEAR_W):  Likewise defines
for left-aligned controls.
(IDD_CHOOSE):  Use all the above, and reformat with whitespace
between args for clarity.

15 years ago * Makefile.am (setup_LDADD): Add -lshlwapi.
Corinna Vinschen [Fri, 26 Jun 2009 15:09:07 +0000 (15:09 +0000)]
* Makefile.am (setup_LDADD): Add -lshlwapi.
* PickView.cc: Include shlwapi.h.
(PickView::setViewMode): Compare package name with search string
case-insensitive.
(PickView::insert_category): Ditto.

15 years ago * script.cc (init_run_script): Don't set $HOME to /tmp. It breaks
Corinna Vinschen [Fri, 26 Jun 2009 12:08:54 +0000 (12:08 +0000)]
* script.cc (init_run_script): Don't set $HOME to /tmp.  It breaks
mkpasswd -c.

15 years ago * script.cc (init_run_script): Reinstantiate accidentally removed
Corinna Vinschen [Thu, 25 Jun 2009 18:01:40 +0000 (18:01 +0000)]
* script.cc (init_run_script): Reinstantiate accidentally removed
setting of sh.

15 years ago* script.cc (init_run_script): Revert to initializing cmd based on OS type.
Christopher Faylor [Mon, 22 Jun 2009 21:07:37 +0000 (21:07 +0000)]
* script.cc (init_run_script): Revert to initializing cmd based on OS type.

15 years ago * script.cc (Script::run): Start bash without -c option.
Corinna Vinschen [Mon, 22 Jun 2009 16:18:13 +0000 (16:18 +0000)]
* script.cc (Script::run): Start bash without -c option.

15 years ago* threebar.cc (ThreeBarProgressPage::ins_dialog): Move variable to more
Christopher Faylor [Sat, 20 Jun 2009 21:54:22 +0000 (21:54 +0000)]
* threebar.cc (ThreeBarProgressPage::ins_dialog): Move variable to more
appropriate class.
(ThreeBarProgressPage::MaximizeDialog): Move function to more appropriate
class.
(ThreeBarProgressPage::OnMessageApp): Remove MaximizeDialog calls.
* threebar.h: Remove maximize handling.
* choose.cc (ChooserPage::ins_dialog): New variable.
(ChooserPage::MaximizeDialog): New function.
(ChooserPage::ChooserPage): Remove unneeded handling of nCmdShow.
(ChooserPage::OnActivate): Maximize chooser page via MaximizeDialog.
(ChooserPage::OnNext): Revert chooser page to normal before returning.
* main.cc (main): Don't pass cmd_show to ChooserPage.
* propsheet.cc (PropSheetProc): Accommodate change in class for SetHwndDialog.

15 years ago* script.cc (shells): Delete.
Christopher Faylor [Sat, 20 Jun 2009 19:47:29 +0000 (19:47 +0000)]
* script.cc (shells): Delete.
(cmd): Just assign to "cmd.exe" since we're always running on NT now.
(sanitize_PATH ): New function.
(init_run_script): Ensure that we're only called once.  Strip environment of
non-pertinent stuff.  Call sanitize_PATH to remove non-standard stuff from the
PATH.  Set up a few standard environment variables.

15 years ago * mount.cc (create_install_root): Don't load mount table again.
Corinna Vinschen [Tue, 16 Jun 2009 10:45:21 +0000 (10:45 +0000)]
* mount.cc (create_install_root): Don't load mount table again.
(read_mounts_nt): Don't break loop, rather continue when not being
able to open "Cygwin" registry key.

15 years ago* source.cc: Add support for both -D and -L on the command line.
Christopher Faylor [Thu, 4 Jun 2009 01:56:28 +0000 (01:56 +0000)]
* source.cc: Add support for both -D and -L on the command line.

15 years ago * filemanip.cc (unlink): Rename from DeleteFileW. Take additional
Corinna Vinschen [Wed, 3 Jun 2009 08:16:21 +0000 (08:16 +0000)]
* filemanip.cc (unlink): Rename from DeleteFileW.  Take additional
parameter to indicate file type to unlink.  Use in flags given to
NtCreateFile.
(DeleteFileW): Just call unlink from here with FILE_NON_DIRECTORY_FILE
flag.
(RemoveDirectoryW): Ditto with FILE_DIRECTORY_FILE flag.

15 years agoReally start bash with --norc --noprofile options.
Charles Wilson [Sat, 30 May 2009 21:52:49 +0000 (21:52 +0000)]
Really start bash with --norc --noprofile options.

15 years agotweak
Christopher Faylor [Thu, 14 May 2009 15:01:06 +0000 (15:01 +0000)]
tweak

15 years ago * script.cc (Script::run): Start bash with --norc --noprofile options.
Corinna Vinschen [Wed, 13 May 2009 11:44:32 +0000 (11:44 +0000)]
* script.cc (Script::run): Start bash with --norc --noprofile options.

15 years ago Add missing ChangeLog entry
Corinna Vinschen [Wed, 13 May 2009 11:43:44 +0000 (11:43 +0000)]
Add missing ChangeLog entry

15 years ago * filemanip.cc (struct _FILE_RENAME_INFORMATION): Remove definition.
Corinna Vinschen [Wed, 13 May 2009 11:28:34 +0000 (11:28 +0000)]
* filemanip.cc (struct _FILE_RENAME_INFORMATION): Remove definition.
* io_stream_cygfile.cc (io_stream_cygfile::io_stream_cygfile): Set
default permission for .exe files to 0755.
(io_stream_cygfile::mklink): Try to create real hardlink first.  Add
comment.
* mklink2.cc (mkcyghardlink): New function to create real hardlink.
* mklink2.h (mkcyghardlink): Declare.
* mount.cc (from_fstab_line): Set got_usr_bin and got_usr_lib flags
if /usr/bin and /usr/lib mount points exist in /etc/fstab.
(add_usr_mnts): Only create mounts if corresponding got_usr_bin and
got_usr_lib flags are not set.
(read_mounts_nt): Initialize got_usr_bin and got_usr_lib to false.
Always call add_usr_mnts, even if from_fstab succeeded.
* ntdll.h: Include ddk/ntifs.h.

15 years ago * filemanip.cc (GetFileAttributesW): Add accidentally omited
Corinna Vinschen [Tue, 12 May 2009 16:03:08 +0000 (16:03 +0000)]
* filemanip.cc (GetFileAttributesW): Add accidentally omited
OBJ_CASE_INSENSITIVE when creating OBJECT_ATTRIBUTES.
(SetFileAttributesW): Ditto.
(MoveFileW): Ditto.
(DeleteFileW): Ditto.
(RemoveDirectoryW): Ditto.
(nt_wfopen): Ditto.

15 years ago* localdir.cc (load_dialog): Choose description string based on install type.
Christopher Faylor [Mon, 11 May 2009 20:32:59 +0000 (20:32 +0000)]
* localdir.cc (load_dialog): Choose description string based on install type.
* res.rc (IDD_LOCAL_DIR): Replace static description text with
IDC_LOCAL_DIR_DESC.
* resource.h (IDS_LOCAL_DIR_DOWNLOAD): New string resource id.
(IDS_LOCAL_DIR_INSTALL): Likewise.
(IDC_LOCAL_DIR_DESC): New text control resource id.
* main.cc (set_cout): Simplify code a little.

15 years ago * choose.cc (ChooserPage::OnMessageCmd): Clear search filter when
Corinna Vinschen [Mon, 11 May 2009 11:02:11 +0000 (11:02 +0000)]
* choose.cc (ChooserPage::OnMessageCmd): Clear search filter when
clear button clicked.
* res.rc (IDD_CHOOSE_DIALOG): Add IDC_CHOOSE_CLEAR_SEARCH button.
* resource.h (IDC_CHOOSE_CLEAR_SEARCH): New button resource ID.

15 years ago * UserSettings.cc (UserSettings::settingFileForLoad): Fix local load
Corinna Vinschen [Mon, 11 May 2009 10:49:15 +0000 (10:49 +0000)]
* UserSettings.cc (UserSettings::settingFileForLoad): Fix local load
path strings.
(UserSettings::settingFileForSave): Never store in cwd.
* autoload.c (ntdll): Autoload ntdll.dll functions here.
* desktop.cc (make_cygwin_bat): Use GetFileAttributesW rather than
_waccess.  Use nt_wfopen instead of _wfopen.
(save_icon): Ditto.
* filemanip.cc (get_file_size): Call io_stream::open with empty mode
string to avoid opening file twice.
(GetFileAttributesW): New function to replace Win32 function with
equivalent function opening files with backup intent.
(SetFileAttributesW): Ditto.
(MoveFileW): Ditto.
(DeleteFileW): Ditto.
(RemoveDirectoryW): Ditto.
(nt_wfopen): New function to replace _wfopen with equivalent function
opening files with backup intent.
* filemanip.h (nt_wfopen): Declare.
* io_stream_cygfile.cc (io_stream_cygfile::io_stream_cygfile): Initalize
lasterr to 0.  Allow empty mode and don't open file, if so.  Call
nt_wfopen rather than _wfopen.
(io_stream_cygfile::exists): Use GetFileAttributesW rather than
_waccess.
(io_stream_cygfile::get_size): Use CreateFileW/GetFileSize to get
file size on NT.
* io_stream_file.cc (io_stream_file::io_stream_file): Initalize lasterr
to 0.  Allow empty mode and don't open file, if so.  Call nt_wfopen
rather than _wfopen.
(io_stream_file::exists): Use GetFileAttributesW rather than _waccess.
(io_stream_file::remove): Don't try to remove non-existant file.
(io_stream_file::get_size): Use CreateFileW/GetFileSize to get
file size on NT.  Add comment to keep track of 2GB border.
* mkdir.cc: Remove function pointers for ntdll functions.
(init_ntfuncs): Remove function.
(mkdir_p): Drop call to init_ntfuncs.  Call ntdll functions directly
rather than over local function pointers.
* ntdll.h: New file.
* postinstall.cc (do_postinstall_reflector): Switch to admins group
as primary group after postinstall scripts have been written.
Explain why.
(do_postinstall): Add comment.
* res.rc: Bump copyright date.
* win32.h (class TokenGroupCollection): Remove.
* win32.cc (TokenGroupCollection::populate): Remove.
(TokenGroupCollection::find): Remove.
(NTSecurity::setDefaultSecurity): Drop reading token groups.  Just
try to switch to admins group as primary group.

15 years ago * package_db.cc (ConnectedLoopFinder::doIt): Revert patch from
Corinna Vinschen [Thu, 7 May 2009 14:14:58 +0000 (14:14 +0000)]
* package_db.cc (ConnectedLoopFinder::doIt): Revert patch from
2008-08-29.  Add dumb hardcoded algorithm to make sure base-cygwin
and base-passwd are always the first packages in the postinstall
executable order.

15 years ago * install.cc (Installer::StandardDirs): Add /home with 1777 perms.
Corinna Vinschen [Wed, 6 May 2009 12:02:18 +0000 (12:02 +0000)]
* install.cc (Installer::StandardDirs): Add /home with 1777 perms.
* main.cc (main): Drop setting $CYGWIN to nontsec.

15 years ago2009-04-24 Andrew Punch <andrew@magneticbooks.com.au>
Dave Korn [Fri, 24 Apr 2009 21:04:13 +0000 (21:04 +0000)]
2009-04-24  Andrew Punch  <andrew@magneticbooks.com.au>

* PickView.h:  Add #include <string>.
(PickView::SetPackageFilter):  Add new function.
(PickView::packageFilterString):  Add new string data member.
* PickView.cc (PickView::setViewMode):  Use it to filter names.
(PickView::insert_category):  Likewise.
(PickView::PickView):  Initialise packageFilterString to blank.
* res.rc (IDD_CHOOSE):  Add IDC_CHOOSE_SEARCH_EDIT and
IDC_CHOOSE_SEARCH_LABEL controls.
(IDS_SEARCH_TOOLTIP):  Add new string resource.
* resource.h (IDS_SEARCH_TOOLTIP):  New string resource ID.
(IDC_CHOOSE_SEARCH_EDIT):  New edit control ID.
(IDC_CHOOSE_SEARCH_LABEL):  Mew static text control ID.
* choose.cc (ChooserControlsInfo[]):  Add IDC_CHOOSE_SEARCH_LABEL
and IDC_CHOOSE_SEARCH_EDIT controls to auto-resize list.
(ChooserPage::OnInit):  Add tooltip to search edit box.
(ChooserPage::OnMessageCmd):  Handle EN_CHANGE event from
IDC_CHOOSE_SEARCH_EDIT.

15 years ago * propsheet.cc (PropSheetWndProc): Re-enable hasMinRect.
Dave Korn [Fri, 24 Apr 2009 20:57:48 +0000 (20:57 +0000)]
* propsheet.cc (PropSheetWndProc):  Re-enable hasMinRect.

15 years ago * win32.h (NTSecurity::primaryGroupSID): Convert to a structure for
Corinna Vinschen [Thu, 23 Apr 2009 20:21:12 +0000 (20:21 +0000)]
* win32.h (NTSecurity::primaryGroupSID): Convert to a structure for
direct usage in GetTokenInformation.
(NTSecurity::osid): Remove.
(NTSecurity::setAdminGroup): Declare.
* win32.cc (NTSecurity::resetPrimaryGroup): Accommodate change to
primaryGroupSID.  Add log output.
(NTSecurity::setAdminGroup): New method.
(NTSecurity::setDefaultSecurity): Use local structures for getting
TOKEN_USER and setting TOKEN_OWNER information.  Accommodate change to
primaryGroupSID.  Slightly enhance log output.
Only set primary group to Administrators group when installing for
all users.  Call setAdminGroup to do it.

15 years ago * mklink2.cc (mkcygsymlink_nt): Allow 4K chars in symlink. Use strncat
Corinna Vinschen [Wed, 22 Apr 2009 19:14:48 +0000 (19:14 +0000)]
* mklink2.cc (mkcygsymlink_nt): Allow 4K chars in symlink.  Use strncat
rather than strcat.
* postinstall.cc (do_postinstall): Reset user token to original
primary group.
* win32.cc (NTSecurity::resetPrimaryGroup): New methid.
(NTSecurity::setDefaultSecurity): Store original primary group in
new NTSecurity member primaryGroupSID.  Set primary group in user token
to Administrators group for admin users.  Align comment.
* win32.h (class NTSecurity): Add member primaryGroupSID.
(NTSecurity::resetPrimaryGroup): Declare.

15 years ago* main.cc (set_cout): Load AttachConsole dynamically to avoid using it on older
Christopher Faylor [Fri, 10 Apr 2009 02:12:56 +0000 (02:12 +0000)]
* main.cc (set_cout): Load AttachConsole dynamically to avoid using it on older
Windows which don't support it.

15 years agofix whitespace
Christopher Faylor [Sat, 21 Mar 2009 21:15:47 +0000 (21:15 +0000)]
fix whitespace

15 years ago* LogFile.cc (LogFile::endEntry): Output messages to stdout.
Christopher Faylor [Sat, 21 Mar 2009 21:00:25 +0000 (21:00 +0000)]
* LogFile.cc (LogFile::endEntry): Output messages to stdout.
* main.cc (set_cout): New function.  Sets stdout to console if one exists.
(main): Redirect stdout to console if unattended_mode or help option is
specified and no stdout is available.  Christopher Faylor <me+cygwin@cgf.cx>
* propsheet.cc (PropSheetWndProc): Detect a Window closing event and issue an
"Are you sure" message.

15 years ago * package_db.cc (ConnectedLoopFinder::doIt): Add code to get a basic
Corinna Vinschen [Fri, 29 Aug 2008 16:06:29 +0000 (16:06 +0000)]
* package_db.cc (ConnectedLoopFinder::doIt): Add code to get a basic
order into the dependency list.  Add comment to explain why.

15 years ago * KeysSetting.cc: Include string.h for memcpy et al.
Brian Dessent [Fri, 22 Aug 2008 11:34:43 +0000 (11:34 +0000)]
* KeysSetting.cc: Include string.h for memcpy et al.
* filemanip.cc: Include stdlib.h for for mbstowcs.
* io_stream_cygfile.h: Update cygmkdir_p prototype for mode_t.
* mount.cc (conv_fstab_spaces): Silence gcc 4.3 warning ("parentheses
around assignment used as truth value").

15 years ago * install.cc (Installer::StandardDirs): Additionally create /var/log
Corinna Vinschen [Wed, 20 Aug 2008 13:17:41 +0000 (13:17 +0000)]
* install.cc (Installer::StandardDirs): Additionally create /var/log
dir.  Set mode of /var/log and /var/run to 01777.
* localdir.cc (LocalDirSetting::save): Create /var/log with 01777
permissions before creating setup.log files.

15 years ago * io_stream_cygfile.cc (io_stream_cygfile::set_mtime_and_mode):
Corinna Vinschen [Wed, 20 Aug 2008 10:33:25 +0000 (10:33 +0000)]
* io_stream_cygfile.cc (io_stream_cygfile::set_mtime_and_mode):
Accommodate SetPosixPerms being method of nt_sec.
* mkdir.cc (mkdir_p): Ditto.
* mklink2.cc (mkcygsymlink_nt): Ditto.
* win32.cc: Slightly rearrange.
(NTSecurity::SetPosixPerms): Make SetPosixPerms method of NTSecurity
rather than stand-alone function.  Remove dynamic allocation for
security descriptors in favor of static allocation.  Drop out
preliminary if well-known SIDs are not initialized.  Slightly change
and rearrange comments.  Add creating NULL SID ACE for special
permissions.
(NTSecurity::initialiseWellKnownSIDs): New function, replacing
NTSecurity::initialiseEveryOneSID.  Initialize all well-known SIDs
here.  Set wellKnownSIDsinitialized to true on success.
(NTSecurity::setDefaultDACL): Don't call initialiseEveryOneSID.  Change
comment.  Drop setting failed.  Don't open process token here.
(NTSecurity::setBackupPrivileges): New function.
(NTSecurity::setDefaultSecurity): Call initialiseWellKnownSIDs.
Open process token here.  Disable setting primary group.  Add comment
to explain why.
* win32.h (SetPosixPerms): Move to NTSecurity.
(class NTSecurity): Add SetPosixPerms method.  Make all SIDs private
again.  Make NoteFailedAPI private.  Add setBackupPrivileges method.
Rename usid to UsersSID.  Remove failed method and _failed member.
Add wellKnownSIDsinitialized accessors and _wellKnownSIDsinitialized
member.

15 years ago * install.cc (struct std_dirs_t): New type.
Corinna Vinschen [Tue, 19 Aug 2008 21:04:15 +0000 (21:04 +0000)]
* install.cc (struct std_dirs_t): New type.
(class Installer): Change type of StandardDirs to std_dirs_t.
(Installer::StandardDirs): Store filename and mode.
(do_install_thread): Call io_stream::mkpath_p with name and mode from
Installer::StandardDirs.
* main.cc (main): Call setDefaultSecurity on global nt_sec.
* IOStreamProvider.h (IOStreamProvider::mkdir_p): Add mode parameter.
* LogFile.cc (LogFile::log_save): Call io_stream::mkpath_p with 0755
mode.
* UserSettings.cc (UserSettings::settingFileForSave): Ditto.
* desktop.cc (make_link): Ditto.
* download.cc (download_one): Ditto.
* ini.cc (do_remote_ini): Ditto.
(do_ini_thread): Ditto.
* package_db.cc (packagedb::flush): Ditto.
* archive.cc (archive::extract_file): Ditto.  Call set_mtime_and_mode
with mode from archive.  Add code to handle directory permissions as
well.
* archive_tar.cc (archive_tar::get_mtime): Return time_t.  Reformat.
(archive_tar::get_mode): New method.
* archive_tar.h (class archive_tar_file): Fix prototypes.  Replace
prototype for set_mtime with prototype for set_mtime_and_mode.
(class archive_tar): Ditto.
* archive_tar_file.cc (archive_tar_file::get_mtime): Return time_t.
(archive_tar_file::get_mode): New method returning mode from tar header.
* compress_bz.cc (compress_bz::set_mtime_and_mode): Replace set_mtime.
(compress_bz::get_mtime): Return time_t.
(compress_bz::get_mode): New function.
* compress_gz.cc: Ditto.
* compress_lzma.cc: Ditto.
* io_stream.cc (io_stream::mkpath_p): Take additional file mode.
Call mkdir_p with additional file mode.
* io_stream_cygfile.cc (CygFileProvider::mkdir_p): Take additional file
mode.
(cygmkdir_p): Ditto.  Call mkdir_p with additional file mode.
(io_stream_cygfile::set_mtime_and_mode): Replace set_mtime.  Call
SetPosixPerms.
* io_stream_file.cc (FileProvider::mkdir_p): Take additional file mode.
(io_stream_file::set_mtime_and_mode): Replace set_mtime.
* mkdir.cc (init_ntfuncs): New function to initialize function pointers
from ntdll.dll.
(mkdir_p): Take additional file mode.  On NT, use NT functions to create
directory.  Call SetPosixPerms.
* compress_bz.h: Change prototypes accordingly.
* compress_gz.h: Ditto.
* compress_lzma.h: Ditto.
* io_stream.h: Ditto.
* io_stream_cygfile.h: Ditto.
* io_stream_file.h: Ditto.
* io_stream_memory.h: Ditto.
* mkdir.h: Ditto.
* mklink2.cc (mkcygsymlink_nt): Open file with STANDARD_RIGHTS_ALL
access and FILE_FLAG_BACKUP_SEMANTICS flag.  Call SetPosixPerms.
* mount.cc (from_fstab): Open file with FILE_FLAG_BACKUP_SEMANTICS.
* script.cc (OutputLog::OutputLog): Call io_stream::mkpath_p with 0755
mode.  Open file with FILE_FLAG_BACKUP_SEMANTICS.
* win32.cc (SetPosixPerms): New function to set POSIX-like permissions.
(nt_sec): New global NTSecurity variable.
(NTSecurity::setDefaultDACL): Open token with TOKEN_ADJUST_PRIVILEGES.
(NTSecurity::setDefaultSecurity): Enable SE_BACKUP_NAME and
SE_RESTORE_NAME privileges if available.
* win32.h (SetPosixPerms): Add prototype.
(class NTSecurity): Make everyOneSID and administratorsSID public.
(nt_sec): Declare.

15 years ago * mount.cc (unconvert_slashes): New inline function.
Corinna Vinschen [Thu, 14 Aug 2008 09:38:21 +0000 (09:38 +0000)]
* mount.cc (unconvert_slashes): New inline function.
(skip_ws): New inline function.
(find_ws): New inline function.
(conv_fstab_spaces): New inline function.
(from_fstab_line): New function to read single line from fstab file.
(from_fstab): New function to read /etc/fstab file and fill mount
table.
(read_mounts_nt): Call from_fstab after getting setup/rootdir from
registry.  Only call add_usr_mnts if no fstab file found.

15 years ago * install.cc (Installer::installOne): Skip 46 bytes type tar package
Corinna Vinschen [Wed, 13 Aug 2008 09:51:11 +0000 (09:51 +0000)]
* install.cc (Installer::installOne): Skip 46 bytes type tar package
silently.

15 years ago * install.cc (Installer::installOne): Use MoveFileExW on NT. Special
Corinna Vinschen [Wed, 13 Aug 2008 08:54:14 +0000 (08:54 +0000)]
* install.cc (Installer::installOne): Use MoveFileExW on NT.  Special
case for bug in Windows 2000.
* package_meta.cc (packagemeta::uninstall): Use wide char file functions
on NT.
* win32.h (VersionInfo::major): New method.
(VersionInfo::minor): New method.
(OSMajorVersion): Define.
(OSMinorVersion): Define.

15 years ago Revamp for Cygwin 1.7.
Corinna Vinschen [Tue, 12 Aug 2008 20:32:08 +0000 (20:32 +0000)]
Revamp for Cygwin 1.7.
* desktop.cc (make_cygwin_bat): Use wide char file functions on NT.
(save_icon): Ditto.
* filemanip.cc (tfx_chars): New char table for wide char transformation
of reserved FS chars to UNICODE private use area.
(transform_chars): New static function.
(mklongpath): New function to convert multibyte path to wide char
path with long path prefix.
* filemanip.h (mklongpath): Declare.
* ini.h (SETUP_INI_FILENAME): Use setup.ini filenames as defined in
real life (setup-2.ini/setup.ini).
(SETUP_BZ2_FILENAME): Ditto.
* install.cc (do_install_thread): Don't create registry mount points
on NT, rather create setup/rootdir entry.
* io_stream_cygfile.cc: Throughout use wide char file functions on NT.
(io_stream_cygfile::w_str): New method to create wide char path.
* io_stream_cygfile.h (class io_stream_cygfile): Remove lmode member.
Add wname member and w_str method.
* io_stream_file.cc: Throughout use wide char file functions on NT.
(io_stream_file::w_str): New method to create wide char path.
* io_stream_file.h (class io_stream_file): Remove lmode member.
Add wname member and w_str method.
* mkdir.cc (mkdir_p): Use wide char file functions on NT.
* mklink2.cc (mkcygsymlink_9x): Rename from mkcygsymlink.  Make static.
(mkcygsymlink_nt): New static function.
(mkcygsymlink): Just call mkcygsymlink_9x or mkcygsymlink_nt dependent
on OS.
* mount.cc (CYGWIN_INFO_CYGWIN_SETUP_REGISTRY_NAME): Define.
(remove1): Move to earlier point in file to avoid declaration.
(remove_mount): Ditto.  Make static.
(create_install_root): New function to create setup/rootdir registry
value on NT.
(read_mounts_9x): Rename from read_mounts.  Make static.  Conditionalize
for OS.
(add_usr_mnts): New static function.
(read_mounts_nt): Ditto, to read mounts on NT.
(read_mounts): Just call read_mounts_nt or read_mounts_9x dependent on
OS.
(set_root_dir): On NT, call read_mounts.
(cygpath): Only add slash for non-root mount to avoid multiple slashes
in resulting path (invalid in long path names).
* mount.h (find_mount): Drop declaration.
(remove_mount): Ditto.
(create_install_root): Add declaration.
(read_mounts): Accommodate new parameter.
* package_db.cc (chosen_db_task): New global variable.
* package_db.h (chosen_db_task): Declare.
* root.cc (check_if_enable_next): Don't use get_root_dir here to
avoid having to call save_dialog in RootPage::OnMessageCmd.
(GetDlgItemRect): New static inline function.
(SetDlgItemRect): Ditto.
(load_dialog): On NT, stretch "Install For" block to full dialog width
and hide "Default Text File Type" block.
(save_dialog): On NT set root_text always to IDC_ROOT_BINARY.
(RootPage::OnMessageCmd): Remove call to save_dialog.
(RootPage::OnNext): Initialize packagedb here the first time, to
avoid fetching wrong data from different previous installation.
* source.cc (save_dialog): Don't initialize packagedb here, rather
just memorize setting in chosen_db_task for the deferred initialization
in RootPage::OnNext.

15 years ago Implement command-line selection of packages to install and make
Dave Korn [Thu, 7 Aug 2008 22:59:17 +0000 (22:59 +0000)]
Implement command-line selection of packages to install and make
unattended mode deal with any dialogs that might arise.  A joint
effort synthesized from contributions by:

Dr. Frank Lee  <rl201@cam.ac.uk>
Bryan Thrall  <bryan.thrall@flightsafety.com>
Kohsuke Kawaguchi  <kk@kohsuke.org>
Dave Korn  <dave.korn.cygwin@gmail.com>

* install.cc (rebootneeded):  Don't define statically here.
(do_install_thread):  Let exit_msg reflect rebootneeded.
* main.cc (main):  If rebootneeded, log it when exiting.
* msg.cc (mbox):  In unattended_mode, choose and log default answer.
* package_db.cc (packagedb::fillMissingCategory):  Iterate over all
packages adding those selected by packagemeta::isManuallyWanted to
base category so that command-line selections are installed.
* package_meta.cc (PackageOption):  Add new StringOption to allow
command-line selection of packages to add to base install.
(packagemeta::isManuallyWanted):  New function tests if package was
selected on command-line.
(packagemeta::addToCategoryBase):  New function adds package to
"base" category.
* state.cc (rebootneeded):  Define here non-static.
* state.h (rebootneeded):  Declare here with extern linkage.
* threebar.cc (ThreeBarProgressPage::MaximizeDialog):  Don't change
size when running in unattended mode.

15 years ago* UserSettings.cc (UserSettings::settingFileForLoad): Look locally for settings
Christopher Faylor [Tue, 5 Aug 2008 15:48:55 +0000 (15:48 +0000)]
* UserSettings.cc (UserSettings::settingFileForLoad): Look locally for settings
before looking outside of current directory.
* choose.cc (ChooserPage::ChooserPage): Record the property sheet's current
show state via new passed in parameter.
* choose.h (ChooserPage::ChooserPage): Reflect change in argument list.
(ChooserPage::nCmdShow): Define new element.
* main.cc (main): Send current show state to Chooser.
* package_version.cc (packageversion::set_requirements): Increase recursion
check from 5 to 30.
* propsheet.cc (PropSheetWndProc): Register hwndDlg with ThreeBarProgressPage.
* threebar.cc (ControlAdjuster::ControlInfo): Initialize cmd_show_set.
(ThreeBarProgressPage::MaximizeDialog): New function.
(ThreeBarProgressPage::OnMessageApp): Call MaximizeDialog to maximize package
selection screen and restore when done.
* threebar.h (ThreeBarProgressPage::MaximizeDialog): Declare function.
(ThreeBarProgressPage::cmd_show_set): Declare variable.
(ThreeBarProgressPage::cmd_show): Declare variable.
(ThreeBarProgressPage::ins_dialog): Declare variable.
(ThreeBarProgressPage::SetHwndDialog): Define function.

15 years agoAdd support for .tar.lzma files (decompress only).
Charles Wilson [Wed, 23 Jul 2008 01:48:16 +0000 (01:48 +0000)]
Add support for .tar.lzma files (decompress only).

16 years agoFix memory leak in compress::decompress().
Charles Wilson [Wed, 9 Jul 2008 01:44:19 +0000 (01:44 +0000)]
Fix memory leak in compress::decompress().

2008-06-29  Charles Wilson  <cygwin@cwilson.fastmail.fm>

* compress.cc (compress::decompress): clean up concrete
decompressor objects on failure -- but in that case, do
NOT destroy original io_stream.
* compress_bz.h (compress_bz::release_original): new method.
(owns_original): new member variable.
* compress_bz.cc (compress_bz::release_original): new method.
(compress_bz::compress_bz): take ownership of parent by default.
(compress_bz::~compress_bz): only delete original if
owns_original is true.
* compress_gz.h (compress_gz::release_original): new method.
(owns_original): new member variable.
* compress_gz.cc (compress_gz::release_original): new method.
(compress_gz::construct): take ownership of parent by default.
(compress_gz::~compress_gz): only delete original if
owns_original is true.

16 years ago * configure.in, gpg-error-config-fake: Revert previous removal.
Dave Korn [Wed, 25 Jun 2008 08:40:12 +0000 (08:40 +0000)]
* configure.in, gpg-error-config-fake:  Revert previous removal.

16 years ago * gpg-error-config-fake: Delete file obsoleted by de-hackification.
Dave Korn [Wed, 25 Jun 2008 00:57:19 +0000 (00:57 +0000)]
* gpg-error-config-fake:  Delete file obsoleted by de-hackification.

16 years ago * net.cc: Correct stray CRLF.
Dave Korn [Wed, 25 Jun 2008 00:54:20 +0000 (00:54 +0000)]
* net.cc:  Correct stray CRLF.

This page took 0.078762 seconds and 5 git commands to generate.