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.
* 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.
* 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.
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.
* 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.
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.
* 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.
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.
* 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.
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.
* 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.
* 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.
* 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.
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").
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.
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.
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.
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.
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.
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.
* 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.
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.
* Makefile.am: Make and install libraries into common location and use them
from there.
* configure.in: Find gpg-error-config in the libgpg-error/src subdirectory
rather than using the host system's version. Set the prefix and exec_prefix to
a common location for the subdirs so that useful files will be installed in a
common location.
Dave Korn [Sun, 2 Mar 2008 22:18:16 +0000 (22:18 +0000)]
(Fixing erroneous previous commit to ChangeLog):
2008-03-02 Dave Korn <dave.korn@artimi.com>
* install.cc (Installer::installOne): Accept new HWND argument
from caller and pass it to MessageBox calls so that MB_TASKMODAL
can work.
(check_for_old_cygwin): Likewise.
(do_install_thread): Pass owner's HWND (from thread context) when
calling them.
Dave Korn [Sun, 2 Mar 2008 22:12:44 +0000 (22:12 +0000)]
2008-03-02 Dave Korn <dave.korn@artimi.com>
* cygpackage.cc (Installer::installOne): Accept new HWND argument
from caller and pass it to MessageBox calls so that MB_TASKMODAL
can work.
(check_for_old_cygwin): Likewise.
(do_install_thread): Pass owner's HWND (from thread context) when
calling them.
Dave Korn [Sat, 23 Feb 2008 18:55:04 +0000 (18:55 +0000)]
2008-02-23 Dave Korn <dave.korn@artimi.com>
* cygpackage.cc (cygpackage::getfirstfile): Guard against trying to
construct std::string from NULL returned by io_stream::gets when the
stream decompressor fails on a corrupt *.lst.gz file.
Brian Dessent [Mon, 30 Jul 2007 22:55:50 +0000 (22:55 +0000)]
* CHANGES: Update.
* configure.in (AM_INIT_AUTOMAKE): Enable more automake warnings.
* Makefile.am (INCLUDES): Use AM_CPPFLAGS instead.
(CLEANFILES): Add. Minor portability tweaks.
* tests/Makefile.am (INCLUDES): Use AM_CPPFLAGS instead.
* archive.cc (archive::extract): Try to be more compatible when
opening tar files.
* compress_bz.cc: Fix whitespace throughout.
(compress_bz::~compress_bz): Ensure that underlying io_stream's dtor is
also run.
* install.cc (Installer::installOne): Refactor.
* package_db.cc (ConnectedLoopFinder::doIt): Move some log spewage into
setup.log.full from setup.log.
(packagedb::connectedBegin): Ditto. Consolidate log output to one line.
Brian Dessent [Wed, 27 Jun 2007 01:41:46 +0000 (01:41 +0000)]
* Makefile.am (release): Drop inconsistent use of $(EXEEXT). Leave an
untouched copy of setup.exe so that later make invocations don't
unnecessarily rebuild it.
(snapshot): Fix typo.
* install.cc (md5_one): Don't try to check packages whose
pkgsource.Cached () is NULL, as with those whose download failed.
Brian Dessent [Wed, 30 May 2007 09:49:24 +0000 (09:49 +0000)]
* find.h (class Find): Make _start_dir non-const.
* find.cc (Find::Find): Append a trailing slash to _start_dir only if
it does not already contain one.
(Find::accept): Use the previously stored value of _start_dir rather
than unconditionally appending a slash.
Brian Dessent [Wed, 30 May 2007 05:53:02 +0000 (05:53 +0000)]
* Makefile.am: No need to specify the default value of --preprocessor
to windres. Rework the automatic version extraction rules so that the
source tarball is generated with the proper name and directory instead
of setup-0. Update snapshot rule to also upload a copy of the binary
with debugging symbols still present.
Brian Dessent [Wed, 30 May 2007 05:12:20 +0000 (05:12 +0000)]
This is a general tidying up/modernization of the build infrastructure.
Renaming the lexer and parser to .ll and .yy allows using automake's
builtin support for flex and bison with C++ sources, and libinilex is a
slightly cleaner way of omitting -Werror.
* Makefile.am (AUTOMAKE_OPTIONS): Move to AM_INIT_AUTOMAKE.
(AM_YFLAGS): Define.
(AM_LFLAGS): Define.
(INCLUDES): Remove redundant mingw directory.
(EXTRA_DIST): Adjust for newly named lexer/parser.
(BUILT_SOURCES): Ditto.
(inilint_LDADD): Ditto.
(inilint_SOURCES): Ditto.
(setup_LDADD): Ditto.
(setup_SOURCES): Ditto.
(iniparse.cc): Remove custom rules.
(inilex.cc): Ditto.
* configure.in: Update quoting and use modern form of AC_INIT and
AM_INIT_AUTOMAKE.
* inilex.l: Rename from this ...
* inilex.ll: ... to this.
* iniparse.y: Rename from this ...
* iniparse.yy: ... to this.
Brian Dessent [Wed, 30 May 2007 03:49:48 +0000 (03:49 +0000)]
* IniParseFindVisitor.cc (IniParseFindVisitor::IniParseFindVisitor):
Remove error_buf and error_count initializers.
(IniParseFindVisitor::visitFile): Store filename in current_ini_name.
Use yyerror_count and yyerror_messages in place of removed error_count
and error_buf members.
* IniParseFindVisitor.h (class IniParseFindVisitor): Remove error_buf
and error_count members.
* ini.cc: Include io_stream_memory.h. Remove file static variables
error_buf, error_count, and ini_filename.
(GuiParseFeedback::progress): Remove some verbose log spam.
(do_remote_ini): Recode .ini-fetching logic to properly display parse
errors, and to account for corrupt bzip2 files.
(yyerror): Moved elsewhere.
(fprintf): Delete unused function.
* ini.h: Remove useless __cplusplus guard. Declare extern variables
current_ini_name, yyerror_messages, and yyerror_count.
* inilex.l: Add current_ini_name, yyerror_messages, and
yyerror_count.
(ini_init): Initialize new variables.
(yybol): Delete.
(yyerror): Reimplement using std::string and relocate from ini.cc.
* io_stream.cc (io_stream::copy): Add clarifying comment.
Igor Peshansky [Fri, 4 May 2007 21:56:53 +0000 (21:56 +0000)]
2007-05-04 Igor Peshansky <pechtcha@cs.nyu.edu>
* resource.h (IDC_STATIC_HEADER): New control id.
* res.rc (IDD_SPLASH): Adjust the copyright.
(IDD_DESKTOP): Make header text accessible as a separate control.
* desktop.cc (set_status): Use eset() instead of SetWindowText().
(load_dialog): Disable checkboxes and change dialog text in
download-only mode.
(DesktopSetupPage::OnInit): Disable checkboxes in download-only
mode.
* threebar.cc (ThreeBarProgressPage::OnMessageApp): Deprecate the
default fallthrough.
* download.cc (do_download_thread): Explicitly return the next
dialog.
Igor Peshansky [Fri, 30 Mar 2007 22:18:34 +0000 (22:18 +0000)]
2007-03-29 Igor Peshansky <pechtcha@cs.nyu.edu>
* LogFile.cc (LogFile::exit): Write exit_msg directly to log, without
the message box.
* resource.h (IDC_DESKTOP_SEPARATOR,IDC_STATUS_HEADER,IDC_STATUS): New
control ids.
* res.rc (IDD_DESKTOP): Change the caption. Add status information.
* desktop.h (DesktopSetupPage::DesktopSetupPage): Define constructor
in the implementation.
* desktop.cc (DesktopControlsInfo): Position specifiers for status
information items.
(DesktopSetupPage::DesktopSetupPage): Register position specifiers.
(set_status): New static method.
(load_dialog): Set status information, if available.
(DesktopSetupPage::OnInit): Set status header font.
Brian Dessent [Wed, 28 Feb 2007 00:55:04 +0000 (00:55 +0000)]
2007-02-27 Brian Dessent <brian@dessent.net>
* ini.h (SETUP_INI_FILENAME): Add define.
(SETUP_BZ2_FILENAME): Add define.
* IniParseFindVisitor.cc (IniParseFindVisitor::visitFile): Use
above macros to parameterize setup.ini filename.
* fromcwd.cc (SetupFindVisitor::visitFile): Ditto.
* ini.cc (do_remote_ini): Ditto.
* Makefile.am (setup_SOURCES): Add win32.cc.
* autoload.c: Include windows.h directly instead of win32.h so that
win32.h can contain C++.
* desktop.cc (verinfo): Delete.
(make_link): Use IsWindowsNT to check for NT instead of verinfo.
(DesktopSetupPage::OnInit): Likewise.
* mount.cc (is_admin): Likewise.
* script.cc (init_run_script): Likewise.
* main.cc (class SIDWrapper, SIDWrapper::SIDWrapper,
SIDWrapper::~SIDWrapper, SIDWrapper::theSID, class HANDLEWrapper,
HANDLEWrapper::HANDLEWrapper, HANDLEWrapper::~HANDLEWrapper,
HANDLEWrapper::theHANDLE, class TokenGroupCollection,
TokenGroupCollection::TokenGroupCollection,
TokenGroupCollection::~TokenGroupCollection,
TokenGroupCollection::populate, TokenGroupCollection::find,
class NTSecurity, set_default_sec, NTSecurity::NoteFailedAPI,
NTSecurity::NTSecurity, NTSecurity::failed,
NTSecurity::initialiseEveryOneSID, NTSecurity::setDefaultDACL,
NTSecurity::setDefaultSecurity): Remove implementation of these
classes from this file and into new file win32.cc and existing win32.h.
(main): Fix whitespace and formatting per GNU coding standards.
* res.rc (IDS_SETUPINI_MISSING): Parameterize filename with %s.
* win32.cc: New file containing methods removed from main.cc as well
as new class VersionInfo methods.
* win32.h: Include <string> for std::string.
(class SIDWrapper, class HANDLEWrapper, class TokenGroupCollection,
class NTSecurity): Add classes removed from main.cc.
(class VersionInfo): Add new class.
(GetVer): Declare.
(IsWindowsNT): Define.
Brian Dessent [Sat, 17 Feb 2007 14:41:10 +0000 (14:41 +0000)]
2007-02-17 Cesar Strauss <cstrauss@cea.inpe.br>
* IniDBBuilderPackage.cc (IniDBBuilderPackage::buildPackageSource):
Initialize the version and operator fields of the newly created
PackageSpecification object, so setup can pick the correct source
version later on.
Igor Peshansky [Wed, 29 Nov 2006 02:07:17 +0000 (02:07 +0000)]
2006-11-28 Igor Peshansky <pechtcha@cs.nyu.edu>
* install.cc (Installer::installOne): If file is in use, ask the user
to stop processes and retry.
(MB_RETRYCONTINUE, IDCONTINUE): New macros.
(hMsgBoxHook): New static field.
(CBTProc): New window hook function.
(_custom_MessageBox): New function.
* CHANGES: Update with the above.