]> cygwin.com Git - cygwin-apps/setup.git/log
cygwin-apps/setup.git
8 years agoRemove unfinished, unused support for 'autodep:' lines in setup.ini
Jon Turney [Fri, 18 Sep 2015 14:22:04 +0000 (15:22 +0100)]
Remove unfinished, unused support for 'autodep:' lines in setup.ini

This effectively reverts the parts of commits
9b98ba2301658c34d0e9c3fd4bbd964ce52ef8ae and
dd15057d785045dfc1395ed5f39c84bcdcb88b13 which add that.

* IniDBBuilder.h (IniDBBuilder::autodep): Remove.
* IniDBBuilderPackage.cc (IniDBBuilderPackage::autodep): Remove.
* IniDBBuilderPackage.h (IniDBBuilderPackage::autodep): Remove.
* cygpackage.cc (cygpackage::set_autodep): Remove.
* cygpackage.h (cygpackage::set_autodep): Remove.
* inilex.ll: Remove autodep.
* iniparse.yy: Remove autodep.
* package_version.cc (packageversion::set_autodep): Remove.
* package_version.h (packageversion::set_autodep): Remove.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoRemove unused regex code
Jon Turney [Fri, 18 Sep 2015 14:13:13 +0000 (15:13 +0100)]
Remove unused regex code

This effectively reverts the parts of commit
01d9015868088fc3347511a095dce0195751c530 which add those sources

That commit also adds -fno-builtin-sscanf to CXXFLAGS. Probably that is part of
the same change, but I don't know for sure, so I've left that alone.

* Makefile.am (AM_CPPFLAGS): Remove regex from include path.
(@SETUP@_SOURCES): Remove regex.c.
* regex/config.h: Delete file.
* regex/re_comp.h: Delete file.
* regex/regcomp.c: Delete file.
* regex/regex.c: Delete file.
* regex/regex.h: Delete file.
* regex/regex_internal.c: Delete file.
* regex/regex_internal.h: Delete file.
* regex/regexec.c: Delete file.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agowin32.h: Fix FIXME comment
Corinna Vinschen [Thu, 21 Jan 2016 09:52:46 +0000 (10:52 +0100)]
win32.h: Fix FIXME comment

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoPartially revert "Remove autoload considerations from win32.h"
Corinna Vinschen [Wed, 20 Jan 2016 20:29:29 +0000 (21:29 +0100)]
Partially revert "Remove autoload considerations from win32.h"

Keep WINBASEAPI defined.  Change comment to explain why.

8 years agoDeprecate ChangeLog file
Corinna Vinschen [Wed, 20 Jan 2016 18:00:55 +0000 (19:00 +0100)]
Deprecate ChangeLog file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDrop Windows 2000 considerations from installer code
Corinna Vinschen [Wed, 20 Jan 2016 17:53:52 +0000 (18:53 +0100)]
Drop Windows 2000 considerations from installer code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoWinMain: Drop local GetVersionEx in favour of using OSMajorVersion.
Corinna Vinschen [Wed, 20 Jan 2016 17:52:46 +0000 (18:52 +0100)]
WinMain: Drop local GetVersionEx in favour of using OSMajorVersion.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRemove autoload considerations from win32.h
Corinna Vinschen [Wed, 20 Jan 2016 17:50:57 +0000 (18:50 +0100)]
Remove autoload considerations from win32.h

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoMove definition of _WIN32_WINNT to win32.h and bump to Windows 10
Corinna Vinschen [Wed, 20 Jan 2016 17:50:14 +0000 (18:50 +0100)]
Move definition of _WIN32_WINNT to win32.h and bump to Windows 10

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoUse Winsock 2 throughout
Yaakov Selkowitz [Fri, 8 Jan 2016 20:25:55 +0000 (14:25 -0600)]
Use Winsock 2 throughout

Winsock 2 was shipped with Windows 98.

* Makefile.am (@SETUP@_LDADD): Link with ws2_32 instead of wsock32.
* nio-ftp.cc: Include winsock2.h instead of winsock.h.
* nio-http.cc: Ditto.
* simpsock.cc: Ditto.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agonio-ie5: drop unnecessary LoadLibrary call
Yaakov Selkowitz [Fri, 8 Jan 2016 20:23:01 +0000 (14:23 -0600)]
nio-ie5: drop unnecessary LoadLibrary call

wininet.dll is already load-time dynamically linked.

* nio-ie5 (NetIO): Drop unnecessary LoadLibrary call.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agopropsheet: drop support for Common Controls v4
Yaakov Selkowitz [Fri, 8 Jan 2016 19:44:11 +0000 (13:44 -0600)]
propsheet: drop support for Common Controls v4

This test was only needed for Windows 9x, as Windows 2000 shipped with
Internet Explorer 5.01 and Windows ME shipped with 5.5:

https://msdn.microsoft.com/en-us/library/windows/desktop/hh298349.aspx

* propsheet.cc (GetPROPSHEETHEADERSize): Remove.
(PropSheet::Create): Use sizeof (PROPSHEETHEADER) unconditionally.
* win32.h (_WIN32_IE): Remove.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFix logical expressions checking if buttons are checked
Corinna Vinschen [Thu, 7 Jan 2016 21:28:03 +0000 (22:28 +0100)]
Fix logical expressions checking if buttons are checked

* AntiVirus.cc (AntiVirusPage::OnActivate): Fix logical expressions
checking if a button is checked.
* net.cc (NetPage::OnInit): Ditto.
* source.cc (SourcePage::OnActivate): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoMake sure Cygwin root is an absolute path
Corinna Vinschen [Tue, 1 Dec 2015 11:14:29 +0000 (12:14 +0100)]
Make sure Cygwin root is an absolute path

* mount.cc (read_mounts): Always convert root dir path from command line
to an absolute path.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDon't stop on various warning message boxes in unattended mode.
Jon Turney [Tue, 20 Oct 2015 12:25:11 +0000 (13:25 +0100)]
Don't stop on various warning message boxes in unattended mode.

Change simple uses of MessageBox() to use the mbox() wrapper for MessageBox(),
which knows what to do in unattended mode.

There still remain the uses of MessageBox() which check the result, as these
need more detailed study, to choose an appropriate default for unattended mode.

* dialog.cc (fatal): Use mbox rather than MessageBox.
* install.cc (installOne, check_for_old_cygwin): Ditto.
* main.cc (main_display, WinMain): Ditto.
* mount.cc (create_install_root): Ditto.
* nio-ie5.cc (NetIO_IE5): Ditto.
* root.cc (directory_contains_wrong_version): Ditto.
* site.cc (do_download_site_info_thread): Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoAvoid double-slashes in URLs
Michael Bisbjerg [Fri, 18 Sep 2015 13:31:37 +0000 (14:31 +0100)]
Avoid double-slashes in URLs

I noticed once I set up a mirror of my own, that Cygwin Setup will
prepend all it's URL's with a double-slash. This does not seem to be
intentional, and I found the place in the sources where I believe the
error to be.

