2017-09-05 Keith Marshall mingw-get-0.6.3-mingw32-pre-20170905-1 posted on OSDN.net * All files (r0-6-3-beta-20170905-1): Tag assigned. 2017-09-04 Keith Marshall Improve probability of establishing successful URL connections. * src/pkginet.cpp (pkgInternetAgent::OpenURL): Add... (INTERNET_FLAG_KEEP_CONNECTION, INTERNET_FLAG_IGNORE_CERT_CN_INVALID) (INTERNET_FLAG_IGNORE_CERT_DATE_INVALID, INTERNET_FLAG_PRAGMA_NOCACHE) (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS) (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP): ...these flags, when calling the InternetOpenUrl() function. 2017-09-01 Keith Marshall Increment version for first OSDN hosted release. * VERSION.m4 (VERSION_PATCH): Increment to 3; thus... (__VERSION__): ...this is auto-incremented to 0.6.3 2013-11-26 Keith Marshall Conflate name and class columns in GUI package list. * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Remove... : ...column with this heading; add its width allocation to the original pixel count alloted for the width of... : ...this column. (pkgListViewMaker::UpdateItem): Conflate content of original name and class columns into first column; renumber successive columns. 2013-10-18 Keith Marshall Don't attempt to resolve dependencies for unidentified packages. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): [selected == NULL]: Current dependency is unresolved; do not make any recursive call for this unidentified requirement. This avoids posting misleading "can't get 'tarname' for non-release element <<>>" diagnostic messages, where the subsequent "unresolved dependency" message is sufficient; include dmhmsgs.h, and add... (PKGMSG_SPECIFICATION_ERROR): ...this preamble instead. 2013-10-18 Keith Marshall Implement foundation for future NLS enabled diagnostics. * src/dmhmsgs.h: New file; it declares the NLS capable DMH interface. * src/dmhmsgs.c: New file; it implements rudimentary NLS hooks, (but currently does not direct them to any NLS provider), together with an initial subset of a default (compiled in) message catalogue. * Makefile.in (CORE_DLL_OBJECTS): Add dmhmsgs.$OBJEXT * src/pkgname.cpp (pkgArchiveName): Modify diagnostics, to use... (PKGMSG_SPECIFICATION_ERROR): ...this dmhmsgs.h declared message. 2013-10-15 Keith Marshall Add automated build time configuration management. * Makefile.in (Makefile): Add regeneration rules, depending on... (VERSION.m4, configure.ac, aclocal.m4, missing.m4, makeopts.m4): ...these, if modified by the package maintainer, directed via... (config.status, configure): ...these, regenerated as required. 2013-10-04 Keith Marshall mingw-get-0.6.2-mingw32-beta-20131004-1 released. * VERSION.m4 (VERSION_PATCH): Increment it. * srcdist-doc/NEWS.in: Release notes updated. * All files (r0-6-2-beta-20131004-1): Tag assigned. 2013-10-03 Keith Marshall Propagate RELEASE_CLASS setting from mingw-get-setup. * configure.ac (CLI_RELEASE_CLASS, GUI_RELEASE_CLASS): Adopt... (RELEASE_CLASS) [defined]: ...this as default value. 2013-10-02 Keith Marshall Support group affiliation with component package granularity. * src/pkglist.cpp (pkgXmlNode::IsVisibleClass): Make it synonymous with IsVisibleGroupMember(); this is a temporary adjustment, pending the planned implementation of component class visibility filtering. (pkgListViewMaker::Dispatch): Defer consideration of visibility until traversal of component package directories, except in the particular case of packages which lack defined components. 2013-10-01 Keith Marshall Correct processing of package group associations. * src/pkgtree.cpp (AppWindowMaker::IsPackageGroupAffiliate): Iterate over "affiliate_key" elements in FindNextAssociate() calls; original implementation was incorrectly iterating over "group_key" elements. 2013-09-21 Keith Marshall Reorder controls within "Apply Changes" dialogue. * src/guimain.rc (IDD_APPLY_APPROVE): Move definition of the "Okay to proceed?" GROUPBOX, and its contained PUSHBUTTONs, to the top; we want it to get the default focus. 2013-09-21 Keith Marshall Reimplement wsh.lua in C/C++; (cf. MinGW-Bug #2057). * src/pkgexec.cpp (LUA_INLINE): New function attribute definition. (init_lua_path): Use it, reproducing the original function attributes. (lua_isstringarg): New LUA_INLINE helper function; implement it. (lua_wsh_libexec_path): New function; it implements wsh.libexec_path (lua_wsh_execute): New function; it implements wsh.execute (luaload_wsh): New function; it wraps references to lua_wsh_execute() and lua_wsh_libexec_path() to provide the wsh module implementation. (pkgXmlNode::DispatchScript): Preload it into the Lua interpreter. * scripts/libexec/setup.lua (M.argwrap): New method; implement it. (M.shlink, M.unlink): Use it to collect their arguments into a single string, to be passed as the command to be invoked by wsh.execute * scripts/libexec/wsh.lua: File is no longer required; delete it. * Makefile.in (LIBEXEC_SCRIPTS): Remove reference to it. 2013-09-20 Keith Marshall Establish default preferences for GUI; (cf. MinGW-Feature #2036) * src/pkgbase.h (pkgXmlDocument::EstablishPreferences): Adjust its prototype; add argument identifying prospective client classification. * src/pkgopts.cpp (client_key): New XML property keyword; define it. (pkgXmlDocument::EstablishPreferences): Implement filter, based on new client classification argument, to restrict preference selection to a matching client class specification. * src/climain.cpp (dbase.EstablishPreferences): Filter on class "cli". * src/guiexec.cpp (pkgData->EstablishPreferences): Likewise, on "gui". * xml/profile.xml (preferences): Add client="cli" attribute for the existing specification; add another for client="gui". 2013-09-20 Keith Marshall Force canonical comparison of shell links; (cf. MinGW-Bug #2054) * scripts/libexec/unlink.js [FileExists(filename) && (chklink != "")]: The value of 'chklink' may not be canonical; instantiate an (unsaved) link reference from it, then compare the canonicalized reference from within it, to the reference within 'filename', thus avoiding possible lexical mismatch between canonical and non-canonical forms. 2013-09-19 Keith Marshall Correct LUA_PATH assignment for GUI; (cf. MinGW-Bug #2052) * src/pkgexec.cpp (LUA_LIBEXEC_PATH): New manifest string; define it. (init_lua_path) : Use it; add guimain.exe app directory. 2013-09-19 Keith Marshall Handle meta-package removal correctly; (cf. MinGW-Bug #2051) * src/pkgunst.cpp (pkgRemove) [archive == none]: Ensure the pending action flag is cleared; previously this was done during manifest clean up, and since a meta-package has no manifest, it was overlooked. 2013-09-10 Keith Marshall mingw-get-0.6.1-mingw32-beta-20130910-1 released. * srcdist-doc/NEWS.in: Release notes updated. * All files (r0-6-1-beta-20130910-1): Tag assigned. 2013-09-10 Keith Marshall Fix MinGW-Bug #2026. * src/dmhguix.cpp (DMH_PTY_GUARDBYTES): New manifest constant. (dmhTypePTY::printf) [buffer full]: Use it; it defines a reserved byte count, at end of buffer, where expansion or scroll out is triggered; use memcpy() for scroll out, but avoid overlapping regions. (dmhTypePTY::printf) [output == '\r']: Handle it. * src/tarproc.cpp (create_output_stream): Improve diagnostic messages; discriminate between file collision and other privilege violations. (pkgArchiveProcessor::ExtractFile): Don't return a zero status code, when the output stream could not be successfully opened, so that... (pkgTarArchiveInstaller::ProcessDataStream): ...we may avoid writing a spurious manifest entry here. 2013-09-06 Keith Marshall Update version, pre-empting subsequent release. * VERSION.m4 (VERSION_PATCH): Bump from zero to 1. 2013-09-04 Keith Marshall mingw-get-0.6.0-mingw32-beta-20130904-1 released. * srcdist-doc/NEWS.in srcdist-doc/README.in: Release notes updated. * srcdist-doc/INSTALL.in: Installation instructions updated. * All files (r0-6-0-beta-20130904-1): Tag assigned. 2013-08-26 Keith Marshall Implement retry throttling for failed internet connections. * src/pkginet.h (INTERNET_RETRY_ATTEMPTS): New macro; define it. (INTERNET_RETRY_INTERVAL, INTERNET_DELAY_FACTOR): Likewise. * src/pkginet.cpp (INTERNET_RETRY_REQUESTER): New typedef. (pkgInternetAgent::connection_delay, pkgInternetAgent::delay_factor): (pkgInternetAgent::retries, pkgInternetAgent::retry_interval): New private member variables; declare them. (pkgInternetAgent::OpenURL): Use them; they must be initialised by... (pkgInternetAgent::SetRetryOptions): ...this new method; implement it. (pkgActionItem::DownloadSingleArchive): Invoke it. (pkgXmlDocument::SyncRepository): Likewise. 2013-08-24 Keith Marshall Reassign default URL for download of setup tool components. * aclocal.m4 (PACKAGE_DIST_DOMAIN, PACKAGE_DIST_DIR): New precious variables; declare them as such, and assign default values by using... (MINGW_AC_PACKAGE_DIST_URL): ...this new macro; implement it. * configure.ac (MINGW_AC_PACKAGE_DIST_URL): Use it. * Makefile.in (TAG_SCRIPT): Capture assigned URL; substitute it... (PACKAGE_DIST_URL): ...for this replacement text marker... * src/setup.rc (ID_DOWNLOAD_HOST_URI): ...here. 2013-08-21 Keith Marshall Simplify guimain.exe duplicate instance prevention. * src/guimain.cpp (WinMain): Delegate requisite checking to... (WTK::RaiseAppWindow): ...this external toolkit function. 2013-08-13 Keith Marshall Install licence as standard setup component. * src/guimain.h src/setup.rc (ID_PACKAGE_GUI_DISTNAME): Macro no longer required; delete definition. * src/setup.cpp (pkgSetup::DoFirstTimeInstallation): [ID_PACKAGE_GUI_DISTNAME]: Delete reference. [ID_PACKAGE_BASE_DISTNAME]: Update reference; repeat to explicitly address each of "bin", "gui", and "lic" components. * Makefile.in (TAG_SCRIPT) [PACKAGE_GUI_DISTNAME]: Delete reference. (TAG_SCRIPT) [PACKAGE_BASE_DISTNAME]: Redefine as template. 2013-08-13 Keith Marshall More dialogue box adjustments. * src/guimain.rc: Generally clean up white-space distribution. (All dialogue templates): Use WS_TABSTOP consistently. 2013-08-13 Keith Marshall Circumvent Windows-7 "Program Compatibility Assistant" misbehaviour. * src/manifest.rc (assembly) : Add declarations for each of Vista, Win7, and (tentatively) Win8. 2013-07-30 Keith Marshall Minor modification to "about" dialogue dismissal button. * src/guimain.rc (IDD_HELP_ABOUT) : Change label text to "Dismiss"; add WS_TABSTOP style. 2013-07-30 Keith Marshall Match "about" dialogue caption to main window. * src/guimain.rc (IDM_HELP_ABOUT) : Match it to... (IDD_HELP_ABOUT) : ...this; make it representative of... (ID_MAIN_WINDOW_CAPTION): ...this. 2013-07-30 Keith Marshall Implement "icon legend" display as "help" menu item. * src/guimain.rc (IDM_HELP_LEGEND): Make menu item active; define template for the dialogue box which it is to call out. * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_HELP_LEGEND]: New case handler; implement dialogue box call out, as a variation on... [IDM_HELP_ABOUT]: ...this; modify it accordingly. 2013-07-30 Keith Marshall Avoid discarding pending changes when catalogue is updated. * src/guimain.h (IDD_CONFIRMATION): New manifest constant; define it. (AppWindowMaker::ConfirmActionDialogue): New static method; declare it. (AppWindowMaker::ConfirmActionRequest): New method; declare it. * src/guimain.rc (IDD_CONFIRMATION): Implement new dialogue template. * src/guiexec.cpp (pkgConfirmAction, pkgConfirmActionClient): New static variables; they are used as pseudo-arguments, together with... (DIALOGUE_DISPATCH, DIALOGUE_RESPONSE, DIALOGUE_CHKSTATE): ...these new macros; define them; they facilitate the implementation of... (AppWindowMaker::ConfirmActionDialogue): ...this; implement it. (AppWindowMaker::ConfirmActionRequest): Implement it; use it... (AppWindowMaker::OnCommand) [IDM_REPO_UPDATE]: ...here, and... * src/pkgdata.cpp (AppWindowMaker::OnClose): ...here. 2013-07-26 Keith Marshall Make a minor GUI layout adjustment. * src/pkgview.cpp (VSASH_INIT_POS): Increment from 0.30 to 0.35; this sets the initial height of the package list pane to be 35% of the main window height, which, at the default initial window size, neatly fits the entire "Basic Setup" package group, without scrolling, on my 1366x768 pixel Win7-VM display. 2013-07-25 Keith Marshall Implement setup tool installer "plugin". * src/setup.h (SETUP_HOOK_RUN_INSTALLER): Define request code. * src/dllhook.cpp (run_basic_system_installer): Implement handler... (setup_hook) [SETUP_HOOK_RUN_INSTALLER]: ...and invoke it. (setup_hook) [default]: Collect diagnostics in common message digest. (AppWindowMaker::SetupHookInvoked): Define and initialise it; in this context, which does not conflict with prior definition in guimain.exe, it must always remain true. * src/setup.cpp (SetupTool) [constructor]: Invoke... (SetupTool::DispatchSetupHookRequest): ...this, on user's request... (SETUP_HOOK_RUN_INSTALLER): ...with this action code; this replaces... (SetupTool::RunInstalledProgram): ...one reference instance for this external program fork, leaving only one such reference remaining; declare it to be "inline". * Makefile.in (GUIMAIN_LIB_OBJECTS): New macro; define it. It abstracts a subset of the object modules originally enumerated... (GUIMAIN_OBJECTS): ...here, whence use it; also incorporate into... (SETUP_DLL_OBJECTS): ...this. (SETUP_DLL_LIBS): Make it equivalent to... (GUIMAIN_LIBS): ...this. (mingw-get-setup-0.dll): Use... (GUI_LDFLAGS): ...this, to specify linking options, rather than... (LDFLAGS): ...this. 2013-07-25 Keith Marshall Add "Basic Setup" as a built-in standard package group. * src/guimain.h (AppWindowMaker::SetupToolInvoked): New private static member variable; declare it. * src/guimain.cpp (AppWindowMaker::SetupToolInvoked): Define and initialise it; this instance is specific to guimain.exe, where it must always remain false. * src/pkgtree.cpp (PKG_AFFILIATE_ALL): New constant; define it. (load_package_group_hierarchy): Use it to specify those groups which have all packages as affiliates, rather than just first root group. (group_attributes): New static inline function; implement it, then... (is_affiliated) [PKG_AFFILIATE_ALL]: ...use it to identify groups which are specified as having all packages as affiliates. (AppWindowMaker::InitPackageTreeView): Construct a temporary XML specification for the "Basic Setup" package group, thence add it to the package tree view; mark it as default group selection when... [AppWindowMaker::SetupToolInvoked]: ...this is true. 2013-07-14 Keith Marshall Implement GUI filtering of package list by group selection. * src/pkgbase.h (pkgXmlNode::IsVisibleGroupMember): (pkgXmlNode::IsVisibleClass): New inline methods; declare them. (pkgXmlNode::MapPackageGroupHierarchy): New inline method; declare it. (pkgXmlNode::SetPackageGroupHierarchyMapper): Likewise; it sets up... (pkgXmlNode::PackageGroupHierarchyMapper): ...this new private static function pointer; declare it as a function reference, in terms of... (pkgXmlNode::GroupHierarchyMapper): ...this new typedef; define it. * src/guimain.h (AppWindowMaker::PackageTreeView): Make it static. (AppWindowMaker::IsPackageGroupAffiliate): Declare new static method. * src/pkgbind.cpp (pkgRepository::GetPackageList): Make it invoke... (pkgXmlNode::MapPackageGroupHierarchy): ...this; implement it. * src/pkglist.cpp (pkgXmlNode::IsVisibleGroupMember): Implement it. (pkgXmlNode::IsVisibleClass): Likewise; just provide a stub, for now. (pkgListViewMaker::Dispatch): Use them to filter package list content. (AppWindowMaker::UpdatePackageList): Redraw main window when done. * src/pkgtree.cpp [_WIN32_IE >= 0x0400]: Require this. (AppWindowMaker::PackageTreeView): Define and initialise it. (AppWindowMaker::InitPackageTreeView): Extend implementation; use... (map_package_group_hierarchy_recursive, load package_group_hierarchy): (is_existing_group, map_package_group_hierarchy): ...these; implement them locally, as file scoped static helper functions. (select_key): New static local string constant; define it. (pkgInitCategoryTreeGraft): Use it; also have it invoke... (pkgXmlNode::SetPackageGroupHierarchyMapper): ...this; implement it. (AppWindowMaker::IsPackageGroupAffiliate): Implement it; it uses... (is_affiliated, is_child_affiliate): ...these helpers; provide them as locally implemented, file scoped static functions. * src/pkgdata.cpp (AppWindowMaker::OnNotify): Add handler for... [ID_PACKAGE_TREEVIEW && TVN_SELCHANGED]: ...this notification. 2013-07-12 Keith Marshall Correct a static string buffer aliasing issue. * src/setup.cpp (SetupTool::setup_dll): New inline method; it ensures that the buffer within approot_path() refers to the setup helper DLL. (SetupTool::InitialiseSetupHookAPI): Use it, when loading the DLL. (SetupTool::SetupTool): Use it again, when subsequently calling... (_wunlink): ...this; it is now the preferred API, replacing... (DeleteFileW): ...this; do not blindly assume that... (SetupTool::dll_name): ...this remains unchanged between references; it is an alias for the static buffer within approot_path(). 2013-07-12 Keith Marshall Add a custom profile for use by the setup tool. * xml/setup.xml: New file. 2013-07-03 Keith Marshall Improve handling of workspace clean-up requests. * Makefile.in (mostlyclean): New rule; it replaces... (clean): ...original intent delegated to 'mostlyclean'; retained and augmented to remove all content specified by 'mostlyclean', plus... (version.c, verinfo.h): ...these additional generated files. (distclean): Modified; 'version.c' now removed by 'clean'. 2013-07-03 Keith Marshall Correct an omission from the source code distribution. * Makefile.in (BUILD_AUX_FILES): Add makeopts.m4; this was omitted from the 2013-04-10 modification to fix MinGW-Bug #1601. 2013-07-03 Keith Marshall Incorporate foundation for setup tool implementation. * src/setup.cpp: New file; it implements the setup program. * src/setup.rc: New file; it implements setup program resources. * src/dllhook.cpp: New file; it implements a DLL bridging API to facilitate invocation of mingw-get-0.dll functions from the setup program, after both DLLs have been explicitly loaded at run time. * src/setup.h: New file; it declares the interface between the setup program and the preceding mingw-get bridging DLL. * src/guimain.h: Add filter to exclude declarations specific to... [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...this case, when included by compilation units specific to the setup tool components. (ID_MAIN_DIALOGUE_CAPTION, ID_DOWNLOAD_HOST_URI): New resource IDs. (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): Likewise. (ID_PACKAGE_GUI_DISTNAME): Likewise; define them. * Makefile.in (all): Respecify it, in terms of... (all-core, all-setup): ...these new rules; define them, and also... (all-setup-exe, all-setup-dll): ...these, to force building of... (mingw-get-setup.$EXEEXT, mingw-get-setup-0.dll): ...these binaries. (setup.res.$OBJEXT): Specify prerequisites, as for guimain.res.$OBJEXT (SETUP_TOOL_OBJECTS, SETUP_TOOL_LIBS): New macros; define them. (SETUP_DLL_OBJECTS, SETUP_DLL_LIBS, SETUP_DISTNAME): Likewise. (TAG_SCRIPT): Add resource script substitution definitions for... (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): ...these... (ID_PACKAGE_GUI_DISTNAME): ...and this. 2013-07-01 Keith Marshall Add subprocess argument vector construction helpers. * src/argwrap.c src/argwrap.h: New files; they implement an API for construction of argument vectors, with appropriate quoting, to be passed to MS-Windows exec'd subprocesses. Rewritten from scratch, without reference to any prior GPL licensed implementation, with MIT style licence, these provide the foundation for a possible future libmingwex.a implementation; they are included here, since no such implementation is currently available. 2013-06-28 Keith Marshall Avoid inadvertent overwrite of existing files. * src/mkpath.c (_O_NEWFILE): Conditionally specify attributes... [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...as they were... [IMPLEMENTATION_LEVEL != SETUP_TOOL_COMPONENT]: ...else, include _O_EXCL in the specified set; exclude _O_TRUNC. * src/tarproc.cpp (dmh_notify_extraction_failed): New static inline function; it encapsulates the diagnostic message factored out from... (pkgArchiveProcessor::ExtractFile): ...here, whence use it. (create_output_stream): Also used in this new static inline function; it adds an appropriate diagnostic wrapper around set_output_stream(), when _O_EXCL prevents overwrite of an existing file. (pkgArchiveProcessor::SetOutputStream): Use it. 2013-06-27 Keith Marshall Improve diagnostics for tar archive processing faults. * src/pkgproc.h (TAR_ARCHIVE_FORMAT_ERROR): New constant; define it. (TAR_ARCHIVE_DATA_READ_ERROR, TAR_ARCHIVE_DATA_WRITE_ERROR): Likewise. * src/tarproc.cpp (dmh_notify_archive_data_exhausted): New static inline function; implement it. (pkgTarArchiveProcessor::GetArchiveEntry) [short header]: Use it. (pkgArchiveProcessor::ExtractFile) [TAR_ARCHIVE_DATA_READ_ERROR]: Likewise, use it here; also explicitlycheck for, and diagnose... [TAR_ARCHIVE_DATA_WRITE_ERROR]: ...this; also add a further catch all case, to diagnose any other unexpected condition. (pkgTarArchiveProcessor::GetArchiveEntry) [bad checksum]: Diagnose it. (pkgTarArchiveProcessor::Process): Return appropriate status codes. (pkgTarArchiveProcessor::ProcessEntityData): Likewise. 2013-06-24 Keith Marshall Facilitate version synchronisation for mingw-get-setup. * VERSION.m4: New file. * configure.ac: Include it, and... (AC_INIT): ...use it. 2013-06-21 Keith Marshall Keep version strings clean when release class is unspecified. * Makefile.in (RC_SCRIPT, VERSION_SCRIPT): Simplify; assign specified release class to local variable; delegate release tag generation to... (TAG_SCRIPT): ...this; check release class variable is not an empty string, before inserting it into the generated release tag. 2013-06-20 Keith Marshall Rework defective assignment of product version resources. * Makefile.in (BUILD_TAG): Avoid creating an empty build.tag file. (PACKAGE_VERINFO_SCRIPT): Ensure that the build tag is generated as a string of non-zero length. Do not assume that it comprises only two elements; extract the final two, as the third and fourth elements of the product version meta-data record. 2013-06-19 Keith Marshall Rework defective package build time-stamping logic. * Makefile.in (%.time): Make it explicitly touch its target; the 2013-05-15 changes, to reduce redundancy, didn't work as expected. (%.tag): Add a side effect; make it also explicitly touch %.time. (%.tagged.time): This is now redundant; remove it. 2013-06-14 Keith Marshall Collect distributable package files in user specified directory. * Makefile.in (distdir): New macro; define default as abs_builddir. (srcdist, bindist, licdist): Use it; direct generated tarballs to it. (%.txt.dist): New pattern rule; define, and use it to make a copy... (readme.txt): ...of this, in distdir, when processing... (dist): ...this build objective. 2013-06-14 Keith Marshall Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity. * src/apihook.c: New file; it provides... (have_api): ...this helper; it checks for availability of any specific API function, within a specific system DLL, (MSVCRT.DLL by default). * src/tarproc.cpp (have_utime64_api): New inline function; it wraps... (have_api): ...this, to check whether MSVCRT.DLL provides... (commit_saved_entity) [_utime64]: ...this; use if available, else... (commit_saved_entity) [!_utime64]: ...fall back to using... (utime): ...this. * Makefile.in (CORE_DLL_OBJECTS): Add apihook.$OBJEXT 2013-06-13 Keith Marshall Facilitate package extraction and registration at setup time. * src/pkgproc.h (IMPLEMENTATION_LEVEL): Add filters to facilitate implementation of distinct setup time archive processing behaviour. (pkgArchiveProcessor::save_on_extract): New property; declare it. (pkgArchiveProcessor::SaveExtractedFiles): New method; implement it. (pkgArchiveProcessor::SetOutputStream): New method; declare it. * src/tarproc.cpp (IMPLEMENTATION_LEVEL): Add filters to implement distinct setup time specific archive processing behaviour. (pkgArchiveProcessor::SetOutputStream): Implement it. (pkgTarArchiveExtractor::ProcessDataStream): Use it. (pkgTarArchiveInstaller::ProcessDataStream): Likewise. 2013-06-13 Keith Marshall Implement some GUI progress metering dialogue enhancements. * src/pkgbase.h (pkgProgressMeter): Don't pre-empt private features of derived progress metering classes; hence, we no longer need this... (AppWindowMaker): ...as a forward class declaration; delete it. * src/guimain.rc (IDD_REPO_UPDATE): Resize, and adjust layout. (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX, IDD_PROGRESS_PCT): Add these dialogue box progress counter display elements. * src/pkgbind.cpp (pkgRepository::GetPackageList): Adjust style of progress status messages, to suit reporting via GUI dialogue box or CLI console, as appropriate. * src/guiexec.cpp (ProgressMeterMaker): Redefine class, in terms of... (PROGRESS_METER_CLASS): ...this new generic class name macro. Reimplement private members, previously inherited from base class; adjust class constructor to ensure that they are initialised. Delete explicit destructor; a default destructor is now sufficient. (ProgressMeterMaker::SetRange, ProgressMeterMaker::SetValue): (ProgressMeterMaker::Annotate): Factor out; reimplement them... * src/pmihook.cpp: ...in this new file, as generalised methods of... (PROGRESS_METER_CLASS): ...the class named by this macro. (PROGRESS_METER_CLASS::PutVal): New private method; implement it. 2013-05-31 Keith Marshall Avoid a potential macro definition conflict. * src/pkgbase.h (strcasecmp) [__MINGW32__]: Use string.h definition. 2013-05-15 Keith Marshall Streamline build-time dependency tracking procedures. * Makefile.in (DEPFLAGS): Adjust for simultaneous .o/.d generation. (RC_DEPFLAGS): New macro; define dependency generation flags for the resource compiler, which can't handle the new DEPFLAGS methodology. (%.c, %.cpp, %.rc): Simplify $OBJEXT generation procedures. (%.time): Remove redundantly replicated build-time procedure from... (%.tagged.time): ...this; just make it a prerequisite. 2013-05-15 Keith Marshall Add resources for specification of product version. * src/verinfo.rc src/verinfo.h.in: New files; included by... * src/guimain.rc: ...this, whence also specify version information... (VERINFO_FILE_NAME, VERINFO_INTERNAL_NAME, VERINFO_FILE_DESCRIPTION): (VERINFO_FILE_VERSION, VERINFO_FILE_VERSION_STRING): ...per these new manifest constant macros; define them, with propagation to... (ID_MAIN_WINDOW_CAPTION): ...this; keep it consistent. * Makefile.in (TAG_SCRIPT): Include invocation for... (PACKAGE_VERINFO_SCRIPT): ...this new macro; defined to interpret... (PACKAGE_VERINFO_PRODUCT_VERSION): ...this new substitution template; it is used in src/verinfo.h.in, whence verinfo.h is generated. (RC_INCLUDES): Add current working directory, for... (verinfo.h): ...this; add rule and dependencies to generate it. 2013-05-14 Keith Marshall Make application manifest resource definition reusable. * src/manifest.rc: New file; factor content from... * src/guimain.rc: ...here, whence include it. 2013-05-08 Keith Marshall Extend DMH services to delay-loaded DLL clients. * src/dmhcore.h (dmh_bind): New function; declare it. * src/dmhcore.cpp (dmh_bind): Implement it; it provides an API through which the setup tool makes its existing DMH services available to post install hooks in mingw-get-0.dll, which cannot be loaded until after the providing package has been downloaded and unpacked. 2013-05-08 Keith Marshall Avoid unnecessary command line globbing in GUI applications. * src/guimain.cpp src/guistub.cpp (_CRT_glob): Declare as extern "C"; initialise to zero, so overriding the runtime start-up default. * src/rites.c [! IMPLEMENT_INITIATION_RITES] (_CRT_glob): Initialise to zero here too; lastrites.exe doesn't need globbing either. 2013-05-04 Keith Marshall Address some GCC-4.7 string initialisation warnings. * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Declare all headings[].text initialisers as 'const'; cast to 'char *' as required. (pkgListViewMaker::Dispatch): Ditto, when inserting the 'const' empty string into the list, as a component class value. * src/pkgdata.cpp (AppWindowMaker::InitPackageTabControl): Declare all TabLegend[] initialisers as 'const'; cast to 'char *' as required. 2013-05-02 Keith Marshall Correct a spin wait thread synchronisation issue. * src/pkgnget.cpp (pkgDownloadMeterGUI::SpinWait): Handle stop requests explicitly; acknowledge when waiting thread has stopped. (pkgDownloadMeterGUI::SpinWaitAction): Raise explicit stop requests; wait for acknowledgement that waiting thread has stopped. 2013-04-23 Keith Marshall Select compressed data streaming filters for use by setup tool. * src/pkgstrm.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Exclude the implementations of all decompression filters, except... (pkgXzArchiveStream): ...this, together with its requisite methods... (pkgArchiveStream, pkgLzmaArchiveStream): ...from these. 2013-04-23 Keith Marshall Adapt internet download agent for use by setup tool. * src/pkgbase.h: More code rearrangement, exposing... (safe_strcmp): ...this in any implementation context, controlled... [USES_SAFE_STRCMP && ! HAVE_SAFE_STRCMP]: ...by this; when true... (HAVE_SAFE_STRCMP): ...define this to 1, (must be non-zero). [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: Ensure that... (USES_SAFE_STRCMP): ...this is defined to 1, (i.e. non-zero). (EXTERN_C): Relocate macro definition... * src/pkgimpl.h: ...to here; add complementary implementation of... (BEGIN_C_DECLS, END_C_DECLS): ...these new macros; define them. * src/pkginet.h (pkgDownloadMeter::SpinWait): New static method; declare it as inline, to be implemented elsewhere, delegating to... (pkgDownloadMeter::SpinWaitAction): ...this new protected virtual method; declare and implement it inline, as a "do nothing" base class method, to be optionally overridden in a derived class. * src/pkginet.cpp (pkgDownloadMeter::SpinWait): Implement it. (pkgInternetAgent::OpenURL): Use it to invoke SpinWaitAction(). (USES_SAFE_STRCMP): Define as 1; (safe_strcmp() is required). [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Filter out code which may not be required in more specialised contexts, then... [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...add specialised variants specific to this. * src/pkgnget.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Filter out code which may not be required in more specialised context. (dmh_setpty): Provide locally declared prototype for external function. (pkgDownloadMeterGUI): Add pseudo-terminal diagnostic message window. (pkgDownloadMeterGUI::SpinWaitAction): Declare and implement GUI specific method specialisation; it invokes a thread, running... (pkgDownloadMeterGUI::SpinWait): ...this new static method overload. 2013-04-19 Keith Marshall Implement pre-emptive update issue number identification. * src/pkgkeys.h (serial_number): Declare function prototype. * src/pkginet.cpp (serial_number): Implementation remains here; promote from static to extern "C". * src/pkgbind.cpp (value_assumed_new): New char constant; define it. (pkgRepository::expected_issue): New private member var; declare and... (pkgRepository::pkgRepository): ...initialise it, assuming new. (pkgRepository::GetPackageList): Assign pre-emptively declared issue number, (from package-list references), to 'expected_issue'; compare it with 'current_issue' number recorded within locally stored catalogue. [current_issue >= expected_issue]: Suppress redundant download; adjust diagnostic messages as appropriate. 2013-04-10 Keith Marshall Fix MinGW-Bug #1601 (on new issues tracker). * aclocal.m4 (makeopts.m4): New build-aux module; include it. (MINGW_AC_PROG_LEX): New macro; implement it. * configure.ac (AC_INIT): Make version number tripartite. (MINGW_AC_MAKE_NO_PRINT_DIRECTORY): Use this new makeopts.m4 macro. (MINGW_AC_PROG_LEX): Use it, in place of... (AC_PROG_LEX): ...this. * Makefile.in (MAKE): New macro; assign using autoconf's SET_MAKE. (QUIET_MAKE): New macro; derive it from $(MAKE) --no-print-directory. (LEX_COMMAND, LEX_COMMAND_ABORT): New macros; define them. (LEX_MISSING, LEX_MISSING_MESSAGE, LEX_OUTPUT): Likewise. (FORMAT_MESSAGE, MESSAGE_FOLD_WIDTH): Likewise; implemented from... (AWK_CLEAR_LINE_BUFFER, AWK_FLUSH_BUFFER, AWK_PRINT_AND_CLEAR_BUFFER): (AWK_COLLECT_MESSAGE, AWK_COLLECT_BLANK_LINE, AWK_PRINT_LINE_BUFFER): ...this collection of internal helper macros; define them. (%.c: %.l): Replacement for built-in rule; it handles "missing lex" in a manner consistent with expectations of autoconf's AC_PROG_LEX. (execute-command): New phoney build goal; it is used with... (WITH_REQUEST): ...this new macro, to invoke commands recursively. 2013-03-25 Keith Marshall Adapt DMH for use in setup tool. * src/dmh.cpp: File renamed to... * src/dmhcore.cpp: ...this; some code rearranged, to facilitate... [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...marking of code sections which are required in the base package build, but which may be filtered out of the build context for the setup tool. * src/guidmh.cpp: File renamed to this... * src/dmhguix.cpp: ...this; also add marking for... [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...sections which may be filtered out of the build context for the setup tool. (dmhTypePTY::printf): Improve stratagem for output. * Makefile.in (CORE_DLL_OBJECTS, GUIMAIN_OBJECTS): Adjust references to renamed source files. 2013-03-22 Keith Marshall Enable context hooks for build time code filtering. * src/pkgimpl.h: New file; it defines... (PACKAGE_BASE_COMPONENT, SETUP_TOOL_COMPONENT): ...these contexts; either of these may be selected, by defining as manifest value for... (IMPLEMENTATION_LEVEL): ...this; default is PACKAGE_BASE_COMPONENT. * src/pkgbase.h: Include pkgimpl.h [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Occlude content. 2013-03-21 Keith Marshall Specify additional files for clean-up. * Makefile.in (distclean): Additionally specify... (build.tag, build.time): ...these, as removable files. 2013-03-21 Keith Marshall Add a missing distribution dependency. * Makefile.in (srcdist): Explicitly require... (pkginfo.c): ...this; previously, it was only an implicit build time requirement, and may not have persisted until distribution time. 2013-03-21 Keith Marshall Implement by-name association of resource scripts with programs. * src/guidata.rc: Renamed as... * src/guimain.rc: ...this, reflecting its association with... * src/guimain.cpp: ...this program source. * Makefile.in (GUIMAIN_OBJECTS): Update dependency... (%.$OBJEXT:%.rc): ...replacing use of this pattern rule... (%.res.$OBJEXT:%.rc): ...with this. 2013-01-18 Keith Marshall Make GUI support visual styles in current Windows versions. * src/guidata.rc: Add an appropriate inline manifest resource. * src/guiexec.cpp (AppWindowMaker::Invoked): Ensure UpdateWindow() is called after the initial call to AdjustLayout(); this is required to ensure that all child windows are properly displayed from the outset. * src/pkgview.cpp (AppWindowMaker::LayoutEngine): [ID_PACKAGE_DATASHEET]: Adjust the top position of the frame, to make the border coincide with the bottom border of the tab strip above. 2013-01-12 Keith Marshall Merge gui-dev branch head to master; close gui-dev branch. * configure.ac (AC_INIT): Reset version to 0.6; reset all package files to state prevailing at gui-dev branch head. 2013-01-11 Keith Marshall Create release branch for further r0.5 development. * configure.ac (AC_INIT): Bump version number to 0.5.1; assign branch label (mercurial bookmark) as "r0-5-1" for all files; (this is not to be released, at this time). 2013-01-10 Keith Marshall Implement data sheet compiler for list of installed files. * src/pkgdata.cpp: #include pkgproc.h; it furnishes... (pkgManifest): ...this class declaration, which is required by... (DataSheetMaker::DisplayFilesManifest): ...this new private inline method; declare and implement it; subsequently, invoke it... (DataSheetMaker::OnPaint) [PKG_DATASHEET_INSTALLED_FILES]: ...here. (pkgTroffLayoutEngine::WriteLn): Correct a defect in handling of excess-length unbreakable "words" outside the viewport; previously they were not dropped from the input queue, resulting in repeated reprocessing in an infinite loop. 2013-01-09 Keith Marshall Include release tags in GUI displayed package versions. * src/pkglist.cpp (pkgVersionString) [ReleaseStatus != NULL]: Append ReleaseStatus and ReleaseIndex to generated version string. 2013-01-08 Keith Marshall Fix enumeration of pending install actions for scheduled upgrades. * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions): [action == ACTION_UPGRADE && classified == ACTION_INSTALL]: Enumerate upgrade as a special case of the install classification. 2013-01-08 Keith Marshall Implement "Mark All Upgrades" GUI capability. * src/guimain.h (IDM_REPO_APPLY): Renumbered; make room for... (IDM_REPO_MARK_UPGRADES): ...this new constant; define it. * src/guidata.rc (IDM_REPO_MARK_UPGRADES): New option; add it... (ID_MAIN_WINDOW_WINDOW) [Installation]: ...to this drop-down menu. * src/pkgbase.h (pkgActionItem::SuppressRedundantUpgrades): New public inline method; declare it. * src/guiexec.cpp (AppWindowMaker::OnCommand): [IDM_REPO_MARK_UPGRADES]: Add case handler for this menu selection. (pkgActionItem::SuppressRedundantUpgrades): New method; implement it. 2013-01-08 Keith Marshall Avoid unnecessary reloading of package list. * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]: Do not reload package list after processing; update it in place. 2013-01-08 Keith Marshall Avoid potential heap corruption in action scheduler. * src/guiexec.cpp (pkgActionItem::Clear): Factor out; relocate to... * src/pkgexec.cpp (pkgActionItem::Clear): ...here; this keeps all use of new and delete operators on the same side of the EXE/DLL boundary as the constructor and destructor for pkgActionItem objects. (pkgActionItem::Schedule): Ensure that all min_wanted and max_wanted references are unique to each allocated pkgActionItem object, so that the destructor may safely release their associated heap memory blocks. 2013-01-07 Keith Marshall Update copyright notification for development in new year. * configure.ac (YEARS_OF_ISSUE): Add year 2013. * Makefile.in (version.c, guidata.$OBJEXT): Make them depend on... (Makefile): ...this, so YEARS_OF_ISSUE propagates to built objects. 2012-12-24 Keith Marshall Work around a GUI action scheduling instability. * src/guimain.h (AppWindowMaker::UpdateDataSheet): Declare new method. * src/pkgdata.cpp (AppWindowMaker::UpdateDataSheet): Implement it. (AppWindowMaker::OnNotify): Use it. * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Don't refresh package list view in-place; clear and reload it instead. 2012-12-21 Keith Marshall Update distribution build rules. * Makefile.in (SRCDIST_FILES): Remove version.c.in; this was moved to src/version.c.in, and is now automatically included via... (SRCDIST_SUBDIRS): ...this; remove build-aux and build-aux/m4; we want only selected files from these, as filtered by specification in... (BUILD_AUX_DIRS, BUILD_AUX_FILES): ...these new macros; define them. (BLDTAG, SCMTAG, GCMTAG): New release class macros; define them. (bindist, licdist, srcdist): Use them. 2012-12-21 Keith Marshall Update CLI implementation hooks for GUI integration. * Makefile.in (LIBEXEC_PROGRAMS): Replace gui$EXEEXT with guistub$EXEEXT; update make goal references accordingly. * src/rites.c (MINGW_GET_GUI): Redefine to be guimain$EXEEXT. (MINGW_GET_GFB): Define new fall-back; let it be guistub$EXEEXT. (RITES_IMPLEMENTATION): Perform rites for MINGW_GET_GUI. * src/clistub.c (main) [cannot exec MINGW_GET_GUI]: Try MINGW_GET_GFB instead. 2012-12-21 Keith Marshall Rename executive core file for GUI implementation. * src/guixmld.cpp: File renamed... * src/guiexec.cpp: ...to this; its function exceeds original intent. * Makefile.in (GUIMAIN_OBJECTS): Update reference accordingly. 2012-12-20 Keith Marshall Create foundation for implementation of package category tree view. * Makefile.in (GUIMAIN_OBJECTS): Add pkgtree.$OBJEXT reference to... * src/pkgtree.cpp: ...incorporate this new file; it implements... (AppWindowMaker::InitPackageTreeView): ...this new class method... (pkgInitCategoryTreeGraft): ...and this new extern "C" function. * src/guimain.h (pkgInitCategoryTreeGraft): Declare prototype. (AppWindowMaker::InitPackageTreeView): New private method; declare it. (AppWindowMaker::PackageTreeView): New member variable; declare it. * src/guixmld.cpp (AppWindowMaker::LoadPackageData): Call pkgInitCategoryTreeGraft(), after loading profile.xml (AppWindowMaker::Invoked): Call InitPackageTreeView() * src/pkgview.cpp (AppWindowMaker::LayoutEngine): [ID_PACKAGE_TREEVIEW]: Handle it. 2012-12-19 Keith Marshall Make the "Apply Changes" dialogue "failure-aware". * src/pkgtask.h (ACTION_APPLY_FAILED): Redefine, in terms of... (ACTION_INSTALL_FAILED, ACTION_REMOVE_FAILED): New manifest defines. (ACTION_UNSUCCESSFUL): New manifest constant; define it. * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions): [ACTION_UNSUCCESSFUL]: Make it a special case for enumeration. * src/guixmld.cpp (pkgApplyChanges): Enumerate... [ACTION_UNSUCCESSFUL > 0]: ...all such cases; when true... [IDD_AUTO_CLOSE_OPTION]: ...this; select alternative close-out messages, as appropriate. (pkgActionItem::Assert): Factor out; relocate to... * src/pkgexec.cpp (pkgActionItem::Assert): ...here; this moves its object code into the mingw-get DLL. * src/pkgunst.cpp (pkgRemove) [ACTION_REMOVE_FAILED]: * src/pkginst.cpp (pkgInstall) [ACTION_INSTALL_FAILED]: Assert as appropriate. 2012-12-19 Keith Marshall Improve progress reporting in "Apply Changes" dialogue. * src/pkgstat.h: New header file; it declares... (pkgSpinWait): ...this new pure abstract base class; it specifies an infrastructure for posting arbitrary text to dialogue controls. * src/pkgexec.cpp (pkgSpinWait): Implement its static elements. (pkgActionItem::Execute): Dispatch progress reports, handled by... (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these. * src/guixmld.cpp (pkgDialogueSpinWait): New class; declare it and implement locally. It is derived from, and provides a listener for... (pkgSpinWait): ...this abstract class. (pkgApplyChanges): Use it. * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream): Call... (pkgSpinWait::Report): ...this, to report extracted files. * src/pkgunst.cpp (pkg_unst): Call... (pkgSpinWait::Report): ...this, to report deleted files. * src/sysroot.cpp (pkgXmlDocument::UpdateSystemMap): Call... (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these, to confirm continuing database update activity. 2012-12-18 Keith Marshall Update tab display on right-click in package list view. * src/pkgdata.cpp (AppWindowMaker::OnNotify) [NM_RCLICK]: Call DataSheetMaker::DisplayData(), before invoking pop-up menu. 2012-12-17 Keith Marshall Add more protection against NULL pointer abuse. * src/pkgbase.h (pkgActionItem::Reset): Method renamed to... * src/guixmld.cpp (pkgActionItem::Assert): ...this; also renamed here. (AppWindowMaker::OnCommand): When calling... (pkgListViewMaker::MarkScheduledActions): ...this, pass argument as... (pkgXmlDocument::ClearScheduledActions): ...pointer returned by this. * src/pkgdata.cpp (AppWindowMaker::MarkSchedule): [pending_actions == NULL]: Do not propagate invocation request to... (pkgListViewMaker::MarkScheduledActions): ...this. * src/pkglist.cpp (pkgListViewMaker::MarkScheduledActions): [schedule == NULL]: Do nothing. 2012-12-14 Keith Marshall Implement some additional permanent debugging support. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): [DEBUG_TRACE_DEPENDENCIES]: Enable DMH digest mode for messages. * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream): [DEBUG_TRACE_TRANSACTIONS]: Add logging of installed file path names. 2012-12-14 Keith Marshall Insert a missing snprintf format effector. * src/pkgnget.cpp (pkgDownloadMeterGUI::Update): Add omitted '%' format specifier, in "%%", for formatting percentage-complete value. Rename "size_buf" automatic variable as "buf"; this results in shorter source lines, and consequently a tidier source code layout. (pkgDownloadMeterGUI::ResetGUI): Likewise s/size_buf/buf/ 2012-12-14 Keith Marshall Add a missing header reference. * src/approot.h: Include stdint.h; this ensures that wchar_t is properly typedef'd, before attempting to use it. 2012-12-12 Keith Marshall Make a clone of the package menu available as a pop-up. * src/guimain.h (AppWindowMaker::SelectPackageAction): New private method; declare it. * src/pkgdata.cpp (AppWindowMaker::SelectPackageAction): Implement it. (AppWindowMaker::OnNotify) [ID_PACKAGE_LISTVIEW]: Use it. 2012-12-12 Keith Marshall Improve conditionally enabled state manipulation for menu items. * src/guidata.rc (IDM_REPO_APPLY): Set its initial state as GRAYED. * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings): [IDM_PACKAGE_REINSTALL]: Always leave it GRAYED; this is a temporary provision, until the GUI is updated to support "reinstall" capability. [IDM_REPO_APPLY && !(EnumeratePendingActions > 0)]: Make it GRAYED. [IDM_REPO_APPLY && (EnumeratePendingActions > 0)]: Enable it. 2012-12-11 Keith Marshall Implement GUI bindings for processing a schedule of actions. * src/guimain.h (IDD_DMH_CONSOLE): New resource ID; define it. (IDD_APPLY_EXECUTE): New dialogue template resource ID; define it. (AppWindowMaker::ExecuteScheduledActions): New method; declare it. * src/guidata.rc (IDD_APPLY_EXECUTE): Implement dialogue template. * src/guixmld.cpp (pkgApplyChanges): New thread function; implement it. (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use it; it is invoked... (IDD_APPLY_EXECUTE): ...via this dialogue box, subsequently calling... (AppWindowMaker::ExecuteScheduledActions): ...this; implement it. * src/pkgexec.cpp (pkgActionItem::Execute): Add argument; use it. (pkgActionItem::~pkgActionItem): Unlink chained references. * src/pkgbase.h (pkgActionItem::Execute): Adjust prototype. 2012-12-11 Keith Marshall Do not preserve unnecessary download requests. * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): [(flags & ACTION_INSTALL) != ACTION_INSTALL]: Actions having no "install" effect do not require a download; cancel any associated download request. 2012-12-10 Keith Marshall Implement GUI bindings for package download agent. * src/guimain.h (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX): (IDD_PROGRESS_PCT): New manifest resource IDs; define them. They will be used to identify dialogue controls, to be associated with... (IDD_APPLY_DOWNLOAD): ...this new dialogue template ID; define it. (AppWindowMaker::DownloadArchiveFiles): New inline method; declare it. * src/guidata.rc (IDD_APPLY_DOWNLOAD): Implement dialogue template. * src/pkgbase.h (pkgActionItem::DownloadArchiveFiles): New public inline method; declare it. It overloads an existing private method of the same name, which it subsequently invokes. * src/pkginet.h: New header file; it declares... (pkgInvokeDownload): ...this new extern "C" function prototype, and... (pkgDownloadMeter): ...this abstract class; it is factored from its original implementation in pkginet.cpp, augmented by addition of... (pkgDownloadMeter::primary): New static member variable; declare it. (pkgDownloadMeter::UseGUI): New public method; implement it inline. (pkgDownloadMeter::ResetGUI): New public method; declare it, providing a do-nothing inline default implementation. Any derived class, which supports GUI capability, should override this. * src/pkgnget.cpp: New file; it implements... (pkgDownloadMeterGUI): New class, derived from pkgDownloadMeter. (pkgActionItem::DownloadArchiveFiles): New overloaded inline method. (AppWindowMaker::DownloadArchiveFiles): New inline method. (pkgInvokeDownload): New dialogue box worker thread handler. * src/pkginet.cpp: Include pkginet.h; hence... (pkgDownloadMeter): ...remove redundant class declaration. (pkgDownloadMeter::primary): Define and initialise it. (pkgInternetStreamingAgent::Get) [pkgDownloadMeter::UseGUI]: Delegate progress metering to referenced pkgDownloadMeterGUI class instance. [! pkgDownloadMeter::UseGUI]: Continue to use the existing built-in pkgDownloadMeterTTY mechanism. (pkgActionItem::DownloadSingleArchive) [ACTION_DOWLOAD_FAILED]: Assert this initially; subsequently clear it on successful completion. (pkgActionItem::DownloadArchiveFiles): Collect diagnostic messages into a single DMH_BEGIN_DIGEST ... DMH_END_DIGEST group. * src/guixmld.cpp: Include pkginet.h; it is required by... (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use pkgInvokeDownload. * Makefile.in (GUIMAIN_OBJECTS): Include pkgnget.$OBJEXT 2012-12-08 Keith Marshall Implement "Discard" handler for GUI "Apply Changes" dialogue. * src/pkgbase.h (pkgActionItem::Reset): New public method; declare it. (pkgActionItem::Clear): New public method; declare two overloaded variants, of which implement one inline. (pkgXmlDocument::ClearScheduledActions): New public method; declare and implement it inline. * src/pkgtask.h (ACTION_DOWNLOAD_FAILED, ACTION_APPLY_FAILED): New manifest bit-flag constants; define them. They provide a mechanism for blocking the discard event in respect of failed actions. * src/guixmld.cpp (pkgActionItem::Reset): Implement it. (pkgActionItem::Clear): Implement second, out-of-line variant. (ACTION_PRESERVE_FAILED): New local manifest bit-flag constant; define it as an aggregate of ACTION_DOWNLOAD_FAILED and ACTION_APPLY_FAILED. (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use them. 2012-12-07 Keith Marshall Implement GUI dialogue for "Apply Changes" action approval. * src/guidata.rc (ID_MAIN_WINDOW_MENU): Rename... ("&Repository"): ...this drop-down menu entry... ("&Installation"): ...this; add... ("&Apply Changes"): ...this new selection. (IDD_APPLY_APPROVE): New dialogue box resource template; define it. (SS_CTEXTBOX): New aggregate style convenience macro; define it. (ES_VT100): Likewise. * src/guimain.h (IDM_REPO_APPLY): New resource ID; define it. (IDM_REPO_QUIT): Redefined resource ID; was 302; changed to 312. (IDD_APPLY_APPROVE, IDD_PROGRESS_TXT): New resource IDs; define them. (IDD_APPLY_REMOVES_PACKAGES, IDD_APPLY_REMOVES_SUMMARY): Likewise. (IDD_APPLY_INSTALLS_PACKAGES, IDD_APPLY_INSTALLS_SUMMARY): Likewise. (IDD_APPLY_UPGRADES_PACKAGES, IDD_APPLY_UPGRADES_SUMMARY): Likewise. (ID_APPLY, ID_DISCARD, ID_DEFER): New response IDs; define them. (AppWindowMaker::EnumerateActions): New inline method; declare it. (AppWindowMaker::DialogueResponse): New inline method; declare and implement it. * src/guixmld.cpp (pkglist.h): #included. (dmh_setpty): Add locally declared prototype. (AppWindowMaker::EnumerateActions): Implement it. (pkgActionCount): New static helper function; implement it. (ACTION_APPLY, APPLIES_TO): New macros; define them. (FMT_APPLY_REMOVES, FMT_APPLY_INSTALLS, FMT_APPLY_UPGRADES): New manifest string constants; define them. (pkgApplyApproved): New static call-back function; implement... (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]: ...and use it. 2012-12-06 Keith Marshall Implement enhanced action item enumeration capability. * src/pkgbase.h (pkgActionItem::EnumeratePendingActions): New public method; declare it. It provides the capability to enumerate scheduled actions, filtered by action classification; when invoked such that it selects all actions, it may be used as a replacement for... (pkgActionItem::Unapplied): ...this; delete declaration. * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions): Implement it; it is derived, with enhancement, from original implementation... (pkgActionItem::Unapplied): ...of this; delete it, and... (AppWindowMaker::OnClose): ...update calling reference accordingly. 2012-12-05 Keith Marshall Implement PTY display emulation for GUI mode DMH. * src/dmhcore.h (dmhTypeGeneric::set_console_hook): New public virtual method; declare it, providing inline default do-nothing implementation. (dmhTypeGeneric::severity_tag): New protected static method; declare it. (dmhTypeGeneric::notification_format): New protected static property; declare it. * src/dmh.cpp (dmhTypeGeneric::severity_tag): Implement it. (dmhTypeGeneric::notification_format): Define and initialise it. (dmhTypeTTY::notify): Use them. (dmh_setpty): New function; declare prototype and implement it. * src/guidmh.cpp (dmhTypePTY): New locally implemented class. (dmhTypeGUI::set_console_hook): New virtual method; declare and implement it; it stores a dmhTypePTY reference pointer into... (dmhTypeGUI::console_hook): ...this new private member variable. (dmhTypeGUI::dmhTypeGUI): Initialise it. (dmhTypeGUI::notify) [console_hook != NULL]: Delegate to it. (dmhTypeGUI::printf) [console_hook != NULL]: Likewise. 2012-12-03 Keith Marshall Implement generalised API for dialogue boxes with worker threads. * src/guimain.h (pkgDialogueThread): New typedef; declare it. (AppWindowMaker::DialogueThread): New static property; declare it. (AppWindowMaker::DispatchDialogueThread): New method; declare it. * src/guixmld.cpp: Formatting of several comments adjusted. (pkgUpdate, pkgInitDataLoad): Defunct functions; replaced by... (pkgDialogue): ...this new static call-back function; implement it. (AppWindowMaker::DialogueThread): Instantiate and initialise it. (AppWindowMaker::DispatchDialogueThread): Implement it. (AppWindowMaker::Invoked): Use it to invoke pkgInvokeInitDataLoad()... (AppWindowMaker::OnCommand): ...and pkgInvokeUpdate(). 2012-12-03 Keith Marshall Consolidate GUI implementation for package list view management. * src/pkglist.h (pkgListViewMaker::GetTitle): Disused overloaded method; remove all declarations. (pkgListViewMaker::GetVersionString): Disused method; remove declaration. (pkgListViewMaker::GetItem): New private inline method; declare it. (pkgListViewMaker::UpdateItem): New private method; declare it. (pkgListViewMaker::UpdateListView): New public method; declare it. (pkgListViewMaker::MarkScheduledActions): Likewise. * src/guimain.h (AppWindowMaker::MarkSchedule): New public inline method; declare it, but defer implementation to... * src/pkgdata.cpp (AppWindowMaker::MarkSchedule): ...here; not used elsewhere, it is derived from, and replaces... (pkgMarkSchedule): ...this function; factor out redundant code, in favour of delegation to pkgListViewMaker::MarkScheduledActions(), with following call to AppWindowMaker::UpdatePackageMenuBindings(); update calling function references... (AppWindowMaker::UnmarkSelectedPackage): ...here, and... (AppWindowMaker::Schedule): ...here. * src/pkglist.cpp (pkgVersionString): New static function; implement it as a local replacement for... (pkgListViewMaker::GetVersionString): ...this defunct class method. (pkgGetTitle): New overloaded static function; implement two variants, as local replacements for... (pkgListViewMaker::GetTitle): ...this defunct overloaded class method. (pkgListViewMaker::UpdateItem): Implement it; factor code from... (pkgListViewMaker::InsertItem): ...here, whence use it. (pkgListViewMaker::MarkScheduledActions): Implement it. (pkgListViewMaker::UpdateListView): Implement it. (pkgListViewMaker::pkgListViewMaker): Remove references to... (LVIF_TEXT): ...this. 2012-11-30 Keith Marshall Increase width of window sash bars by 50%. * src/guimain.h (SASH_BAR_THICKNESS): Increase from 4 to 6; this makes it easier to grab the sash bars, so they may be dragged; IMO, it also results in a better appearance. 2012-11-29 Keith Marshall Maintain consistent internal vs. external installation records. * src/pkginst.cpp (pkgInstall): Set "installed" attribute on internal package reference, to "yes", after installation; CLI didn't need this, but GUI will do so, for any package revisited in a single session. * src/pkgunst.cpp (pkgRemove): Similarly, negate "installed" attribute after package removal. 2012-11-17 Keith Marshall Refactor to consolidate three instances of duplicate code. * src/pkglist.h (pkgGetStatus): New function; declare it. * src/pkglist.cpp (pkgGetStatus): Implement it; factor out from... (pkgListViewMaker::InsertItem): ...here, whence use it. * src/pkgdata.cpp (pkgMarkSchedule): Likewise here... (DataSheetMaker::DisplayGeneralData): ...and here. 2012-11-16 Keith Marshall Add GUI support for install, upgrade, and remove action scheduling. * src/guimain.h (EXTERN_C): Ensure it is defined. (pkgActionItem): Add forward declaration of class name. (pkgMarkSchedule): New EXTERN_C function; declare and prototype it. (AppWindowMaker::OnClose): New virtual method; declare it. (AppWindowMaker::Schedule): New public method; declare it. (AppWindowMaker::UnmarkSelectedPackage): Likewise. * src/pkgbase.h (pkgActionItem::HasAttribute) [this == NULL]: Add protective logic; ignore attempts to access non-existent objects. (pkgActionItem::SelectPackage) [this == NULL]: Likewise. (pkgActionItem::Selection) [this == NULL]: Likewise. (pkgActionItem::GetReference): New overloaded public method; declare prototype variant with argument type of pkgXmlNode*. (pkgActionItem::Unapplied): New public method; declare it. (pkgActionItem::CancelScheduledAction): Likewise. (pkgXmlDocument::Schedule): Change return type from void to pkgActionItem*; add default argument values. * src/guixmld.cpp (AppWindowMaker::OnCommand): Add menu case hooks... [IDM_PACKAGE_INSTALL]: ...to schedule package 'install' action... [IDM_PACKAGE_UPGRADE]: ...package 'upgrade' action... [IDM_PACKAGE_REMOVE]: ...package 'remove' action, or... [IDM_PACKAGE_UNMARK]: ...to cancel any of these scheduling requests. [IDM_REPO_QUIT]: Correct typo; s/WM_QUIT/WM_CLOSE/ in comment. * src/pkgdata.cpp (pkgMarkSchedule): Implement it. (pkgActionItem::CancelScheduledAction): Implement it. (pkgActionItem::Unapplied): Implement it. (AppWindowMaker::UpdatePackageMenuBindings): Improve comments. (AppWindowMaker::UnmarkSelectedPackage): Implement it. (AppWindowMaker::Schedule): Implement it. (AppWindowMaker::OnClose): Implement it. * src/pkgdeps.cpp (pkgActionItem::GetReference): Implement overload. (pkgXmlDocument::Schedule): Change return type, and return value. [this == NULL]: Add protective logic; ignore non-existent objects. [name == NULL]: Do not schedule; just return existing action list. 2012-11-02 Keith Marshall Add dynamically enabled state control for package menu items. * src/guimain.h (AppWindowMaker::UpdatePackageMenuBindings): New private method; declare it. * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings): Implement it, and... (AppWindowMaker::OnNotify): ...use it. 2012-11-01 Keith Marshall Avoid excessive inter-word spaces in adjusted text. * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Check extent of padding to be added at each inter-word space, when adjusting text; do not adjust, if it exceeds 5% of available display pane width. 2012-11-01 Keith Marshall Elide unbreakable text which will not fit within display width. * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Add logic to detect over-width unbreakable text; elide characters from the right, to make it fit within the display width, with trailing ellipsis. 2012-11-01 Keith Marshall Add content compiler for package data sheet "general" tab. * src/pkgbase.h (pkgActionItem::PrintURI): Make it public. Add a call-back reference argument, for output function; assign puts() as default, where previously had hard coded printf() emulating puts() * src/pkginet.cpp (pkgActionItem::PrintURI): Use call-back hook. * src/pkgdata.cpp (DataSheetMaker::Display): New static property; it stores a reference to the active class instance, so static call-back methods may delegate processing requests to non-static methods. (DataSheetMaker::Advance): New static property; it is used to instruct call-back methods to interpose paragraph leading it the output stream. (DataSheetMaker::FormatRecord): New private method; implement it. (DataSheetMaker::FormatText): Don't pass "canvas" as an argument; we can access it directly as a class property. Update all callers as necessary, to conform to modified function prototype. (pkgListSelection): New static function; implement it, and... (DataSheetMaker::OnPaint): ...use it in switch cases, when calling... [PKG_DATASHEET_GENERAL]: DataSheetMaker::DisplayGeneralData(), and... [PKG_DATASHEET_DESCRIPTION]: DataSheetMaker::DisplayDescription(). (DataSheetMaker::DisplayGeneralData): New public method; implement it. (DataSheetMaker::DisplayPackageURL): New static method; implement it. (DataSheetMaker::DisplayLicenceURL): Likewise. (DataSheetMaker::DisplaySourceURL): Likewise. 2012-10-30 Keith Marshall Fix error in counting of catalogue files during loading. * src/pkgbind.cpp (pkgRepository::GetPackageList): Increment count variable once only, at start of each cycle of the catalogue loading loop; previous strategy of counting in discrete logic paths could miss several required increments, particularly in CLI mode. 2012-10-27 Keith Marshall Avoid DMH message digest fragmentation when downloading. * src/dmh.h (DMH_GET_CONTROL_STATE): New macro; define it. * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use it; do not close locally opened message digest, when called with one already open. 2012-10-27 Keith Marshall Initiate progress metering for catalogue load and update operations. * src/guidata.rc (IDD_REPO_UPDATE): New dialogue template; define it. (IDM_REPO_UPDATE): Enable selection from "Repository" drop-down menu. * src/guimain.h (IDD_REPO_UPDATE, IDD_CLOSE_OPTIONS): (IDD_AUTO_CLOSE_OPTION, IDD_PROGRESS_BAR, IDD_PROGRESS_MSG): New resource identification manifest constants; define them. (pkgXmlNode, pkgProgressMeter): Add forward class declarations. (AppWindowMaker::AttachedProgressMeter): New private data; define... (AppWindowMaker::AppWindowMaker): ...and initialise it. (AppWindowMaker::AttachProgressMeter): New public method; declare it. (AppWindowMaker::DetachProgressMeter): Likewise. (AppWindowMaker::LoadPackageData, AppWindowMaker::ClearPackageList): (AppWindowMaker::UpdatePackageList): Make them public. * src/pkgbase.h (pkgProgressMeter): New abstract class; declare it. (AppWindowMaker) [GUIMAIN_H undefined]: Add forward class declaration. (pkgXmlDocument::progress_meter): New private data member; declare... (pkgXmlDocument::pkgXmlDocument): ...and initialise it. (pkgXmlDocument::ProgressMeter, pkgXmlDocument::AttachProgressMeter): (pkgXmlDocument::DetachProgressMeter): New public inline methods; implement them. * src/pkgview.cpp (WTK::GenericDialogue): Delete disused reference. (AppWindowMaker::OnCommand): Factor out implementation; relocate it... * src/guixmld.cpp: ...to here; thus it may utilise dependants of... (ProgressMeterMaker): ...this new locally implemented class. (AppWindowMaker::AttachProgressMeter): Implement it. (AppWindowMaker::AttachProgressMeter): Likewise. (pkgProgressMeter::~pkgProgressMeter): Likewise. (pkgUpdate, pkgInvokeUpdate): New static functions; implement them. (AppWindowMaker::Invoked): Replace direct call to LoadPackageData by an indirect invocation, via a progress metering dialogue box using... (pkgInitDataLoad): ...this new static callback function, invoking... (pkgInvokeInitDataLoad): ...this new static thread function, whence... (AppWindowMaker::LoadPackageData): ...this; add hook-up call to... (pkgXmlDocument::AttachProgressMeter): ...incorporate this. * src/pkgbind.cpp (pkgRepository::total, pkgRepository::count): New private static properties; declare and instantiate them; provide... (pkgRepository::Reset, pkgRepository::IncrementTotal): ...new public static methods to manipulate them; declare and implement them inline. (pkgRepository::GetPackageList): Use them to manage updates to the pkgProgressMeter class instance, if any, which has been bound to the controlling pkgXmlDocument class instance, when invoking... (pkgXmlXmlDocument::BindRepositories): ...this. 2012-10-18 Keith Marshall Associate DMH message boxes with active dialogues. * src/guidmh.cpp (last_active_popup): New static inline function. (dmhTypeGUI::dispatch_message): Use it. 2012-10-18 Keith Marshall Fix Diagnostic Message Handler initialisation logic. * src/dmh.cpp (dmh_init) [DMH_SUBSYSTEM_GUI]: Correct a logic error; it previously fell through after any successful initialisation of the DMH_SUBSYSTEM_GUI handler, replacing it with a DMH_SUBSYSTEM_TTY type handler. Also, assign a heap copy of the passed "progname" string resource, which is volatile, to ensure that the handler retains a valid reference. 2012-10-11 Keith Marshall Implement preliminary GUI mode data sheet compiler. * src/guimain.h (DataSheetMaker): New class; forward declare it. (AppWindowMaker::InitPackageTabControl): New private method; declare it. (AppWindowMaker::DataSheet, AppWindowMaker::PackageTabControl): (AppWindowMaker::TabDataPane, AppWindowMaker::PackageTabPane): New private data members; declare them. (ID_SASH_WINDOW_PANE_CLASS): New string resource identifier; define it. (ID_PACKAGE_DATASHEET, ID_PACKAGE_TABPANE): New window identifiers; define them. * src/guidata.rc (ID_SASH_WINDOW_PANE_CLASS): Specify string resource. * src/pkgview.cpp (AppWindowMaker::OnSize): Add handler for... (ID_PACKAGE_TABPANE, ID_PACKAGE_TABCONTROL, ID_PACKAGE_DATASHHET): ...this group of sash pane child window entities. (AppWindowMaker::OnNotify): Comment out disused stub implementation. * src/pkgshow.cpp (pkgUTF8Parser): Factor out class declaration... (UTF32_MAX, UTF32_OVERFLOW, UTF32_INVALID): ...these definitions... (utf32_t): ...and this typedef; relocate to, and #include... * src/pkgdata.h: ...this new header file. * src/pkgdata.cpp (DataSheetMaker): New class; declare and implement it. (AppWindowMaker::InitPackageTabControl): Implement it. (AppWindowMaker::OnNotify): Reimplement it. * Makefile.in (GUIMAIN_OBJECTS): Add pkgdata.OBJEXT * src/guixmld.cpp (AppWindowMaker::Invoked): Add call to invoke AppWindowMaker::InitPackageTabControl() 2012-10-09 Keith Marshall Remove a grossly heuristic list view hack. * src/pkglist.cpp (pkgListViewMaker::GetTitle): Remove code for the heuristic deletion of any redundant package name prefixes from package title attributes; by now, all such prefixes should have been removed from the catalogue, explicitly, at source. 2012-10-08 Keith Marshall Implement GUI list view compiler for XML catalogue. * src/pkgview.cpp (AppWindowMaker::LayoutEngine): Add case handler... [pane_id == ID_PACKAGE_LISTVIEW]: ...for this window pane class. * src/guimain.h (ID_PKGLIST_TABLE_HEADINGS): (ID_PKGNAME_COLUMN_HEADING, ID_PKGTYPE_COLUMN_HEADING): (ID_INSTVER_COLUMN_HEADING, ID_REPOVER_COLUMN_HEADING): (ID_PKGDESC_COLUMN_HEADING): New resource identifiers; define them. (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW): (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL): (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED): (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE): (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN): (ID_PKGSTATE_PURGE): New icon resource identifiers; define them. (AppWindowMaker::InitPackageListView): New private method; declare it. (AppWindowMaker::UpdatePackageList): New private method; declare it. (AppWindowMaker::ClearPackageList): New private method; declare and implement it inline. * src/guidata.rc (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW): (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL): (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED): (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE): (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN): (ID_PKGSTATE_PURGE): New icon resources; implement them. * icons/state01.ico icons/state02.ico icons/state03.ico: * icons/state04.ico icons/state05.ico icons/state06.ico: * icons/state07.ico icons/state08.ico icons/state09.ico: * icons/state10.ico icons/state11.ico icons/state12.ico: * icons/state13.ico: New files. All are cloned from synaptic icons; see src/guimain.rc for symbolic/functional reference names. * src/pkglist.h [GUIMAIN_H defined] (pkgListViewMaker): New class; declare it for use in modules which #include guimain.h * src/pkglist.cpp: New file; it implements... (pkgListViewMaker): ...this new class, and its clients... (AppWindowMaker::InitPackageListView): New method. (AppWindowMaker::UpdatePackageList): Likewise. * Makefile.in (GUIMAIN_OBJECTS): Add pkglist.OBJEXT * src/guixmld.cpp (AppWindowMaker::Invoke): Call InitCommonControls(), as prerequisite to AppWindowMaker::InitPackageListView(); follow up by calling AppWindowMaker::AdjustLayout(). 2012-10-07 Keith Marshall Add GUI initialiser hook for XML catalogue interface. * src/guimain.h (AppWindowMaker::Invoke): New public method; declare it; it overrides the generic WTK::MainWindowMaker::Invoke() method, so providing the initialiser hook which will invoke this... (AppWindowMaker::LoadPackageData): ...new private method; declare it. * src/guixmld.cpp: New file. (AppWindowMaker::Invoke): Implement it. (AppWindowMaker::LoadPackageData): Likewise. * Makefile.in (GUIMAIN_OBJECTS): Add guixmld.OBJEXT 2012-09-29 Keith Marshall Add initial working GUI mode DMH class implementation. * src/dmh.h (DMH_SEVERITY_MASK): New manifest constant; define it. (DMH_DIGEST_MASK, DMH_COMPILE_DIGEST, DMH_DISPATCH_DIGEST): Likewise. (DMH_BEGIN_DIGEST, DMH_END_DIGEST): Redefine in terms of above. * src/dmhcore.h: New header file; it declares... (dmhTypeGeneric): ...this abstract base class, factored from... * src/dmh.cpp (dmhTypeGeneric): ...here, whence remove it; it is still required, thus include dmhcore.h so that it remains visible. (dmh_exception): Remove errant namespace qualifier from constructor. (dmhTypeGUI): Delete class declaration and original constructor. (dmh_init): Delete reference to dmhTypeGUI; replace by call to... (dmh_init_gui): ...this new static function; it is a stub which invokes a DLL import of the same name, to instantiate a dmhTypeGUI. (dmhTypeGUI::control, dmhTypeGUI::notify, dmhTypeGUI::printf): Delete original method stubs. * src/guidmh.cpp: New file; it reimplements... (dmhTypeGUI): ...this class; declare it and implement its constructor. (dmh_init_gui): Provide its DLL exported implementation. (dmhTypeGUI::dispatch_message): New private method; add it to the class declaration and implement it; it is a helper method for... (dmhTypeGUI::control, dmhTypeGUI::notify): ...these; implement them. (dmhTypeGUI::printf): Provide a replacement stub. * Makefile.in (GUIMAIN_OBJECTS): Add guidmh.OBJEXT * src/guimain.h (AppWindowMaker::Create): New method; add it to the class declaration; it overrides the default Create() method inherited from WTK::MainWindowMaker * src/pkgview.cpp (AppWindowMaker::Create): Implement it; it handles window class registration and dmhTypeGUI initialisation, in addition to the inherited CreateWindow() behaviour. * src/guimain.cpp: Include dmh.h (WinMain): Add catch block for dmh_exception. Remove window class registration request; it is now delegated to AppWindowMaker::Create() 2012-09-26 Keith Marshall Add .hgignore as tracked file. * .hgignore: New file. 2012-09-25 Keith Marshall Defer generation of version.c until "make" time. * version.c.in: Move it... * src/version.c.in: ...to here. (PACKAGE_NAME, PACKAGE_VERSION, COPYRIGHT_HOLDER, YEARS_OF_ISSUE): Change substitution field marker character from "@" to "%". * configure.ac (AC_CONFIG_FILES): Remove version.c * Makefile.in (TAG_SCRIPT): New macro, factored out from... (RC_SCRIPT): ...here, whence use it; also use it to implement... (VERSION_SCRIPT): ...this further new macro; use it in... (%.c): ...this generic template rule for version.c (time-stamp, %.time, %.tagged.time, %.tag): New generic build goals; use them to track package release progression via... (build.tag): ...this new intermediate; make it a pre-requisite... (guidata.OBJEXT, version.c): ...of these. 2012-09-21 Keith Marshall Implement framework for GUI sash window layout controller. * configure.ac (AC_INIT): Bump version number to 0.6 (CLI_RELEASE_CLASS): New AC_SUBST variable; default to "beta". (GUI_RELEASE_CLASS): New AC_SUBST variable; default to "alpha". (SNAPSHOT_CLASS): Recognise as user specified environent variable override for both CLI_RELEASE_CLASS and GUI_RELEASE_CLASS. (RC): New AC_CHECK_TOOL substitution variable name; it replaces... (WINDRES): ...this, as reference name for the resource compiler. (MINGW_AC_ASSERT_MISSING): Add AC_CHECK_HEADER traps for missing "lua-dev" and "wtklite-dev" support. * Makefile.in (CLI_RELEASE_CLASS, GUI_RELEASE_CLASS): Use them. (BUILD_TAG, RC_SCRIPT, RC_INCLUDES): New macros; define and use... (RC): ...with this, to implement new target rule for compiling... (%.rc): ...resource definition files to %.OBJEXT objects. (GUIMAIN_OBJECTS, GUIMAIN_LIBS): New macros; define and use... (guimain.EXEEXT): ...to implement build rule for this. (LIBEXEC_PROGRAMS): Add guimain.EXEEXT (lastrites.EXEEXT): Use GUI_LDFLAGS. * src/guimain.h src/guimain.cpp src/guidata.rc: New files. * src/pkgview.cpp: New file. 2012-09-20 Keith Marshall Adjust incorrectly resolved 2012-09-14 merge from master. * src/Makefile.in: Restore lost reference to guistub.cpp 2012-09-14 Keith Marshall Implement GUI hooks in "rites of passage" internal API. * src/pkglock.h: New file; it adds the pkgLock() and pkgRelease() inline wrapper functions, through which the GUI application acquires and manages an exclusive access lock for the XML catalogue. * src/rites.c (lockfile_name): Explicitly cast memory allocated for the returned name to (char *), so this may be embedded in C++ code. (pkgInitRites): Factor out lock acquisition failure diagnostics... (pkgLockFail): ...to this inline helper function; conditionally... [ifdef GUIMAIN_H]: ...provide one implementation for GUI use... [ifndef GUIMAIN_H]: ...and an alternative for CLI use. 2012-09-14 Keith Marshall Be case agnostic when matching shortcut targets. * scripts/libexec/unlink.js [ref.TargetPath == chklink]: Apply toLowerCase() on both sides of the comparison. 2012-09-12 Keith Marshall Note relocation of m4 when packaging source distribution. * Makefile.in (SRCDIST_SUBDIRS): Refer to build-aux/m4, not m4. 2012-09-10 Keith Marshall Move guimain.cpp out of the way. * src/guimain.cpp: Rename file as... * src/guistub.cpp: ...this; we want to keep current features for now, but to use the guimain.cpp name for main GUI application development. * Makefile.in: Adjust references accordingly. 2012-09-09 Keith Marshall Fix typo, and update licensing terms for embedded getopt.c * src/getopt.c: Incorporate MIT/X style licence; update copyright notice, to reflect chronology of publication; correct degenerate RCS keyword usage in EOF marker comment. 2012-09-03 Keith Marshall Correct omission from copyright notice. * src/pkgkeys.c: Add year 2012, to reflect 2012-09-02 update. 2012-09-02 Keith Marshall Redefine paragraph_key with project global scope. * src/pkgkeys.h (paragraph_key): Declare it. * src/pkgkeys.c (paragraph_key): Define it. * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): Delete function local definition; use global definition instead. 2012-09-02 Keith Marshall Correct defect introduced by 2012-08-03 commit. * src/approot.c (AppPathNameW): Add omitted 'else', so that tail pointer isn't moved after the APPROOT prefix is truncated. 2012-09-02 Keith Marshall Remap Mercurial subrepository reference via local hg-git clone. * .hgsub (build-aux): Point to ../build-aux; this must be a locally hosted hg clone of the git origin repository, and it must pre-exist as a sibling of any created hg clone of the mingw-get repository. * .hgsubstate: New file, automatically generated by Mercurial. 2012-08-31 Keith Marshall Add Mercurial subrepository reference for build-aux. * .hgsub: New file. 2012-08-03 Keith Marshall More code refactoring, to facilitate GUI implementation. * src/clistub.c (AppPathNameW): Factor out; relocate to... * src/approot.c: ...this new file; it reproduces the original implementation, modified to also consider any "libexec" directory in the executable path as the first child of the APPROOT prefix. Note also, that no longer terminates APPROOT with a trailing backslash. * src/approot.h: New file; it trivially declares the prototype for... (AppPathNameW): ...this relocated extern "C" function. * src/clistub.c (main): Adapt usage of AppPathNameW(), to reinstate trailing backslash on assignment to APPROOT environment variable. * Makefile.in (CLI_EXE_OBJECTS): New macro; define it as the original set of prerequisites, with the addition of approot.OBJEXT, for... (mingw-get.EXEEXT): ...this; use it. * src/rites.c: Add comment regarding APPROOT usage. 2012-08-02 Earnie Boyd Find missing.m4 in build-aux/m4 directory. * aclocal.m4: Change path m4/missing.m4 to build-aux/m4/missing.m4. 2012-07-31 Earnie Boyd Add build-aux as a submodule. Move .cvsignore to .gitignore. * .gitmodules: New file. * build-aux: New submodule directory. * .cvsignore: Remove. * .gitignore: New file. 2012-07-13 Keith Marshall Disable globbing of command line arguments. * src/clistub.c (_CRT_glob): Define and initialise to zero; we don't need globbing, and it may cause case transliteration of case-sensitive action keywords, when a file system entity with a case-insensitively matching name exists. 2012-06-02 Keith Marshall Refactor API to facilitate implementation of GUI ListView hooks. * src/pkgkeys.h (title_key, description_key): Declare them. * src/pkgkeys.c (title_key, description_key): Define them; relocate... * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): ...from here. (pkgXmlDocument::CalalogueAllPackages): New public method; factor... (pkgXmlDocument::DisplayPackageInfo): ...from here, whence use it. (pkgDirectoryViewerEngine::EnumerateComponents): New private method; implement as a concrete method of this abstract base class; factor... (pkgDirectoryViewer::Dispatch): ...from original inline implementation within this method of the concrete derived class, whence use it. (pkgDirectoryViewerEngine, pkgDirectory): Factor class declarations... * src/pkglist.h: ...into this new header file; include it. * src/pkgbase.h (pkgDirectory): Add forward class declaration. (pkgXmlDocument::CatalogueAllPackages): Declare it. 2012-05-02 Keith Marshall Update help text to document package version selection capability. * src/clistub.c (help_text): Add description of command line syntax which may be used to specify an alternative to the default package version selection, for install and upgrade actions. 2012-05-01 Keith Marshall Support options set by preferences assigned within profile.xml * xml/profile.xml (preferences): New element; add defaults. * src/pkgopts.h (OPTION_ASSIGNED_FLAGS, OPTION_DESKTOP_ARGS): (OPTION_START_MENU_ARGS): New enumerated constants; define them. (OPTION_DESKTOP, OPTION_START_MENU): New manifest constants. (OPTION_ASSIGNED, mark_option_as_set): New macros; define them. (pkgOpts::GetValue, pkgOpts::GetString): Restrict look-up index to least significant 12-bits of full-range index value. (pkgOpts::IsSet): New inline method; implement it. * src/clistub.c (main): Reimplement --desktop and --start-menu options; each now becomes an OPTION_GENERIC optarg string store. (set_script_hook): Function no longer used; delete it; delegate to... * src/pkgbase.h (pkgXmlDocument::EstablishPreferences): ...this new method; declare it, providing its implementation in... * src/pkgopts.cpp: ...this new file; invoke it... * src/climain.cpp (climain): ...here. * Makefile.in (CORE_DLL_OBJECTS): Add pkgopts.$OBJEXT 2012-04-30 Keith Marshall Correct sequence of installation/removal progress reporting. * src/pkgunst.cpp (pkgRemove): Delay output of "removing package ..." message, until after pre-remove hooks have run; this ensures that any output from the pre-remove hook scripts appears in correct sequence. * src/pkginst.cpp (pkgInstall): Likewise, for "installing package ..." message, in relation to pre-install hooks. 2012-04-26 Keith Marshall mingw-get-0.5-beta-20120426-1 released. * configure.ac (AC_INIT): Version number updated. * srcdist-doc/NEWS.in: Updated; bug-fix notifications added. * All files (r0-5-beta-20120426-1): Tag assigned. 2012-04-25 Keith Marshall Interim work-around for MinGW-Bug #3520864. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): [DEBUG_TRACE_DEPENDENCIES]: Add request flags to messages reporting the scheduling of installation activities. * src/pkgexec.cpp (pkgXmlDocument::Schedule): Add temporary diagnostic hooks to confirm request flags; bracket them with #if 0 ... #endif. [ACTION_PRIMARY && pre-scheduled request]: Don't trash request flags when updating the pre-existing action item data. 2012-04-23 Keith Marshall Fix MinGW-Bug #3520488 * src/pkgexec.cpp (action_code): Check for, and reject NULL pointer passed as action request string; also reject ambiguous abbreviations. * src/climain.cpp (climain): Discriminate between NULL pointer and other forms of invalid action keyword matching failures. 2012-04-16 Keith Marshall mingw-get-0.5-beta-20120416-1 released. * configure.ac (AC_INIT): Version number updated. (YEARS_OF_ISSUE): 2012 added. * srcdist-doc/NEWS.in: Updated; release notes added. * All files (r0-5-beta-20120416-1): Tag assigned. 2012-04-16 Keith Marshall Assign icon to temporary GUI executable file. * icons/pkgicon.ico: New file, shamelessly copied from synaptic. * configure.ac: Add identification for windres; propagate it to... * Makefile.in: ...here; use it to compile object from icon files... (srcdir/icons) [%.ico]: ...from this new vpath location. (gui.exe): Link to compiled icon's object file. (SRCDIST_SUBDIRS): Add icons directory. 2012-04-15 Keith Marshall Ensure that package removal requests are correctly scheduled. * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [ACTION_REMOVE]: Schedule as a distinct case, when the installed version is not the most recent available release; consideration of this distinct case was previously erroneously overlooked. 2012-04-15 Keith Marshall Correct scheduling of new prerequisites when upgrading. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): [ACTION_UPGRADE && ACTION_PRIMARY]: Don't exclude scheduling for this case of a prerequisite with no previously installed version; it may be a delegated primary requirement of a meta-package. 2012-04-15 Keith Marshall Don't require subsystem within user specified version bounds. * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Automatically consider "*" wild-card matches for subsystem, if user doesn't specify it. 2012-04-09 Charles Wilson Fix missing include. * src/pkgdeps.cpp (pkgopts.h): Include unconditionally; do not rely... (debug.h) [DEBUG_TRACE_DYNAMIC]: ...on this, for indirect inclusion. 2012-04-07 Keith Marshall Correct a srcdist package construction defect. * Makefile.in (srcdist) [for SRCDIST_SUBDIRS]: Use... (mkinstalldirs): ...this, to create package image directories. 2012-04-06 Keith Marshall Add scripting hooks to support creation of MS-Windows shortcuts. * src/clistub.c (progname): New static variable with file scope; it replaces former automatic variable, of same name, in main() function. (set_script_hook): New static function; implement it, and call it... (main) [--desktop, --start-menu]: ...from here, to interpret these new command line options; they are propagated to scripts via... (MINGW_GET_DESKTOP_HOOK, MINGW_GET_START_MENU_HOOK): ...these new internally assigned environment variables. (help_text): Document --desktop and --start-menu. * scripts/libexec/setup.lua scripts/libexec/wsh.lua: New lua module files; they implement a lua scripting API; they delegate requests to the Windows Scripting Host, via either of this pair of... * scripts/libexec/shlink.js: ...new script to create shortcuts, or... * scripts/libexec/unlink.js: ...its complement, to remove them. * Makefile.in (SRCDIST_SUBDIRS): Integrate them; enumerate them in... (scripts_srcdir, LIBEXEC_SCRIPTS): ...these new macros; use to... (install): ...install them. 2012-04-06 Keith Marshall Initialise $LUA_PATH to locate mingw-get specific scripts. * src/pkgexec.cpp (lua_path_init): New static inline function. (pkgXmlNode::DispatchScript): Call it on first time invocation, per... [lua_path_setup == false]: ...this static function local variable. 2012-04-01 Keith Marshall Support installation of releases other than latest available. * src/pkgbase.h (pkgActionItem::ApplyBounds): New method; declare it. * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Implement it. (pkgXmlDocument::Schedule): Use it to interpret user specified version bounds, and apply them to scheduled action items. Having used... (get_version_bounds): ...this new static inline function... ...to acquire any user specified version bounds, check that they can be honoured, before scheduling any action; delegate diagnostics to... (dmh_notify_no_match): ...this new local helper function, to report when they can't, and to indicate viable alternatives. 2012-03-26 Keith Marshall Rework previously inadequate solution for MinGW-Bug #3424406 * src/pkgtask.h: Update copyright notice for current year. (ACTION_MAY_SELECT): New manifest constant for use as flag; define it. * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Assign it. * src/pkgdeps.cpp (STATIC_INLINE): New macro; define it. (ACTION_RECURSIVE_REINSTALL, ACTION_RECURSIVE_UPGRADE): (ACTION_RECURSIVE_REPLACE): New action code constants; define them. (with_flags): Original macro deleted; replace it with... (with_request_flags): ...this new static inline function. (if_noref, if_match, if_alias, with_download, promote): New static inline functions; they replace original macros of the same names. (is_recursive_action): Function no longer used; delete it. (action_class): New static inline function; implement and use it... (pkgXmlDocument::ResolveDependencies): ...here, to identify scheduling requirements for packages which are already installed; depends on... (request_mode): ...this new automatic variable; it augments and... (recursive_mode): ...replaces this one; rename it accordingly. (viable): Automatic variable no longer used; delete it. [DEBUG_REQUEST & DEBUG_TRACE_DEPENDENCIES]: Emit notification for scheduled installation. (pkgXmlDocument::Schedule): Add an implied... (ACTION_REMOVE): ...when scheduling a reinstallation. 2012-03-13 Keith Marshall Address reinstallation issues per MinGW-Bugs #3416013 and #3424406 * src/pkgexec.cpp (reinstall_action_scheduled): New inline function. (pkgActionItem::Execute): Use it to identify cases where... [--reinstall]: ...implicit package removal is required, and also to facilitate improved progress reporting in such cases. * src/pkgdeps.cpp (is_recursive_action): New inline function. (pkgXmlDocument::ResolveDependencies): Use it in tandem with... (recursive_mode): ...this new automatic variable, so as to handle... [meta-package dependency]: ...implicit recursion, to extend the scope of the current action to the first level of non-meta dependency. [install --reinstall]: ...reinstall original version of nominated package, ignoring any available upgrade; extend scope of operation... [install --reinstall --recursive]: ...to all prerequisite packages. [upgrade --reinstall]: ...upgrade nominated package if possible; if no upgrade available, reinstall current version; extend scope... [upgrade --reinstall --recursive]: ...to all prerequisites. (pkgXmlDocument::Schedule): Partially revert 2012-03-05 change; reimplement selectively; never promote... [install, install --reinstall]: ...these operations to become... [upgrade]: ...this, even if available; issue diagnostic instead. 2012-03-12 Keith Marshall Rationalise implementation and usage of --all-related option. * src/pkgopts.h: Update copyright notice; add year 2012. (OPTION_RECURSIVE, OPTION_ALL_RELATED): New constants; define them. (pkgOpts::SetFlags): New method; declare and implement it inline. * src/clistub.c: Update copyright notice; add year 2012. (options) [recursive, all-related]: Redefine in terms of... (OPTION_RECURSIVE, OPTION_ALL_RELATED): ...these. (help_text): Update appropriately. * src/climain.cpp: Update copyright notice; add year 2012. (climain) [all-related]: Associate its use exclusively with... (source, licence): ...these package processing operations; use... (pkgOptions::SetFlags): ...this, to propagate its effect. 2012-03-12 Keith Marshall Don't report failed downloads in respect of virtual packages. * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Clear... [ACTION_DOWNLOAD]: ...this status flag for any package identified as a meta-package; this corrects a further regression introduced with the 2011-11-09 update, whereby pending download requests for such virtual packages were not cancelled, resulting in failure to install due to failed downloads, when no download is actually required. 2012-03-05 Keith Marshall Don't suppress implied downloads for top-level actions. * src/pkgdeps.cpp: Update copyright notice for new year. (pkgXmlDocument::Schedule) [!OPTION_PRINT_URIS]: Ensure that... [ACTION_DOWNLOAD]: ...this is enabled, when scheduling an install or an upgrade action for a package specified as a command line argument; this corrects a regression introduced on 2011-11-09, which resulted in ACTION_DOWNLOAD being enabled only for second tier dependent actions. 2012-02-20 Keith Marshall Copyright notice updates. * Makefile.in: Add 2012 as year of republication. * src/pkgbase.h src/sysroot.cpp src/pkgexec.cpp: Likewise. * src/rites.c src/pkginst.cpp src/pkgunst.cpp: Likewise. 2012-02-20 Keith Marshall Fix ill-advised optimisation in $APPROOT environment lookup. * src/rites.c (approot_path): Don't save result of getenv() lookup across calls; the environment may have been moved in the interim, making the original result invalid on any subsequent call. Also, prefer MS-Windows style (with backslashes) for default. (pkgLastRites): Report full path name for lastrites.exe, on execl() failure, rather than only the path relative to $APPROOT. 2012-02-20 Keith Marshall Propagate sysroot path settings to scripts via the environment. * src/pkgbase.h (PKG_PUTENV_FLAGS_MASK): New constant; it maps... (PKG_PUTENV_DIRSEP_MSW, PKG_PUTENV_DIRSEP_POSIX): ...these flags... (PKG_PUTENV_SCAN_VARNAME, PKG_PUTENV_NAME_TOUPPER): ...and these; they are used to specify optional behavioural choices for... (pkgPutEnv): ...this new function; declare it. * src/sysroot.cpp (pkgPutEnv): Implement it. (pkgXmlDocument::LoadSystemMap): Use it to add $SUBSYSTEM_SYSROOT path specifications to the environment, for each named subsystem associated with the active system map. * src/pkgexec.cpp (pkgActionItem::Execute): Invoke pkgPutEnv() prior to processing of each package install, upgrade, or remove action, so as to update environment variable $SYSROOT to represent the sysroot path for each package processed, during execution of script hooks. 2012-02-17 Keith Marshall Implement hooks to support lua scripting interface. * Makefile.in (LIBS): Add -llua. * src/pkgbase.h (pkgXmlNode::InvokeScript): New method; declare it as private, and provide overloaded public inline API implementation. (pkgXmlNode::DispatchScript): New private method; declare it. * src/pkgexec.cpp (pkgXmlNode::InvokeScript): Implement it. (pkgXmlNode::DispatchScript): Likewise; it directs InvokeScript to... (pkgInvokeScript): ...this new static function; implement it. * src/pkginst.cpp (pkgInstall): Call InvokeScript as appropriate. * src/pkgunst.cpp (pkgRemove): Likewise. 2011-11-24 Keith Marshall Avoid implicit cast warnings; reported by Robert Hartmann. * src/dmh.h (DMH_BEGIN_DIGEST): Explicitly cast to uint16_t. (DMH_END_DIGEST): Likewise. 2011-11-09 Keith Marshall Avoid unnecessary downloads for already installed packages. * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Require external scheduling of ACTION_DOWNLOAD; cancel the scheduled request on completion, or when not required due to pre-existing local copy. * src/climain.cpp (pkgActionItem::GetSourceArchive): Must always be prepared to download the associated archive; enable ACTION_DOWNLOAD. * src/pkgexec.cpp (pkgActionItem::Schedule) [OPTION_REINSTALL]: May need to download the archive, even when the requested package was previously installed; schedule ACTION_DOWNLOAD to enable this. * src/pkgdeps.cpp (promote): Macro redefined in terms of... (with_flags, with_download): ...these new macros; implement and... (pkgXmlDocument::ResolveDependencies): ...use them to enable/schedule ACTION_DOWNLOAD only when expected that it may be necessary. 2011-11-06 Keith Marshall Fix packaging anomalies for source and licence distributions. * Makefile.in (licdist): Link README from ${CURDIR}, not from '..'. (srcdist): Explicitly link pkginfo.c from ${CURDIR} to src/pkginfo, rather than as implied prerequisite; this avoids a bogus attempt to link srcdist-doc into src/pkginfo. 2011-11-06 Keith Marshall Bump version number for subsequent CVS snapshots. * configure.ac (AC_INIT): Set version to 0.4-alpha-1.1cvs 2011-11-06 Keith Marshall mingw-get-0.4-mingw32-alpha-1 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed. * All files (r0-4-alpha-1): Tag assigned. 2011-11-04 Keith Marshall Don't upgrade installed DLL components to incompatible version. Provide clearer diagnostics for failed requests on implied packages. * src/pkgdeps.cpp (is_abi_compatible): New static inline function. (pkgXmlDocument::ResolveDependencies) [is_installed]: Use it. (pkgXmlDocument::ResolveDependencies) [DEBUG_TRACE_DEPENDENCIES]: Clean up and improve diagnostic message content and formatting. (pkgXmlDocument::Schedule) [(upgrade || remove) && ! installed]: Downgrade diagnostic to WARNING, for implicitly specified component packages; provide additional explanatory diagnostics. * src/pkgspec.cpp (pkgSpecs::VersionComparator): * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): [DEBUG_TRACE_DEPENDENCIES]: Eliminate diagnostic noise. 2011-10-11 Keith Marshall Fix --download-only vs. --reinstall conflict. * src/pkgexec.cpp (pkgActionItem::Execute) [OPTION_DOWNLOAD_ONLY]: Test for explicit inequality, rather than equality to zero; since the 2011-08-30 update, which made --download-only also imply --reinstall, it will test as non-zero when --reinstall is specified, even though --download-only is not. 2011-10-07 Keith Marshall Add support for non-specific upgrade of all installed packages. * src/pkgbase.h (pkgXmlDocument::RescheduleInstalledPackages): New public method; declare it. * src/pkgdeps.cpp (pkgXmlDocument::RescheduleInstalledPackages): Implement it. * src/climain.cpp (climain) [ACTION_UPGRADE && argc < 2]: Invoke pkgXmlDocument::RescheduleInstalledPackages() to schedule the upgrade request for all packages currently registered as installed. 2011-10-06 Keith Marshall Implement "source" and "licence" operations. * src/pkgopts.h (OPTION_ALL_DEPS): New option code; define it. * src/clistub.c (main): Associate it with... (all-related, recursive): ...these synonymous option names... (options): ...defined within this local structured array. (help_text): Document them; also document "source" and "licence" as new operations which may be specified on the command line. * src/pkgtask.h (action_source, action_licence): Enumerate them. (ACTION_SOURCE, ACTION_LICENCE): Define their manifest values, and... * src/pkgexec.cpp (action_name): ...associate with operation names. * src/pkgbase.h (pkgActionItem::GetScheduledSourceArchives): (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive): New public methods; declare them for external implementation. (pkgXmlDocument::GetScheduledSourceArchives): New public method; implement it as inline. * src/climain.cpp (pkgProcessedArchives): New pointer to stack of... (pkgArchiveNameList): ...this new locally defined class; implement it. (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive): (pkgActionItem::GetScheduledSourceArchives): Implement them. (climain): Add invocation hooks. 2011-10-04 Keith Marshall Establish mapping from release tarname to source tarname. * src/pkgreqs.cpp (inherited_requirement): New inline function. (requirement): Use it; adapt to propagate release archive format and compression type fields, in addition to version fields, when resolving "%" wildcard matches within the template for the resultant tarname. (pkgAssociateName): New public function; implement it for use by... * src/pkgname.cpp (pkgResolvedName): ...this new inline function. (pkgXmlNode::SourceArchiveName): Use it; adapt to accept a category selector, so it may resolve source or licence tarnames on demand. * src/pkgbase.h (pkgXmlNode::SourceArchiveName): Modify declaration; add category selector argument to support source/licence choice. 2011-10-02 Keith Marshall Facilitate downloads using diverse cache directories. * src/pkgbase.h (pkgActionItem::DownloadSingleArchive): New private method; declare it; it handles the download for a single named archive file, and stores it in a specifed cache directory. * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Implement it; factor its code from the original implementation within... (pkgActionItem::DownloadArchiveFiles): ...this; adapt to use it. 2011-10-02 Keith Marshall Establish cache directory for source archive downloads. * src/mkpath.h (pkgSourceArchivePath): New function; declare it. * src/mkpath.c (pkgSourceArchivePath): Implement it. 2011-08-30 Keith Marshall Support archive extraction to arbitrary destination without install. * src/pkgproc.h (pkgArchiveProcessor::ExtractFile): New virtual helper method for use, as core helper, by derived classes; declare it. (pkgArchiveProcessor::CreateExtractionDirectory): Likewise. (pkgTarArchiveProcessor): Declare overloaded default constructor. (pkgTarArchiveExtractor): New class definition; it is derived from pkgTarArchiveProcessor. * src/tarproc.cpp (pkgArchiveProcessor::ExtractFile): Implement it. (pkgArchiveProcessor::CreateExtractionDirectory): Likewise. (pkgTarArchiveExtractor): Implement constructor, together with... (pkgTarArchiveExtractor::ProcessDirectory): ...this method, and also... (pkgTarArchiveExtractor::ProcessDataStream): ...this one; these are declared as abstract, in the pkgTarArchiveProcessor base class. (pkgTarArchiveInstaller::ProcessDirectory): Simplify; it now delegates directory creation to pkgArchiveProcessor::CreateExtractionDirectory. (pkgTarArchiveInstaller::ProcessDataStream): Simplify; delegate file handling to pkgArchiveProcessor::ExtractFile, as appropriate. 2011-08-30 Keith Marshall Make --download-only and --print-uris imply --reinstall. * src/pkgopts.h (OPTION_PRINT_URIS): Adjust definition. (OPTION_DNLOAD_ONLY, OPTION_DOWNLOAD_ONLY): Likewise. 2011-08-07 Keith Marshall Implement --download-only and --print-uris options. * src/pkgopts.h (OPTION_DOWNLOAD_ONLY, OPTION_PRINT_URIS): New manifest constants, identifying flag bits; define them. (OPTION_DNLOAD_ONLY): Likewise; an alias for OPTION_DOWNLOAD_ONLY. * src/pkgbase.h (pkgActionItem::PrintURI): New private method. * src/pkginet.cpp: Implement it. * src/clistub.c (options): Add "download-only" and "print-uris". (help_text): Document them. * src/pkgexec.cpp (pkgActionItem::Execute): Process them. 2011-07-29 Keith Marshall mingw-get-0.3-mingw32-alpha-2.1 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; document bugs fixed. * All files (r0-3-alpha-2-1): Tag assigned. 2011-07-29 Keith Marshall Adopt tar.xz as default package archive format. * Makefile.in (TARZIP, TAREXT): New macros; define them. (bindist, licdist, srcdist): Use them in place of hardcoded tar.gz (maintainer-clean): Expunge tar files of any compression format. 2011-07-27 Keith Marshall Correct handling of release status in requirements specifications. * src/debug.h (DEBUG_TRACE_DEPENDENCIES): New tracing hook; define it. * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Use it; add function entry/exit tracing report hooks. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Likewise; also add internal trace point reporting, which may also require... (show_required): ...this new static inline DEBUG_INVOKED function. * src/pkgreqs.cpp (requirement): Propagate release status and release reference index fields from requirer, when package version requirement is specified by a '%' token, and no explicit release status override is included in the requirement specification. * src/pkgspec.cpp (is_wildcard_spec): New static inline helper. (pkgSpecs::VersionComparator): Use it to identify any package version specification which may require the extension of a wildcard match, to span the package version and release status fields; also add tracing hooks, triggered on DEBUG_TRACE_DEPENDENCIES, to facilitate debugging. 2011-06-18 Keith Marshall Avoid accidental RCS keyword substitutions. * Makefile.in (DOLLAR): New macro; define it. (readme.txt, readme.txt.in): Use it, where unexpanded RCS Id keyword matching is intended. 2011-06-18 Keith Marshall Mercurial support revisited. * .cvsignore (.hgtags): Add to CVS untracked list. 2011-06-18 Keith Marshall Update readme.txt ID tag-line to track NEWS rather than README. * Makefile.in (readme.txt.in): New rule; implement it. (readme.txt.tag): Likewise; this implements the tag-line tracking. (readme.txt): Rule redefined in terms of the preceding pair. 2011-06-17 Keith Marshall mingw-get-0.3-mingw32-alpha-2 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed. * All files (r0-3-alpha-2): Tag assigned. 2011-06-15 Keith Marshall Add internal documentation for --reinstall option. * src/clistub.c (help_text): Add description for "--reinstall". 2011-06-14 Keith Marshall Support use of Mercurial within a CVS working copy. * .cvsignore (.hg, .hgignore): Don't have CVS track these. 2011-06-13 Keith Marshall Implement --reinstall option. * src/pkgopts.h (OPTION_REINSTALL): New macro; define it. (OPTION_GENERIC, OPTION_SHIFT_MASK): Likewise. (OPTION_EXTRA_FLAGS): New field; declare it. * src/clistub.c (options): Add "reinstall". (OPTION_GENERIC): Use it where appropriate; within its scope... (OPTION_STORAGE_CLASS): Improve descriptive comments; add handling for default case of flag type options requiring an alignment shift. * src/pkgexec.cpp: Remove previous "always reinstall" kludge. (pkgOptionSelected, PKG_OPTION_REINSTALL): Remove obsolete macros. (pkgActionItem::Execute): Check for "upgrade" request on any package which is already up to date; report this state, otherwise... [OPTION_REINSTALL || ACTION_UPGRADE]: Mark package as "removed", to avoid bail-out on "package already installed", when calling... (pkgInstall): ...this. 2011-06-12 Keith Marshall Don't require -vv to report progress of update operation. * src/pkgbind.cpp (pkgRepository::GetPackageList): Eliminate all basename() calls; `dname' already tells us what it should return. [update]: Report progress, irrespective of verbosity setting. 2011-06-11 Keith Marshall Fix MinGW-Bug #3313806. * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Do not match them within the PACKAGE_NAME field; this avoids misinterpretation as a release status qualifier when intended as part of the package name, as in msys-cvs. 2011-06-07 Keith Marshall Provisional correction for MinGW-Bug #3309438. * src/debug.h [DEBUGLEVEL == 0]: Provide defaults for... (DEBUG_ENABLED, DEBUG_REQUEST): ...these macros. * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory): (pkgTarArchiveInstaller::ProcessDataStream): Use DEBUG_REQUEST to enable runtime trace activation for previous compile time choices. 2011-05-30 Keith Marshall mingw-get-0.3-mingw32-alpha-1 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; document new features. * All files (r0-3-alpha-1): Tag assigned. 2011-05-30 Keith Marshall Support assignment of DEBUGLEVEL at configure time. * configure.ac (DEBUGLEVEL): Declare as a precious variable, using AC_ARG_VAR; also declare with AC_SUBST, to ensure it is initialised. * Makefile.in (DEBUGLEVEL): Let AC_SUBST assign it. 2011-05-29 Keith Marshall Work around bugs in MinGW and GNU getopt_long_only() implementations. * src/getopt.c: New file; this is a free-standing replacement for any implementation provided by system libraries. We will always use this to ensure correct operation irrespective of system bugs; (different bug manifestations have been identified in the stock MinGW and GNU implementations). * Makefile.in (mingw-get.EXEEXT): Use it. * src/clistub.c (options): Remove redundant declaration of `-v' as a long form option. 2011-05-29 Keith Marshall Implement user selection of traceable features at run-time. * src.pkgopts.h (OPTION_VERBOSE_MAX): New macro; define it. * src/debug.h (DEBUG_ENABLED): New macro; define it. (DEBUG_REQUEST, DEBUG_REQUEST_FLAGS, DEBUG_TRACE_DYNAMIC): Likewise. * src/clistub.c (main) [--trace]: Don't make it available unless... [DEBUG_ENABLED(DEBUG_TRACE_DYNAMIC)]: ...this is set (at compile-time). [--verbose]: Limit to OPTION_VERBOSE_MAX, using... (atmost): ...this new macro; define it. (options): Declare `-v' as both long and short form, pending bug fix in MinGW's getopt_long_only() implementation. * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use DEBUG_REQUEST. (pkgInternetLzmaStreamingAgent::TransferData): Likewise. (pkgInternetStreamingAgent::TransferData): Likewise. (pkgInternetStreamingAgent::Get): Likewise. * src/pkgunst.cpp (pkgActionItem::SetAuthorities): Use DEBUG_REQUEST. (pkg_rmdir, pkg_unlink): Likewise. * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use DEBUG_REQUEST. 2011-05-21 Keith Marshall Implement protocol for processing global program options. * src/pkgopts.h: New file. * src/climain.cpp (cli_setopts): New function; implement it. (pkgOptions): Likewise. * src/clistub.c (xatoi): New function; implement it. (cli_setargv): New inline helper function; implement it. (main): Use it. Also incorporate implementation of... (parsed_options): New structure; it accommodates... (verbose, trace): New options; interpret them, and... (help_text): ...document them. * src/pkgbind.cpp (pkgRepository::GetPackageList): Make catalogue loading notifications and progress reports conditional on... [OPTION_VERBOSE > 1]: ...this. 2011-05-18 Keith Marshall Augment known development status keywords and accept CMS labels. * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Define new provisional list; add transitional state scanner rule and code to interpret them. (STATUS_KEYWORDS): Add "pre" and "rc" to existing list; modify scanner code to maintain consistency with CMS_KEYWORDS processing; also extend this coding strategy to other rules. * src/pkginfo/driver.c (spec): Strip initial '$' token from displayed field values; (we expect it only for a CMS_KEYWORDS field value). * src/pkgreqs.cpp (pkgSpecs::GetTarName): Remove any initial '$' token from PACKAGE_RELEASE_STATUS field, when performing reverse of tarname decomposition transformation. 2011-05-18 Keith Marshall Correct omission from 2011-02-18 commit. * src/tarproc.cpp (Copyright Notice): Add 2011 as year of release. 2011-05-14 Keith Marshall mingw-get-0.2-mingw32-alpha-4 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; add bug-fix/feature descriptions. * All files (r0-2-alpha-4): Tag assigned. 2011-05-12 Keith Marshall Fix MinGW-Bug #3297660 (reported by Chris Sutcliffe). * src/pkgbase.h (pkgActionItem::SetAuthorities): Return unsigned long. (pkgActionItem::HasAttribute): New inline method; implement it. * src/pkgtask.h (ACTION_DOWNLOAD, ACTION_DOWNLOAD_OK): New macros. * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): [ACTION_DOWNLOAD]: Assert it at commencement of each package download; clear it again, on successful download completion. * src/pkginst.cpp (pkgtask.h): #include it. (pkgInstall) [ACTION_DOWNLOAD]: Don't proceed with installation when set; this indicates failed download; diagnose it. * src/pkgunst.cpp (pkgRemove) [ACTION_DOWNLOAD && ACTION_UPGRADE]: Don't proceed with pre-emptive removal when both set; this indicates failed download of replacement package; diagnose it. 2011-05-12 Keith Marshall Fix MinGW-Bug #3295526 (reported by Charles Wilson). * src/pkgunst.cpp (sys/stat.h): #include it; we need it for... (pkg_unlink): ...chmod( file, S_IWRITE ), emulating `rm -f' semantics. 2011-05-12 Keith Marshall Diagnose and aggressively retry failed download connections. * src/debug.h (DEBUG_TRACE_INTERNET_REQUESTS): New macro; define it. * src/pkginet.cpp (debug.h): #include it. (pkgDownloadMeter): New abstract class; declare it and implement its default (non-abstract) data and methods; derive... (pkgDownloadMeterTTY): ...this new class from it; implement it... (pkgInternetStreamingAgent::Get): ...and instantiate it (naively for now), as associated pkgDownloadMeter object; add tracing diagnostic. (pkgInternetAgent::OpenURL): Don't inline it; move implementation out of line; add retry loops to aggressively retry failed connections. (pkgInternetAgent::QueryContentLength): New method; implement it. (pkgInternetStreamingAgent::TransferData): Avoid Microsoft specific data type `DWORD'; prefer equivalent standard `unsigned long'. Add tracing diagnostic. Remove progress diagnostic; replace it with an `Update' request to associated pkgDownloadMeter. (pkgInternetLzmaStreamingAgent::GetRawData): Avoid `DWORD' data type. (pkgInternetLzmaStreamingAgent::TransferData): Likewise; add tracing diagnostic on failure. 2011-03-31 Keith Marshall mingw-get-0.2-mingw32-alpha-3 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; add bug-fix description. * All files (r0-2-alpha-3): Tag assigned. 2011-03-30 Keith Marshall Provisional handling for http proxy authentication. (Adapted from patch by Scott Michel ) (ref: MinGW-Patch #3158453) * src/pkginet.cpp: Several format/layout adjustments; add comments. Eliminate several instances of Microsoft specific typedef nastiness. (dmh_dialogue_context): New macro; kludge definition to support... (pkgInternetAgent::OpenURL) [HTTP_STATUS_PROXY_AUTH_REQ]: Detect and handle it. 2011-03-30 Keith Marshall Expand macros in path names for files and directories to be removed. * src/pkgunst.cpp (pkgRemove): Format sysroot as a template, so... (pkg_rmdir, pkg_unlink): ...are able to use mkpath() to construct the full path name for each file or directory to be removed. 2011-03-29 Keith Marshall Correct defective activation logic for some debugging hooks. * src/pkgunst.cpp (pkg_rmdir, pkg_unlink) [DEBUG_INVOKE_IF]: (pkgActionItem::SetAuthorities) [DEBUG_INVOKE_IF]: Use bit-wise `&' operator, not `&&', to evaluate DEBUGLEVEL state. 2011-03-22 Keith Marshall Avoid Unicode hyphens in generated ASCII document files. * Makefile.in (NROFF): New macro; define it to invoke `nroff -Tascii'. (%.dist, readme.txt): Use it to ensure that output is pure ASCII. 2011-03-15 Keith Marshall mingw-get-0.2-mingw32-alpha-2 released. * configure.ac (AC_INIT): Adjust version number. * srcdist-doc/NEWS.in: Updated; add bug-fix description. * All files (r0-2-alpha-2): Tag assigned. 2011-03-15 Keith Marshall Fix MinGW-Bug 3212246. * src/keyword.c (has_keyword): Avoid incrementing the comparison pointers when a significant character in one string is not matched in the other; previously the pointers were left pointing one character to the right of the mismatch, and this was overlooked if the mismatch occurred at the rightmost character in both strings. 2011-03-12 Keith Marshall mingw-get-0.2-mingw32-alpha-1 released. * configure.ac (AC_INIT): Set version number; correct capitalisation in URI reference to bug reporting instructions. * srcdist-doc/NEWS.in: Confirm release date. [bug reporting]: Remove redundant paragraph; the information is provided, via reference to mingw.org. in the README and INSTALL files. * All files (r0-2-alpha-1): Tag assigned. 2011-03-12 Keith Marshall * srcdist-doc/INSTALL.in [building]: Qualify liblzma.a requirement; add earliest acceptable snapshot release date. 2011-03-11 Keith Marshall Remove unused 7zip and boost source code from CVS trunk. * 7z: Directory and all content removed. * boost: Likewise. 2011-03-11 Keith Marshall Refactor and update existing installation and usage instructions. * src/clistub.c (help_text): Updated. * srcdist-doc: New directory. * README: Deleted; its content refactored into... * srcdist-doc/README.in srcdist-doc/INSTALL.in srcdist-doc/NEWS.in: ...these new template files, updated for current development state. * srcdist-doc/gendoc.sed.in: New sed script; it directs formatting of generated text files derived from the srcdist-doc templates. * Makefile.in (SRCDIST_SUBDIRS): Add srcdist-doc. (SRCDIST_FILES): Add NEWS and INSTALL. (srcdist-doc): New build rule to generate README, NEWS and INSTALL. (srcdist, licdist): Adjust path to locate them. (readme.txt): New build rule to generate on-line package description. (dist): Require it. (distclean): Don't remove Makefile... (maintainer-clean): ...but do it here instead. Also remove generated README, NEWS and INSTALL, the autom4te cache, and all distributable zip files, in addition to tarballs, for the current version. 2011-02-27 Keith Marshall Initial implementation for "remove" feature. * src/pkgbase.h: Update copyright notice; add current year. (pkgActionItem::SetPrimary): New inline public method; declare it. (pkgActionItem::SetAuthorities): New public method; declare it. * src/pkgtask.h (ACTION_PREFLIGHT, ACTION_REMOVE_OK): New defines. * src/pkgproc.h: Update copyright notice; add current year. (pkgManifest::GetSysRootReference): New public method; declare it. (pkgManifest::GetRoot): New inline method; declare and implement it. (pkgManifest::DetachSysRoot): Argument type changed to const char*. (pkgRemove): New extern "C" function; declare it. * src/pkgexec.cpp (pkgActionItem::SetPrimary): Implement it, and... (pkgXmlDocument::Schedule): ...use it to promote actions on all user specified packages, as listed on the command line, to primary status. (pkgActionItem::Execute): Repeatedly invoke... (pkgActionItem::SetAuthorities): ...this; incorporate call of... (pkgActionItem::DownloadArchiveFiles): ...this, within the loop, so that we retry failed downloads at least a second time. [ACTION_REMOVE]: Delete stub; invoke pkgRemove(). * src/pkgunst.cpp: New file. (pkgActionItem::SetAuthorities): Implement it. (pkgManifest::GetSysRootReference): Implement it. (pkgManifest::DetachSysRoot): Implement it per new declaration. (pkgRemove): Implement it. * Makefile.in (CORE_DLL_OBJECTS): Add pkgunst.OBJEXT 2011-02-26 Keith Marshall Work-around for improper stderr buffering in MSYS mintty and rxvt. (Merged from r0-1-alpha-5 branch). * src/dmh.cpp (dmhTypeTTY::emit_and_flush): New private method. (dmhTypeTTY::printf, dmhTypeTTY::notify): Use it to force an fflush() after each output record is written to stderr. * README: Update as appropriate. 2011-02-18 Keith Marshall Tidy up some debugging hooks. * src/debug.h (DEBUG_INVOKED): New macro; define it. (DEBUG_INVOKE_IF): Likewise; this takes arguments providing for conditional invocation of code when DEBUGLEVEL is non-zero; make it expand to nothing, when DEBUGLEVEL is zero. (DEBUG_TRACE_INIT): Redefined macro; value changed to 0x0010. (DEBUG_TRACE_TRANSACTIONS, DEBUG_SUPPRESS_INSTALLATION): (DEBUG_UPDATE_INVENTORY): New macros; define them. * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory): (pkgTarArchiveInstaller::ProcessDataStream): Refactor debugging hooks; implement them in terms of DEBUGLEVEL, with reference to... (DEBUG_SUPPRESS_INSTALLATION, DEBUG_UPDATE_INVENTORY): ...these. 2011-02-15 Keith Marshall Make package version comparisons more robust. Fixes an issue reported by Chris Sutcliffe: previously, version comparisons were evaluated solely on the basis of differences in the package version field itself. Henceforth, if this field compares as equal, then the comparison is extended to also consider differences between development phase qualifiers, and, if these too compare as equal, to differences in the target subsystem version fields. * src/pkginfo/pkginfo.h (pkgSpecs::VersionComparator): New private method; declare it. * src/pkgspec.cpp (pkgSpecs::VersionComparator): Implement it. (pkgSpecs::operator<, pkgSpecs::operator<=, pkgSpecs::operator>=): (pkgSpecs::operator>): Use it, replacing... (version): ...this static function; now unreferenced; delete it. * src/vercmp.h (pkgVersionInfo::pkgVersionInfo): Make it inline; it now delegates the entire class construction operation to... (pkgVersionInfo::Parse): ...this new private method; declare it. This is also used to facilitate implementation of... (pkgVersionInfo::Reset): ...this new inline method, also requiring... (pkgVersionInfo::FreeAll): ...this new inline method; also now used by the class destructor, it encapsulates separate calls to... (pkgVersionInfo::Free): ...this original inline method, renamed... (pkgVersionInfo::FreeEntry): ...as this. * src/vercmp.cpp (pkgVersionInfo::Parse): Implement it. 2011-02-13 Keith Marshall Merge from mingw-get-0.1-mingw32-alpha-5 bug-fix branch. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Promote "install" action on new prerequisites, where a previously uninstalled package is required to satisfy any "upgrade" dependency. * src/pkgexec.cpp (pkgActionList::Execute): Don't make misleading claims concerning package removal. * src/pkgtask.h (STRICTLY_GT, STRICTLY_LT, ACTION_PRIMARY): Add one level of parentheses around defining expressions. 2011-02-10 Keith Marshall Publish mingw-get-0.0-mingw32-alpha-5.1 bug-fix release. * README: Updated to reflect changes. 2011-02-08 Keith Marshall Improve diagnostics for failed GUI invocation. * src/guimain.cpp: New file; currently delivers only a diagnostic stub, provided by Sze Howe Koh , to pop-up a message block explaining why GUI mode cannot be invoked. * Makefile.in (GUI_LDFLAGS): New macro; it is required by... (gui$EXEEXT): ...this new build rule; add to prerequisites of... (all): ...this [default] build rule; redefine this in terms of... (BIN_PROGRAMS, LIBEXEC_PROGRAMS, LIBEXEC_DATA): ...these new macros; define them, and also use them as loop iterator objectives for... (install, install_strip): ...these; also schedule them... (clean): ...for removal by this. * src/clistub.c (Copyright): Add new year. (main): Amend error message, if gui$EXEEXT doesn't start; make it more intelligible to normal users. 2011-02-07 Keith Marshall Correct omissions from packaged source tarball. * Makefile.in (Copyright): Add new year. (SRCDIST_FILES): Add aclocal.m4 (SRCDIST_SUBDIRS): Add m4 2011-01-05 Keith Marshall Reduce path names to base names, in some diagnostic message contexts. * src/climain.cpp: Update copyright notice for new year. (climain): Extract base name from argv[0], to pass as program name tag in initialisation of diagnostic message handler. * src/dmh.h, src/dmh.cpp: Update copyright notices; make some layout adjustments, for more consistent formatting style. * src/pkgbind.cpp: Update copyright notice. (pkgRepository::GetPackageList): Reduce path names for catalogue files to their base names, when reporting them in diagnostic messages. 2011-01-05 Keith Marshall Avoid a potential out-of-range action name look-up. * src/pkgdeps.cpp: Update copyright notice for new year. (pkgXmlDocument::Schedule): Mask action code with ACTION_MASK, to determine correct action name when diagnosing uninstalled package. 2011-01-03 Keith Marshall Make "install" and "remove" notifications symmetric. * configure.ac (AC_INIT): Bump version to "0.1-alpha-6cvs". (YEARS_OF_ISSUE): Add new year. * src/pkginst.cpp: Update copyright notice for new year. (pkgInstall): Add notification for package being installed. 2010-12-30 Keith Marshall Add preliminary CLI support for "list" and "show" actions. * src/pkgtask.h (ACTION_PRIMARY): New manifest constant; define it. (ACTION_LIST, ACTION_SHOW): Likewise; cast to enumerated values for... (action_list, action_show): ...these; define them. * src/pkgexec.cpp (action_name): Add defining text for... (action_list, action_show): ...these. * src/climain.cpp: Partially revert 2010-11-01 change... (climain) [! ACTION_UPDATE]: Reinstate original "if" block, moving the "switch" block within it, but without the ACTION_UPDATE case. [ACTION_LIST, ACTION_SHOW]: New "switch" cases; they invoke... (pkgXmlDocument::DisplayPackageInfo): ...this new method. * src/pkgbase.h (pkgXmlDocument::DisplayPackageInfo): Declare it. (pkgActionItem::ConfirmInstallationStatus): New method; declare it. (pkgXmlNode::GetSysRoot): Make declaration style consistent with others in the class; do not name arguments in the declaration. (pkgXmlNode::FindFirstAssociate): Likewise. (pkgXmlNode::FindNextAssociate): Likewise. * src/pkgshow.cpp: New file. (pkgXmlDocument::DisplayPackageInfo): Implement it. * src/pkgdeps.cpp (pkgMsgUnknownPackage): New extern "C" function; implement it temporarily, pending a future i18n reimplementation. (assert_installed): Drop "inline" attribute; leave it as "static". Set "tarname" correctly, to match the installed package version; (it previously incorrectly returned the latest available version). (pkgActionItem::ConfirmInstallationStatus): Implement it. (pkgXmlDocument::Schedule) [ACTION_PRIMARY]: Set as appropriate. (pkgXmlDocument::Schedule) [ACTION_REMOVE || ACTION_UPGRADE]: Complain if requested package is not recorded as having been installed. (pkgXmlDocument::ResolveDependencies) [! ACTION_INSTALL]: Do not invoke it recursively. * Makefile.in (pkgshow.$OBJEXT): Add reference. 2010-11-01 Keith Marshall Lay groundwork for implentation of additional actions. * src/climain.cpp (climain): Adjust indentation; replace `if' block... [action != ACTION_UPDATE]: ...with this default `switch' case, and... [action == ACTION_UPDATE]: ...this as explicit "do nothing" case. 2010-10-29 Keith Marshall mingw-get-0.1-mingw32-alpha-5 released. * configure.ac (AC_INIT): Bump version to 0.1-alpha-5. * README: Update release notes accordingly. * All files (r0-1-alpha-5): Tag assigned. 2010-10-22 Keith Marshall Make pkgInitRites/pkgLastRites processing more robust; avoid a potential race condition in mingw-get-inst. * src/rites.c: Refactor conditional code to segregate execution of... [defined IMPLEMENT_INITIATION_RITES]: ...this into distinct phases. (PHASE_ONE_RITES, PHASE_TWO_RITES): Define constants to identify them. (do_init_rites): Renamed to... (invoke_rites): ...this; inline it. (pkgLastRites): Invoke it, to pre-empt rename action of... (lastrites.exe): ...this, subsequently exec()ed process. (perror): Issue more informative diagnostic on exec() failure. * src/clistub.c (IMPLEMENT_INITIATION_RITES): Stipulate as... (PHASE_ONE_RITES): ...this phase of implementation only. * src/pkgexec.cpp (IMPLEMENT_INITIATION_RITES): Define to provide... (PHASE_TWO_RITES): ...this phase of implementation, facilitated by... (self_upgrade_rites): ...this locally defined RITES_INLINE function. (pkgActionItem::Execute): Invoke it, in remove/install loop, while... [init_rites_pending]: ...new loop local variable remains true. 2010-09-10 Charles Wilson Fix packaging bug in -lic package. * Makefile.in (licdist): Use directory named "share", not "shared". 2010-09-10 Charles Wilson mingw-get-0.1-mingw32-alpha-4 released. * All files (r0-1-alpha-4): Tag assigned. 2010-09-10 Charles Wilson Add rudimentary help option. * README: Update release notes. * src/clistub.c: Add --help option. 2010-09-10 Charles Wilson Fix "mingw-get deletes itself" bug in last rites handling. * README: Add new release notes. * configure.ac: Bump version to 0.1-alpha-4. * src/dmh.h: If __cplusplus, include and declare dmh_exception class. * src/dmh.cpp (class dmh_exception): Implement. (abort_if_fatal): If DMH_FATAL, throw dmh_exception rather than calling exit(). * src/climain.cpp (climain): Wrap entire function body in try/ catch block. If dmh_exception is caught, return EXIT_FAILURE. * src/clistub.c (main): Capture return value of climain(). If non-zero, perform last rites and return EXIT_FAILURE. 2010-08-30 Keith Marshall mingw-get-0.1-mingw32-alpha-3 released. * README: Add new release notes. * All files (r0-1-alpha-3): Tag assigned. 2010-08-27 Keith Marshall Add runtime hooks to support self-upgrade for future releases. * src/rites.c: New file; compile it free-standing, to provide... (lastrites.exe): ...this helper application for context clean-up; alternatively, use it as an include file, with pre-definition of... (IMPLEMENT_INITIATION_RITES): ...this, to implement... (pkgInitRites, pkgLastRites): ...these inline functions. * src/clistub.c (main) [argc > 1]: Use them. (progname): New local variable within `main'; set it once, then use it instead of repeated references to `basename(*argv)' in diagnostics. (MINGW_GET_DLL, MINGW_GET_GUI): Relocate to `src/rites.c'. * src/debug.h (DEBUG_INHIBIT_RITES_OF_PASSAGE): (DEBUG_FAIL_FILE_RENAME_RITE, DEBUG_FAIL_FILE_UNLINK_RITE): New defines; they facilitate debugging of the src/rites.c code. * Makefile.in (lastrites$EXEEXT): New target; build as prerequisite... (all): ...of this primary target. (install, install-strip): Install it. (SRCDIST_FILES): Remove install-sh; it is now included in... (build-aux): ...this directory; add it to... (SRCDIST_SUBDIRS): ...this. 2010-08-24 Keith Marshall Set default sysroots relative to mingw-get installation directory. * xml/profile.xml (system-map) [name == default]: For each of... [subsystem == mingw32]: ...set sysroot path to value of %R macro... [subsystem == msys]: ...and to its %R/msys/1.0 subdirectory. 2010-08-19 Keith Marshall Some dependency resolver enhancements and bug fixes. * src/pkgbase.h (pkgXmlNode::GetContainerAttribute): New method; declare it. * src/pkgdeps.cpp (pkgXmlNode::GetContainerAttribute): Implement it; it is used to retrieve package name attributes from the containing 'package' element, when given a pointer to a 'release' element by... (assert_unmatched, assert_installed): ...these new static functions. (pkgXmlDocument::Schedule): Use them to reconstruct and register dependency reference data for previously installed packages which are no longer included in the distribution manifest. (pkgXmlDocument::ResolveDependencies): Fix a block nesting error; catch and diagnose unresolved dependencies; don't look beyond the XML document root node, (tinyxml error not caught?), when searching for requirements specified on container nodes. 2010-08-17 Keith Marshall Improve scheduling of package processing requests. * src/pkgexec.cpp (pkgXmlDocument::Schedule): Inspect entire `actions' list, when checking for duplicate package processing requests; decline to schedule any such duplicate, or any request which lacks a package association. 2010-08-15 Keith Marshall Lay foundation for selective compilation of debugging code. * src/debug.h: New file... * src/sysroot.cpp: Include it. (pkgXmlDocument::LoadSystemMap): Make debugging output conditional... [DEBUGLEVEL & DEBUG_TRACE_INIT]: ...on this new debugging state. 2010-08-15 Keith Marshall * src/pkgkeys.h: Typo in comment: file was previously identified as pkgkeys.c; corrected. 2010-08-13 Keith Marshall Improve diagnostics for invalid references to non-release XML nodes. * src/pkgkeys.h (value_unknown): New global string; declare it. * src/pkgkeys.c (value_unknown): Implement it. * src/pkgname.cpp (pkgArchiveName): Identify XML element type when diagnosing references to elements of types other than release; use... (value_unknown): ...this, as appropriate. 2010-08-12 Keith Marshall Guard against a potential buffer overrun. * src/pkgreqs.cpp (pkgSpecs::SetProperty): Allocate an additional byte to accommodate an extra field separator, when inserting a new data value into a previously empty field. 2010-07-27 Cesar Strauss Handle the GNU long name tar header format. * src/pkgproc.h (TAR_ENTITY_TYPE_GNU_LONGNAME): New manifest constant; define it. (pkgTarArchiveProcessor::EntityDataAsString): New protected method; declare and... * src/tarproc.cpp: ...implement it. (pkgTarArchiveProcessor::Process): Before building the entry pathname, check for a GNU long name type header; when found, read pathname from the entry data area, before fetching the following header, from which to retrieve the associated entity data. 2010-06-24 Keith Marshall Work around an autoconf bug (reported by Stefano Sabatini). * Makefile.in (VPATH): Use @top_srcdir@ instead of ${srcdir}; current autoconf incorrectly elides references to @srcdir@ and ${srcdir} when substituting within a VPATH specification for building `in-source'. Also, prefer colons to blanks as path name separators, for improved portability to non-GNU implementations of make; (recommendation by Ralf Wildenhues). 2010-06-24 Keith Marshall Include alias search, when matching component package name. * src/keyword.c (has_keyword): Rearrange argument declarations for more natural order; update all callers accordingly. Simplify; compare keyword to be matched with each successive candidate from match-list, character-by-character and in-place, so avoiding memory allocation for any local duplicate of the passed match-list; thus... (safe_strdup): ...this static function no longer required; delete it. (string.h): No references remain; do not include it. * src/pkgfind.cpp (pkgXmlNode::FindPackageByName): Augment component package name matching to include potential matches of the look-up name with trailing component name stripped off, when that matches the class name of an identified component package, and the initial substring of the look-up name, after stripping, matches any specified alias name for the containing package. 2010-06-10 Keith Marshall Address FIXME relating to identification of distributable files. * install-sh: Move to... * build-aux: ...this new directory. * Makefile.in (PACKAGE_DISTVERSION): Modify `sed' edit sequence; make it depend on, and ensure that it incorporates the expansion of... (PACKAGE_SUBSYSTEM): ...this new macro; defined as substitution of... (host_os): ...this autoconf variable, set by... * configure.ac (AC_CANONICAL_HOST): ...this; add it, requiring... (AC_CONFIG_AUX_DIR): ...`build-aux' directory reference, providing... * build-aux/config.guess, build-aux/config.sub: ...these new standard files; import them from the standard `build-aux' repository. 2010-05-17 Keith Marshall Bump version for next release cycle. * configure.ac (AC_INIT): Bump version suffix to alpha-3. 2010-05-17 Keith Marshall mingw-get-0.1-mingw32-alpha-2 released. * README: Add new release notes. * xml/profile.xml: Update to use default referencing for... (package-list.xml.lzma): ...this repository master catalogue. * All files (r0-1-alpha-2): Tag assigned. 2010-05-12 Keith Marshall Make provision to protect user's profile settings during upgrade. * Makefile.in (install): Remove `profile.xml'; replace it with... (install-profile): ...this new prerequisite installation goal; it renames the installed copy of `profile.xml' as `defaults.xml', within the installed package image. * src/pkgkeys.h (defaults_key): New key; declare it. * src/pkgkeys.c: Some cosmetic formatting (tabulation) adjustments. (defaults_key): Implement it; it refers to the `defaults.xml' file. * src/climain.cpp (climain): Check `profile_key' for accessibility of the `profile.xml' file; if [! R_OK] emit a diagnostic warning, fall back on `defaults_key', and attempt to load configuration from the distributed `defaults.xml' file. 2010-05-11 Keith Marshall Add preliminary support for future `-reinstall' option. * src/pkgexec.cpp (pkgActionItem::Execute) [ACTION_INSTALL]: Force installation if `-reinstall' option is selected, overriding state of any prior installation; temporarily assume that this option is always selected, to permit proper `upgrade' operation in the absence of any functional `uninstall' capability, and pending implementation of a mechanism for interpreting user specified options. 2010-05-11 Keith Marshall Correct handling for "%R" macro in relative sysroot path specs. * src/tarproc.cpp (pkgTarArchiveProcessor): In constructor, expand the sysroot path specification a second time, to capture the effect of any embedded macros, before computing the recorded `sysroot_len' value. 2010-05-05 Keith Marshall Handle "%" wildcard matches in package and subsystem version strings. * src/pkgbase.h (pkgSpecs): Forward declare it. (pkgActionItem::~pkgActionItem): Declare explicit destructor. (pkgActionItem::SetRequirements): Add extra `pkgSpecs*' argument; update references, passing additional argument in... * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): ...this. * src/pkgexec.cpp (pkgActionItem::~pkgActionItem): Implement it. (pkgActionItem::SetRequirements): Delete obsolete implementation. * src/pkginfo/pkginfo.h: Update copyright notice; add year 2010. (pkgSpecs::GetTarName): New public method; declare it. (pkgSpecs::SetProperty): New private method; declare it. (pkgSpecs::SetPackageName): New inline method; implement it. (pkgSpecs::SetPackageVersion, pkgSpecs::SetPackageBuild): Likewise. (pkgSpecs::SetSubSystemName, pkgSpecs::SetSubSystemVersion): Likewise. (pkgSpecs::SetSubSystemBuild, pkgSpecs::SetReleaseStatus): Likewise. (pkgSpecs::SetReleaseIndex, pkgSpecs::SetComponentClass): Likewise. (pkgSpecs::SetComponentVersion, pkgSpecs::SetPackageFormat): Likewise. (pkgSpecs::SetCompressionType): Likewise. * src/pkginfo/pkginfo.l: Update copyright notice; add year 2010. (TRANS): Interpret "%" as wildcard in version string matches. * src/pkgreqs.cpp: New file. (pkgActionItem::SetRequirements): Reimplement per new declaration; it now always allocates heap memory for requirements specifications. (pkgSpecs::GetTarName, pkgSpecs::SetProperty): Implement them. * Makefile.in (CORE_DLL_OBJECTS): Add `pkgreqs.$(OBJEXT)'. 2010-04-30 Keith Marshall Revert 2010-04-04 refactoring of tarproc.cpp and tarinst.cpp * src/tarinst.cpp: File removed; its content merged into... * src/tarproc.cpp: ...this; it cannot be cleanly separated out. * Makefile.in (tarinst.$OBJEXT): Remove reference. 2010-04-29 Keith Marshall Handle "*" wildcard matches in package and subsystem version strings. * src/vercmp.h (pkgVersionInfo::version_string): New private member variable; it stores a pointer to a dynamically allocated local copy of the invariant `version' argument, to facilitate correct parsing. (pkgVersionInfo::build_string): Likewise; it provides similar handling for the invariant `build' argument. (pkgVersionInfo::Free): New private inline method; it provides a NULL pointer safe wrapper, calling the C library `free()' function, (since some implementations are believed to be unsafe); it is used by... (pkgVersionInfo::~pkgVersionInfo): ...this new inline destructor, to release the memory allocated by the constructor, for `version_string' and `build_string'. * src/vercmp.cpp (pkgVersionInfo::pkgVersionInfo): Allocate memory for `version_string' and `build_string', as required; populate it. Explicitly handle "*" as a `match anything' wildcard... (pkgVersionInfo::Compare): ...matching it as `equal' to everything. 2010-04-18 Keith Marshall Correct omission from configure script prerequisite checks. * aclocal.m4 (MINGW_AC_OUTPUT): New macro; it wraps AC_OUTPUT itself, adding a trap to force an abort if any preceding prerequisite check was handled by MINGW_AC_ASSERT_MISSING. * configure.ac: Qualify package component types, in prerequisite checks handled by MINGW_AC_ASSERT_MISSING; invoke MINGW_AC_OUTPUT in place of AC_OUTPUT. 2010-04-17 Keith Marshall Add configure script checks for prerequisite library headers. (Thanks to Cesar Strauss for proposing a rudimentary implementation). * aclocal.m4: New file; it does no more than include... * m4/missing.m4: ...this; new file incorporated from build-aux module. * configure.ac: Add AC_CHECK_HEADER assertions for... (zlib.h, bzlib.h, lzma.h): ...these; invoke MINGW_AC_ASSERT_MISSING in respect of each failing assertion. 2010-04-17 Keith Marshall Case-insensitive subsystem name matching revisited. * src/pkgfind.cpp (pkgXmlDocument::FindPackageByName): Use... (subsystem_strcmp): ...this to match subsystem names, instead of... (match_if_explicit): ...this. 2010-04-15 Keith Marshall Enable recursive processing of repository package lists. * src/pkgbase.h (pkgXmlDocument::SyncRepository): Make it public. * src/pkgbind.cpp (pkgRepository): New locally defined and implemented class; it facilitates recursive loading and parsing of package lists, replacing much of the original non-recursive functionality within... (pkgXmlDocument::BindRepositories): ...this; use it. 2010-04-04 Keith Marshall Implement installer function; use per-package file manifests. * src/pkgproc.h (pkgManifest): New class; declare it. (pkgArchiveProcessor::origin): New protected member variable. (pkgArchiveProcessor::sysroot_len): New protected member variable. (pkgArchiveProcessor::installed): Type changed to `pkgManifest *'. (pkgTarArchiveInstaller::Process): Declare specialisation hook. (pkgTarArchiveInstaller::UpdateInstallationManifest): Disused member function; remove redundant declaration from class definition. (pkgInstall): New generalised installation function; declare it. (pkgRegister): New function; declare it. * src/pkginst.cpp: New file. (pkgManifest, pkgInstall, pkgRegister): Implement them. * src/pkgexec.cpp (pkgActionItem::Execute): Use `pkgInstall' in place of stub formerly provided here. * src/pkgkeys.h (manifest_key, reference_key): New keys; declare them. * src/pkgkeys.c (manifest_key, reference_key): Implement them. * src/tarproc.cpp: Code refactored. (pkgTarArchiveProcessor::sysroot_len): Initialise it. (pkgTarArchiveProcessor::origin): Initialise it. (pkgTarArchiveProcessor::installed): Initialise; associate it with a pkgManifest class entity, and populate this as appropriate. (pkgTarArchiveProcessor::~pkgTarArchiveProcessor): Add explicit clean up of linked `pkgManifest *' entity referenced by `installed'. (pkgTarArchiveProcessor::Process) [TAR_ENTITY_TYPE_DIRECTORY]: Add braces to demarcate localised inner scope of string scan for removal of trailing directory name separators; (thanks to Cesar Strauss for reporting invalid local pointer declaration error in GCC >= 4.4). (pkgTarArchiveInstaller::UpdateInstallationManifest): Deleted. (pkgTarArchiveInstaller::pkgTarArchiveInstaller): Factor out. (pkgTarArchiveInstaller::ProcessDirectory): Likewise. (pkgTarArchiveInstaller::ProcessDataStream): Likewise. (commit_saved_entity): Likewise. * src/tarinst.cpp: New file; it implements... (pkgTarArchiveInstaller::Process): ...this new specialisation of the original pkgTarArchiveProcessor::Process method... (pkgTarArchiveInstaller::pkgTarArchiveInstaller): ...and this refactored code, abstracted from src/tarproc.cpp and modified to use the pkgManifest class for installation tracking. (pkgTarArchiveInstaller::ProcessDirectory): Likewise. (pkgTarArchiveInstaller::ProcessDataStream): Likewise. (commit_saved_entity): Relocated from src/tarproc.cpp. * Makefile.in (CORE_DLL_OBJECTS): Add... (pkginst.OBJEXT, tarinst.OBJEXT): ...these new object files. 2010-03-31 Keith Marshall Guard against NULL pointer dereferences in tinyxml code. * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is non-NULL, before invoking the underlying tinyxml method. (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise. (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise. (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise. (pkgXmlNode::GetDocumentRoot): Likewise. (pkgXmlNode::IsElementOfType): Likewise. 2010-03-28 Cesar Strauss Avoid running InternetAttemptConnect in pkgInternetAgent constructor, since it is called during DLL initialisation. * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the InternetAttemptConnect call from constructor... (pkgInternetAgent::OpenURL): ...to here. 2010-03-23 Keith Marshall Automate object code dependency tracking. * Makefile.in (DEPFLAGS): New macro; define it. (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands... (%.d): ...to create these dependency maps; `sinclude' them, and... (clean): ...remove them. * .cvsignore (*.d): Add wild card template to match them. 2010-03-22 Keith Marshall Support case insensitive matching for file and subsystem names. * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL argument safe comparison of strings, returning the boolean inverse of the `strcmp' result, using either case-sensitive or case-insensitive semantics; derive it from... (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp' using explicitly case-sensitive semantics. (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either case-sensitive or case-insensitive semantics, depending on... (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it fixes the choice between case-sensitive and case-insensitive matching semantics for any given implementation, at compile time. (pkg_strcmp): New macro; it invokes `safe_strcmp' with either case-sensitive or case-insensitive semantics, depending on... (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it fixes the choice between case-sensitive and case-insensitive matching semantics for any given implementation, at compile time. * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'. 2010-03-02 Keith Marshall Add preliminary support for virtual packages. * src/pkgkeys.h (yes_value, no_value): Redefine as aliases... (value_yes, value_no): ...for these new global strings; declare them. (value_none, value_virtual): New global strings; declare them. * src/pkgkeys.c (yes_value, no_value): Rename... (value_yes, value_no): ...to implement these, respectively. (value_none, value_virtual): Implement them. * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package node for `class' attribute set to `value_virtual'; if present, always return the effective `tarname' property as `value_none'. * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages with an effective `tarname' of `value_none', do not download anything. * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an effective `tarname' of `value_none', do not invoke any tar archive processing function. 2010-03-02 Keith Marshall Don't write installation records for unavailable packages. * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure archive is ready for processing, before initialising an installation manifest record. 2010-03-02 Keith Marshall Rationalise path identification for XML file locations. * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()' function to locate `sysroot' map file; free memory when done. (pkgXmlDocument::UpdateSystemMap): Likewise. (sigpath): Static global variable disused; delete it. 2010-03-01 Keith Marshall Extend package name search to include component packages. * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into... (pkgXmlNode::FindPackageByName): ...this; augment to extend search within package definition elements, seeking a potential match on an included component package name or component class-implied name. * src/pkgkeys.h (class_key): New global string constant; declare it. * src/pkgkeys.c (class_key): Implement it. 2010-02-16 Keith Marshall Bump version for next release cycle. * configure.ac (AC_INIT): Bump version suffix to alpha-2. 2010-02-16 Keith Marshall mingw-get-0.1-mingw32-alpha-1 released. 2010-02-16 Keith Marshall Prepare initial package release. * README: New file; use it to source release notes. * Makefile.in (SRCDIST_FILES): Use ... (LICENCE_FILES): ...this new macro; define it. (licdist): New build goal; implement it. (bindist): Require it; add alternative `zip' format package. * xml/profile.xml (repository): Set default `package-index' name. (system-map): Normalise spelling for default `sysroot' path names. 2010-02-10 Keith Marshall Add directory/file records in installation manifests. * src/pkgkeys.h (dirname_key, filename_key): New strings; declare... * src/pkgkeys.c (dirname_key, filename_key): ...and implement them. * src/pkgproc.h (pkgArchiveProcessor::installed): New class member variable; declare it. (pkgTarArchiveInstaller::UpdateInstallationManifest): New method; declare it. * src/tarproc.cpp: Miscellaneous comment updates. (pkgTarArchiveInstaller): In constructor... (pkgTarArchiveInstaller::installed): ...use new member variable... (pkgArchiveProcessor::installed): ...inherited from this. (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and... (pkgTarArchiveInstaller::ProcessDataStream): ...use it. (pkgTarArchiveInstaller::ProcessDirectory): Likewise. 2010-02-06 Keith Marshall Work around a deficiency in Microsoft's stat() implementation. * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't pass a `pathname' argument with trailing slashes; strip them off. 2010-02-06 Keith Marshall Add machinery for installation and packaging for distribution. * install-sh: New file; source it from autoconf distribution. * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'. (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these. (STRIP): New output variable; use AC_CHECK_TOOL to define it. * Makefile.in (abs_top_srcdir): Define to AC_SUBST value. (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values. (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise. (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise. (STRIP): New macro; define it using AC_CHECK_TOOL substitution. (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result. (LN_S): New macro; define it as AC_PROG_LN_S result. (dist, srcdist, bindist): New build objectives; implement them. (install, installdirs, install-strip, maintainer-clean): Likewise. (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them. (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise. (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise. (PACKAGE_CONFIG_DIR): Likewise. 2010-02-02 Keith Marshall Implement package installer for tar archives. * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing stub implementation of installer, using methods provided by... * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap... * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry... (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect `install' requests for packages which are aleady installed. * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify dependencies as appropriate. * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit newly created `sysroot' mapping records to disk; defer to... (pkgXmlDocument::UpdateSystemMap): ...this new method. (sigpath): Make it a global variable, with file (static) scope. * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it. * src/pkgkeys.h (download_key, modified_key, source_key): New global string variables; declare them, providing their implementations... * src/pkgkeys.c (download_key, modified_key, source_key): ...here. * src/pkgname.cpp (download_key, source_key): Use them. * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace... * src/mkpath.c (pkgArchivePath): ...with this free standing function. * src/mkpath.h (pkgArchivePath): Declare its prototype. * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration. (pkgXmlDocument): Add a default constructor; implement as `inline'. (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new declaration object, instead of `auto' variable, to avoid scope error. (pkgXmlDocument::UpdateSystemMap): Declare it. 2010-01-26 Keith Marshall Implement rudimentary dependency resolver. * src/pkgdeps.cpp: New file. * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference; establish header file dependencies. * src/pkgbase.h (to_remove, to_install, selection_types): New enum. (pkgActionItem::selection): Extend it to store as enumerated pair... (pkgActionItem::SelectPackage): New inline method; assign them. (pkgActionItem::Selection): New inline method; retrieve them. (pkgXmlNode::GetInstallationRecord): New method; declare it. * src/pkgexec.cpp (pkgActionItem): In constructor... (selection): ...initialise both references in enumerated pair. (pkgActionItem::GetReference): Use `Selection()' method. (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for making selection, and assign to `to_install' element. (pkgXmlDocument::Schedule): Don't update `request'. (pkgActionItem::Execute): Implement as stub. * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new `Selection()' method. * src/pkgkeys.h (yes_value, no_value): Declare new string constants. * src/pkgkeys.c (yes_value, no_value): Implement them. * src/vercmp.cpp: Update copyright notice. (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'. 2010-01-23 Keith Marshall Avoid segmentation faults when processing invalid data streams. * src/pkgstrm.h: Update copyright notice. (pkgArchiveStream::IsReady): New pure virtual method. (pkgRawArchiveStream::IsReady): Provide inline implementation. (pkgGzipArchiveStream::IsReady): Likewise. (pkgBzipArchiveStream::IsReady): Likewise. (pkgLzmaArchiveStream::IsReady): Likewise. (pkgXzArchiveStream::IsReady): Likewise. * src/pkgstrm.cpp: Update copyright notice. (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to perform any form of read or decode processing. * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as pseudo-descriptor for the pkgLzmaArchiveStream derived component of this internet data streaming class. 2010-01-23 Keith Marshall Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated comment; it was required to permit, (but not to enforce), linking to the static liblzma.a library, with earlier beta releases, but this anomaly has now been corrected. 2010-01-22 Keith Marshall Remove zlib sources from trunk. (Application builders should use free standing implementation of zlib, from MinGW's package distribution page on SourceForge). 2010-01-22 Keith Marshall Remove bzip2 sources from trunk. (Application builders should use free standing implementation of bzip2, from MinGW's package distribution page on SourceForge). 2010-01-22 Keith Marshall Add subsystem specific sysroot mapping facility. * src/pkghash.c: New file; required by... * src/sysroot.cpp: New file; it implements... (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods. * src/pkgbase.h: Update copyright notice. (pkgXmlDocument::LoadSystemMap): Declare it. (pkgXmlDocument::AddDeclaration): New inline method. (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise. (pkgXmlNode::GetSysRoot): Declare it. (pkgXmlNode::GetDocumentRoot): New inline method. (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise. * src/climain.cpp: Update copyright notice. (climain): Invoke pkgXmlDocument::LoadSystemMap() as required. * Makefile.in (CORE_DLL_OBJECTS): Add ... (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies. (DEBUGLEVEL): New macro; define it. (CPPFLAGS): Use it. 2010-01-16 Keith Marshall Assign standardised keys for XML database lookup. * src/pkgkeys.h: New file; provide public key declarations. * src/pkgkeys.c: New file; implement them. * src/pkgbind.cpp: Use them; update copyright notice. * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise. * src/pkgname.cpp, src/pkgspec.cpp: Likewise. * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all dependencies accordingly. 2010-01-08 Keith Marshall Add CLI version reporting option. * configure.ac: Update copyright notice for new year. (COPYRIGHT_HOLDER): New AC_SUBST variable; define it. (YEARS_OF_ISSUE): New AC_SUBST variable; define it. (AC_CONFIG_FILES): Add `version.c'; source it from... * version.c.in: ...this new file. * Makefile.in: Update copyright notice for new year. (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'. (distclean): Add `version.c'. * configure: Regenerated. * src/clistub.c: Update copyright notice for new year. (options): New array of `struct option'; define and use it as the reference for `argv' parsing with `getopt_long_only()'. 2009-12-17 Keith Marshall Add CLI support for "update" action. * src/pkgtask.h (ACTION_UPDATE): Define it, derived from... (action_update): ...this new entry in anonymous enumeration. * src/pkgexec.cpp (action_name): Add "update" keyword identification. * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/. (pkgXmlDocument::BindRepositories): Add `force_update' parameter... * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to... (pkgXmlDocument::SyncRepository): ...invoke this method when passed as a `true' flag, in addition to (as previously) first time reference. * src/climain.cpp (climain): Interpret "update" keyword for... [ACTION_UPDATE]: ...passing state as `force_update' parameter to... (pkgXmlDocument::BindRepositories): ...this method, then... [!ACTION_UPDATE]: Follow with normal action processing. 2009-12-16 Keith Marshall Add status checking for Internet URL connections. * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method. (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return value, deferring failure diagnostics to callers, i.e. to... (pkgXmlDocument::SyncRepositories): ...this, and to... (pkgActionItem::DownloadArchiveFiles): ...this. 2009-11-23 Keith Marshall Add package download and repository synchronisation machinery. * src/pkgstrm.h: New header file. * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp, src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files. * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them. * xml: New directory. * src/climain.cpp (climain): Establish repository bindings from... * xml/profile.xml: ...this new configuration file. 2009-11-16 Keith Marshall Add XML database bindings and preliminary action executive for CLI. * src/pkgbase.h, src/pkgtask.h, src/mkpath.h, src/vercmp.h: New header files. * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp, src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files. * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files... (mingw-get-0.dll): ...build them into this new DLL target; add it... (all): ...as prerequisite for this primary build goal. 2009-11-12 Keith Marshall Avoid some potential GCC warnings. * src/clistub.c: Include process.h for `execv' prototype... (main): Cast `argv' to appropriately matched type when calling it. * src/pkginfo/driver.c: Include stdlib.h for `free' prototype. 2009-11-11 Keith Marshall Create diagnostic message handler for CLI usage. * src/dmh.h: New header file; it defines the public interface. * src/dmh.cpp: New file; it implements the message handler. 2009-11-05 Keith Marshall Correct some identified TinyXML issues. * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag probable redundancy of checks for '\n' and '\r'. * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove all such redundancies in IsWhiteSpace() calls throughout. * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format specification in sprintf()/snprintf() calls; "%lf" is invalid; replace with "%f". 2009-10-31 Keith Marshall Add CLI loader stub. * src/clistub.c: New file. * Makefile.in: Add build rule for it; build as... (mingw-get.exe): ...this; also add to... (clean): ...this goal. 2009-10-31 Keith Marshall Set up build mechanism. * configure.ac, Makefile.in: New files. * .cvsignore (configure, autom4te.cache): Add to ignored files. 2009-10-30 Keith Marshall Add GPL-v3 licensing terms. * COPYING: New file, sourced from gnu.org. 2009-10-12 Keith Marshall Add pkginfo implementation. * src, src/pkginfo: New directories. * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files. * src/pkginfo/driver.c: New file. 2009-10-12 Keith Marshall Create tdm-branch. * All files (tdm-branch): Assign new branch tag. * All top-level files: Remove from trunk. * ChangeLog: New file.