On line 160 of "download.cc", we see that the "n->key" is the source
of the repository, including a "/", as it is used as the name of the
local cache, which always has a "%2f" in its name. That key is then
used on line 165 in "get_url_to_file", where it is concatenated with
another slash and "pkgsource.Canonical" to make the final URL.

My (untested) patch removes this slash, so that the resulting URL's
will be with a single slash.

8 years agoFix signature check for local directory installation and record names of local mirror... release_2.873
Achim Gratz [Sun, 18 Oct 2015 17:27:42 +0000 (19:27 +0200)]
Fix signature check for local directory installation and record names of local mirror directories

* ini.cc (check_ini_sig): Do not complain about a missing
signature file when installing from localdir.  If it is present it
still must be checked, however.  The "download only" mode should
pull down both the (compressed) setup file and the corresponding
signature (not yet implemented).
(do_local_ini): The builder needs to know the (unescaped) mirror
name it's associated with in order for the file validation to
work.  The found_ini_list should directly provide the constituent
parts so that we don't need to extract them (not yet implemented).

* fromcwd.cc (FindVisitor): Remove superfluous path separator and
simply use SetupArch (which has previously compared equal to
aDir->cFileName) when constructing the setup file name.

* Makefile.am (GITVER): Do not use an explicit HEAD parameter and
add the "--dirty" option so that builds with uncommitted changes
get marked appropriately.

8 years agoFix creation of parent directory for file names containing colons release_2.872
Ken Brown [Fri, 25 Sep 2015 14:18:31 +0000 (10:18 -0400)]
Fix creation of parent directory for file names containing colons

* mkdir.cc (mkdir_p): Remove special treatment of colon in path
name.

9 years agoProperly record SHA512 checksum presence and skip validation for ad-hoc installs
Achim Gratz [Tue, 4 Aug 2015 17:48:56 +0000 (19:48 +0200)]
Properly record SHA512 checksum presence and skip validation for ad-hoc installs

* package_source.h (packagesource): Add boolean member variable
sha512_isSet to record whether an SHA512 checksum has been set.
(packagesource): Initialize sha512_isSet to false.

* IniDBBuilderPackage.cc (buildInstallSHA512, buildSourceSHA512):
Only set the SHA512 checksum when it was previously unset like it
is done for MD5 checksums.  That will generally be the checksum
recorded on the package line in setup.ini, any further checksums
in separate lines will thus be ignored.

* install.cc (chksum_one): Conditionalize the comparison of the
SHA512 checksum on whether or not it was previously set.  Check
SHA512 checksum first since it is the default now.  This is
necessary for ad-hoc installs from local disk without a setup.ini
file.  Output a warning when the checksum was not be verified
because neither a MD5 nor a SHA512 checksum was set.

9 years agoIncrease read buffer size for MD5 checksumming to 64kiB
Achim Gratz [Tue, 4 Aug 2015 17:39:23 +0000 (19:39 +0200)]
Increase read buffer size for MD5 checksumming to 64kiB

* install.cc (md5_one): Change buffer size from 16kiB to 64kiB for
faster reading.

9 years agoSimplify parser, both SHA512 checksum types can parse to the same token
Achim Gratz [Mon, 3 Aug 2015 19:23:37 +0000 (21:23 +0200)]
Simplify parser, both SHA512 checksum types can parse to the same token

* inilex.ll: Introduce HEX and B64 definitions, use them in the
rules section.  Parse both SHA512 and SHA512-Base64URL checksums
to the SHA512 token.
* iniparse.yy (packagedata): Remove all occurences of the
SHA512B64URL token.

9 years agoIf MD5 checksum is missing then SHA512 must always be checked
Achim Gratz [Mon, 3 Aug 2015 19:19:53 +0000 (21:19 +0200)]
If MD5 checksum is missing then SHA512 must always be checked

* install.cc (chksum_one): If MD5 checksum is not available, then
SHA512 must always be checked even if just against the zeroed
digest as initialized.  Otherwise a package with no checksum would
be treated as valid.

9 years agoFix bug in nibbled1 and use character types throughout
Achim Gratz [Mon, 3 Aug 2015 19:04:10 +0000 (21:04 +0200)]
Fix bug in nibbled1 and use character types throughout

* ini.h (nibbled1): Fix a thinko in this macro that made the
result always zero.
(hexnibble, nibbled1, b64url, b64d1, b64d2, b64d3): Use character
literals for all numeric constants dealing with characters.
Remove trailing semicolons.

9 years agoFix MD5sum.str () formatting bug
Achim Gratz [Mon, 3 Aug 2015 18:15:51 +0000 (20:15 +0200)]
Fix MD5sum.str () formatting bug

* csu_util/MD5Sum.cc (str): The stream modifiers are not sticky
and must be applied for each conversion.

9 years agoImplement -I/--include-source option to download and install sources automatically
David Hoke [Wed, 26 Jun 2013 19:13:48 +0000 (19:13 +0000)]
Implement -I/--include-source option to download and install sources automatically

* download.cc (IncludeSource): New command line switch
-I/--include-source.  Automatically download sources
associated with any binary package being downloaded when
IncludeSource is true.
* install.cc (do_install_thread): Automatically install
sources associated with any binary package being installed
when IncludeSource is true.

9 years agoImplement -Y/--prune-install option to bring an installation into a known state
Achim Gratz [Sat, 9 May 2015 18:25:43 +0000 (20:25 +0200)]
Implement -Y/--prune-install option to bring an installation into a known state

* choose.cc (PruneInstallOption): New option -Y/--prune-install.
(OnInit): Implement PruneInstallOption to downgrade packages
installed with a higher version and delete all packages not
explicitly requested to be installed.  This brings an existing
installation to the same state a fresh installation would create.
Put the handling for upgrade==true into a separate else branch.

9 years agoiniparse.yy: Fix a copy-and-paste bug
Achim Gratz [Sun, 26 Jul 2015 18:28:10 +0000 (20:28 +0200)]
iniparse.yy: Fix a copy-and-paste bug

* iniparse.yy (singleitem): Fix a copy-and-paste bug, use
SHA512Line for SHA512 standalone checksums (unused in setup.ini).

9 years agofromcwd.cc: Remove debugging output
Achim Gratz [Sat, 11 Jul 2015 21:24:11 +0000 (23:24 +0200)]
fromcwd.cc: Remove debugging output

9 years agoRefactor setup search and implement XZ compressed setup files
Achim Gratz [Sat, 11 Jul 2015 19:58:30 +0000 (21:58 +0200)]
Refactor setup search and implement XZ compressed setup files

* ini.cc: Construct setup_ext_list from array until we can use
C++11 aggregate initializers.  Clean up function parenthesis.
(decompress_ini): Refactored for use from do_local_ini and
do_remote_ini.  Change outdated comment about setup.ini
uncompressed size.
(check_ini_sig): Factor out signature check.
(fetch_remote_ini): Refactored for use from do_remote_ini.
(do_local_ini): Iterate over search results in found_ini_list.
Use decompress_ini and check_ini_sig.
(do_remote_ini): Iterate over known setup file extensions from
setup_ext_list with early-out semantics, preferring ".xz" over
".bz2" over ".ini" extension.  Use fetch_remote_ini and
check_ini_sig.
* ini.h: Remove unused macros.
* IniParseFindVisitor.cc: Remove, the search is already done by
SetupFindVisitor in do_from_local_dir.
* IniParseFindVisitor.cc: Ditto.
* Makefile.am (@SETUP@_SOURCES): Ditto.

9 years agoCorrect local directory search
Achim Gratz [Wed, 1 Jul 2015 19:36:12 +0000 (21:36 +0200)]
Correct local directory search

* fromcwd.cc: Remove unused includes.  Add global found_ini_list
to record the search result.
(SetupFindVisitor): Make setup.{ini,bz2,xz} known and provide bool
private variables to record whether we found them.  Another bool
inidir to indicate whether we are currently inside a directory
where setup.ini files should exist.
(SetupFindVisitor::visitFile): When inidir is true, check if a
setup file with one of the known extensions was found and set the
corresponding bool variables.
        (SetupFindVisitor::visitDirectory): Set inidir when appropriate.
Recurse into directories only if they are potential mirror dirs,
based on level. Truncate search and recurse into inidir.  Record
any setup files in found_ini_list while preferring ".xz" over
".bz2" over ".ini" extension.
(SetupFindVisitor::operator bool): Return true when found_ini_list
is non-empty.
(do_from_local_dir): Restrict search to either a single mirror
hierarchy or multiple mirror hierarchy; setup files directly in
local directory or mixed hierarchies are no longer recognized.
The setup files must be present in an architecture dependent
directory of "x86/" or "x86_64/", either in the local directory
for single mirror or one level down for multiple mirrors.

This patch already finds setup.xz files, but the code to deal with
them will be in a later patch.  The current code re-does the search
and ignores the results from here.

9 years agoImplement option "-i/--ini-basename" to set the basename for setup
Achim Gratz [Sun, 28 Jun 2015 11:34:11 +0000 (13:34 +0200)]
Implement option "-i/--ini-basename" to set the basename for setup

* ini.h: Declare extern SetupBaseName, SetupArch and SetupIniDir.
Redefine macros to use them.

* main.cc: Provide option "-i/--ini-basename" to set the basename
for setup, keep the default as "setup" and store in SetupBaseName.
Initialize SetupArch and SetupIniDir based on effective
architecture.

9 years agoIncrease read buffer size for the lexer input buffer to 64kiB
Achim Gratz [Thu, 11 Jun 2015 04:28:19 +0000 (06:28 +0200)]
Increase read buffer size for the lexer input buffer to 64kiB

9 years agoIncrease read buffer size for io_stream to 64kiB
Achim Gratz [Thu, 11 Jun 2015 04:20:50 +0000 (06:20 +0200)]
Increase read buffer size for io_stream to 64kiB

9 years agoImplement Base64URL-encoded SHA512 checksums
Achim Gratz [Sun, 7 Jun 2015 07:10:13 +0000 (09:10 +0200)]
Implement Base64URL-encoded SHA512 checksums

* ini.h: Add macros for use within the implementation of the
checksum parsers.  Hexdigest requires a 2-to-1 and Base64 a 4-to-3
conversion.  Base64 uses the filename and URL safe alphabet from
RFC4648.  It would be trivial to additionally process the normal
Base64 alphabet but we don't want to allow that in order to be
able to use the checksums as filenames without further conversion.
(hexnibble, b64url): Process single input character to input value.
(nibbled1): Convert 2 processed input values into 1 output value.
(b64d1, b64d2, b64d3): Convert 4 input values into 3 output
values.
* iniparse.yy: Add SHA512B64URL checksum in addition to MD5 and
SHA512.  Keep symmetry with MD5LINE and also define SHA512LINE
syntax.
* inilex.ll: Implement existing MD5 and SHA512 checksum parsers
using new macros.  Implement new SHA512B64URL parser using new
macros.  Enforce Base64 alphabet as defined in RFC4648 with no
padding to enable direct use of checksum values as filenames.
Implement SHA512LINE parser.

9 years agoReading in 64K chunks is a lot faster on Win32. release_2.871
Corinna Vinschen [Wed, 25 Mar 2015 11:53:23 +0000 (12:53 +0100)]
Reading in 64K chunks is a lot faster on Win32.

* install.cc (sha512_one): Raise buffer size to 64K for performance
reasons.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoSilently ignore 'x' and 'g' type tar extended headers
Jon TURNEY [Tue, 3 Mar 2015 12:40:00 +0000 (12:40 +0000)]
Silently ignore 'x' and 'g' type tar extended headers

Silently ignore 'g' and 'x' type tar extended headers, rather than warning about
"unknown (or unsupported) file type 'x'".

It seems that base-files has an 'x' extended header for each file, apparently to
store the mtime.

* archive_tar.cc (next_file_name): Silence error for 'g' and 'x'
type headers.

9 years agoLog errors from archive_tar.cc
Jon TURNEY [Fri, 6 Mar 2015 13:46:21 +0000 (13:46 +0000)]
Log errors from archive_tar.cc

archive_tar.cc contains some output directly using fprintf(stderr,), convert
that to using the printf-style log adaptors.

ChangeLog:

2015-03-04  Jon TURNEY  <jon.turney@dronecode.org.uk>

* archive_tar.cc (archive_tar): Convert from fprintf(stderr, ...)
to LogBabblePrintf() or LogPlainPrintf() as appropriate.

9 years agoRemove msg() and convert to log output
Jon TURNEY [Tue, 3 Mar 2015 13:28:48 +0000 (13:28 +0000)]
Remove msg() and convert to log output

Remove msg(), which writes output to the debugger via OutputDebugString() and
convert it's uses to log output using the printf-style log adaptors.

Examining the uses of msg(), some of these are genuine errors, which should be
logged somewhere we might have a chance to see them.  Convert those to
LOG_PLAIN.  Convert the other uses of msg() for debug output to LOG_BABBLE.

ChangeLog:

2015-03-04  Jon TURNEY  <jon.turney@dronecode.org.uk>

* msg.cc (msg): Remove.
* msg.h (msg): Ditto.
* compress_xz.cc (read, bid_xz, bid_lzma): Convert from msg() to
LogBabblePrintf() or LogPlainPrintf() as appropriate.
* crypto.cc (MESSAGE): Ditto.
* desktop.cc (make_link, start_menu, desktop_icon)
(check_desktop, check_startmenu): Ditto.
* gpg-packet.cc (MESSAGE): Ditto.
* ini.cc (do_ini_thread): Ditto.
* simpsock.cc (SimpleSocket): Ditto.

9 years agoAdd Log adaptors for printf-style output
Jon TURNEY [Tue, 3 Mar 2015 13:08:18 +0000 (13:08 +0000)]
Add Log adaptors for printf-style output

ChangeLog:

2015-03-04  Jon TURNEY  <jon.turney@dronecode.org.uk>

* LogSingleton.cc (LogBabblePrintf, LogPlainPrintf): Add.
* LogSingleton.h: Ditto.

9 years agoDemote some messages to LOG_BABBLE
Achim Gratz [Fri, 6 Mar 2015 06:11:29 +0000 (07:11 +0100)]
Demote some messages to LOG_BABBLE

* package_meta.cc (isManuallyWanted, isManuallyDeleted): Demote
overly talkative messages to LOG_BABBLE, so that they won't
clutter stdout by default.

9 years agoRemove msg() from LogFile::endEntry()
Jon TURNEY [Mon, 2 Mar 2015 13:35:40 +0000 (13:35 +0000)]
Remove msg() from LogFile::endEntry()

Every single line of log output is written to OutputDebugString() using msg().
This makes setup run quite slowly under a debugger.  If you have stdout
connected to the terminal where your debugger is running (e.g. 'gdb setup'),
this output is duplicated.

Future work: there are some other uses of msg() to report real errors.  At the
moment, these are completely invisible unless you are running setup under a
debugger.  These should be converted to use the logger.

ChangeLog:

2015-03-02  Jon TURNEY  <jon.turney@dronecode.org.uk>

* LogFile.cc (endEntry): Remove msg().

9 years agoDon't write LOG_BABBLE output to stdout
Jon TURNEY [Mon, 2 Mar 2015 12:10:28 +0000 (12:10 +0000)]
Don't write LOG_BABBLE output to stdout

It somewhat hampers the use of setup as a command line tool that it writes
everything to stdout.  Don't write LOG_BABBLE output to stdout.  Add '--verbose'
flag to restore the previous behaviour.

ChangeLog:

2015-03-02  Jon TURNEY  <jon.turney@dronecode.org.uk>

* LogFile.cc (VerboseOutput): Add option.
(endEntry): Only write LOG_PLAIN to stdout, unless VerboseOutput.

9 years agoAdd a 'Retry' button to the IDD_FILE_INUSE dialog
Jon TURNEY [Sun, 1 Mar 2015 17:41:49 +0000 (17:41 +0000)]
Add a 'Retry' button to the IDD_FILE_INUSE dialog

I have been meaning to add this for a while, and was reminded of this by [1],
although that is really about a different problem.

[1] https://cygwin.com/ml/cygwin/2015-02/msg00679.html

Add a 'Retry' button to the IDD_FILE_INUSE dialog, to press when you want to
manually stop the processes which were preventing a file from being replaced,
after you have done so.

Unfortunately the IDD_FILE_INUSE DIALOG is already rather cramped, so define
SETUP_MEDIUM_DIALOG_DIMS for a medium-size dialog, and adjust the dialog layout
appropriately.

Also do a bit of polish on the text used: "you will need to reboot" -> "the file
will be updated after a reboot"

XXX: This text should be dynamic, and should not appear if the NoReplaceOnReboot
option has been used.

Also spread out the text in the fallback MessageBox used when we can't enumerate
the processes which have the file in-use.

XXX: Note that there is no user notification, only a log message, if scheduling
a file to be replaced on reboot failed.

ChangeLog:

2015-03-02  Jon TURNEY  <jon.turney@dronecode.org.uk>

* res.rc (IDD_FILE_INUSE): Add 'Retry' button. Make larger.
* install.cc (FileInuseDlgProc): Polish text.  Handle IDIGNORE.
(installOne): Ditto.

9 years agoFix truncation of "Bin?" and "Src?" column headers
Jon TURNEY [Sun, 1 Mar 2015 14:54:03 +0000 (14:54 +0000)]
Fix truncation of "Bin?" and "Src?" column headers

It seems that the the "Bin?" and "Src? columns in the PickView are usually not
quite wide enough, and display truncated with an ellipsis, e.g. 'B...' and
'S...', which is completely unintelligible.

Try to more correctly size these colums.  3*GetSystemMetrics(SM_CXEDGE) seems to
be documented as the default value for the margin of a header control, so text
length + twice that is the minimum header width needed.

ChangeLog:

2015-03-02  Jon TURNEY  <jon.turney@dronecode.org.uk>

* PickView.cc (init_headers): More correctly size "Bin?" and
"Src?" columns.

9 years agoChoose curr package when user picks not yet installed package for the first time release_2.870
Corinna Vinschen [Wed, 18 Feb 2015 15:26:13 +0000 (16:26 +0100)]
Choose curr package when user picks not yet installed package for the first time

* PickPackageLine.cc (PickPackageLine::click): Call
packagemeta::set_action with current trust level as argument.
* package_meta.cc  (packagemeta::set_action): Take trust level as
argument.  When the user picks a package for the first time (from
"Skip"), pick the version matching the current trust level.  Improve
comments.
* package_meta.h (class packagemeta): Add member user_picked.
(packagemeta::packagemeta): Initialize user_picked to false.
(packagemeta::set_action): Align prototype to above change.

9 years agoMerge branch 'master' of cygwin.com:/git/cygwin-setup
Corinna Vinschen [Wed, 18 Feb 2015 15:02:22 +0000 (16:02 +0100)]
Merge branch 'master' of cygwin.com:/git/cygwin-setup

9 years agoFix .gitignore to ignore autoconf.h.in~.
Corinna Vinschen [Wed, 18 Feb 2015 15:00:54 +0000 (16:00 +0100)]
Fix .gitignore to ignore autoconf.h.in~.

9 years agoREADME: document some recent changes in the build environment
Achim Gratz [Fri, 8 Feb 2013 19:49:47 +0000 (20:49 +0100)]
README: document some recent changes in the build environment

* README: Adapt the documentation to the recent changes and some
not-so-recent ones.

9 years agoCreate XZ compressed archive using git ls-files
Achim Gratz [Sat, 14 Feb 2015 18:40:52 +0000 (19:40 +0100)]
Create XZ compressed archive using git ls-files

* Makefile.am (setup-src): Create file list for archive from
git-ls-files instead of cvs and create an XZ compressed archive.

9 years agoUse git-describe to determine release version
Achim Gratz [Sat, 14 Feb 2015 17:42:12 +0000 (18:42 +0100)]
Use git-describe to determine release version

* Makefile.am (VER): Use git-describe to construct version string
based on annotated release tags.
(setup_version.c): Echo setup version, use round parens instead of
curlies.

9 years agoMakefile.am (VER): Use ChangeLog's commit count instead of revision
Corinna Vinschen [Tue, 10 Feb 2015 11:35:50 +0000 (12:35 +0100)]
Makefile.am (VER): Use ChangeLog's commit count instead of revision

9 years agoAdd autoconf.h.in to .gitignore
Corinna Vinschen [Mon, 9 Feb 2015 19:53:28 +0000 (20:53 +0100)]
Add autoconf.h.in to .gitignore

9 years ago.gitignore: Remove .git, add CVS
Corinna Vinschen [Mon, 9 Feb 2015 16:34:38 +0000 (17:34 +0100)]
.gitignore: Remove .git, add CVS

9 years agoAdd .gitattributes
Corinna Vinschen [Mon, 9 Feb 2015 16:19:39 +0000 (17:19 +0100)]
Add .gitattributes

9 years agoAdd .gitignore
Corinna Vinschen [Mon, 9 Feb 2015 16:18:21 +0000 (17:18 +0100)]
Add .gitignore

9 years agoadd tags from .cvsignore
Corinna Vinschen [Mon, 9 Feb 2015 16:02:00 +0000 (17:02 +0100)]
add tags from .cvsignore

9 years agoremove tags from .cvsignore
Corinna Vinschen [Mon, 9 Feb 2015 15:28:15 +0000 (16:28 +0100)]
remove tags from .cvsignore

9 years agoAdd tags to .cvsignore
Corinna Vinschen [Mon, 9 Feb 2015 15:23:17 +0000 (16:23 +0100)]
Add tags to .cvsignore

9 years ago * install.cc (preremoveOne): Allow dash scripts and ".cmd" as an release_2.869
Achim Gratz [Sat, 7 Feb 2015 21:18:05 +0000 (21:18 +0000)]
* install.cc (preremoveOne): Allow dash scripts and ".cmd" as an
additional extension for Windows batch files.

9 years ago * package_meta.h (packagemeta::trustp): Make sure that curr and
Corinna Vinschen [Fri, 6 Feb 2015 16:20:01 +0000 (16:20 +0000)]
* package_meta.h (packagemeta::trustp): Make sure that curr and
installed exist before using them in version comparisons.  Install exp
over installed only if exp has a higher version number than installed.

9 years ago Throughout, change preceeding patch from SHA256 to SHA512.
Corinna Vinschen [Thu, 5 Feb 2015 16:56:17 +0000 (16:56 +0000)]
Throughout, change preceeding patch from SHA256 to SHA512.
* Makefile.am (BASECXXFLAGS): Add -Wno-attributes for the sake of
sha2.c.

9 years ago Prepare for changing from MD5 to SHA256 checksums.
Corinna Vinschen [Thu, 5 Feb 2015 14:46:27 +0000 (14:46 +0000)]
Prepare for changing from MD5 to SHA256 checksums.
* IniDBBuilder.h (IniDBBuilder::buildInstallSHA256): Declare as pure
virtual method.
(IniDBBuilder::buildSourceSHA256): Ditto.
* IniDBBuilderPackage.h (IniDBBuilderPackage::buildInstallSHA256):
Declare.
(IniDBBuilderPackage::buildSourceSHA256): Ditto.
* IniDBBuilderPackage.cc: Formatting changes.
(IniDBBuilderPackage::buildInstallSHA256): New method to store SHA256
sum for binary package.
(IniDBBuilderPackage::buildSourceSHA256): Ditto for source package.
* Makefile.am (@SETUP@_SOURCES): Add sha256sum.c and sha256sum.h.
* inilex.ll: Formatting changes.  Implement string recognition for
SHA256 sums.
* iniparse.yy: Define new token.  Allow SHA256 as well as MD5 checksums.
* install.cc (do_install_thread): Call chksum_one instead of md5sum.
(sha256_str): New static function to create SHA256 checksum string for
log output.
(sha256_one): New function to compute SHA256 checksum for file.
(md5_one): Move validity tests into chksum_one.
(chksum_one): New static function.  Call either sha256_one
or md5_one depending on checksum read from ini file.
* package_source.h (packagesource::packagesource): Initialize sha256sum.
(packagesource::sha256sum): New member.
* sha2.c: New file, taken from OpenBSD.
* sha2.h: New file, taken from OpenBSD.

9 years ago * Throughout, include LogFile.h instead of LogSingleton.h where
Corinna Vinschen [Wed, 4 Feb 2015 10:10:42 +0000 (10:10 +0000)]
* Throughout, include LogFile.h instead of LogSingleton.h where
required.
* LogFile.cc (LogFile::exit_msg): Convert globally available variable
to protected, static LogFile member.
(LogFile::exit): Accept second parameter to decide if the end of install
message is  to be printed.  Revert to using the exit_code as is.
* LogFile.h (LogFile::setExitMsg): New static method.  Use throughout
rather than setting exit_msg directly.
(LogFile::getExitMsg): Ditto.
(LogFile::exit): Add second parameter to prototype.
(LogFile::exit_msg): New static member.
(Logger): New macro defining simplified access th logger instance.
Use throughout in place of LogSingleton::GetInstance and direct access
to theLog.
* LogSingleton.h (LogSingleton::exit): Add second parameter to
prototype.
* desktop.cc (theLog): Remove extern declaration.
(set_status): Call Logger ().getExitMsg () instead of
accessing exit_msg directly.
* localdir.cc (theLog): Remove extern declaration.
* main.cc (theLog): Remove.
(WinMain): Introduce local variables to store requirement to print
help output and if command line options were used incorrectly.  Use
throughout function.

9 years ago * LogFile.cc (LogFile::exit): Deconstify exit_code. Handle
Corinna Vinschen [Tue, 3 Feb 2015 19:51:49 +0000 (19:51 +0000)]
* LogFile.cc (LogFile::exit): Deconstify exit_code.  Handle
exit_code -1 special (instead of IDS_ELEVATED).  Add comments to
explain.
* LogFile.h (LogFile::exit): Deconstify exit_code in prototype.
* main.cc (WinMain): Restructure code.  Revert to always initializing
log output.  Don't generate log files if setup is going to elevate
itself, or if only help output is requested.  Set exit_code to -1 in
call to LogFile::exit in the cases we don't want a log (elevate/help).

9 years ago * choose.cc (MirrorOption): Add experimental local mirror option.
Corinna Vinschen [Wed, 28 Jan 2015 20:05:48 +0000 (20:05 +0000)]
* choose.cc (MirrorOption): Add experimental local mirror option.
(ChooserPage::OnInit): Call packagemeta::ScanDownloadedFiles with
value of MirrorOption as argument.
* download.cc (check_for_cached): Add bool parameter.  If true, assume
correctness of download (==mirror) directory without checking files.
* download.h (check_for_cached): Add bool parameter to prototype,
default to false.
* package_meta.cc (packagemeta::ScanDownloadedFiles): Add bool
parameter.  Use to compute flag to call packageversion::scan with.
* package_meta.h (packagemeta::ScanDownloadedFiles): Align prototype.
* package_version.cc (packageversion::scan): Add bool parameter.  Call
check_for_cached with value of this parameter.
* package_version.h (packageversion::scan): Align prototype.

9 years ago * PickPackageLine.cc (PickPackageLine::click): Rearrange code. Switch
Corinna Vinschen [Wed, 28 Jan 2015 15:23:52 +0000 (15:23 +0000)]
* PickPackageLine.cc (PickPackageLine::click): Rearrange code.  Switch
package to "Uninstall" if neither binary, nor source package are picked.
Explain why.
* choose.cc (ChooserPage::OnInit): Fix CleanOrphansOption broken with
latest patch.  Reformat slightly.
* package_meta.cc (packagemeta::set_action): Rearrange and further
simplify code.  Make sure to have binary and source version never
unpicked at the same time to avoid spurious uninstallation of package.
Try to comment thoroughly.

9 years ago * PickPackageLine.cc (PickPackageLine::paint): Call trustp with default
Corinna Vinschen [Mon, 26 Jan 2015 21:05:46 +0000 (21:05 +0000)]
* PickPackageLine.cc (PickPackageLine::paint): Call trustp with default
flag set to false.
(PickPackageLine::click): Drop parameter from packagemeta::set_action
call.
(PickPackageLine::set_action): Call trustp with default flag set to
true.
* choose.cc (ChooserPage::OnInit): Call trustp with default flag set to
true to fetch default package version, rather than defaulting to curr.
* package_db.cc (packagedb::defaultTrust): Call trustp with default
flag set to true.
* package_meta.cc (packagemeta::set_action): Drop default_version
parameter.  Rewrite to simplify mechanism, and to account for correct
stepping through versions if installed version is not available anymore.
* package_meta.h (packagemeta::set_action): Align prototype.
(packagemeta::trustp): Add bool to request default package handling.
Add code to make sure not to downgrade packages by default.
* package_version.cc (processOneDependency): Call trustp with default
flag set to false.
* prereq.cc (PrereqChecker::getUnmetString): Ditto.
(PrereqChecker::selectMissing): Ditto.

9 years ago * package_version.cc (packageversion::compareVersions): Get arguments
Corinna Vinschen [Sun, 25 Jan 2015 16:38:46 +0000 (16:38 +0000)]
* package_version.cc (packageversion::compareVersions): Get arguments
by const references instead of by value.
* package_version.h (packageversion::compareVersions): Match prototype.
* res.rc: Bump version date.

9 years ago* package_source.cc (packagesource::set_canonical): Fix handling
Yaakov Selkowitz [Tue, 9 Dec 2014 18:42:35 +0000 (18:42 +0000)]
* package_source.cc (packagesource::set_canonical): Fix handling
of package release number containing a period.

9 years agoadd dash as a usable script type and shell, add ".cmd" as an alias for ".bat"
Achim Gratz [Sat, 6 Dec 2014 13:52:49 +0000 (13:52 +0000)]
add dash as a usable script type and shell, add ".cmd" as an alias for ".bat"

     * script.cc: New static string dash.
     (init_run_script): Initialize dash.
     (run): Implement dash as an extra shell type that is invoked for
     suffix ".dash".  Implement suffix ".cmd" as an alias for ".bat".

9 years agoimplement minimal stratified postinstall
Achim Gratz [Sat, 6 Dec 2014 13:50:41 +0000 (13:50 +0000)]
implement minimal stratified postinstall

     * install.cc (do_install_thread): Remove initialization for
     run_script.
     * postinstall.cc (do_postinstall_thread): Remove initialization
     for run_script.  Implement stratified postinstall (hardcode three
     strata for now).  For each stratum, run perpetual scripts first
     after sorting them as ASCII, then the postinstall scripts just
     installed, then check for dormant scripts in postinstall and try
     to run those.
     (PerpetualFindVisitor): New helper class to pick up perpetual
     scripts.
     (RunFindVisitor): Use new Script member function and pick up only
     runnable non-perpetual scripts.
     * script.h (Script::baseName): Add private variable.
     (Script::scriptExtension): Ditto.
     (Script::scriptStratum): Ditto
     (Script::scriptType): Ditto
     (Script::allowedStrata): Ditto
     (Script::allowedTypes): Ditto
     (Script::match): New private member function.
     (Script::not_p): New public member function to check for
     non-perpetual runnable script.
     (Script::is_p): Ditto, but for perpetual scripts.
     (Script::operator ==): Qualify as const.
     (Script::operator <): New const qualified, used for sorting as ASCII.
     * script.cc (class Script): Implement those additional members.
     (run): Implement using the new member variables and std::string
     functions instead of C string manipulations.
     (isAScript): Ditto.
     (fullName): Ditto.
     (baseName): Ditto.
     (Script): Extend initialization section and calculate values for
     member variables.  Move initialization for run_script into the constructor.

9 years agoRename log to Log to avoid collision with standard math function
Achim Gratz [Sat, 6 Dec 2014 13:38:55 +0000 (13:38 +0000)]
Rename log to Log to avoid collision with standard math function

     * LogSingleton.h: Rename log macro to Log to avoid collision with
     standard math function in some versions of g++.
     * AntiVirus.cc: Replace invocations of log with Log.
     * IniDBBuilderPackage.cc: Ditto.
     * LogFile.cc: Ditto.
     * PickView.cc: Ditto.
     * archive.cc: Ditto.
     * archive_tar.cc: Ditto.
     * choose.cc: Ditto.
     * cygpackage.cc: Ditto.
     * download.cc: Ditto.
     * geturl.cc: Ditto.
     * ini.cc: Ditto.
     * install.cc: Ditto.
     * io_stream.cc: Ditto.
     * io_stream_cygfile.cc: Ditto.
     * localdir.cc: Ditto.
     * main.cc: Ditto.
     * mount.cc: Ditto.
     * msg.cc: Ditto.
     * net.cc: Ditto.
     * nio-ftp.cc: Ditto.
     * package_db.cc: Ditto.
     * package_meta.cc: Ditto.
     * package_version.cc: Ditto.
     * prereq.cc: Ditto.
     * processlist.cc: Ditto.
     * proppage.cc: Ditto.
     * root.cc: Ditto.
     * script.cc: Ditto.
     * site.cc: Ditto.
     * source.cc: Ditto.
     * threebar.cc: Ditto.
     * win32.cc: Ditto.
     * window.cc: Ditto.

9 years agoshow parameter usage when option processing was unsuccessful
Achim Gratz [Sat, 6 Dec 2014 13:22:51 +0000 (13:22 +0000)]
show parameter usage when option processing was unsuccessful

         * main.cc (WinMain): Show parameter usage before exiting when
         options processing was unsuccessful (this usually means that an
         unknown option was given on the command line).

9 years ago * install.cc (Installer::StandardDirs): Add /etc/fstab.d, /dev,
Corinna Vinschen [Thu, 20 Nov 2014 11:33:49 +0000 (11:33 +0000)]
* install.cc (Installer::StandardDirs): Add /etc/fstab.d, /dev,
/dev/mqueue, /dev/shm.  Sort array alphabetically.

9 years ago * Makefile.am: Provide new targets "strip" and "upx" to remove
Corinna Vinschen [Tue, 4 Nov 2014 09:15:06 +0000 (09:15 +0000)]
* Makefile.am: Provide new targets "strip" and "upx" to remove
debugging symbols and compress the executable using UPX.
* README: Change description of how to produce stripped and compressed
binaries to use the new make targets.

9 years ago * setup.exe.manifest: Add Windows 10 OS GUID.
Corinna Vinschen [Sun, 26 Oct 2014 08:04:53 +0000 (08:04 +0000)]
* setup.exe.manifest: Add Windows 10 OS GUID.
* setup64.exe.manifest: Ditto.

9 years ago* res.rc: Fix missing space.
Eric Blake [Mon, 13 Oct 2014 15:59:52 +0000 (15:59 +0000)]
* res.rc: Fix missing space.

10 years ago * site.cc (init): Handle sitenames which aren't FQDNs correctly.
Jon TURNEY [Tue, 22 Apr 2014 17:41:55 +0000 (17:41 +0000)]
* site.cc (init): Handle sitenames which aren't FQDNs correctly.

10 years ago * site.cc (PopulateListBox): Select listbox items by finding the
Jon TURNEY [Tue, 22 Apr 2014 17:40:03 +0000 (17:40 +0000)]
* site.cc (PopulateListBox): Select listbox items by finding the
index of the item with a matching full URL, not by LB_FINDSTRING
which does an inexact match on the displayed URL.

10 years ago * msg.cc (mbox): Generalize to a MessageBox wrapper which knows
Jon TURNEY [Tue, 22 Apr 2014 17:35:50 +0000 (17:35 +0000)]
* msg.cc (mbox): Generalize to a MessageBox wrapper which knows
what to do in unattended mode.
* msg.h: Add prototype.
* ini.cc (IniParseFeedback): Use here rather than MessageBox.

10 years ago * mount.cc (read_mounts): Don't create rootdir key when just fetching
Corinna Vinschen [Tue, 22 Apr 2014 12:41:31 +0000 (12:41 +0000)]
* mount.cc (read_mounts): Don't create rootdir key when just fetching
info from registry.

10 years ago * mount.cc (is_admin): Drop function. It's incorrectly implemented
Corinna Vinschen [Tue, 22 Apr 2014 11:49:58 +0000 (11:49 +0000)]
* mount.cc (is_admin): Drop function.  It's incorrectly implemented
and redundant.
(create_install_root): If installing the setup rootdir entry to HKLM
results in ERROR_ACCESS_DENIED, fall back to installing into HKCU.
Don't exit with a fatal error if writing the registry key fails.  Just
pop up an informative message box instead.  Also log access denied.
(read_mounts): call nt_sec.isRunAsAdmin instead of removed is_admin.
(NTSecurity::isRunAsAdmin): Fix formatting.

10 years ago * main.cc (WaitOption): New -W/--wait option.
Corinna Vinschen [Mon, 10 Mar 2014 11:10:35 +0000 (11:10 +0000)]
* main.cc (WaitOption): New -W/--wait option.
(WinMain): Rearrange code to make sure only the actual worker
instance of setup logs into the setup.log and setup.log.full files.
Call NTSecurity::initialiseWellKnownSIDs explicitely.  Explain why.
If WaitOption is given, let the parent process wait for the elevated
child process.
* win32.cc (NTSecurity::initialiseWellKnownSIDs): Drop generating
log messages.
(NTSecurity::setDefaultSecurity): Drop call to initialiseWellKnownSIDs.
* win32.h (NTSecurity::initialiseWellKnownSIDs): Make public.

10 years ago * setup.exe.manifest: Add Windows 8.1 GUID.
Corinna Vinschen [Tue, 19 Nov 2013 21:52:55 +0000 (21:52 +0000)]
* setup.exe.manifest: Add Windows 8.1 GUID.
* setup64.exe.manifest: Ditto.

10 years ago * filemanip.cc (nt_fopen): Rename from fopen. Add permission parameter.
Corinna Vinschen [Mon, 18 Nov 2013 11:16:15 +0000 (11:16 +0000)]
* filemanip.cc (nt_fopen): Rename from fopen.  Add permission parameter.
Drop C binding.  Move comment.
* filemanip.h (nt_fopen): Declare.
* geturl.cc (get_url_to_file): Call nt_fopen instead of fopen.
* nio-file.cc (NetIO_File::NetIO_File): Ditto.
* main.cc (dyn_AttachConsole): Remove.
(dyn_GetLongPathName): Remove.
(set_dynaddr): Remove.
(set_cout): Just call AttachConsole directly.
(WinMain): Drop call to set_dynaddr.

10 years ago * resource.h (IDC_SOURCE_SUBTEXT): Define.
Corinna Vinschen [Fri, 15 Nov 2013 12:15:23 +0000 (12:15 +0000)]
* resource.h (IDC_SOURCE_SUBTEXT): Define.
* res.rc: Define text below header as IDC_SOURCE_SUBTEXT to allow
reconfiguration.

10 years ago * root.cc: Move inline definitions of GetDlgItemRect and
Corinna Vinschen [Fri, 15 Nov 2013 11:41:12 +0000 (11:41 +0000)]
* root.cc: Move inline definitions of GetDlgItemRect and
SetDlgItemRect from here...
* win32.h: ...to here, for potential usage in other dialogs.

10 years ago * res.rc: Fix size and position of rootdir textbox and button.
Corinna Vinschen [Fri, 15 Nov 2013 10:42:57 +0000 (10:42 +0000)]
* res.rc: Fix size and position of rootdir textbox and button.
Align size and position of localdir fields to rootdir fields for
optical reasons.

10 years ago * resource.h (IDC_ROOTDIR_SUBTEXT): Fix typo.
Corinna Vinschen [Fri, 15 Nov 2013 10:35:47 +0000 (10:35 +0000)]
* resource.h (IDC_ROOTDIR_SUBTEXT): Fix typo.

10 years ago * resource.h (IDC_ROOTDIR_SUBTEXT): Define.
Corinna Vinschen [Fri, 15 Nov 2013 10:34:59 +0000 (10:34 +0000)]
* resource.h (IDC_ROOTDIR_SUBTEXT): Define.
* res.rc: Define text below header as IDC_ROOTDIR_SUBTEXT to allow
reconfiguration.

10 years ago * mount.cc (read_mounts): Drop setting root_text.
Corinna Vinschen [Fri, 15 Nov 2013 10:22:16 +0000 (10:22 +0000)]
* mount.cc (read_mounts): Drop setting root_text.
* res.rc: Set content of root dir dialog correctly right from the start.
Remove unused items.
* resource.h (IDC_ROOT_TEXT): Remove.
(IDC_ROOT_BINARY): Ditto.
(IDC_FILEMODES_LINK): Ditto.
(IDC_MODE_GRP): Ditto.
(IDC_MODE_TEXT): Ditto.
(IDC_MODE_BIN): Ditto.
* root.cc (Root): Set "Install For" group items to CP_STRETCH.
Remove all "text/binary" items.
(rb): Remove.
(check_if_enable_next): Drop test for root_text.
(load_dialog): Remove all code setting items differently to what's
specified as default in the resources, in favor of setting this
correctly in the resources.
(save_dialog): Drop setting root_text.
(RootPage::OnMessageCmd): Drop IDC_ROOT_TEXT/IDC_ROOT_BINARY handling.
(RootPage::OnInit): Drop IDC_FILEMODES_LINK handling.
(RootPage::OnNext): Drop "text"/"binary" state from debug output.
* state.cc (root_text): Remove.

10 years ago * archive_tar.cc: Drop commented out static variable definitions.
Corinna Vinschen [Thu, 14 Nov 2013 21:36:15 +0000 (21:36 +0000)]
* archive_tar.cc: Drop commented out static variable definitions.
(archive_tar::next_file_name): Replace MAX_PATH with CYG_PATH_MAX.
* archive_tar.h (tar_state::filename): Ditto.
* cygpackage.cc (cygpackage::cygpackage): Ditto.
* cygpackage.h (cygpackage::getfilenamebuffer): Ditto.
* desktop.cc (start_menu): Add comment.  Drop Windows 9x considerations.
(desktop_icon): Ditto.
(check_desktop): Ditto.
(check_startmenu): Ditto.
* diskfull.cc (diskfull): Drop Windows 9x considerations.  Convert
incoming path to wide char and call GetDiskFreeSpaceExW.
* filemanip.cc (fopen): New function, overriding MSVCRT function.
Explain why.
(remove): Ditto.
(rename): Ditto.
(_access): Ditto.
* install.cc (check_for_old_cygwin): Add comment.
* localdir.cc (browse): Add comment.
(LocalDirPage::OnNext): Don't rely on being able to change CWD.
Call GetFileAttributesW instead and change conditional expressions
accordingly.  Explain why.  Rename trySetCurDir to tryLocalDir to
avoid confusion.  Call do_from_local_dir rather than do_fromcwd.
* mount.cc (read_mounts): Add comments.  Call GetSystemWindowsDirectory
rather than GetWindowsDirectory since that's what we're really want.
* postinstall.cc (do_postinstall_thread): Drop setting CWD.  Scripts
are called with CWD set to Cygwin root dir anyway.
* processlist.cc (Process::getName): Allow CYG_PATH_MAX sized module
names.
(Process::isModuleLoadedInProcess): Allow CYG_PATH_MAX sized module
names.
* root.cc (browse): Add comment.
* script.cc (sanitize_PATH): Call GetSystemWindowsDirectory rather than
GetWindowsDirectory since that's what we're really want.
(Script::run): Allow cmdline up to CYG_PATH_MAX chars to allow longer
script paths.
* win32.h (CYG_PATH_MAX): Define as 4096 as Cygwin's PATH_MAX.

10 years ago * desktop.cc (STARTMENUDIR): Define.
Corinna Vinschen [Wed, 13 Nov 2013 20:57:16 +0000 (20:57 +0000)]
* desktop.cc (STARTMENUDIR): Define.
(check_startmenu): Use STARTMENUDIR instead of constant string.
(DesktopSetupPage::OnActivate): Use TARGET and TERMINALTITLE defines
to simplify calls to check_startmenu and check_desktop.

10 years ago * desktop.cc: Drop dependency on static variable and order of
Corinna Vinschen [Wed, 13 Nov 2013 20:47:50 +0000 (20:47 +0000)]
* desktop.cc: Drop dependency on static variable and order of
initialization.  Allow easier reconfiguration.
(iconname): Drop static variable.
(make_link): Add parameter to specify icon path.
(start_menu): Ditto.  Call make_link accordingly.
(desktop_icon): Ditto.
(save_icon): Take windows path as first parameter.  Drop setting
global iconname variable.
(TARGET): Define.
(DEFAULTICON): Define.
(TERMINALICON): Define.
(TERMINALTITLE): Define.
(do_desktop_setup): Rearrange code to use aforementioned defines and
align function calls to aforementioned changes.

10 years ago * mount.cc (CYGWIN_INFO_CYGNUS_REGISTRY_NAME): Remove now unused
Corinna Vinschen [Wed, 13 Nov 2013 14:42:33 +0000 (14:42 +0000)]
* mount.cc (CYGWIN_INFO_CYGNUS_REGISTRY_NAME): Remove now unused
pre-1.7 registry key name.
(CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME): Ditto.
(CYGWIN_INFO_CYGDRIVE_FLAGS): Ditto.
(CYGWIN_INFO_CYGDRIVE_PREFIX): Ditto.
(CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX): Ditto.

10 years ago * Makefile.am (EXTRA_DIST): Add cygwin-setup.ico and
Corinna Vinschen [Wed, 13 Nov 2013 14:36:18 +0000 (14:36 +0000)]
* Makefile.am (EXTRA_DIST): Add cygwin-setup.ico and
cygwin-terminal.ico.

10 years ago * LogFile.cc (LogFile::exit): Don't print ending message after
Corinna Vinschen [Thu, 7 Nov 2013 13:14:19 +0000 (13:14 +0000)]
* LogFile.cc (LogFile::exit): Don't print ending message after
successful elevation.
* res.rc (IDS_ELEVATED): New string.
* resource.h (IDS_ELEVATED): New string resource number.

* LogFile.cc (LogFile::flushAll): New function to flush log all logging
to files without exiting (as LogFile::exit does).
* LogFile.h: Declare new method closeAll.
* main.cc (NoAdminOption): Add new CLI options -B/--no-admin. This
option allows the user to suppress privilege elevation (in tandem with
"asInvoker" requestedExecutionLevel changes to exe manifests).
(WinMain): check if setup run with Administrator privilege and if the
NoAdminOption has not been specified, attempt to elevate privilege to an
Administrator via WINAPI ShellExecuteEx().
* setup.exe.manifest: Add requestedExecutionLevel of asInvoker to allow
suppression of privilege elevation.
* setup64.exe.manifest: Modify requestedExecutionLevel from
requireAdministrator to asInvoker to allow suppression of privilege
elevation. Continuity of privilege elevation attempt on startup is
implemented by main.cc changes to WinMain().
* win32.cc (NTSecurity::isRunAsAdmin): New function to allow main.cc to
check if setup.exe has been run with privilege elevated to Administrator
level.
* win32.h: Declare new method isRunAsAdmin.

10 years ago * prereq.cc (OnUnattended): Also select missing requirements in unattended
Jon TURNEY [Mon, 7 Oct 2013 18:04:03 +0000 (18:04 +0000)]
* prereq.cc (OnUnattended): Also select missing requirements in unattended
mode, since it's no longer a side effect of the chooser.

10 years ago* filemanip.cc (find_tar_ext): Generalize search for .tar extension,
Yaakov Selkowitz [Wed, 18 Sep 2013 00:30:08 +0000 (00:30 +0000)]
* filemanip.cc (find_tar_ext): Generalize search for .tar extension,
avoiding looking for specific compression types.

11 years ago * include/getopt++/DefaultFormatter.h (DefaultFormatter):
Corinna Vinschen [Mon, 12 Aug 2013 11:44:53 +0000 (11:44 +0000)]
* include/getopt++/DefaultFormatter.h (DefaultFormatter):
Introduce private data members and use them, adjust comment
accordingly.  Split the line 35/45 instead of 40/40 by default
to get less linebreaks.  Add default initializers for data
members to the constructor.  Add a second constructor that
offers parameters for initialization of the private data
members.
(DefaultFormatter::operator ()): Remove automatic variable
output and directly put the data on the output stream instead.
Use private data members to construct the output rather than

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