1 2013-08-21 Keith Marshall <keithmarshall@users.sourceforge.net>
3 Simplify guimain.exe duplicate instance prevention.
5 * src/guimain.cpp (WinMain): Delegate requisite checking to...
6 (WTK::RaiseAppWindow): ...this external toolkit function.
8 2013-08-13 Keith Marshall <keithmarshall@users.sourceforge.net>
10 Install licence as standard setup component.
12 * src/guimain.h src/setup.rc (ID_PACKAGE_GUI_DISTNAME): Macro
13 no longer required; delete definition.
15 * src/setup.cpp (pkgSetup::DoFirstTimeInstallation):
16 <pkgSetupAction> [ID_PACKAGE_GUI_DISTNAME]: Delete reference.
17 <pkgSetupAction> [ID_PACKAGE_BASE_DISTNAME]: Update reference; repeat
18 to explicitly address each of "bin", "gui", and "lic" components.
20 * Makefile.in (TAG_SCRIPT) [PACKAGE_GUI_DISTNAME]: Delete reference.
21 (TAG_SCRIPT) [PACKAGE_BASE_DISTNAME]: Redefine as template.
23 2013-08-13 Keith Marshall <keithmarshall@users.sourceforge.net>
25 More dialogue box adjustments.
27 * src/guimain.rc: Generally clean up white-space distribution.
28 (All dialogue templates): Use WS_TABSTOP consistently.
30 2013-08-13 Keith Marshall <keithmarshall@users.sourceforge.net>
32 Circumvent Windows-7 "Program Compatibility Assistant" misbehaviour.
34 * src/manifest.rc (assembly) <compatibility>: Add <supportedOS>
35 declarations for each of Vista, Win7, and (tentatively) Win8.
37 2013-07-30 Keith Marshall <keithmarshall@users.sourceforge.net>
39 Minor modification to "about" dialogue dismissal button.
41 * src/guimain.rc (IDD_HELP_ABOUT) <DEFPUSHBUTTON>: Change label text
42 to "Dismiss"; add WS_TABSTOP style.
44 2013-07-30 Keith Marshall <keithmarshall@users.sourceforge.net>
46 Match "about" dialogue caption to main window.
48 * src/guimain.rc (IDM_HELP_ABOUT) <MENUITEM>: Match it to...
49 (IDD_HELP_ABOUT) <CAPTION>: ...this; make it representative of...
50 (ID_MAIN_WINDOW_CAPTION): ...this.
52 2013-07-30 Keith Marshall <keithmarshall@users.sourceforge.net>
54 Implement "icon legend" display as "help" menu item.
56 * src/guimain.rc (IDM_HELP_LEGEND): Make menu item active; define
57 template for the dialogue box which it is to call out.
59 * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_HELP_LEGEND]: New
60 case handler; implement dialogue box call out, as a variation on...
61 [IDM_HELP_ABOUT]: ...this; modify it accordingly.
63 2013-07-30 Keith Marshall <keithmarshall@users.sourceforge.net>
65 Avoid discarding pending changes when catalogue is updated.
67 * src/guimain.h (IDD_CONFIRMATION): New manifest constant; define it.
68 (AppWindowMaker::ConfirmActionDialogue): New static method; declare it.
69 (AppWindowMaker::ConfirmActionRequest): New method; declare it.
71 * src/guimain.rc (IDD_CONFIRMATION): Implement new dialogue template.
73 * src/guiexec.cpp (pkgConfirmAction, pkgConfirmActionClient): New
74 static variables; they are used as pseudo-arguments, together with...
75 (DIALOGUE_DISPATCH, DIALOGUE_RESPONSE, DIALOGUE_CHKSTATE): ...these
76 new macros; define them; they facilitate the implementation of...
77 (AppWindowMaker::ConfirmActionDialogue): ...this; implement it.
78 (AppWindowMaker::ConfirmActionRequest): Implement it; use it...
79 (AppWindowMaker::OnCommand) [IDM_REPO_UPDATE]: ...here, and...
81 * src/pkgdata.cpp (AppWindowMaker::OnClose): ...here.
83 2013-07-26 Keith Marshall <keithmarshall@users.sourceforge.net>
85 Make a minor GUI layout adjustment.
87 * src/pkgview.cpp (VSASH_INIT_POS): Increment from 0.30 to 0.35; this
88 sets the initial height of the package list pane to be 35% of the main
89 window height, which, at the default initial window size, neatly fits
90 the entire "Basic Setup" package group, without scrolling, on my
91 1366x768 pixel Win7-VM display.
93 2013-07-25 Keith Marshall <keithmarshall@users.sourceforge.net>
95 Implement setup tool installer "plugin".
97 * src/setup.h (SETUP_HOOK_RUN_INSTALLER): Define request code.
99 * src/dllhook.cpp (run_basic_system_installer): Implement handler...
100 (setup_hook) [SETUP_HOOK_RUN_INSTALLER]: ...and invoke it.
101 (setup_hook) [default]: Collect diagnostics in common message digest.
102 (AppWindowMaker::SetupHookInvoked): Define and initialise it; in this
103 context, which does not conflict with prior definition in guimain.exe,
104 it must always remain true.
106 * src/setup.cpp (SetupTool) [constructor]: Invoke...
107 (SetupTool::DispatchSetupHookRequest): ...this, on user's request...
108 (SETUP_HOOK_RUN_INSTALLER): ...with this action code; this replaces...
109 (SetupTool::RunInstalledProgram): ...one reference instance for this
110 external program fork, leaving only one such reference remaining;
111 declare it to be "inline".
113 * Makefile.in (GUIMAIN_LIB_OBJECTS): New macro; define it. It
114 abstracts a subset of the object modules originally enumerated...
115 (GUIMAIN_OBJECTS): ...here, whence use it; also incorporate into...
116 (SETUP_DLL_OBJECTS): ...this.
117 (SETUP_DLL_LIBS): Make it equivalent to...
118 (GUIMAIN_LIBS): ...this.
119 (mingw-get-setup-0.dll): Use...
120 (GUI_LDFLAGS): ...this, to specify linking options, rather than...
123 2013-07-25 Keith Marshall <keithmarshall@users.sourceforge.net>
125 Add "Basic Setup" as a built-in standard package group.
127 * src/guimain.h (AppWindowMaker::SetupToolInvoked): New private
128 static member variable; declare it.
130 * src/guimain.cpp (AppWindowMaker::SetupToolInvoked): Define and
131 initialise it; this instance is specific to guimain.exe, where it
132 must always remain false.
134 * src/pkgtree.cpp (PKG_AFFILIATE_ALL): New constant; define it.
135 (load_package_group_hierarchy): Use it to specify those groups which
136 have all packages as affiliates, rather than just first root group.
137 (group_attributes): New static inline function; implement it, then...
138 (is_affiliated) [PKG_AFFILIATE_ALL]: ...use it to identify groups
139 which are specified as having all packages as affiliates.
140 (AppWindowMaker::InitPackageTreeView): Construct a temporary XML
141 specification for the "Basic Setup" package group, thence add it to
142 the package tree view; mark it as default group selection when...
143 [AppWindowMaker::SetupToolInvoked]: ...this is true.
145 2013-07-14 Keith Marshall <keithmarshall@users.sourceforge.net>
147 Implement GUI filtering of package list by group selection.
149 * src/pkgbase.h (pkgXmlNode::IsVisibleGroupMember):
150 (pkgXmlNode::IsVisibleClass): New inline methods; declare them.
151 (pkgXmlNode::MapPackageGroupHierarchy): New inline method; declare it.
152 (pkgXmlNode::SetPackageGroupHierarchyMapper): Likewise; it sets up...
153 (pkgXmlNode::PackageGroupHierarchyMapper): ...this new private static
154 function pointer; declare it as a function reference, in terms of...
155 (pkgXmlNode::GroupHierarchyMapper): ...this new typedef; define it.
157 * src/guimain.h (AppWindowMaker::PackageTreeView): Make it static.
158 (AppWindowMaker::IsPackageGroupAffiliate): Declare new static method.
160 * src/pkgbind.cpp (pkgRepository::GetPackageList): Make it invoke...
161 (pkgXmlNode::MapPackageGroupHierarchy): ...this; implement it.
163 * src/pkglist.cpp (pkgXmlNode::IsVisibleGroupMember): Implement it.
164 (pkgXmlNode::IsVisibleClass): Likewise; just provide a stub, for now.
165 (pkgListViewMaker::Dispatch): Use them to filter package list content.
166 (AppWindowMaker::UpdatePackageList): Redraw main window when done.
168 * src/pkgtree.cpp [_WIN32_IE >= 0x0400]: Require this.
169 (AppWindowMaker::PackageTreeView): Define and initialise it.
170 (AppWindowMaker::InitPackageTreeView): Extend implementation; use...
171 (map_package_group_hierarchy_recursive, load package_group_hierarchy):
172 (is_existing_group, map_package_group_hierarchy): ...these; implement
173 them locally, as file scoped static helper functions.
174 (select_key): New static local string constant; define it.
175 (pkgInitCategoryTreeGraft): Use it; also have it invoke...
176 (pkgXmlNode::SetPackageGroupHierarchyMapper): ...this; implement it.
177 (AppWindowMaker::IsPackageGroupAffiliate): Implement it; it uses...
178 (is_affiliated, is_child_affiliate): ...these helpers; provide them as
179 locally implemented, file scoped static functions.
181 * src/pkgdata.cpp (AppWindowMaker::OnNotify): Add handler for...
182 [ID_PACKAGE_TREEVIEW && TVN_SELCHANGED]: ...this notification.
184 2013-07-12 Keith Marshall <keithmarshall@users.sourceforge.net>
186 Correct a static string buffer aliasing issue.
188 * src/setup.cpp (SetupTool::setup_dll): New inline method; it ensures
189 that the buffer within approot_path() refers to the setup helper DLL.
190 (SetupTool::InitialiseSetupHookAPI): Use it, when loading the DLL.
191 (SetupTool::SetupTool): Use it again, when subsequently calling...
192 (_wunlink): ...this; it is now the preferred API, replacing...
193 (DeleteFileW): ...this; do not blindly assume that...
194 (SetupTool::dll_name): ...this remains unchanged between references;
195 it is an alias for the static buffer within approot_path().
197 2013-07-12 Keith Marshall <keithmarshall@users.sourceforge.net>
199 Add a custom profile for use by the setup tool.
201 * xml/setup.xml: New file.
203 2013-07-03 Keith Marshall <keithmarshall@users.sourceforge.net>
205 Improve handling of workspace clean-up requests.
207 * Makefile.in (mostlyclean): New rule; it replaces...
208 (clean): ...original intent delegated to 'mostlyclean'; retained and
209 augmented to remove all content specified by 'mostlyclean', plus...
210 (version.c, verinfo.h): ...these additional generated files.
211 (distclean): Modified; 'version.c' now removed by 'clean'.
213 2013-07-03 Keith Marshall <keithmarshall@users.sourceforge.net>
215 Correct an omission from the source code distribution.
217 * Makefile.in (BUILD_AUX_FILES): Add makeopts.m4; this was omitted
218 from the 2013-04-10 modification to fix MinGW-Bug #1601.
220 2013-07-03 Keith Marshall <keithmarshall@users.sourceforge.net>
222 Incorporate foundation for setup tool implementation.
224 * src/setup.cpp: New file; it implements the setup program.
225 * src/setup.rc: New file; it implements setup program resources.
227 * src/dllhook.cpp: New file; it implements a DLL bridging API to
228 facilitate invocation of mingw-get-0.dll functions from the setup
229 program, after both DLLs have been explicitly loaded at run time.
231 * src/setup.h: New file; it declares the interface between the
232 setup program and the preceding mingw-get bridging DLL.
234 * src/guimain.h: Add filter to exclude declarations specific to...
235 [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...this case, when
236 included by compilation units specific to the setup tool components.
237 (ID_MAIN_DIALOGUE_CAPTION, ID_DOWNLOAD_HOST_URI): New resource IDs.
238 (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): Likewise.
239 (ID_PACKAGE_GUI_DISTNAME): Likewise; define them.
241 * Makefile.in (all): Respecify it, in terms of...
242 (all-core, all-setup): ...these new rules; define them, and also...
243 (all-setup-exe, all-setup-dll): ...these, to force building of...
244 (mingw-get-setup.$EXEEXT, mingw-get-setup-0.dll): ...these binaries.
245 (setup.res.$OBJEXT): Specify prerequisites, as for guimain.res.$OBJEXT
246 (SETUP_TOOL_OBJECTS, SETUP_TOOL_LIBS): New macros; define them.
247 (SETUP_DLL_OBJECTS, SETUP_DLL_LIBS, SETUP_DISTNAME): Likewise.
248 (TAG_SCRIPT): Add resource script substitution definitions for...
249 (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): ...these...
250 (ID_PACKAGE_GUI_DISTNAME): ...and this.
252 2013-07-01 Keith Marshall <keithmarshall@users.sourceforge.net>
254 Add subprocess argument vector construction helpers.
256 * src/argwrap.c src/argwrap.h: New files; they implement an API for
257 construction of argument vectors, with appropriate quoting, to be
258 passed to MS-Windows exec'd subprocesses. Rewritten from scratch,
259 without reference to any prior GPL licensed implementation, with MIT
260 style licence, these provide the foundation for a possible future
261 libmingwex.a implementation; they are included here, since no such
262 implementation is currently available.
264 2013-06-28 Keith Marshall <keithmarshall@users.sourceforge.net>
266 Avoid inadvertent overwrite of existing files.
268 * src/mkpath.c (_O_NEWFILE): Conditionally specify attributes...
269 [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...as they were...
270 [IMPLEMENTATION_LEVEL != SETUP_TOOL_COMPONENT]: ...else, include
271 _O_EXCL in the specified set; exclude _O_TRUNC.
273 * src/tarproc.cpp (dmh_notify_extraction_failed): New static inline
274 function; it encapsulates the diagnostic message factored out from...
275 (pkgArchiveProcessor::ExtractFile): ...here, whence use it.
276 (create_output_stream): Also used in this new static inline function;
277 it adds an appropriate diagnostic wrapper around set_output_stream(),
278 when _O_EXCL prevents overwrite of an existing file.
279 (pkgArchiveProcessor::SetOutputStream): Use it.
281 2013-06-27 Keith Marshall <keithmarshall@users.sourceforge.net>
283 Improve diagnostics for tar archive processing faults.
285 * src/pkgproc.h (TAR_ARCHIVE_FORMAT_ERROR): New constant; define it.
286 (TAR_ARCHIVE_DATA_READ_ERROR, TAR_ARCHIVE_DATA_WRITE_ERROR): Likewise.
288 * src/tarproc.cpp (dmh_notify_archive_data_exhausted): New static
289 inline function; implement it.
290 (pkgTarArchiveProcessor::GetArchiveEntry) [short header]: Use it.
291 (pkgArchiveProcessor::ExtractFile) [TAR_ARCHIVE_DATA_READ_ERROR]:
292 Likewise, use it here; also explicitlycheck for, and diagnose...
293 [TAR_ARCHIVE_DATA_WRITE_ERROR]: ...this; also add a further catch all
294 case, to diagnose any other unexpected condition.
295 (pkgTarArchiveProcessor::GetArchiveEntry) [bad checksum]: Diagnose it.
296 (pkgTarArchiveProcessor::Process): Return appropriate status codes.
297 (pkgTarArchiveProcessor::ProcessEntityData): Likewise.
299 2013-06-24 Keith Marshall <keithmarshall@users.sourceforge.net>
301 Facilitate version synchronisation for mingw-get-setup.
303 * VERSION.m4: New file.
304 * configure.ac: Include it, and...
305 (AC_INIT): ...use it.
307 2013-06-21 Keith Marshall <keithmarshall@users.sourceforge.net>
309 Keep version strings clean when release class is unspecified.
311 * Makefile.in (RC_SCRIPT, VERSION_SCRIPT): Simplify; assign specified
312 release class to local variable; delegate release tag generation to...
313 (TAG_SCRIPT): ...this; check release class variable is not an empty
314 string, before inserting it into the generated release tag.
316 2013-06-20 Keith Marshall <keithmarshall@users.sourceforge.net>
318 Rework defective assignment of product version resources.
320 * Makefile.in (BUILD_TAG): Avoid creating an empty build.tag file.
321 (PACKAGE_VERINFO_SCRIPT): Ensure that the build tag is generated as a
322 string of non-zero length. Do not assume that it comprises only two
323 elements; extract the final two, as the third and fourth elements
324 of the product version meta-data record.
326 2013-06-19 Keith Marshall <keithmarshall@users.sourceforge.net>
328 Rework defective package build time-stamping logic.
330 * Makefile.in (%.time): Make it explicitly touch its target; the
331 2013-05-15 changes, to reduce redundancy, didn't work as expected.
332 (%.tag): Add a side effect; make it also explicitly touch %.time.
333 (%.tagged.time): This is now redundant; remove it.
335 2013-06-14 Keith Marshall <keithmarshall@users.sourceforge.net>
337 Collect distributable package files in user specified directory.
339 * Makefile.in (distdir): New macro; define default as abs_builddir.
340 (srcdist, bindist, licdist): Use it; direct generated tarballs to it.
341 (%.txt.dist): New pattern rule; define, and use it to make a copy...
342 (readme.txt): ...of this, in distdir, when processing...
343 (dist): ...this build objective.
345 2013-06-14 Keith Marshall <keithmarshall@users.sourceforge.net>
347 Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity.
349 * src/apihook.c: New file; it provides...
350 (have_api): ...this helper; it checks for availability of any specific
351 API function, within a specific system DLL, (MSVCRT.DLL by default).
353 * src/tarproc.cpp (have_utime64_api): New inline function; it wraps...
354 (have_api): ...this, to check whether MSVCRT.DLL provides...
355 (commit_saved_entity) [_utime64]: ...this; use if available, else...
356 (commit_saved_entity) [!_utime64]: ...fall back to using...
359 * Makefile.in (CORE_DLL_OBJECTS): Add apihook.$OBJEXT
361 2013-06-13 Keith Marshall <keithmarshall@users.sourceforge.net>
363 Facilitate package extraction and registration at setup time.
365 * src/pkgproc.h (IMPLEMENTATION_LEVEL): Add filters to facilitate
366 implementation of distinct setup time archive processing behaviour.
367 (pkgArchiveProcessor::save_on_extract): New property; declare it.
368 (pkgArchiveProcessor::SaveExtractedFiles): New method; implement it.
369 (pkgArchiveProcessor::SetOutputStream): New method; declare it.
371 * src/tarproc.cpp (IMPLEMENTATION_LEVEL): Add filters to implement
372 distinct setup time specific archive processing behaviour.
373 (pkgArchiveProcessor::SetOutputStream): Implement it.
374 (pkgTarArchiveExtractor::ProcessDataStream): Use it.
375 (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
377 2013-06-13 Keith Marshall <keithmarshall@users.sourceforge.net>
379 Implement some GUI progress metering dialogue enhancements.
381 * src/pkgbase.h (pkgProgressMeter): Don't pre-empt private features
382 of derived progress metering classes; hence, we no longer need this...
383 (AppWindowMaker): ...as a forward class declaration; delete it.
385 * src/guimain.rc (IDD_REPO_UPDATE): Resize, and adjust layout.
386 (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX, IDD_PROGRESS_PCT): Add these
387 dialogue box progress counter display elements.
389 * src/pkgbind.cpp (pkgRepository::GetPackageList): Adjust style of
390 progress status messages, to suit reporting via GUI dialogue box or
391 CLI console, as appropriate.
393 * src/guiexec.cpp (ProgressMeterMaker): Redefine class, in terms of...
394 (PROGRESS_METER_CLASS): ...this new generic class name macro.
395 Reimplement private members, previously inherited from base class;
396 adjust class constructor to ensure that they are initialised.
397 Delete explicit destructor; a default destructor is now sufficient.
398 (ProgressMeterMaker::SetRange, ProgressMeterMaker::SetValue):
399 (ProgressMeterMaker::Annotate): Factor out; reimplement them...
401 * src/pmihook.cpp: ...in this new file, as generalised methods of...
402 (PROGRESS_METER_CLASS): ...the class named by this macro.
403 (PROGRESS_METER_CLASS::PutVal): New private method; implement it.
405 2013-05-31 Keith Marshall <keithmarshall@users.sourceforge.net>
407 Avoid a potential macro definition conflict.
409 * src/pkgbase.h (strcasecmp) [__MINGW32__]: Use string.h definition.
411 2013-05-15 Keith Marshall <keithmarshall@users.sourceforge.net>
413 Streamline build-time dependency tracking procedures.
415 * Makefile.in (DEPFLAGS): Adjust for simultaneous .o/.d generation.
416 (RC_DEPFLAGS): New macro; define dependency generation flags for the
417 resource compiler, which can't handle the new DEPFLAGS methodology.
418 (%.c, %.cpp, %.rc): Simplify $OBJEXT generation procedures.
419 (%.time): Remove redundantly replicated build-time procedure from...
420 (%.tagged.time): ...this; just make it a prerequisite.
422 2013-05-15 Keith Marshall <keithmarshall@users.sourceforge.net>
424 Add resources for specification of product version.
426 * src/verinfo.rc src/verinfo.h.in: New files; included by...
427 * src/guimain.rc: ...this, whence also specify version information...
428 (VERINFO_FILE_NAME, VERINFO_INTERNAL_NAME, VERINFO_FILE_DESCRIPTION):
429 (VERINFO_FILE_VERSION, VERINFO_FILE_VERSION_STRING): ...per these new
430 manifest constant macros; define them, with propagation to...
431 (ID_MAIN_WINDOW_CAPTION): ...this; keep it consistent.
433 * Makefile.in (TAG_SCRIPT): Include invocation for...
434 (PACKAGE_VERINFO_SCRIPT): ...this new macro; defined to interpret...
435 (PACKAGE_VERINFO_PRODUCT_VERSION): ...this new substitution template;
436 it is used in src/verinfo.h.in, whence verinfo.h is generated.
437 (RC_INCLUDES): Add current working directory, for...
438 (verinfo.h): ...this; add rule and dependencies to generate it.
440 2013-05-14 Keith Marshall <keithmarshall@users.sourceforge.net>
442 Make application manifest resource definition reusable.
444 * src/manifest.rc: New file; factor content from...
445 * src/guimain.rc: ...here, whence include it.
447 2013-05-08 Keith Marshall <keithmarshall@users.sourceforge.net>
449 Extend DMH services to delay-loaded DLL clients.
451 * src/dmhcore.h (dmh_bind): New function; declare it.
452 * src/dmhcore.cpp (dmh_bind): Implement it; it provides an API through
453 which the setup tool makes its existing DMH services available to post
454 install hooks in mingw-get-0.dll, which cannot be loaded until after
455 the providing package has been downloaded and unpacked.
457 2013-05-08 Keith Marshall <keithmarshall@users.sourceforge.net>
459 Avoid unnecessary command line globbing in GUI applications.
461 * src/guimain.cpp src/guistub.cpp (_CRT_glob): Declare as extern "C";
462 initialise to zero, so overriding the runtime start-up default.
464 * src/rites.c [! IMPLEMENT_INITIATION_RITES] (_CRT_glob): Initialise
465 to zero here too; lastrites.exe doesn't need globbing either.
467 2013-05-04 Keith Marshall <keithmarshall@users.sourceforge.net>
469 Address some GCC-4.7 string initialisation warnings.
471 * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Declare all
472 headings[].text initialisers as 'const'; cast to 'char *' as required.
473 (pkgListViewMaker::Dispatch): Ditto, when inserting the 'const' empty
474 string into the list, as a component class value.
476 * src/pkgdata.cpp (AppWindowMaker::InitPackageTabControl): Declare all
477 TabLegend[] initialisers as 'const'; cast to 'char *' as required.
479 2013-05-02 Keith Marshall <keithmarshall@users.sourceforge.net>
481 Correct a spin wait thread synchronisation issue.
483 * src/pkgnget.cpp (pkgDownloadMeterGUI::SpinWait): Handle stop
484 requests explicitly; acknowledge when waiting thread has stopped.
485 (pkgDownloadMeterGUI::SpinWaitAction): Raise explicit stop requests;
486 wait for acknowledgement that waiting thread has stopped.
488 2013-04-23 Keith Marshall <keithmarshall@users.sourceforge.net>
490 Select compressed data streaming filters for use by setup tool.
492 * src/pkgstrm.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]:
493 Exclude the implementations of all decompression filters, except...
494 (pkgXzArchiveStream): ...this, together with its requisite methods...
495 (pkgArchiveStream, pkgLzmaArchiveStream): ...from these.
497 2013-04-23 Keith Marshall <keithmarshall@users.sourceforge.net>
499 Adapt internet download agent for use by setup tool.
501 * src/pkgbase.h: More code rearrangement, exposing...
502 (safe_strcmp): ...this in any implementation context, controlled...
503 [USES_SAFE_STRCMP && ! HAVE_SAFE_STRCMP]: ...by this; when true...
504 (HAVE_SAFE_STRCMP): ...define this to 1, (must be non-zero).
505 [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: Ensure that...
506 (USES_SAFE_STRCMP): ...this is defined to 1, (i.e. non-zero).
507 (EXTERN_C): Relocate macro definition...
508 * src/pkgimpl.h: ...to here; add complementary implementation of...
509 (BEGIN_C_DECLS, END_C_DECLS): ...these new macros; define them.
511 * src/pkginet.h (pkgDownloadMeter::SpinWait): New static method;
512 declare it as inline, to be implemented elsewhere, delegating to...
513 (pkgDownloadMeter::SpinWaitAction): ...this new protected virtual
514 method; declare and implement it inline, as a "do nothing" base
515 class method, to be optionally overridden in a derived class.
517 * src/pkginet.cpp (pkgDownloadMeter::SpinWait): Implement it.
518 (pkgInternetAgent::OpenURL): Use it to invoke SpinWaitAction().
519 (USES_SAFE_STRCMP): Define as 1; (safe_strcmp() is required).
520 [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Filter out code
521 which may not be required in more specialised contexts, then...
522 [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...add specialised
523 variants specific to this.
525 * src/pkgnget.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]:
526 Filter out code which may not be required in more specialised context.
527 (dmh_setpty): Provide locally declared prototype for external function.
528 (pkgDownloadMeterGUI): Add pseudo-terminal diagnostic message window.
529 (pkgDownloadMeterGUI::SpinWaitAction): Declare and implement GUI
530 specific method specialisation; it invokes a thread, running...
531 (pkgDownloadMeterGUI::SpinWait): ...this new static method overload.
533 2013-04-19 Keith Marshall <keithmarshall@users.sourceforge.net>
535 Implement pre-emptive update issue number identification.
537 * src/pkgkeys.h (serial_number): Declare function prototype.
538 * src/pkginet.cpp (serial_number): Implementation remains here;
539 promote from static to extern "C".
541 * src/pkgbind.cpp (value_assumed_new): New char constant; define it.
542 (pkgRepository::expected_issue): New private member var; declare and...
543 (pkgRepository::pkgRepository): ...initialise it, assuming new.
544 (pkgRepository::GetPackageList): Assign pre-emptively declared issue
545 number, (from package-list references), to 'expected_issue'; compare it
546 with 'current_issue' number recorded within locally stored catalogue.
547 [current_issue >= expected_issue]: Suppress redundant download; adjust
548 diagnostic messages as appropriate.
550 2013-04-10 Keith Marshall <keithmarshall@users.sourceforge.net>
552 Fix MinGW-Bug #1601 (on new issues tracker).
554 * aclocal.m4 (makeopts.m4): New build-aux module; include it.
555 (MINGW_AC_PROG_LEX): New macro; implement it.
557 * configure.ac (AC_INIT): Make version number tripartite.
558 (MINGW_AC_MAKE_NO_PRINT_DIRECTORY): Use this new makeopts.m4 macro.
559 (MINGW_AC_PROG_LEX): Use it, in place of...
560 (AC_PROG_LEX): ...this.
562 * Makefile.in (MAKE): New macro; assign using autoconf's SET_MAKE.
563 (QUIET_MAKE): New macro; derive it from $(MAKE) --no-print-directory.
564 (LEX_COMMAND, LEX_COMMAND_ABORT): New macros; define them.
565 (LEX_MISSING, LEX_MISSING_MESSAGE, LEX_OUTPUT): Likewise.
566 (FORMAT_MESSAGE, MESSAGE_FOLD_WIDTH): Likewise; implemented from...
567 (AWK_CLEAR_LINE_BUFFER, AWK_FLUSH_BUFFER, AWK_PRINT_AND_CLEAR_BUFFER):
568 (AWK_COLLECT_MESSAGE, AWK_COLLECT_BLANK_LINE, AWK_PRINT_LINE_BUFFER):
569 ...this collection of internal helper macros; define them.
570 (%.c: %.l): Replacement for built-in rule; it handles "missing lex" in
571 a manner consistent with expectations of autoconf's AC_PROG_LEX.
572 (execute-command): New phoney build goal; it is used with...
573 (WITH_REQUEST): ...this new macro, to invoke commands recursively.
575 2013-03-25 Keith Marshall <keithmarshall@users.sourceforge.net>
577 Adapt DMH for use in setup tool.
579 * src/dmh.cpp: File renamed to...
580 * src/dmhcore.cpp: ...this; some code rearranged, to facilitate...
581 [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...marking of code
582 sections which are required in the base package build, but which may
583 be filtered out of the build context for the setup tool.
585 * src/guidmh.cpp: File renamed to this...
586 * src/dmhguix.cpp: ...this; also add marking for...
587 [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...sections which
588 may be filtered out of the build context for the setup tool.
589 (dmhTypePTY::printf): Improve stratagem for output.
591 * Makefile.in (CORE_DLL_OBJECTS, GUIMAIN_OBJECTS): Adjust references
592 to renamed source files.
594 2013-03-22 Keith Marshall <keithmarshall@users.sourceforge.net>
596 Enable context hooks for build time code filtering.
598 * src/pkgimpl.h: New file; it defines...
599 (PACKAGE_BASE_COMPONENT, SETUP_TOOL_COMPONENT): ...these contexts;
600 either of these may be selected, by defining as manifest value for...
601 (IMPLEMENTATION_LEVEL): ...this; default is PACKAGE_BASE_COMPONENT.
603 * src/pkgbase.h: Include pkgimpl.h
604 [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Occlude content.
606 2013-03-21 Keith Marshall <keithmarshall@users.sourceforge.net>
608 Specify additional files for clean-up.
610 * Makefile.in (distclean): Additionally specify...
611 (build.tag, build.time): ...these, as removable files.
613 2013-03-21 Keith Marshall <keithmarshall@users.sourceforge.net>
615 Add a missing distribution dependency.
617 * Makefile.in (srcdist): Explicitly require...
618 (pkginfo.c): ...this; previously, it was only an implicit build time
619 requirement, and may not have persisted until distribution time.
621 2013-03-21 Keith Marshall <keithmarshall@users.sourceforge.net>
623 Implement by-name association of resource scripts with programs.
625 * src/guidata.rc: Renamed as...
626 * src/guimain.rc: ...this, reflecting its association with...
627 * src/guimain.cpp: ...this program source.
629 * Makefile.in (GUIMAIN_OBJECTS): Update dependency...
630 (%.$OBJEXT:%.rc): ...replacing use of this pattern rule...
631 (%.res.$OBJEXT:%.rc): ...with this.
633 2013-01-18 Keith Marshall <keithmarshall@users.sourceforge.net>
635 Make GUI support visual styles in current Windows versions.
637 * src/guidata.rc: Add an appropriate inline manifest resource.
639 * src/guiexec.cpp (AppWindowMaker::Invoked): Ensure UpdateWindow() is
640 called after the initial call to AdjustLayout(); this is required to
641 ensure that all child windows are properly displayed from the outset.
643 * src/pkgview.cpp (AppWindowMaker::LayoutEngine):
644 [ID_PACKAGE_DATASHEET]: Adjust the top position of the frame, to make
645 the border coincide with the bottom border of the tab strip above.
647 2013-01-12 Keith Marshall <keithmarshall@users.sourceforge.net>
649 Merge gui-dev branch head to master; close gui-dev branch.
651 * configure.ac (AC_INIT): Reset version to 0.6; reset all package
652 files to state prevailing at gui-dev branch head.
654 2013-01-11 Keith Marshall <keithmarshall@users.sourceforge.net>
656 Create release branch for further r0.5 development.
658 * configure.ac (AC_INIT): Bump version number to 0.5.1; assign branch
659 label (mercurial bookmark) as "r0-5-1" for all files; (this is not to
660 be released, at this time).
662 2013-01-10 Keith Marshall <keithmarshall@users.sourceforge.net>
664 Implement data sheet compiler for list of installed files.
666 * src/pkgdata.cpp: #include pkgproc.h; it furnishes...
667 (pkgManifest): ...this class declaration, which is required by...
668 (DataSheetMaker::DisplayFilesManifest): ...this new private inline
669 method; declare and implement it; subsequently, invoke it...
670 (DataSheetMaker::OnPaint) [PKG_DATASHEET_INSTALLED_FILES]: ...here.
671 (pkgTroffLayoutEngine::WriteLn): Correct a defect in handling of
672 excess-length unbreakable "words" outside the viewport; previously
673 they were not dropped from the input queue, resulting in repeated
674 reprocessing in an infinite loop.
676 2013-01-09 Keith Marshall <keithmarshall@users.sourceforge.net>
678 Include release tags in GUI displayed package versions.
680 * src/pkglist.cpp (pkgVersionString) [ReleaseStatus != NULL]:
681 Append ReleaseStatus and ReleaseIndex to generated version string.
683 2013-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
685 Fix enumeration of pending install actions for scheduled upgrades.
687 * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions):
688 [action == ACTION_UPGRADE && classified == ACTION_INSTALL]: Enumerate
689 upgrade as a special case of the install classification.
691 2013-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
693 Implement "Mark All Upgrades" GUI capability.
695 * src/guimain.h (IDM_REPO_APPLY): Renumbered; make room for...
696 (IDM_REPO_MARK_UPGRADES): ...this new constant; define it.
698 * src/guidata.rc (IDM_REPO_MARK_UPGRADES): New option; add it...
699 (ID_MAIN_WINDOW_WINDOW) [Installation]: ...to this drop-down menu.
701 * src/pkgbase.h (pkgActionItem::SuppressRedundantUpgrades): New
702 public inline method; declare it.
704 * src/guiexec.cpp (AppWindowMaker::OnCommand):
705 [IDM_REPO_MARK_UPGRADES]: Add case handler for this menu selection.
706 (pkgActionItem::SuppressRedundantUpgrades): New method; implement it.
708 2013-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
710 Avoid unnecessary reloading of package list.
712 * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]:
713 Do not reload package list after processing; update it in place.
715 2013-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
717 Avoid potential heap corruption in action scheduler.
719 * src/guiexec.cpp (pkgActionItem::Clear): Factor out; relocate to...
720 * src/pkgexec.cpp (pkgActionItem::Clear): ...here; this keeps all use
721 of new and delete operators on the same side of the EXE/DLL boundary
722 as the constructor and destructor for pkgActionItem objects.
723 (pkgActionItem::Schedule): Ensure that all min_wanted and max_wanted
724 references are unique to each allocated pkgActionItem object, so that
725 the destructor may safely release their associated heap memory blocks.
727 2013-01-07 Keith Marshall <keithmarshall@users.sourceforge.net>
729 Update copyright notification for development in new year.
731 * configure.ac (YEARS_OF_ISSUE): Add year 2013.
733 * Makefile.in (version.c, guidata.$OBJEXT): Make them depend on...
734 (Makefile): ...this, so YEARS_OF_ISSUE propagates to built objects.
736 2012-12-24 Keith Marshall <keithmarshall@users.sourceforge.net>
738 Work around a GUI action scheduling instability.
740 * src/guimain.h (AppWindowMaker::UpdateDataSheet): Declare new method.
741 * src/pkgdata.cpp (AppWindowMaker::UpdateDataSheet): Implement it.
742 (AppWindowMaker::OnNotify): Use it.
744 * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]:
745 Don't refresh package list view in-place; clear and reload it instead.
747 2012-12-21 Keith Marshall <keithmarshall@users.sourceforge.net>
749 Update distribution build rules.
751 * Makefile.in (SRCDIST_FILES): Remove version.c.in; this was moved
752 to src/version.c.in, and is now automatically included via...
753 (SRCDIST_SUBDIRS): ...this; remove build-aux and build-aux/m4; we want
754 only selected files from these, as filtered by specification in...
755 (BUILD_AUX_DIRS, BUILD_AUX_FILES): ...these new macros; define them.
756 (BLDTAG, SCMTAG, GCMTAG): New release class macros; define them.
757 (bindist, licdist, srcdist): Use them.
759 2012-12-21 Keith Marshall <keithmarshall@users.sourceforge.net>
761 Update CLI implementation hooks for GUI integration.
763 * Makefile.in (LIBEXEC_PROGRAMS): Replace gui$EXEEXT with
764 guistub$EXEEXT; update make goal references accordingly.
766 * src/rites.c (MINGW_GET_GUI): Redefine to be guimain$EXEEXT.
767 (MINGW_GET_GFB): Define new fall-back; let it be guistub$EXEEXT.
768 (RITES_IMPLEMENTATION): Perform rites for MINGW_GET_GUI.
770 * src/clistub.c (main) [cannot exec MINGW_GET_GUI]: Try
771 MINGW_GET_GFB instead.
773 2012-12-21 Keith Marshall <keithmarshall@users.sourceforge.net>
775 Rename executive core file for GUI implementation.
777 * src/guixmld.cpp: File renamed...
778 * src/guiexec.cpp: ...to this; its function exceeds original intent.
779 * Makefile.in (GUIMAIN_OBJECTS): Update reference accordingly.
781 2012-12-20 Keith Marshall <keithmarshall@users.sourceforge.net>
783 Create foundation for implementation of package category tree view.
785 * Makefile.in (GUIMAIN_OBJECTS): Add pkgtree.$OBJEXT reference to...
786 * src/pkgtree.cpp: ...incorporate this new file; it implements...
787 (AppWindowMaker::InitPackageTreeView): ...this new class method...
788 (pkgInitCategoryTreeGraft): ...and this new extern "C" function.
790 * src/guimain.h (pkgInitCategoryTreeGraft): Declare prototype.
791 (AppWindowMaker::InitPackageTreeView): New private method; declare it.
792 (AppWindowMaker::PackageTreeView): New member variable; declare it.
794 * src/guixmld.cpp (AppWindowMaker::LoadPackageData): Call
795 pkgInitCategoryTreeGraft(), after loading profile.xml
796 (AppWindowMaker::Invoked): Call InitPackageTreeView()
798 * src/pkgview.cpp (AppWindowMaker::LayoutEngine):
799 [ID_PACKAGE_TREEVIEW]: Handle it.
801 2012-12-19 Keith Marshall <keithmarshall@users.sourceforge.net>
803 Make the "Apply Changes" dialogue "failure-aware".
805 * src/pkgtask.h (ACTION_APPLY_FAILED): Redefine, in terms of...
806 (ACTION_INSTALL_FAILED, ACTION_REMOVE_FAILED): New manifest defines.
807 (ACTION_UNSUCCESSFUL): New manifest constant; define it.
809 * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions):
810 [ACTION_UNSUCCESSFUL]: Make it a special case for enumeration.
812 * src/guixmld.cpp (pkgApplyChanges): Enumerate...
813 [ACTION_UNSUCCESSFUL > 0]: ...all such cases; when true...
814 [IDD_AUTO_CLOSE_OPTION]: ...this; select alternative close-out
815 messages, as appropriate.
816 (pkgActionItem::Assert): Factor out; relocate to...
817 * src/pkgexec.cpp (pkgActionItem::Assert): ...here; this moves its
818 object code into the mingw-get DLL.
820 * src/pkgunst.cpp (pkgRemove) [ACTION_REMOVE_FAILED]:
821 * src/pkginst.cpp (pkgInstall) [ACTION_INSTALL_FAILED]:
822 Assert as appropriate.
824 2012-12-19 Keith Marshall <keithmarshall@users.sourceforge.net>
826 Improve progress reporting in "Apply Changes" dialogue.
828 * src/pkgstat.h: New header file; it declares...
829 (pkgSpinWait): ...this new pure abstract base class; it specifies an
830 infrastructure for posting arbitrary text to dialogue controls.
832 * src/pkgexec.cpp (pkgSpinWait): Implement its static elements.
833 (pkgActionItem::Execute): Dispatch progress reports, handled by...
834 (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these.
836 * src/guixmld.cpp (pkgDialogueSpinWait): New class; declare it and
837 implement locally. It is derived from, and provides a listener for...
838 (pkgSpinWait): ...this abstract class.
839 (pkgApplyChanges): Use it.
841 * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream): Call...
842 (pkgSpinWait::Report): ...this, to report extracted files.
844 * src/pkgunst.cpp (pkg_unst): Call...
845 (pkgSpinWait::Report): ...this, to report deleted files.
847 * src/sysroot.cpp (pkgXmlDocument::UpdateSystemMap): Call...
848 (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these, to confirm
849 continuing database update activity.
851 2012-12-18 Keith Marshall <keithmarshall@users.sourceforge.net>
853 Update tab display on right-click in package list view.
855 * src/pkgdata.cpp (AppWindowMaker::OnNotify) [NM_RCLICK]:
856 Call DataSheetMaker::DisplayData(), before invoking pop-up menu.
858 2012-12-17 Keith Marshall <keithmarshall@users.sourceforge.net>
860 Add more protection against NULL pointer abuse.
862 * src/pkgbase.h (pkgActionItem::Reset): Method renamed to...
863 * src/guixmld.cpp (pkgActionItem::Assert): ...this; also renamed here.
864 (AppWindowMaker::OnCommand): When calling...
865 (pkgListViewMaker::MarkScheduledActions): ...this, pass argument as...
866 (pkgXmlDocument::ClearScheduledActions): ...pointer returned by this.
868 * src/pkgdata.cpp (AppWindowMaker::MarkSchedule):
869 [pending_actions == NULL]: Do not propagate invocation request to...
870 (pkgListViewMaker::MarkScheduledActions): ...this.
872 * src/pkglist.cpp (pkgListViewMaker::MarkScheduledActions):
873 [schedule == NULL]: Do nothing.
875 2012-12-14 Keith Marshall <keithmarshall@users.sourceforge.net>
877 Implement some additional permanent debugging support.
879 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
880 [DEBUG_TRACE_DEPENDENCIES]: Enable DMH digest mode for messages.
882 * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream):
883 [DEBUG_TRACE_TRANSACTIONS]: Add logging of installed file path names.
885 2012-12-14 Keith Marshall <keithmarshall@users.sourceforge.net>
887 Insert a missing snprintf format effector.
889 * src/pkgnget.cpp (pkgDownloadMeterGUI::Update): Add omitted '%'
890 format specifier, in "%%", for formatting percentage-complete value.
891 Rename "size_buf" automatic variable as "buf"; this results in shorter
892 source lines, and consequently a tidier source code layout.
893 (pkgDownloadMeterGUI::ResetGUI): Likewise s/size_buf/buf/
895 2012-12-14 Keith Marshall <keithmarshall@users.sourceforge.net>
897 Add a missing header reference.
899 * src/approot.h: Include stdint.h; this ensures that wchar_t is
900 properly typedef'd, before attempting to use it.
902 2012-12-12 Keith Marshall <keithmarshall@users.sourceforge.net>
904 Make a clone of the package menu available as a pop-up.
906 * src/guimain.h (AppWindowMaker::SelectPackageAction): New private
909 * src/pkgdata.cpp (AppWindowMaker::SelectPackageAction): Implement it.
910 (AppWindowMaker::OnNotify) [ID_PACKAGE_LISTVIEW]: Use it.
912 2012-12-12 Keith Marshall <keithmarshall@users.sourceforge.net>
914 Improve conditionally enabled state manipulation for menu items.
916 * src/guidata.rc (IDM_REPO_APPLY): Set its initial state as GRAYED.
918 * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings):
919 [IDM_PACKAGE_REINSTALL]: Always leave it GRAYED; this is a temporary
920 provision, until the GUI is updated to support "reinstall" capability.
921 [IDM_REPO_APPLY && !(EnumeratePendingActions > 0)]: Make it GRAYED.
922 [IDM_REPO_APPLY && (EnumeratePendingActions > 0)]: Enable it.
924 2012-12-11 Keith Marshall <keithmarshall@users.sourceforge.net>
926 Implement GUI bindings for processing a schedule of actions.
928 * src/guimain.h (IDD_DMH_CONSOLE): New resource ID; define it.
929 (IDD_APPLY_EXECUTE): New dialogue template resource ID; define it.
930 (AppWindowMaker::ExecuteScheduledActions): New method; declare it.
932 * src/guidata.rc (IDD_APPLY_EXECUTE): Implement dialogue template.
934 * src/guixmld.cpp (pkgApplyChanges): New thread function; implement it.
935 (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use it; it is invoked...
936 (IDD_APPLY_EXECUTE): ...via this dialogue box, subsequently calling...
937 (AppWindowMaker::ExecuteScheduledActions): ...this; implement it.
939 * src/pkgexec.cpp (pkgActionItem::Execute): Add argument; use it.
940 (pkgActionItem::~pkgActionItem): Unlink chained references.
942 * src/pkgbase.h (pkgActionItem::Execute): Adjust prototype.
944 2012-12-11 Keith Marshall <keithmarshall@users.sourceforge.net>
946 Do not preserve unnecessary download requests.
948 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles):
949 [(flags & ACTION_INSTALL) != ACTION_INSTALL]: Actions having no
950 "install" effect do not require a download; cancel any associated
953 2012-12-10 Keith Marshall <keithmarshall@users.sourceforge.net>
955 Implement GUI bindings for package download agent.
957 * src/guimain.h (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX):
958 (IDD_PROGRESS_PCT): New manifest resource IDs; define them. They will
959 be used to identify dialogue controls, to be associated with...
960 (IDD_APPLY_DOWNLOAD): ...this new dialogue template ID; define it.
961 (AppWindowMaker::DownloadArchiveFiles): New inline method; declare it.
963 * src/guidata.rc (IDD_APPLY_DOWNLOAD): Implement dialogue template.
965 * src/pkgbase.h (pkgActionItem::DownloadArchiveFiles): New public
966 inline method; declare it. It overloads an existing private method of
967 the same name, which it subsequently invokes.
969 * src/pkginet.h: New header file; it declares...
970 (pkgInvokeDownload): ...this new extern "C" function prototype, and...
971 (pkgDownloadMeter): ...this abstract class; it is factored from its
972 original implementation in pkginet.cpp, augmented by addition of...
973 (pkgDownloadMeter::primary): New static member variable; declare it.
974 (pkgDownloadMeter::UseGUI): New public method; implement it inline.
975 (pkgDownloadMeter::ResetGUI): New public method; declare it, providing
976 a do-nothing inline default implementation. Any derived class, which
977 supports GUI capability, should override this.
979 * src/pkgnget.cpp: New file; it implements...
980 (pkgDownloadMeterGUI): New class, derived from pkgDownloadMeter.
981 (pkgActionItem::DownloadArchiveFiles): New overloaded inline method.
982 (AppWindowMaker::DownloadArchiveFiles): New inline method.
983 (pkgInvokeDownload): New dialogue box worker thread handler.
985 * src/pkginet.cpp: Include pkginet.h; hence...
986 (pkgDownloadMeter): ...remove redundant class declaration.
987 (pkgDownloadMeter::primary): Define and initialise it.
988 (pkgInternetStreamingAgent::Get) [pkgDownloadMeter::UseGUI]: Delegate
989 progress metering to referenced pkgDownloadMeterGUI class instance.
990 [! pkgDownloadMeter::UseGUI]: Continue to use the existing built-in
991 pkgDownloadMeterTTY mechanism.
992 (pkgActionItem::DownloadSingleArchive) [ACTION_DOWLOAD_FAILED]: Assert
993 this initially; subsequently clear it on successful completion.
994 (pkgActionItem::DownloadArchiveFiles): Collect diagnostic messages
995 into a single DMH_BEGIN_DIGEST ... DMH_END_DIGEST group.
997 * src/guixmld.cpp: Include pkginet.h; it is required by...
998 (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use pkgInvokeDownload.
1000 * Makefile.in (GUIMAIN_OBJECTS): Include pkgnget.$OBJEXT
1002 2012-12-08 Keith Marshall <keithmarshall@users.sourceforge.net>
1004 Implement "Discard" handler for GUI "Apply Changes" dialogue.
1006 * src/pkgbase.h (pkgActionItem::Reset): New public method; declare it.
1007 (pkgActionItem::Clear): New public method; declare two overloaded
1008 variants, of which implement one inline.
1009 (pkgXmlDocument::ClearScheduledActions): New public method; declare
1010 and implement it inline.
1012 * src/pkgtask.h (ACTION_DOWNLOAD_FAILED, ACTION_APPLY_FAILED): New
1013 manifest bit-flag constants; define them. They provide a mechanism
1014 for blocking the discard event in respect of failed actions.
1016 * src/guixmld.cpp (pkgActionItem::Reset): Implement it.
1017 (pkgActionItem::Clear): Implement second, out-of-line variant.
1018 (ACTION_PRESERVE_FAILED): New local manifest bit-flag constant; define
1019 it as an aggregate of ACTION_DOWNLOAD_FAILED and ACTION_APPLY_FAILED.
1020 (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use them.
1022 2012-12-07 Keith Marshall <keithmarshall@users.sourceforge.net>
1024 Implement GUI dialogue for "Apply Changes" action approval.
1026 * src/guidata.rc (ID_MAIN_WINDOW_MENU): Rename...
1027 ("&Repository"): ...this drop-down menu entry...
1028 ("&Installation"): ...this; add...
1029 ("&Apply Changes"): ...this new selection.
1030 (IDD_APPLY_APPROVE): New dialogue box resource template; define it.
1031 (SS_CTEXTBOX): New aggregate style convenience macro; define it.
1032 (ES_VT100): Likewise.
1034 * src/guimain.h (IDM_REPO_APPLY): New resource ID; define it.
1035 (IDM_REPO_QUIT): Redefined resource ID; was 302; changed to 312.
1036 (IDD_APPLY_APPROVE, IDD_PROGRESS_TXT): New resource IDs; define them.
1037 (IDD_APPLY_REMOVES_PACKAGES, IDD_APPLY_REMOVES_SUMMARY): Likewise.
1038 (IDD_APPLY_INSTALLS_PACKAGES, IDD_APPLY_INSTALLS_SUMMARY): Likewise.
1039 (IDD_APPLY_UPGRADES_PACKAGES, IDD_APPLY_UPGRADES_SUMMARY): Likewise.
1040 (ID_APPLY, ID_DISCARD, ID_DEFER): New response IDs; define them.
1041 (AppWindowMaker::EnumerateActions): New inline method; declare it.
1042 (AppWindowMaker::DialogueResponse): New inline method; declare and
1045 * src/guixmld.cpp (pkglist.h): #included.
1046 (dmh_setpty): Add locally declared prototype.
1047 (AppWindowMaker::EnumerateActions): Implement it.
1048 (pkgActionCount): New static helper function; implement it.
1049 (ACTION_APPLY, APPLIES_TO): New macros; define them.
1050 (FMT_APPLY_REMOVES, FMT_APPLY_INSTALLS, FMT_APPLY_UPGRADES): New
1051 manifest string constants; define them.
1052 (pkgApplyApproved): New static call-back function; implement...
1053 (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]: ...and use it.
1055 2012-12-06 Keith Marshall <keithmarshall@users.sourceforge.net>
1057 Implement enhanced action item enumeration capability.
1059 * src/pkgbase.h (pkgActionItem::EnumeratePendingActions): New public
1060 method; declare it. It provides the capability to enumerate scheduled
1061 actions, filtered by action classification; when invoked such that it
1062 selects all actions, it may be used as a replacement for...
1063 (pkgActionItem::Unapplied): ...this; delete declaration.
1065 * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions): Implement
1066 it; it is derived, with enhancement, from original implementation...
1067 (pkgActionItem::Unapplied): ...of this; delete it, and...
1068 (AppWindowMaker::OnClose): ...update calling reference accordingly.
1070 2012-12-05 Keith Marshall <keithmarshall@users.sourceforge.net>
1072 Implement PTY display emulation for GUI mode DMH.
1074 * src/dmhcore.h (dmhTypeGeneric::set_console_hook): New public virtual
1075 method; declare it, providing inline default do-nothing implementation.
1076 (dmhTypeGeneric::severity_tag): New protected static method; declare it.
1077 (dmhTypeGeneric::notification_format): New protected static property;
1080 * src/dmh.cpp (dmhTypeGeneric::severity_tag): Implement it.
1081 (dmhTypeGeneric::notification_format): Define and initialise it.
1082 (dmhTypeTTY::notify): Use them.
1083 (dmh_setpty): New function; declare prototype and implement it.
1085 * src/guidmh.cpp (dmhTypePTY): New locally implemented class.
1086 (dmhTypeGUI::set_console_hook): New virtual method; declare and
1087 implement it; it stores a dmhTypePTY reference pointer into...
1088 (dmhTypeGUI::console_hook): ...this new private member variable.
1089 (dmhTypeGUI::dmhTypeGUI): Initialise it.
1090 (dmhTypeGUI::notify) [console_hook != NULL]: Delegate to it.
1091 (dmhTypeGUI::printf) [console_hook != NULL]: Likewise.
1093 2012-12-03 Keith Marshall <keithmarshall@users.sourceforge.net>
1095 Implement generalised API for dialogue boxes with worker threads.
1097 * src/guimain.h (pkgDialogueThread): New typedef; declare it.
1098 (AppWindowMaker::DialogueThread): New static property; declare it.
1099 (AppWindowMaker::DispatchDialogueThread): New method; declare it.
1101 * src/guixmld.cpp: Formatting of several comments adjusted.
1102 (pkgUpdate, pkgInitDataLoad): Defunct functions; replaced by...
1103 (pkgDialogue): ...this new static call-back function; implement it.
1104 (AppWindowMaker::DialogueThread): Instantiate and initialise it.
1105 (AppWindowMaker::DispatchDialogueThread): Implement it.
1106 (AppWindowMaker::Invoked): Use it to invoke pkgInvokeInitDataLoad()...
1107 (AppWindowMaker::OnCommand): ...and pkgInvokeUpdate().
1109 2012-12-03 Keith Marshall <keithmarshall@users.sourceforge.net>
1111 Consolidate GUI implementation for package list view management.
1113 * src/pkglist.h (pkgListViewMaker::GetTitle): Disused overloaded
1114 method; remove all declarations.
1115 (pkgListViewMaker::GetVersionString): Disused method; remove
1117 (pkgListViewMaker::GetItem): New private inline method; declare it.
1118 (pkgListViewMaker::UpdateItem): New private method; declare it.
1119 (pkgListViewMaker::UpdateListView): New public method; declare it.
1120 (pkgListViewMaker::MarkScheduledActions): Likewise.
1122 * src/guimain.h (AppWindowMaker::MarkSchedule): New public inline
1123 method; declare it, but defer implementation to...
1125 * src/pkgdata.cpp (AppWindowMaker::MarkSchedule): ...here; not used
1126 elsewhere, it is derived from, and replaces...
1127 (pkgMarkSchedule): ...this function; factor out redundant code, in
1128 favour of delegation to pkgListViewMaker::MarkScheduledActions(), with
1129 following call to AppWindowMaker::UpdatePackageMenuBindings(); update
1130 calling function references...
1131 (AppWindowMaker::UnmarkSelectedPackage): ...here, and...
1132 (AppWindowMaker::Schedule): ...here.
1134 * src/pkglist.cpp (pkgVersionString): New static function; implement
1135 it as a local replacement for...
1136 (pkgListViewMaker::GetVersionString): ...this defunct class method.
1137 (pkgGetTitle): New overloaded static function; implement two variants,
1138 as local replacements for...
1139 (pkgListViewMaker::GetTitle): ...this defunct overloaded class method.
1140 (pkgListViewMaker::UpdateItem): Implement it; factor code from...
1141 (pkgListViewMaker::InsertItem): ...here, whence use it.
1142 (pkgListViewMaker::MarkScheduledActions): Implement it.
1143 (pkgListViewMaker::UpdateListView): Implement it.
1144 (pkgListViewMaker::pkgListViewMaker): Remove references to...
1145 (LVIF_TEXT): ...this.
1147 2012-11-30 Keith Marshall <keithmarshall@users.sourceforge.net>
1149 Increase width of window sash bars by 50%.
1151 * src/guimain.h (SASH_BAR_THICKNESS): Increase from 4 to 6; this makes
1152 it easier to grab the sash bars, so they may be dragged; IMO, it also
1153 results in a better appearance.
1155 2012-11-29 Keith Marshall <keithmarshall@users.sourceforge.net>
1157 Maintain consistent internal vs. external installation records.
1159 * src/pkginst.cpp (pkgInstall): Set "installed" attribute on internal
1160 package reference, to "yes", after installation; CLI didn't need this,
1161 but GUI will do so, for any package revisited in a single session.
1163 * src/pkgunst.cpp (pkgRemove): Similarly, negate "installed" attribute
1164 after package removal.
1166 2012-11-17 Keith Marshall <keithmarshall@users.sourceforge.net>
1168 Refactor to consolidate three instances of duplicate code.
1170 * src/pkglist.h (pkgGetStatus): New function; declare it.
1171 * src/pkglist.cpp (pkgGetStatus): Implement it; factor out from...
1172 (pkgListViewMaker::InsertItem): ...here, whence use it.
1173 * src/pkgdata.cpp (pkgMarkSchedule): Likewise here...
1174 (DataSheetMaker::DisplayGeneralData): ...and here.
1176 2012-11-16 Keith Marshall <keithmarshall@users.sourceforge.net>
1178 Add GUI support for install, upgrade, and remove action scheduling.
1180 * src/guimain.h (EXTERN_C): Ensure it is defined.
1181 (pkgActionItem): Add forward declaration of class name.
1182 (pkgMarkSchedule): New EXTERN_C function; declare and prototype it.
1183 (AppWindowMaker::OnClose): New virtual method; declare it.
1184 (AppWindowMaker::Schedule): New public method; declare it.
1185 (AppWindowMaker::UnmarkSelectedPackage): Likewise.
1187 * src/pkgbase.h (pkgActionItem::HasAttribute) [this == NULL]: Add
1188 protective logic; ignore attempts to access non-existent objects.
1189 (pkgActionItem::SelectPackage) [this == NULL]: Likewise.
1190 (pkgActionItem::Selection) [this == NULL]: Likewise.
1191 (pkgActionItem::GetReference): New overloaded public method; declare
1192 prototype variant with argument type of pkgXmlNode*.
1193 (pkgActionItem::Unapplied): New public method; declare it.
1194 (pkgActionItem::CancelScheduledAction): Likewise.
1195 (pkgXmlDocument::Schedule): Change return type from void to
1196 pkgActionItem*; add default argument values.
1198 * src/guixmld.cpp (AppWindowMaker::OnCommand): Add menu case hooks...
1199 [IDM_PACKAGE_INSTALL]: ...to schedule package 'install' action...
1200 [IDM_PACKAGE_UPGRADE]: ...package 'upgrade' action...
1201 [IDM_PACKAGE_REMOVE]: ...package 'remove' action, or...
1202 [IDM_PACKAGE_UNMARK]: ...to cancel any of these scheduling requests.
1203 [IDM_REPO_QUIT]: Correct typo; s/WM_QUIT/WM_CLOSE/ in comment.
1205 * src/pkgdata.cpp (pkgMarkSchedule): Implement it.
1206 (pkgActionItem::CancelScheduledAction): Implement it.
1207 (pkgActionItem::Unapplied): Implement it.
1208 (AppWindowMaker::UpdatePackageMenuBindings): Improve comments.
1209 (AppWindowMaker::UnmarkSelectedPackage): Implement it.
1210 (AppWindowMaker::Schedule): Implement it.
1211 (AppWindowMaker::OnClose): Implement it.
1213 * src/pkgdeps.cpp (pkgActionItem::GetReference): Implement overload.
1214 (pkgXmlDocument::Schedule): Change return type, and return value.
1215 [this == NULL]: Add protective logic; ignore non-existent objects.
1216 [name == NULL]: Do not schedule; just return existing action list.
1218 2012-11-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1220 Add dynamically enabled state control for package menu items.
1222 * src/guimain.h (AppWindowMaker::UpdatePackageMenuBindings): New
1223 private method; declare it.
1225 * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings):
1226 Implement it, and...
1227 (AppWindowMaker::OnNotify): ...use it.
1229 2012-11-01 Keith Marshall <keithmarshall@users.sourceforge.net>
1231 Avoid excessive inter-word spaces in adjusted text.
1233 * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Check extent of
1234 padding to be added at each inter-word space, when adjusting text; do
1235 not adjust, if it exceeds 5% of available display pane width.
1237 2012-11-01 Keith Marshall <keithmarshall@users.sourceforge.net>
1239 Elide unbreakable text which will not fit within display width.
1241 * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Add logic to detect
1242 over-width unbreakable text; elide characters from the right, to make
1243 it fit within the display width, with trailing ellipsis.
1245 2012-11-01 Keith Marshall <keithmarshall@users.sourceforge.net>
1247 Add content compiler for package data sheet "general" tab.
1249 * src/pkgbase.h (pkgActionItem::PrintURI): Make it public. Add a
1250 call-back reference argument, for output function; assign puts() as
1251 default, where previously had hard coded printf() emulating puts()
1253 * src/pkginet.cpp (pkgActionItem::PrintURI): Use call-back hook.
1255 * src/pkgdata.cpp (DataSheetMaker::Display): New static property; it
1256 stores a reference to the active class instance, so static call-back
1257 methods may delegate processing requests to non-static methods.
1258 (DataSheetMaker::Advance): New static property; it is used to instruct
1259 call-back methods to interpose paragraph leading it the output stream.
1260 (DataSheetMaker::FormatRecord): New private method; implement it.
1261 (DataSheetMaker::FormatText): Don't pass "canvas" as an argument; we
1262 can access it directly as a class property. Update all callers as
1263 necessary, to conform to modified function prototype.
1264 (pkgListSelection): New static function; implement it, and...
1265 (DataSheetMaker::OnPaint): ...use it in switch cases, when calling...
1266 [PKG_DATASHEET_GENERAL]: DataSheetMaker::DisplayGeneralData(), and...
1267 [PKG_DATASHEET_DESCRIPTION]: DataSheetMaker::DisplayDescription().
1268 (DataSheetMaker::DisplayGeneralData): New public method; implement it.
1269 (DataSheetMaker::DisplayPackageURL): New static method; implement it.
1270 (DataSheetMaker::DisplayLicenceURL): Likewise.
1271 (DataSheetMaker::DisplaySourceURL): Likewise.
1273 2012-10-30 Keith Marshall <keithmarshall@users.sourceforge.net>
1275 Fix error in counting of catalogue files during loading.
1277 * src/pkgbind.cpp (pkgRepository::GetPackageList): Increment count
1278 variable once only, at start of each cycle of the catalogue loading
1279 loop; previous strategy of counting in discrete logic paths could
1280 miss several required increments, particularly in CLI mode.
1282 2012-10-27 Keith Marshall <keithmarshall@users.sourceforge.net>
1284 Avoid DMH message digest fragmentation when downloading.
1286 * src/dmh.h (DMH_GET_CONTROL_STATE): New macro; define it.
1287 * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use it; do not close
1288 locally opened message digest, when called with one already open.
1290 2012-10-27 Keith Marshall <keithmarshall@users.sourceforge.net>
1292 Initiate progress metering for catalogue load and update operations.
1294 * src/guidata.rc (IDD_REPO_UPDATE): New dialogue template; define it.
1295 (IDM_REPO_UPDATE): Enable selection from "Repository" drop-down menu.
1297 * src/guimain.h (IDD_REPO_UPDATE, IDD_CLOSE_OPTIONS):
1298 (IDD_AUTO_CLOSE_OPTION, IDD_PROGRESS_BAR, IDD_PROGRESS_MSG): New
1299 resource identification manifest constants; define them.
1300 (pkgXmlNode, pkgProgressMeter): Add forward class declarations.
1301 (AppWindowMaker::AttachedProgressMeter): New private data; define...
1302 (AppWindowMaker::AppWindowMaker): ...and initialise it.
1303 (AppWindowMaker::AttachProgressMeter): New public method; declare it.
1304 (AppWindowMaker::DetachProgressMeter): Likewise.
1305 (AppWindowMaker::LoadPackageData, AppWindowMaker::ClearPackageList):
1306 (AppWindowMaker::UpdatePackageList): Make them public.
1308 * src/pkgbase.h (pkgProgressMeter): New abstract class; declare it.
1309 (AppWindowMaker) [GUIMAIN_H undefined]: Add forward class declaration.
1310 (pkgXmlDocument::progress_meter): New private data member; declare...
1311 (pkgXmlDocument::pkgXmlDocument): ...and initialise it.
1312 (pkgXmlDocument::ProgressMeter, pkgXmlDocument::AttachProgressMeter):
1313 (pkgXmlDocument::DetachProgressMeter): New public inline methods;
1316 * src/pkgview.cpp (WTK::GenericDialogue): Delete disused reference.
1317 (AppWindowMaker::OnCommand): Factor out implementation; relocate it...
1318 * src/guixmld.cpp: ...to here; thus it may utilise dependants of...
1319 (ProgressMeterMaker): ...this new locally implemented class.
1320 (AppWindowMaker::AttachProgressMeter): Implement it.
1321 (AppWindowMaker::AttachProgressMeter): Likewise.
1322 (pkgProgressMeter::~pkgProgressMeter): Likewise.
1323 (pkgUpdate, pkgInvokeUpdate): New static functions; implement them.
1324 (AppWindowMaker::Invoked): Replace direct call to LoadPackageData by
1325 an indirect invocation, via a progress metering dialogue box using...
1326 (pkgInitDataLoad): ...this new static callback function, invoking...
1327 (pkgInvokeInitDataLoad): ...this new static thread function, whence...
1328 (AppWindowMaker::LoadPackageData): ...this; add hook-up call to...
1329 (pkgXmlDocument::AttachProgressMeter): ...incorporate this.
1331 * src/pkgbind.cpp (pkgRepository::total, pkgRepository::count): New
1332 private static properties; declare and instantiate them; provide...
1333 (pkgRepository::Reset, pkgRepository::IncrementTotal): ...new public
1334 static methods to manipulate them; declare and implement them inline.
1335 (pkgRepository::GetPackageList): Use them to manage updates to the
1336 pkgProgressMeter class instance, if any, which has been bound to
1337 the controlling pkgXmlDocument class instance, when invoking...
1338 (pkgXmlXmlDocument::BindRepositories): ...this.
1340 2012-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
1342 Associate DMH message boxes with active dialogues.
1344 * src/guidmh.cpp (last_active_popup): New static inline function.
1345 (dmhTypeGUI::dispatch_message): Use it.
1347 2012-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
1349 Fix Diagnostic Message Handler initialisation logic.
1351 * src/dmh.cpp (dmh_init) [DMH_SUBSYSTEM_GUI]: Correct a logic error;
1352 it previously fell through after any successful initialisation of the
1353 DMH_SUBSYSTEM_GUI handler, replacing it with a DMH_SUBSYSTEM_TTY type
1354 handler. Also, assign a heap copy of the passed "progname" string
1355 resource, which is volatile, to ensure that the handler retains a
1358 2012-10-11 Keith Marshall <keithmarshall@users.sourceforge.net>
1360 Implement preliminary GUI mode data sheet compiler.
1362 * src/guimain.h (DataSheetMaker): New class; forward declare it.
1363 (AppWindowMaker::InitPackageTabControl): New private method; declare it.
1364 (AppWindowMaker::DataSheet, AppWindowMaker::PackageTabControl):
1365 (AppWindowMaker::TabDataPane, AppWindowMaker::PackageTabPane): New
1366 private data members; declare them.
1367 (ID_SASH_WINDOW_PANE_CLASS): New string resource identifier; define it.
1368 (ID_PACKAGE_DATASHEET, ID_PACKAGE_TABPANE): New window identifiers;
1371 * src/guidata.rc (ID_SASH_WINDOW_PANE_CLASS): Specify string resource.
1373 * src/pkgview.cpp (AppWindowMaker::OnSize): Add handler for...
1374 (ID_PACKAGE_TABPANE, ID_PACKAGE_TABCONTROL, ID_PACKAGE_DATASHHET):
1375 ...this group of sash pane child window entities.
1376 (AppWindowMaker::OnNotify): Comment out disused stub implementation.
1378 * src/pkgshow.cpp (pkgUTF8Parser): Factor out class declaration...
1379 (UTF32_MAX, UTF32_OVERFLOW, UTF32_INVALID): ...these definitions...
1380 (utf32_t): ...and this typedef; relocate to, and #include...
1381 * src/pkgdata.h: ...this new header file.
1383 * src/pkgdata.cpp (DataSheetMaker): New class; declare and implement it.
1384 (AppWindowMaker::InitPackageTabControl): Implement it.
1385 (AppWindowMaker::OnNotify): Reimplement it.
1387 * Makefile.in (GUIMAIN_OBJECTS): Add pkgdata.OBJEXT
1389 * src/guixmld.cpp (AppWindowMaker::Invoked): Add call to invoke
1390 AppWindowMaker::InitPackageTabControl()
1392 2012-10-09 Keith Marshall <keithmarshall@users.sourceforge.net>
1394 Remove a grossly heuristic list view hack.
1396 * src/pkglist.cpp (pkgListViewMaker::GetTitle): Remove code for the
1397 heuristic deletion of any redundant package name prefixes from package
1398 title attributes; by now, all such prefixes should have been removed
1399 from the catalogue, explicitly, at source.
1401 2012-10-08 Keith Marshall <keithmarshall@users.sourceforge.net>
1403 Implement GUI list view compiler for XML catalogue.
1405 * src/pkgview.cpp (AppWindowMaker::LayoutEngine): Add case handler...
1406 [pane_id == ID_PACKAGE_LISTVIEW]: ...for this window pane class.
1408 * src/guimain.h (ID_PKGLIST_TABLE_HEADINGS):
1409 (ID_PKGNAME_COLUMN_HEADING, ID_PKGTYPE_COLUMN_HEADING):
1410 (ID_INSTVER_COLUMN_HEADING, ID_REPOVER_COLUMN_HEADING):
1411 (ID_PKGDESC_COLUMN_HEADING): New resource identifiers; define them.
1412 (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW):
1413 (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL):
1414 (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED):
1415 (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE):
1416 (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN):
1417 (ID_PKGSTATE_PURGE): New icon resource identifiers; define them.
1418 (AppWindowMaker::InitPackageListView): New private method; declare it.
1419 (AppWindowMaker::UpdatePackageList): New private method; declare it.
1420 (AppWindowMaker::ClearPackageList): New private method; declare and
1421 implement it inline.
1423 * src/guidata.rc (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW):
1424 (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL):
1425 (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED):
1426 (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE):
1427 (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN):
1428 (ID_PKGSTATE_PURGE): New icon resources; implement them.
1430 * icons/state01.ico icons/state02.ico icons/state03.ico:
1431 * icons/state04.ico icons/state05.ico icons/state06.ico:
1432 * icons/state07.ico icons/state08.ico icons/state09.ico:
1433 * icons/state10.ico icons/state11.ico icons/state12.ico:
1434 * icons/state13.ico: New files. All are cloned from synaptic icons;
1435 see src/guimain.rc for symbolic/functional reference names.
1437 * src/pkglist.h [GUIMAIN_H defined] (pkgListViewMaker): New class;
1438 declare it for use in modules which #include guimain.h
1440 * src/pkglist.cpp: New file; it implements...
1441 (pkgListViewMaker): ...this new class, and its clients...
1442 (AppWindowMaker::InitPackageListView): New method.
1443 (AppWindowMaker::UpdatePackageList): Likewise.
1445 * Makefile.in (GUIMAIN_OBJECTS): Add pkglist.OBJEXT
1447 * src/guixmld.cpp (AppWindowMaker::Invoke): Call InitCommonControls(),
1448 as prerequisite to AppWindowMaker::InitPackageListView(); follow up by
1449 calling AppWindowMaker::AdjustLayout().
1451 2012-10-07 Keith Marshall <keithmarshall@users.sourceforge.net>
1453 Add GUI initialiser hook for XML catalogue interface.
1455 * src/guimain.h (AppWindowMaker::Invoke): New public method; declare
1456 it; it overrides the generic WTK::MainWindowMaker::Invoke() method, so
1457 providing the initialiser hook which will invoke this...
1458 (AppWindowMaker::LoadPackageData): ...new private method; declare it.
1460 * src/guixmld.cpp: New file.
1461 (AppWindowMaker::Invoke): Implement it.
1462 (AppWindowMaker::LoadPackageData): Likewise.
1464 * Makefile.in (GUIMAIN_OBJECTS): Add guixmld.OBJEXT
1466 2012-09-29 Keith Marshall <keithmarshall@users.sourceforge.net>
1468 Add initial working GUI mode DMH class implementation.
1470 * src/dmh.h (DMH_SEVERITY_MASK): New manifest constant; define it.
1471 (DMH_DIGEST_MASK, DMH_COMPILE_DIGEST, DMH_DISPATCH_DIGEST): Likewise.
1472 (DMH_BEGIN_DIGEST, DMH_END_DIGEST): Redefine in terms of above.
1474 * src/dmhcore.h: New header file; it declares...
1475 (dmhTypeGeneric): ...this abstract base class, factored from...
1477 * src/dmh.cpp (dmhTypeGeneric): ...here, whence remove it; it is
1478 still required, thus include dmhcore.h so that it remains visible.
1479 (dmh_exception): Remove errant namespace qualifier from constructor.
1480 (dmhTypeGUI): Delete class declaration and original constructor.
1481 (dmh_init): Delete reference to dmhTypeGUI; replace by call to...
1482 (dmh_init_gui): ...this new static function; it is a stub which
1483 invokes a DLL import of the same name, to instantiate a dmhTypeGUI.
1484 (dmhTypeGUI::control, dmhTypeGUI::notify, dmhTypeGUI::printf): Delete
1485 original method stubs.
1487 * src/guidmh.cpp: New file; it reimplements...
1488 (dmhTypeGUI): ...this class; declare it and implement its constructor.
1489 (dmh_init_gui): Provide its DLL exported implementation.
1490 (dmhTypeGUI::dispatch_message): New private method; add it to the
1491 class declaration and implement it; it is a helper method for...
1492 (dmhTypeGUI::control, dmhTypeGUI::notify): ...these; implement them.
1493 (dmhTypeGUI::printf): Provide a replacement stub.
1495 * Makefile.in (GUIMAIN_OBJECTS): Add guidmh.OBJEXT
1497 * src/guimain.h (AppWindowMaker::Create): New method; add it to the
1498 class declaration; it overrides the default Create() method inherited
1499 from WTK::MainWindowMaker
1501 * src/pkgview.cpp (AppWindowMaker::Create): Implement it; it handles
1502 window class registration and dmhTypeGUI initialisation, in addition
1503 to the inherited CreateWindow() behaviour.
1505 * src/guimain.cpp: Include dmh.h
1506 (WinMain): Add catch block for dmh_exception. Remove window class
1507 registration request; it is now delegated to AppWindowMaker::Create()
1509 2012-09-26 Keith Marshall <keithmarshall@users.sourceforge.net>
1511 Add .hgignore as tracked file.
1513 * .hgignore: New file.
1515 2012-09-25 Keith Marshall <keithmarshall@users.sourceforge.net>
1517 Defer generation of version.c until "make" time.
1519 * version.c.in: Move it...
1520 * src/version.c.in: ...to here.
1521 (PACKAGE_NAME, PACKAGE_VERSION, COPYRIGHT_HOLDER, YEARS_OF_ISSUE):
1522 Change substitution field marker character from "@" to "%".
1524 * configure.ac (AC_CONFIG_FILES): Remove version.c
1526 * Makefile.in (TAG_SCRIPT): New macro, factored out from...
1527 (RC_SCRIPT): ...here, whence use it; also use it to implement...
1528 (VERSION_SCRIPT): ...this further new macro; use it in...
1529 (%.c): ...this generic template rule for version.c
1530 (time-stamp, %.time, %.tagged.time, %.tag): New generic build
1531 goals; use them to track package release progression via...
1532 (build.tag): ...this new intermediate; make it a pre-requisite...
1533 (guidata.OBJEXT, version.c): ...of these.
1535 2012-09-21 Keith Marshall <keithmarshall@users.sourceforge.net>
1537 Implement framework for GUI sash window layout controller.
1539 * configure.ac (AC_INIT): Bump version number to 0.6
1540 (CLI_RELEASE_CLASS): New AC_SUBST variable; default to "beta".
1541 (GUI_RELEASE_CLASS): New AC_SUBST variable; default to "alpha".
1542 (SNAPSHOT_CLASS): Recognise as user specified environent variable
1543 override for both CLI_RELEASE_CLASS and GUI_RELEASE_CLASS.
1544 (RC): New AC_CHECK_TOOL substitution variable name; it replaces...
1545 (WINDRES): ...this, as reference name for the resource compiler.
1546 (MINGW_AC_ASSERT_MISSING): Add AC_CHECK_HEADER traps for missing
1547 "lua-dev" and "wtklite-dev" support.
1549 * Makefile.in (CLI_RELEASE_CLASS, GUI_RELEASE_CLASS): Use them.
1550 (BUILD_TAG, RC_SCRIPT, RC_INCLUDES): New macros; define and use...
1551 (RC): ...with this, to implement new target rule for compiling...
1552 (%.rc): ...resource definition files to %.OBJEXT objects.
1553 (GUIMAIN_OBJECTS, GUIMAIN_LIBS): New macros; define and use...
1554 (guimain.EXEEXT): ...to implement build rule for this.
1555 (LIBEXEC_PROGRAMS): Add guimain.EXEEXT
1556 (lastrites.EXEEXT): Use GUI_LDFLAGS.
1558 * src/guimain.h src/guimain.cpp src/guidata.rc: New files.
1559 * src/pkgview.cpp: New file.
1561 2012-09-20 Keith Marshall <keithmarshall@users.sourceforge.net>
1563 Adjust incorrectly resolved 2012-09-14 merge from master.
1565 * src/Makefile.in: Restore lost reference to guistub.cpp
1567 2012-09-14 Keith Marshall <keithmarshall@users.sourceforge.net>
1569 Implement GUI hooks in "rites of passage" internal API.
1571 * src/pkglock.h: New file; it adds the pkgLock() and pkgRelease()
1572 inline wrapper functions, through which the GUI application acquires
1573 and manages an exclusive access lock for the XML catalogue.
1575 * src/rites.c (lockfile_name): Explicitly cast memory allocated for
1576 the returned name to (char *), so this may be embedded in C++ code.
1577 (pkgInitRites): Factor out lock acquisition failure diagnostics...
1578 (pkgLockFail): ...to this inline helper function; conditionally...
1579 [ifdef GUIMAIN_H]: ...provide one implementation for GUI use...
1580 [ifndef GUIMAIN_H]: ...and an alternative for CLI use.
1582 2012-09-14 Keith Marshall <keithmarshall@users.sourceforge.net>
1584 Be case agnostic when matching shortcut targets.
1586 * scripts/libexec/unlink.js [ref.TargetPath == chklink]: Apply
1587 toLowerCase() on both sides of the comparison.
1589 2012-09-12 Keith Marshall <keithmarshall@users.sourceforge.net>
1591 Note relocation of m4 when packaging source distribution.
1593 * Makefile.in (SRCDIST_SUBDIRS): Refer to build-aux/m4, not m4.
1595 2012-09-10 Keith Marshall <keithmarshall@users.sourceforge.net>
1597 Move guimain.cpp out of the way.
1599 * src/guimain.cpp: Rename file as...
1600 * src/guistub.cpp: ...this; we want to keep current features for now,
1601 but to use the guimain.cpp name for main GUI application development.
1602 * Makefile.in: Adjust references accordingly.
1604 2012-09-09 Keith Marshall <keithmarshall@users.sourceforge.net>
1606 Fix typo, and update licensing terms for embedded getopt.c
1608 * src/getopt.c: Incorporate MIT/X style licence; update copyright
1609 notice, to reflect chronology of publication; correct degenerate RCS
1610 keyword usage in EOF marker comment.
1612 2012-09-03 Keith Marshall <keithmarshall@users.sourceforge.net>
1614 Correct omission from copyright notice.
1616 * src/pkgkeys.c: Add year 2012, to reflect 2012-09-02 update.
1618 2012-09-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1620 Redefine paragraph_key with project global scope.
1622 * src/pkgkeys.h (paragraph_key): Declare it.
1623 * src/pkgkeys.c (paragraph_key): Define it.
1625 * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): Delete
1626 function local definition; use global definition instead.
1628 2012-09-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1630 Correct defect introduced by 2012-08-03 commit.
1632 * src/approot.c (AppPathNameW): Add omitted 'else', so that tail
1633 pointer isn't moved after the APPROOT prefix is truncated.
1635 2012-09-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1637 Remap Mercurial subrepository reference via local hg-git clone.
1639 * .hgsub (build-aux): Point to ../build-aux; this must be a locally
1640 hosted hg clone of the git origin repository, and it must pre-exist as
1641 a sibling of any created hg clone of the mingw-get repository.
1643 * .hgsubstate: New file, automatically generated by Mercurial.
1645 2012-08-31 Keith Marshall <keithmarshall@users.sourceforge.net>
1647 Add Mercurial subrepository reference for build-aux.
1651 2012-08-03 Keith Marshall <keithmarshall@users.sourceforge.net>
1653 More code refactoring, to facilitate GUI implementation.
1655 * src/clistub.c (AppPathNameW): Factor out; relocate to...
1656 * src/approot.c: ...this new file; it reproduces the original
1657 implementation, modified to also consider any "libexec" directory in
1658 the executable path as the first child of the APPROOT prefix. Note
1659 also, that no longer terminates APPROOT with a trailing backslash.
1661 * src/approot.h: New file; it trivially declares the prototype for...
1662 (AppPathNameW): ...this relocated extern "C" function.
1664 * src/clistub.c (main): Adapt usage of AppPathNameW(), to reinstate
1665 trailing backslash on assignment to APPROOT environment variable.
1667 * Makefile.in (CLI_EXE_OBJECTS): New macro; define it as the original
1668 set of prerequisites, with the addition of approot.OBJEXT, for...
1669 (mingw-get.EXEEXT): ...this; use it.
1671 * src/rites.c: Add comment regarding APPROOT usage.
1673 2012-08-02 Earnie Boyd <earnie@users.sourceforge.net>
1675 Find missing.m4 in build-aux/m4 directory.
1677 * aclocal.m4: Change path m4/missing.m4 to build-aux/m4/missing.m4.
1679 2012-07-31 Earnie Boyd <earnie@users.sourceforge.net>
1681 Add build-aux as a submodule.
1682 Move .cvsignore to .gitignore.
1684 * .gitmodules: New file.
1685 * build-aux: New submodule directory.
1686 * .cvsignore: Remove.
1687 * .gitignore: New file.
1689 2012-07-13 Keith Marshall <keithmarshall@users.sourceforge.net>
1691 Disable globbing of command line arguments.
1693 * src/clistub.c (_CRT_glob): Define and initialise to zero; we don't
1694 need globbing, and it may cause case transliteration of case-sensitive
1695 action keywords, when a file system entity with a case-insensitively
1696 matching name exists.
1698 2012-06-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1700 Refactor API to facilitate implementation of GUI ListView hooks.
1702 * src/pkgkeys.h (title_key, description_key): Declare them.
1703 * src/pkgkeys.c (title_key, description_key): Define them; relocate...
1704 * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): ...from here.
1705 (pkgXmlDocument::CalalogueAllPackages): New public method; factor...
1706 (pkgXmlDocument::DisplayPackageInfo): ...from here, whence use it.
1707 (pkgDirectoryViewerEngine::EnumerateComponents): New private method;
1708 implement as a concrete method of this abstract base class; factor...
1709 (pkgDirectoryViewer::Dispatch): ...from original inline implementation
1710 within this method of the concrete derived class, whence use it.
1711 (pkgDirectoryViewerEngine, pkgDirectory): Factor class declarations...
1712 * src/pkglist.h: ...into this new header file; include it.
1714 * src/pkgbase.h (pkgDirectory): Add forward class declaration.
1715 (pkgXmlDocument::CatalogueAllPackages): Declare it.
1717 2012-05-02 Keith Marshall <keithmarshall@users.sourceforge.net>
1719 Update help text to document package version selection capability.
1721 * src/clistub.c (help_text): Add description of command line syntax
1722 which may be used to specify an alternative to the default package
1723 version selection, for install and upgrade actions.
1725 2012-05-01 Keith Marshall <keithmarshall@users.sourceforge.net>
1727 Support options set by preferences assigned within profile.xml
1729 * xml/profile.xml (preferences): New element; add defaults.
1731 * src/pkgopts.h (OPTION_ASSIGNED_FLAGS, OPTION_DESKTOP_ARGS):
1732 (OPTION_START_MENU_ARGS): New enumerated constants; define them.
1733 (OPTION_DESKTOP, OPTION_START_MENU): New manifest constants.
1734 (OPTION_ASSIGNED, mark_option_as_set): New macros; define them.
1735 (pkgOpts::GetValue, pkgOpts::GetString): Restrict look-up index to
1736 least significant 12-bits of full-range index value.
1737 (pkgOpts::IsSet): New inline method; implement it.
1739 * src/clistub.c (main): Reimplement --desktop and --start-menu
1740 options; each now becomes an OPTION_GENERIC optarg string store.
1741 (set_script_hook): Function no longer used; delete it; delegate to...
1742 * src/pkgbase.h (pkgXmlDocument::EstablishPreferences): ...this new
1743 method; declare it, providing its implementation in...
1744 * src/pkgopts.cpp: ...this new file; invoke it...
1745 * src/climain.cpp (climain): ...here.
1747 * Makefile.in (CORE_DLL_OBJECTS): Add pkgopts.$OBJEXT
1749 2012-04-30 Keith Marshall <keithmarshall@users.sourceforge.net>
1751 Correct sequence of installation/removal progress reporting.
1753 * src/pkgunst.cpp (pkgRemove): Delay output of "removing package ..."
1754 message, until after pre-remove hooks have run; this ensures that any
1755 output from the pre-remove hook scripts appears in correct sequence.
1757 * src/pkginst.cpp (pkgInstall): Likewise, for "installing package ..."
1758 message, in relation to pre-install hooks.
1760 2012-04-26 Keith Marshall <keithmarshall@users.sourceforge.net>
1762 mingw-get-0.5-beta-20120426-1 released.
1764 * configure.ac (AC_INIT): Version number updated.
1765 * srcdist-doc/NEWS.in: Updated; bug-fix notifications added.
1766 * All files (r0-5-beta-20120426-1): Tag assigned.
1768 2012-04-25 Keith Marshall <keithmarshall@users.sourceforge.net>
1770 Interim work-around for MinGW-Bug #3520864.
1772 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
1773 [DEBUG_TRACE_DEPENDENCIES]: Add request flags to messages reporting
1774 the scheduling of installation activities.
1776 * src/pkgexec.cpp (pkgXmlDocument::Schedule): Add temporary diagnostic
1777 hooks to confirm request flags; bracket them with #if 0 ... #endif.
1778 [ACTION_PRIMARY && pre-scheduled request]: Don't trash request flags
1779 when updating the pre-existing action item data.
1781 2012-04-23 Keith Marshall <keithmarshall@users.sourceforge.net>
1783 Fix MinGW-Bug #3520488
1785 * src/pkgexec.cpp (action_code): Check for, and reject NULL pointer
1786 passed as action request string; also reject ambiguous abbreviations.
1788 * src/climain.cpp (climain): Discriminate between NULL pointer and
1789 other forms of invalid action keyword matching failures.
1791 2012-04-16 Keith Marshall <keithmarshall@users.sourceforge.net>
1793 mingw-get-0.5-beta-20120416-1 released.
1795 * configure.ac (AC_INIT): Version number updated.
1796 (YEARS_OF_ISSUE): 2012 added.
1798 * srcdist-doc/NEWS.in: Updated; release notes added.
1799 * All files (r0-5-beta-20120416-1): Tag assigned.
1801 2012-04-16 Keith Marshall <keithmarshall@users.sourceforge.net>
1803 Assign icon to temporary GUI executable file.
1805 * icons/pkgicon.ico: New file, shamelessly copied from synaptic.
1807 * configure.ac: Add identification for windres; propagate it to...
1808 * Makefile.in: ...here; use it to compile object from icon files...
1809 (srcdir/icons) [%.ico]: ...from this new vpath location.
1810 (gui.exe): Link to compiled icon's object file.
1811 (SRCDIST_SUBDIRS): Add icons directory.
1813 2012-04-15 Keith Marshall <keithmarshall@users.sourceforge.net>
1815 Ensure that package removal requests are correctly scheduled.
1817 * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [ACTION_REMOVE]: Schedule
1818 as a distinct case, when the installed version is not the most recent
1819 available release; consideration of this distinct case was previously
1820 erroneously overlooked.
1822 2012-04-15 Keith Marshall <keithmarshall@users.sourceforge.net>
1824 Correct scheduling of new prerequisites when upgrading.
1826 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
1827 [ACTION_UPGRADE && ACTION_PRIMARY]: Don't exclude scheduling for this
1828 case of a prerequisite with no previously installed version; it may be
1829 a delegated primary requirement of a meta-package.
1831 2012-04-15 Keith Marshall <keithmarshall@users.sourceforge.net>
1833 Don't require subsystem within user specified version bounds.
1835 * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Automatically consider
1836 "*" wild-card matches for subsystem, if user doesn't specify it.
1838 2012-04-09 Charles Wilson <mingw@cwilson.fastmail.fm>
1840 Fix missing include.
1842 * src/pkgdeps.cpp (pkgopts.h): Include unconditionally; do not rely...
1843 (debug.h) [DEBUG_TRACE_DYNAMIC]: ...on this, for indirect inclusion.
1845 2012-04-07 Keith Marshall <keithmarshall@users.sourceforge.net>
1847 Correct a srcdist package construction defect.
1849 * Makefile.in (srcdist) [for SRCDIST_SUBDIRS]: Use...
1850 (mkinstalldirs): ...this, to create package image directories.
1852 2012-04-06 Keith Marshall <keithmarshall@users.sourceforge.net>
1854 Add scripting hooks to support creation of MS-Windows shortcuts.
1856 * src/clistub.c (progname): New static variable with file scope; it
1857 replaces former automatic variable, of same name, in main() function.
1858 (set_script_hook): New static function; implement it, and call it...
1859 (main) [--desktop, --start-menu]: ...from here, to interpret these new
1860 command line options; they are propagated to scripts via...
1861 (MINGW_GET_DESKTOP_HOOK, MINGW_GET_START_MENU_HOOK): ...these new
1862 internally assigned environment variables.
1863 (help_text): Document --desktop and --start-menu.
1865 * scripts/libexec/setup.lua scripts/libexec/wsh.lua: New lua module
1866 files; they implement a lua scripting API; they delegate requests to
1867 the Windows Scripting Host, via either of this pair of...
1868 * scripts/libexec/shlink.js: ...new script to create shortcuts, or...
1869 * scripts/libexec/unlink.js: ...its complement, to remove them.
1870 * Makefile.in (SRCDIST_SUBDIRS): Integrate them; enumerate them in...
1871 (scripts_srcdir, LIBEXEC_SCRIPTS): ...these new macros; use to...
1872 (install): ...install them.
1874 2012-04-06 Keith Marshall <keithmarshall@users.sourceforge.net>
1876 Initialise $LUA_PATH to locate mingw-get specific scripts.
1878 * src/pkgexec.cpp (lua_path_init): New static inline function.
1879 (pkgXmlNode::DispatchScript): Call it on first time invocation, per...
1880 [lua_path_setup == false]: ...this static function local variable.
1882 2012-04-01 Keith Marshall <keithmarshall@users.sourceforge.net>
1884 Support installation of releases other than latest available.
1886 * src/pkgbase.h (pkgActionItem::ApplyBounds): New method; declare it.
1888 * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Implement it.
1889 (pkgXmlDocument::Schedule): Use it to interpret user specified version
1890 bounds, and apply them to scheduled action items. Having used...
1891 (get_version_bounds): ...this new static inline function...
1892 ...to acquire any user specified version bounds, check that they can
1893 be honoured, before scheduling any action; delegate diagnostics to...
1894 (dmh_notify_no_match): ...this new local helper function, to report
1895 when they can't, and to indicate viable alternatives.
1897 2012-03-26 Keith Marshall <keithmarshall@users.sourceforge.net>
1899 Rework previously inadequate solution for MinGW-Bug #3424406
1901 * src/pkgtask.h: Update copyright notice for current year.
1902 (ACTION_MAY_SELECT): New manifest constant for use as flag; define it.
1903 * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Assign it.
1905 * src/pkgdeps.cpp (STATIC_INLINE): New macro; define it.
1906 (ACTION_RECURSIVE_REINSTALL, ACTION_RECURSIVE_UPGRADE):
1907 (ACTION_RECURSIVE_REPLACE): New action code constants; define them.
1908 (with_flags): Original macro deleted; replace it with...
1909 (with_request_flags): ...this new static inline function.
1910 (if_noref, if_match, if_alias, with_download, promote): New static
1911 inline functions; they replace original macros of the same names.
1912 (is_recursive_action): Function no longer used; delete it.
1913 (action_class): New static inline function; implement and use it...
1914 (pkgXmlDocument::ResolveDependencies): ...here, to identify scheduling
1915 requirements for packages which are already installed; depends on...
1916 (request_mode): ...this new automatic variable; it augments and...
1917 (recursive_mode): ...replaces this one; rename it accordingly.
1918 (viable): Automatic variable no longer used; delete it.
1919 [DEBUG_REQUEST & DEBUG_TRACE_DEPENDENCIES]: Emit notification for
1920 scheduled installation.
1921 (pkgXmlDocument::Schedule): Add an implied...
1922 (ACTION_REMOVE): ...when scheduling a reinstallation.
1924 2012-03-13 Keith Marshall <keithmarshall@users.sourceforge.net>
1926 Address reinstallation issues per MinGW-Bugs #3416013 and #3424406
1928 * src/pkgexec.cpp (reinstall_action_scheduled): New inline function.
1929 (pkgActionItem::Execute): Use it to identify cases where...
1930 [--reinstall]: ...implicit package removal is required, and also to
1931 facilitate improved progress reporting in such cases.
1933 * src/pkgdeps.cpp (is_recursive_action): New inline function.
1934 (pkgXmlDocument::ResolveDependencies): Use it in tandem with...
1935 (recursive_mode): ...this new automatic variable, so as to handle...
1936 [meta-package dependency]: ...implicit recursion, to extend the scope
1937 of the current action to the first level of non-meta dependency.
1938 [install --reinstall]: ...reinstall original version of nominated
1939 package, ignoring any available upgrade; extend scope of operation...
1940 [install --reinstall --recursive]: ...to all prerequisite packages.
1941 [upgrade --reinstall]: ...upgrade nominated package if possible; if no
1942 upgrade available, reinstall current version; extend scope...
1943 [upgrade --reinstall --recursive]: ...to all prerequisites.
1944 (pkgXmlDocument::Schedule): Partially revert 2012-03-05 change;
1945 reimplement selectively; never promote...
1946 [install, install --reinstall]: ...these operations to become...
1947 [upgrade]: ...this, even if available; issue diagnostic instead.
1949 2012-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
1951 Rationalise implementation and usage of --all-related option.
1953 * src/pkgopts.h: Update copyright notice; add year 2012.
1954 (OPTION_RECURSIVE, OPTION_ALL_RELATED): New constants; define them.
1955 (pkgOpts::SetFlags): New method; declare and implement it inline.
1957 * src/clistub.c: Update copyright notice; add year 2012.
1958 (options) [recursive, all-related]: Redefine in terms of...
1959 (OPTION_RECURSIVE, OPTION_ALL_RELATED): ...these.
1960 (help_text): Update appropriately.
1962 * src/climain.cpp: Update copyright notice; add year 2012.
1963 (climain) [all-related]: Associate its use exclusively with...
1964 (source, licence): ...these package processing operations; use...
1965 (pkgOptions::SetFlags): ...this, to propagate its effect.
1967 2012-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
1969 Don't report failed downloads in respect of virtual packages.
1971 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Clear...
1972 [ACTION_DOWNLOAD]: ...this status flag for any package identified as
1973 a meta-package; this corrects a further regression introduced with the
1974 2011-11-09 update, whereby pending download requests for such virtual
1975 packages were not cancelled, resulting in failure to install due to
1976 failed downloads, when no download is actually required.
1978 2012-03-05 Keith Marshall <keithmarshall@users.sourceforge.net>
1980 Don't suppress implied downloads for top-level actions.
1982 * src/pkgdeps.cpp: Update copyright notice for new year.
1983 (pkgXmlDocument::Schedule) [!OPTION_PRINT_URIS]: Ensure that...
1984 [ACTION_DOWNLOAD]: ...this is enabled, when scheduling an install or
1985 an upgrade action for a package specified as a command line argument;
1986 this corrects a regression introduced on 2011-11-09, which resulted in
1987 ACTION_DOWNLOAD being enabled only for second tier dependent actions.
1989 2012-02-20 Keith Marshall <keithmarshall@users.sourceforge.net>
1991 Copyright notice updates.
1993 * Makefile.in: Add 2012 as year of republication.
1994 * src/pkgbase.h src/sysroot.cpp src/pkgexec.cpp: Likewise.
1995 * src/rites.c src/pkginst.cpp src/pkgunst.cpp: Likewise.
1997 2012-02-20 Keith Marshall <keithmarshall@users.sourceforge.net>
1999 Fix ill-advised optimisation in $APPROOT environment lookup.
2001 * src/rites.c (approot_path): Don't save result of getenv() lookup
2002 across calls; the environment may have been moved in the interim,
2003 making the original result invalid on any subsequent call. Also,
2004 prefer MS-Windows style (with backslashes) for default.
2005 (pkgLastRites): Report full path name for lastrites.exe, on execl()
2006 failure, rather than only the path relative to $APPROOT.
2008 2012-02-20 Keith Marshall <keithmarshall@users.sourceforge.net>
2010 Propagate sysroot path settings to scripts via the environment.
2012 * src/pkgbase.h (PKG_PUTENV_FLAGS_MASK): New constant; it maps...
2013 (PKG_PUTENV_DIRSEP_MSW, PKG_PUTENV_DIRSEP_POSIX): ...these flags...
2014 (PKG_PUTENV_SCAN_VARNAME, PKG_PUTENV_NAME_TOUPPER): ...and these;
2015 they are used to specify optional behavioural choices for...
2016 (pkgPutEnv): ...this new function; declare it.
2018 * src/sysroot.cpp (pkgPutEnv): Implement it.
2019 (pkgXmlDocument::LoadSystemMap): Use it to add $SUBSYSTEM_SYSROOT path
2020 specifications to the environment, for each named subsystem associated
2021 with the active system map.
2023 * src/pkgexec.cpp (pkgActionItem::Execute): Invoke pkgPutEnv() prior
2024 to processing of each package install, upgrade, or remove action, so
2025 as to update environment variable $SYSROOT to represent the sysroot
2026 path for each package processed, during execution of script hooks.
2028 2012-02-17 Keith Marshall <keithmarshall@users.sourceforge.net>
2030 Implement hooks to support lua scripting interface.
2032 * Makefile.in (LIBS): Add -llua.
2034 * src/pkgbase.h (pkgXmlNode::InvokeScript): New method; declare it
2035 as private, and provide overloaded public inline API implementation.
2036 (pkgXmlNode::DispatchScript): New private method; declare it.
2038 * src/pkgexec.cpp (pkgXmlNode::InvokeScript): Implement it.
2039 (pkgXmlNode::DispatchScript): Likewise; it directs InvokeScript to...
2040 (pkgInvokeScript): ...this new static function; implement it.
2042 * src/pkginst.cpp (pkgInstall): Call InvokeScript as appropriate.
2043 * src/pkgunst.cpp (pkgRemove): Likewise.
2045 2011-11-24 Keith Marshall <keithmarshall@users.sourceforge.net>
2047 Avoid implicit cast warnings; reported by Robert Hartmann.
2049 * src/dmh.h (DMH_BEGIN_DIGEST): Explicitly cast to uint16_t.
2050 (DMH_END_DIGEST): Likewise.
2052 2011-11-09 Keith Marshall <keithmarshall@users.sourceforge.net>
2054 Avoid unnecessary downloads for already installed packages.
2056 * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Require
2057 external scheduling of ACTION_DOWNLOAD; cancel the scheduled request
2058 on completion, or when not required due to pre-existing local copy.
2060 * src/climain.cpp (pkgActionItem::GetSourceArchive): Must always be
2061 prepared to download the associated archive; enable ACTION_DOWNLOAD.
2063 * src/pkgexec.cpp (pkgActionItem::Schedule) [OPTION_REINSTALL]:
2064 May need to download the archive, even when the requested package was
2065 previously installed; schedule ACTION_DOWNLOAD to enable this.
2067 * src/pkgdeps.cpp (promote): Macro redefined in terms of...
2068 (with_flags, with_download): ...these new macros; implement and...
2069 (pkgXmlDocument::ResolveDependencies): ...use them to enable/schedule
2070 ACTION_DOWNLOAD only when expected that it may be necessary.
2072 2011-11-06 Keith Marshall <keithmarshall@users.sourceforge.net>
2074 Fix packaging anomalies for source and licence distributions.
2076 * Makefile.in (licdist): Link README from ${CURDIR}, not from '..'.
2077 (srcdist): Explicitly link pkginfo.c from ${CURDIR} to src/pkginfo,
2078 rather than as implied prerequisite; this avoids a bogus attempt to
2079 link srcdist-doc into src/pkginfo.
2081 2011-11-06 Keith Marshall <keithmarshall@users.sourceforge.net>
2083 Bump version number for subsequent CVS snapshots.
2085 * configure.ac (AC_INIT): Set version to 0.4-alpha-1.1cvs
2087 2011-11-06 Keith Marshall <keithmarshall@users.sourceforge.net>
2089 mingw-get-0.4-mingw32-alpha-1 released.
2091 * configure.ac (AC_INIT): Adjust version number.
2092 * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed.
2093 * All files (r0-4-alpha-1): Tag assigned.
2095 2011-11-04 Keith Marshall <keithmarshall@users.sourceforge.net>
2097 Don't upgrade installed DLL components to incompatible version.
2098 Provide clearer diagnostics for failed requests on implied packages.
2100 * src/pkgdeps.cpp (is_abi_compatible): New static inline function.
2101 (pkgXmlDocument::ResolveDependencies) [is_installed]: Use it.
2102 (pkgXmlDocument::ResolveDependencies) [DEBUG_TRACE_DEPENDENCIES]:
2103 Clean up and improve diagnostic message content and formatting.
2104 (pkgXmlDocument::Schedule) [(upgrade || remove) && ! installed]:
2105 Downgrade diagnostic to WARNING, for implicitly specified component
2106 packages; provide additional explanatory diagnostics.
2108 * src/pkgspec.cpp (pkgSpecs::VersionComparator):
2109 * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit):
2110 [DEBUG_TRACE_DEPENDENCIES]: Eliminate diagnostic noise.
2112 2011-10-11 Keith Marshall <keithmarshall@users.sourceforge.net>
2114 Fix --download-only vs. --reinstall conflict.
2116 * src/pkgexec.cpp (pkgActionItem::Execute) [OPTION_DOWNLOAD_ONLY]:
2117 Test for explicit inequality, rather than equality to zero; since the
2118 2011-08-30 update, which made --download-only also imply --reinstall,
2119 it will test as non-zero when --reinstall is specified, even though
2120 --download-only is not.
2122 2011-10-07 Keith Marshall <keithmarshall@users.sourceforge.net>
2124 Add support for non-specific upgrade of all installed packages.
2126 * src/pkgbase.h (pkgXmlDocument::RescheduleInstalledPackages):
2127 New public method; declare it.
2129 * src/pkgdeps.cpp (pkgXmlDocument::RescheduleInstalledPackages):
2132 * src/climain.cpp (climain) [ACTION_UPGRADE && argc < 2]: Invoke
2133 pkgXmlDocument::RescheduleInstalledPackages() to schedule the upgrade
2134 request for all packages currently registered as installed.
2136 2011-10-06 Keith Marshall <keithmarshall@users.sourceforge.net>
2138 Implement "source" and "licence" operations.
2140 * src/pkgopts.h (OPTION_ALL_DEPS): New option code; define it.
2141 * src/clistub.c (main): Associate it with...
2142 (all-related, recursive): ...these synonymous option names...
2143 (options): ...defined within this local structured array.
2144 (help_text): Document them; also document "source" and "licence" as
2145 new operations which may be specified on the command line.
2147 * src/pkgtask.h (action_source, action_licence): Enumerate them.
2148 (ACTION_SOURCE, ACTION_LICENCE): Define their manifest values, and...
2149 * src/pkgexec.cpp (action_name): ...associate with operation names.
2151 * src/pkgbase.h (pkgActionItem::GetScheduledSourceArchives):
2152 (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive):
2153 New public methods; declare them for external implementation.
2154 (pkgXmlDocument::GetScheduledSourceArchives): New public method;
2155 implement it as inline.
2157 * src/climain.cpp (pkgProcessedArchives): New pointer to stack of...
2158 (pkgArchiveNameList): ...this new locally defined class; implement it.
2159 (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive):
2160 (pkgActionItem::GetScheduledSourceArchives): Implement them.
2161 (climain): Add invocation hooks.
2163 2011-10-04 Keith Marshall <keithmarshall@users.sourceforge.net>
2165 Establish mapping from release tarname to source tarname.
2167 * src/pkgreqs.cpp (inherited_requirement): New inline function.
2168 (requirement): Use it; adapt to propagate release archive format and
2169 compression type fields, in addition to version fields, when resolving
2170 "%" wildcard matches within the template for the resultant tarname.
2171 (pkgAssociateName): New public function; implement it for use by...
2172 * src/pkgname.cpp (pkgResolvedName): ...this new inline function.
2173 (pkgXmlNode::SourceArchiveName): Use it; adapt to accept a category
2174 selector, so it may resolve source or licence tarnames on demand.
2176 * src/pkgbase.h (pkgXmlNode::SourceArchiveName): Modify declaration;
2177 add category selector argument to support source/licence choice.
2179 2011-10-02 Keith Marshall <keithmarshall@users.sourceforge.net>
2181 Facilitate downloads using diverse cache directories.
2183 * src/pkgbase.h (pkgActionItem::DownloadSingleArchive): New private
2184 method; declare it; it handles the download for a single named archive
2185 file, and stores it in a specifed cache directory.
2187 * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Implement
2188 it; factor its code from the original implementation within...
2189 (pkgActionItem::DownloadArchiveFiles): ...this; adapt to use it.
2191 2011-10-02 Keith Marshall <keithmarshall@users.sourceforge.net>
2193 Establish cache directory for source archive downloads.
2195 * src/mkpath.h (pkgSourceArchivePath): New function; declare it.
2196 * src/mkpath.c (pkgSourceArchivePath): Implement it.
2198 2011-08-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2200 Support archive extraction to arbitrary destination without install.
2202 * src/pkgproc.h (pkgArchiveProcessor::ExtractFile): New virtual
2203 helper method for use, as core helper, by derived classes; declare it.
2204 (pkgArchiveProcessor::CreateExtractionDirectory): Likewise.
2205 (pkgTarArchiveProcessor): Declare overloaded default constructor.
2206 (pkgTarArchiveExtractor): New class definition; it is derived from
2207 pkgTarArchiveProcessor.
2209 * src/tarproc.cpp (pkgArchiveProcessor::ExtractFile): Implement it.
2210 (pkgArchiveProcessor::CreateExtractionDirectory): Likewise.
2211 (pkgTarArchiveExtractor): Implement constructor, together with...
2212 (pkgTarArchiveExtractor::ProcessDirectory): ...this method, and also...
2213 (pkgTarArchiveExtractor::ProcessDataStream): ...this one; these are
2214 declared as abstract, in the pkgTarArchiveProcessor base class.
2215 (pkgTarArchiveInstaller::ProcessDirectory): Simplify; it now delegates
2216 directory creation to pkgArchiveProcessor::CreateExtractionDirectory.
2217 (pkgTarArchiveInstaller::ProcessDataStream): Simplify; delegate file
2218 handling to pkgArchiveProcessor::ExtractFile, as appropriate.
2220 2011-08-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2222 Make --download-only and --print-uris imply --reinstall.
2224 * src/pkgopts.h (OPTION_PRINT_URIS): Adjust definition.
2225 (OPTION_DNLOAD_ONLY, OPTION_DOWNLOAD_ONLY): Likewise.
2227 2011-08-07 Keith Marshall <keithmarshall@users.sourceforge.net>
2229 Implement --download-only and --print-uris options.
2231 * src/pkgopts.h (OPTION_DOWNLOAD_ONLY, OPTION_PRINT_URIS):
2232 New manifest constants, identifying flag bits; define them.
2233 (OPTION_DNLOAD_ONLY): Likewise; an alias for OPTION_DOWNLOAD_ONLY.
2235 * src/pkgbase.h (pkgActionItem::PrintURI): New private method.
2236 * src/pkginet.cpp: Implement it.
2238 * src/clistub.c (options): Add "download-only" and "print-uris".
2239 (help_text): Document them.
2240 * src/pkgexec.cpp (pkgActionItem::Execute): Process them.
2242 2011-07-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2244 mingw-get-0.3-mingw32-alpha-2.1 released.
2246 * configure.ac (AC_INIT): Adjust version number.
2247 * srcdist-doc/NEWS.in: Updated; document bugs fixed.
2248 * All files (r0-3-alpha-2-1): Tag assigned.
2250 2011-07-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2252 Adopt tar.xz as default package archive format.
2254 * Makefile.in (TARZIP, TAREXT): New macros; define them.
2255 (bindist, licdist, srcdist): Use them in place of hardcoded tar.gz
2256 (maintainer-clean): Expunge tar files of any compression format.
2258 2011-07-27 Keith Marshall <keithmarshall@users.sourceforge.net>
2260 Correct handling of release status in requirements specifications.
2262 * src/debug.h (DEBUG_TRACE_DEPENDENCIES): New tracing hook; define it.
2263 * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Use it; add
2264 function entry/exit tracing report hooks.
2265 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Likewise;
2266 also add internal trace point reporting, which may also require...
2267 (show_required): ...this new static inline DEBUG_INVOKED function.
2269 * src/pkgreqs.cpp (requirement): Propagate release status and release
2270 reference index fields from requirer, when package version requirement
2271 is specified by a '%' token, and no explicit release status override
2272 is included in the requirement specification.
2274 * src/pkgspec.cpp (is_wildcard_spec): New static inline helper.
2275 (pkgSpecs::VersionComparator): Use it to identify any package version
2276 specification which may require the extension of a wildcard match, to
2277 span the package version and release status fields; also add tracing
2278 hooks, triggered on DEBUG_TRACE_DEPENDENCIES, to facilitate debugging.
2280 2011-06-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2282 Avoid accidental RCS keyword substitutions.
2284 * Makefile.in (DOLLAR): New macro; define it.
2285 (readme.txt, readme.txt.in): Use it, where unexpanded RCS Id keyword
2286 matching is intended.
2288 2011-06-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2290 Mercurial support revisited.
2292 * .cvsignore (.hgtags): Add to CVS untracked list.
2294 2011-06-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2296 Update readme.txt ID tag-line to track NEWS rather than README.
2298 * Makefile.in (readme.txt.in): New rule; implement it.
2299 (readme.txt.tag): Likewise; this implements the tag-line tracking.
2300 (readme.txt): Rule redefined in terms of the preceding pair.
2302 2011-06-17 Keith Marshall <keithmarshall@users.sourceforge.net>
2304 mingw-get-0.3-mingw32-alpha-2 released.
2306 * configure.ac (AC_INIT): Adjust version number.
2307 * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed.
2308 * All files (r0-3-alpha-2): Tag assigned.
2310 2011-06-15 Keith Marshall <keithmarshall@users.sourceforge.net>
2312 Add internal documentation for --reinstall option.
2314 * src/clistub.c (help_text): Add description for "--reinstall".
2316 2011-06-14 Keith Marshall <keithmarshall@users.sourceforge.net>
2318 Support use of Mercurial within a CVS working copy.
2320 * .cvsignore (.hg, .hgignore): Don't have CVS track these.
2322 2011-06-13 Keith Marshall <keithmarshall@users.sourceforge.net>
2324 Implement --reinstall option.
2326 * src/pkgopts.h (OPTION_REINSTALL): New macro; define it.
2327 (OPTION_GENERIC, OPTION_SHIFT_MASK): Likewise.
2328 (OPTION_EXTRA_FLAGS): New field; declare it.
2330 * src/clistub.c (options): Add "reinstall".
2331 (OPTION_GENERIC): Use it where appropriate; within its scope...
2332 (OPTION_STORAGE_CLASS): Improve descriptive comments; add handling for
2333 default case of flag type options requiring an alignment shift.
2335 * src/pkgexec.cpp: Remove previous "always reinstall" kludge.
2336 (pkgOptionSelected, PKG_OPTION_REINSTALL): Remove obsolete macros.
2337 (pkgActionItem::Execute): Check for "upgrade" request on any package
2338 which is already up to date; report this state, otherwise...
2339 [OPTION_REINSTALL || ACTION_UPGRADE]: Mark package as "removed", to
2340 avoid bail-out on "package already installed", when calling...
2341 (pkgInstall): ...this.
2343 2011-06-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2345 Don't require -vv to report progress of update operation.
2347 * src/pkgbind.cpp (pkgRepository::GetPackageList): Eliminate all
2348 basename() calls; `dname' already tells us what it should return.
2349 [update]: Report progress, irrespective of verbosity setting.
2351 2011-06-11 Keith Marshall <keithmarshall@users.sourceforge.net>
2353 Fix MinGW-Bug #3313806.
2355 * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Do not match them within the
2356 PACKAGE_NAME field; this avoids misinterpretation as a release status
2357 qualifier when intended as part of the package name, as in msys-cvs.
2359 2011-06-07 Keith Marshall <keithmarshall@users.sourceforge.net>
2361 Provisional correction for MinGW-Bug #3309438.
2363 * src/debug.h [DEBUGLEVEL == 0]: Provide defaults for...
2364 (DEBUG_ENABLED, DEBUG_REQUEST): ...these macros.
2366 * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory):
2367 (pkgTarArchiveInstaller::ProcessDataStream): Use DEBUG_REQUEST to
2368 enable runtime trace activation for previous compile time choices.
2370 2011-05-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2372 mingw-get-0.3-mingw32-alpha-1 released.
2374 * configure.ac (AC_INIT): Adjust version number.
2375 * srcdist-doc/NEWS.in: Updated; document new features.
2376 * All files (r0-3-alpha-1): Tag assigned.
2378 2011-05-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2380 Support assignment of DEBUGLEVEL at configure time.
2382 * configure.ac (DEBUGLEVEL): Declare as a precious variable, using
2383 AC_ARG_VAR; also declare with AC_SUBST, to ensure it is initialised.
2385 * Makefile.in (DEBUGLEVEL): Let AC_SUBST assign it.
2387 2011-05-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2389 Work around bugs in MinGW and GNU getopt_long_only() implementations.
2391 * src/getopt.c: New file; this is a free-standing replacement for any
2392 implementation provided by system libraries. We will always use this
2393 to ensure correct operation irrespective of system bugs; (different
2394 bug manifestations have been identified in the stock MinGW and GNU
2397 * Makefile.in (mingw-get.EXEEXT): Use it.
2399 * src/clistub.c (options): Remove redundant declaration of `-v' as a
2402 2011-05-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2404 Implement user selection of traceable features at run-time.
2406 * src.pkgopts.h (OPTION_VERBOSE_MAX): New macro; define it.
2408 * src/debug.h (DEBUG_ENABLED): New macro; define it.
2409 (DEBUG_REQUEST, DEBUG_REQUEST_FLAGS, DEBUG_TRACE_DYNAMIC): Likewise.
2411 * src/clistub.c (main) [--trace]: Don't make it available unless...
2412 [DEBUG_ENABLED(DEBUG_TRACE_DYNAMIC)]: ...this is set (at compile-time).
2413 [--verbose]: Limit to OPTION_VERBOSE_MAX, using...
2414 (atmost): ...this new macro; define it.
2415 (options): Declare `-v' as both long and short form, pending bug fix
2416 in MinGW's getopt_long_only() implementation.
2418 * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use DEBUG_REQUEST.
2419 (pkgInternetLzmaStreamingAgent::TransferData): Likewise.
2420 (pkgInternetStreamingAgent::TransferData): Likewise.
2421 (pkgInternetStreamingAgent::Get): Likewise.
2423 * src/pkgunst.cpp (pkgActionItem::SetAuthorities): Use DEBUG_REQUEST.
2424 (pkg_rmdir, pkg_unlink): Likewise.
2426 * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use DEBUG_REQUEST.
2428 2011-05-21 Keith Marshall <keithmarshall@users.sourceforge.net>
2430 Implement protocol for processing global program options.
2432 * src/pkgopts.h: New file.
2434 * src/climain.cpp (cli_setopts): New function; implement it.
2435 (pkgOptions): Likewise.
2437 * src/clistub.c (xatoi): New function; implement it.
2438 (cli_setargv): New inline helper function; implement it.
2439 (main): Use it. Also incorporate implementation of...
2440 (parsed_options): New structure; it accommodates...
2441 (verbose, trace): New options; interpret them, and...
2442 (help_text): ...document them.
2444 * src/pkgbind.cpp (pkgRepository::GetPackageList): Make catalogue
2445 loading notifications and progress reports conditional on...
2446 [OPTION_VERBOSE > 1]: ...this.
2448 2011-05-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2450 Augment known development status keywords and accept CMS labels.
2452 * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Define new provisional list;
2453 add transitional state scanner rule and code to interpret them.
2454 (STATUS_KEYWORDS): Add "pre" and "rc" to existing list; modify scanner
2455 code to maintain consistency with CMS_KEYWORDS processing; also extend
2456 this coding strategy to other rules.
2458 * src/pkginfo/driver.c (spec): Strip initial '$' token from displayed
2459 field values; (we expect it only for a CMS_KEYWORDS field value).
2461 * src/pkgreqs.cpp (pkgSpecs::GetTarName): Remove any initial '$' token
2462 from PACKAGE_RELEASE_STATUS field, when performing reverse of tarname
2463 decomposition transformation.
2465 2011-05-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2467 Correct omission from 2011-02-18 commit.
2469 * src/tarproc.cpp (Copyright Notice): Add 2011 as year of release.
2471 2011-05-14 Keith Marshall <keithmarshall@users.sourceforge.net>
2473 mingw-get-0.2-mingw32-alpha-4 released.
2475 * configure.ac (AC_INIT): Adjust version number.
2476 * srcdist-doc/NEWS.in: Updated; add bug-fix/feature descriptions.
2477 * All files (r0-2-alpha-4): Tag assigned.
2479 2011-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2481 Fix MinGW-Bug #3297660 (reported by Chris Sutcliffe).
2483 * src/pkgbase.h (pkgActionItem::SetAuthorities): Return unsigned long.
2484 (pkgActionItem::HasAttribute): New inline method; implement it.
2486 * src/pkgtask.h (ACTION_DOWNLOAD, ACTION_DOWNLOAD_OK): New macros.
2488 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles):
2489 [ACTION_DOWNLOAD]: Assert it at commencement of each package download;
2490 clear it again, on successful download completion.
2492 * src/pkginst.cpp (pkgtask.h): #include it.
2493 (pkgInstall) [ACTION_DOWNLOAD]: Don't proceed with installation when
2494 set; this indicates failed download; diagnose it.
2496 * src/pkgunst.cpp (pkgRemove) [ACTION_DOWNLOAD && ACTION_UPGRADE]:
2497 Don't proceed with pre-emptive removal when both set; this indicates
2498 failed download of replacement package; diagnose it.
2500 2011-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2502 Fix MinGW-Bug #3295526 (reported by Charles Wilson).
2504 * src/pkgunst.cpp (sys/stat.h): #include it; we need it for...
2505 (pkg_unlink): ...chmod( file, S_IWRITE ), emulating `rm -f' semantics.
2507 2011-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2509 Diagnose and aggressively retry failed download connections.
2511 * src/debug.h (DEBUG_TRACE_INTERNET_REQUESTS): New macro; define it.
2513 * src/pkginet.cpp (debug.h): #include it.
2514 (pkgDownloadMeter): New abstract class; declare it and implement its
2515 default (non-abstract) data and methods; derive...
2516 (pkgDownloadMeterTTY): ...this new class from it; implement it...
2517 (pkgInternetStreamingAgent::Get): ...and instantiate it (naively for
2518 now), as associated pkgDownloadMeter object; add tracing diagnostic.
2519 (pkgInternetAgent::OpenURL): Don't inline it; move implementation out
2520 of line; add retry loops to aggressively retry failed connections.
2521 (pkgInternetAgent::QueryContentLength): New method; implement it.
2522 (pkgInternetStreamingAgent::TransferData): Avoid Microsoft specific
2523 data type `DWORD'; prefer equivalent standard `unsigned long'. Add
2524 tracing diagnostic. Remove progress diagnostic; replace it with an
2525 `Update' request to associated pkgDownloadMeter.
2526 (pkgInternetLzmaStreamingAgent::GetRawData): Avoid `DWORD' data type.
2527 (pkgInternetLzmaStreamingAgent::TransferData): Likewise; add tracing
2528 diagnostic on failure.
2530 2011-03-31 Keith Marshall <keithmarshall@users.sourceforge.net>
2532 mingw-get-0.2-mingw32-alpha-3 released.
2534 * configure.ac (AC_INIT): Adjust version number.
2535 * srcdist-doc/NEWS.in: Updated; add bug-fix description.
2536 * All files (r0-2-alpha-3): Tag assigned.
2538 2011-03-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2540 Provisional handling for http proxy authentication.
2541 (Adapted from patch by Scott Michel <pingbak@users.sourceforge.net>)
2542 (ref: MinGW-Patch #3158453)
2544 * src/pkginet.cpp: Several format/layout adjustments; add comments.
2545 Eliminate several instances of Microsoft specific typedef nastiness.
2546 (dmh_dialogue_context): New macro; kludge definition to support...
2547 (pkgInternetAgent::OpenURL) [HTTP_STATUS_PROXY_AUTH_REQ]: Detect
2550 2011-03-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2552 Expand macros in path names for files and directories to be removed.
2554 * src/pkgunst.cpp (pkgRemove): Format sysroot as a template, so...
2555 (pkg_rmdir, pkg_unlink): ...are able to use mkpath() to construct the
2556 full path name for each file or directory to be removed.
2558 2011-03-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2560 Correct defective activation logic for some debugging hooks.
2562 * src/pkgunst.cpp (pkg_rmdir, pkg_unlink) [DEBUG_INVOKE_IF]:
2563 (pkgActionItem::SetAuthorities) [DEBUG_INVOKE_IF]: Use bit-wise `&'
2564 operator, not `&&', to evaluate DEBUGLEVEL state.
2566 2011-03-22 Keith Marshall <keithmarshall@users.sourceforge.net>
2568 Avoid Unicode hyphens in generated ASCII document files.
2570 * Makefile.in (NROFF): New macro; define it to invoke `nroff -Tascii'.
2571 (%.dist, readme.txt): Use it to ensure that output is pure ASCII.
2573 2011-03-15 Keith Marshall <keithmarshall@users.sourceforge.net>
2575 mingw-get-0.2-mingw32-alpha-2 released.
2577 * configure.ac (AC_INIT): Adjust version number.
2578 * srcdist-doc/NEWS.in: Updated; add bug-fix description.
2579 * All files (r0-2-alpha-2): Tag assigned.
2581 2011-03-15 Keith Marshall <keithmarshall@users.sourceforge.net>
2583 Fix MinGW-Bug 3212246.
2585 * src/keyword.c (has_keyword): Avoid incrementing the comparison
2586 pointers when a significant character in one string is not matched in
2587 the other; previously the pointers were left pointing one character to
2588 the right of the mismatch, and this was overlooked if the mismatch
2589 occurred at the rightmost character in both strings.
2591 2011-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2593 mingw-get-0.2-mingw32-alpha-1 released.
2595 * configure.ac (AC_INIT): Set version number; correct capitalisation
2596 in URI reference to bug reporting instructions.
2598 * srcdist-doc/NEWS.in: Confirm release date.
2599 [bug reporting]: Remove redundant paragraph; the information is
2600 provided, via reference to mingw.org. in the README and INSTALL files.
2602 * All files (r0-2-alpha-1): Tag assigned.
2604 2011-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
2606 * srcdist-doc/INSTALL.in [building]: Qualify liblzma.a requirement;
2607 add earliest acceptable snapshot release date.
2609 2011-03-11 Keith Marshall <keithmarshall@users.sourceforge.net>
2611 Remove unused 7zip and boost source code from CVS trunk.
2613 * 7z: Directory and all content removed.
2616 2011-03-11 Keith Marshall <keithmarshall@users.sourceforge.net>
2618 Refactor and update existing installation and usage instructions.
2620 * src/clistub.c (help_text): Updated.
2622 * srcdist-doc: New directory.
2624 * README: Deleted; its content refactored into...
2625 * srcdist-doc/README.in srcdist-doc/INSTALL.in srcdist-doc/NEWS.in:
2626 ...these new template files, updated for current development state.
2628 * srcdist-doc/gendoc.sed.in: New sed script; it directs formatting of
2629 generated text files derived from the srcdist-doc templates.
2631 * Makefile.in (SRCDIST_SUBDIRS): Add srcdist-doc.
2632 (SRCDIST_FILES): Add NEWS and INSTALL.
2633 (srcdist-doc): New build rule to generate README, NEWS and INSTALL.
2634 (srcdist, licdist): Adjust path to locate them.
2635 (readme.txt): New build rule to generate on-line package description.
2637 (distclean): Don't remove Makefile...
2638 (maintainer-clean): ...but do it here instead. Also remove generated
2639 README, NEWS and INSTALL, the autom4te cache, and all distributable
2640 zip files, in addition to tarballs, for the current version.
2642 2011-02-27 Keith Marshall <keithmarshall@users.sourceforge.net>
2644 Initial implementation for "remove" feature.
2646 * src/pkgbase.h: Update copyright notice; add current year.
2647 (pkgActionItem::SetPrimary): New inline public method; declare it.
2648 (pkgActionItem::SetAuthorities): New public method; declare it.
2650 * src/pkgtask.h (ACTION_PREFLIGHT, ACTION_REMOVE_OK): New defines.
2652 * src/pkgproc.h: Update copyright notice; add current year.
2653 (pkgManifest::GetSysRootReference): New public method; declare it.
2654 (pkgManifest::GetRoot): New inline method; declare and implement it.
2655 (pkgManifest::DetachSysRoot): Argument type changed to const char*.
2656 (pkgRemove): New extern "C" function; declare it.
2658 * src/pkgexec.cpp (pkgActionItem::SetPrimary): Implement it, and...
2659 (pkgXmlDocument::Schedule): ...use it to promote actions on all user
2660 specified packages, as listed on the command line, to primary status.
2661 (pkgActionItem::Execute): Repeatedly invoke...
2662 (pkgActionItem::SetAuthorities): ...this; incorporate call of...
2663 (pkgActionItem::DownloadArchiveFiles): ...this, within the loop, so
2664 that we retry failed downloads at least a second time.
2665 [ACTION_REMOVE]: Delete stub; invoke pkgRemove().
2667 * src/pkgunst.cpp: New file.
2668 (pkgActionItem::SetAuthorities): Implement it.
2669 (pkgManifest::GetSysRootReference): Implement it.
2670 (pkgManifest::DetachSysRoot): Implement it per new declaration.
2671 (pkgRemove): Implement it.
2673 * Makefile.in (CORE_DLL_OBJECTS): Add pkgunst.OBJEXT
2675 2011-02-26 Keith Marshall <keithmarshall@users.sourceforge.net>
2677 Work-around for improper stderr buffering in MSYS mintty and rxvt.
2678 (Merged from r0-1-alpha-5 branch).
2680 * src/dmh.cpp (dmhTypeTTY::emit_and_flush): New private method.
2681 (dmhTypeTTY::printf, dmhTypeTTY::notify): Use it to force an fflush()
2682 after each output record is written to stderr.
2684 * README: Update as appropriate.
2686 2011-02-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2688 Tidy up some debugging hooks.
2690 * src/debug.h (DEBUG_INVOKED): New macro; define it.
2691 (DEBUG_INVOKE_IF): Likewise; this takes arguments providing for
2692 conditional invocation of code when DEBUGLEVEL is non-zero; make it
2693 expand to nothing, when DEBUGLEVEL is zero.
2694 (DEBUG_TRACE_INIT): Redefined macro; value changed to 0x0010.
2695 (DEBUG_TRACE_TRANSACTIONS, DEBUG_SUPPRESS_INSTALLATION):
2696 (DEBUG_UPDATE_INVENTORY): New macros; define them.
2698 * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory):
2699 (pkgTarArchiveInstaller::ProcessDataStream): Refactor debugging hooks;
2700 implement them in terms of DEBUGLEVEL, with reference to...
2701 (DEBUG_SUPPRESS_INSTALLATION, DEBUG_UPDATE_INVENTORY): ...these.
2703 2011-02-15 Keith Marshall <keithmarshall@users.sourceforge.net>
2705 Make package version comparisons more robust.
2707 Fixes an issue reported by Chris Sutcliffe: previously, version
2708 comparisons were evaluated solely on the basis of differences in the
2709 package version field itself. Henceforth, if this field compares as
2710 equal, then the comparison is extended to also consider differences
2711 between development phase qualifiers, and, if these too compare as
2712 equal, to differences in the target subsystem version fields.
2714 * src/pkginfo/pkginfo.h (pkgSpecs::VersionComparator): New private
2717 * src/pkgspec.cpp (pkgSpecs::VersionComparator): Implement it.
2718 (pkgSpecs::operator<, pkgSpecs::operator<=, pkgSpecs::operator>=):
2719 (pkgSpecs::operator>): Use it, replacing...
2720 (version): ...this static function; now unreferenced; delete it.
2722 * src/vercmp.h (pkgVersionInfo::pkgVersionInfo): Make it inline; it
2723 now delegates the entire class construction operation to...
2724 (pkgVersionInfo::Parse): ...this new private method; declare it. This
2725 is also used to facilitate implementation of...
2726 (pkgVersionInfo::Reset): ...this new inline method, also requiring...
2727 (pkgVersionInfo::FreeAll): ...this new inline method; also now used by
2728 the class destructor, it encapsulates separate calls to...
2729 (pkgVersionInfo::Free): ...this original inline method, renamed...
2730 (pkgVersionInfo::FreeEntry): ...as this.
2732 * src/vercmp.cpp (pkgVersionInfo::Parse): Implement it.
2734 2011-02-13 Keith Marshall <keithmarshall@users.sourceforge.net>
2736 Merge from mingw-get-0.1-mingw32-alpha-5 bug-fix branch.
2738 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Promote
2739 "install" action on new prerequisites, where a previously uninstalled
2740 package is required to satisfy any "upgrade" dependency.
2742 * src/pkgexec.cpp (pkgActionList::Execute): Don't make misleading
2743 claims concerning package removal.
2745 * src/pkgtask.h (STRICTLY_GT, STRICTLY_LT, ACTION_PRIMARY): Add one
2746 level of parentheses around defining expressions.
2748 2011-02-10 Keith Marshall <keithmarshall@users.sourceforge.net>
2750 Publish mingw-get-0.0-mingw32-alpha-5.1 bug-fix release.
2752 * README: Updated to reflect changes.
2754 2011-02-08 Keith Marshall <keithmarshall@users.sourceforge.net>
2756 Improve diagnostics for failed GUI invocation.
2758 * src/guimain.cpp: New file; currently delivers only a diagnostic
2759 stub, provided by Sze Howe Koh <axfangli@users.sourceforge.net>, to
2760 pop-up a message block explaining why GUI mode cannot be invoked.
2762 * Makefile.in (GUI_LDFLAGS): New macro; it is required by...
2763 (gui$EXEEXT): ...this new build rule; add to prerequisites of...
2764 (all): ...this [default] build rule; redefine this in terms of...
2765 (BIN_PROGRAMS, LIBEXEC_PROGRAMS, LIBEXEC_DATA): ...these new macros;
2766 define them, and also use them as loop iterator objectives for...
2767 (install, install_strip): ...these; also schedule them...
2768 (clean): ...for removal by this.
2770 * src/clistub.c (Copyright): Add new year.
2771 (main): Amend error message, if gui$EXEEXT doesn't start; make it
2772 more intelligible to normal users.
2774 2011-02-07 Keith Marshall <keithmarshall@users.sourceforge.net>
2776 Correct omissions from packaged source tarball.
2778 * Makefile.in (Copyright): Add new year.
2779 (SRCDIST_FILES): Add aclocal.m4
2780 (SRCDIST_SUBDIRS): Add m4
2782 2011-01-05 Keith Marshall <keithmarshall@users.sourceforge.net>
2784 Reduce path names to base names, in some diagnostic message contexts.
2786 * src/climain.cpp: Update copyright notice for new year.
2787 (climain): Extract base name from argv[0], to pass as program name tag
2788 in initialisation of diagnostic message handler.
2790 * src/dmh.h, src/dmh.cpp: Update copyright notices; make some layout
2791 adjustments, for more consistent formatting style.
2793 * src/pkgbind.cpp: Update copyright notice.
2794 (pkgRepository::GetPackageList): Reduce path names for catalogue files
2795 to their base names, when reporting them in diagnostic messages.
2797 2011-01-05 Keith Marshall <keithmarshall@users.sourceforge.net>
2799 Avoid a potential out-of-range action name look-up.
2801 * src/pkgdeps.cpp: Update copyright notice for new year.
2802 (pkgXmlDocument::Schedule): Mask action code with ACTION_MASK, to
2803 determine correct action name when diagnosing uninstalled package.
2805 2011-01-03 Keith Marshall <keithmarshall@users.sourceforge.net>
2807 Make "install" and "remove" notifications symmetric.
2809 * configure.ac (AC_INIT): Bump version to "0.1-alpha-6cvs".
2810 (YEARS_OF_ISSUE): Add new year.
2812 * src/pkginst.cpp: Update copyright notice for new year.
2813 (pkgInstall): Add notification for package being installed.
2815 2010-12-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2817 Add preliminary CLI support for "list" and "show" actions.
2819 * src/pkgtask.h (ACTION_PRIMARY): New manifest constant; define it.
2820 (ACTION_LIST, ACTION_SHOW): Likewise; cast to enumerated values for...
2821 (action_list, action_show): ...these; define them.
2823 * src/pkgexec.cpp (action_name): Add defining text for...
2824 (action_list, action_show): ...these.
2826 * src/climain.cpp: Partially revert 2010-11-01 change...
2827 (climain) [! ACTION_UPDATE]: Reinstate original "if" block, moving
2828 the "switch" block within it, but without the ACTION_UPDATE case.
2829 [ACTION_LIST, ACTION_SHOW]: New "switch" cases; they invoke...
2830 (pkgXmlDocument::DisplayPackageInfo): ...this new method.
2832 * src/pkgbase.h (pkgXmlDocument::DisplayPackageInfo): Declare it.
2833 (pkgActionItem::ConfirmInstallationStatus): New method; declare it.
2834 (pkgXmlNode::GetSysRoot): Make declaration style consistent with
2835 others in the class; do not name arguments in the declaration.
2836 (pkgXmlNode::FindFirstAssociate): Likewise.
2837 (pkgXmlNode::FindNextAssociate): Likewise.
2839 * src/pkgshow.cpp: New file.
2840 (pkgXmlDocument::DisplayPackageInfo): Implement it.
2842 * src/pkgdeps.cpp (pkgMsgUnknownPackage): New extern "C" function;
2843 implement it temporarily, pending a future i18n reimplementation.
2844 (assert_installed): Drop "inline" attribute; leave it as "static".
2845 Set "tarname" correctly, to match the installed package version; (it
2846 previously incorrectly returned the latest available version).
2847 (pkgActionItem::ConfirmInstallationStatus): Implement it.
2848 (pkgXmlDocument::Schedule) [ACTION_PRIMARY]: Set as appropriate.
2849 (pkgXmlDocument::Schedule) [ACTION_REMOVE || ACTION_UPGRADE]: Complain
2850 if requested package is not recorded as having been installed.
2851 (pkgXmlDocument::ResolveDependencies) [! ACTION_INSTALL]: Do not
2852 invoke it recursively.
2854 * Makefile.in (pkgshow.$OBJEXT): Add reference.
2856 2010-11-01 Keith Marshall <keithmarshall@users.sourceforge.net>
2858 Lay groundwork for implentation of additional actions.
2860 * src/climain.cpp (climain): Adjust indentation; replace `if' block...
2861 [action != ACTION_UPDATE]: ...with this default `switch' case, and...
2862 [action == ACTION_UPDATE]: ...this as explicit "do nothing" case.
2864 2010-10-29 Keith Marshall <keithmarshall@users.sourceforge.net>
2866 mingw-get-0.1-mingw32-alpha-5 released.
2868 * configure.ac (AC_INIT): Bump version to 0.1-alpha-5.
2869 * README: Update release notes accordingly.
2870 * All files (r0-1-alpha-5): Tag assigned.
2872 2010-10-22 Keith Marshall <keithmarshall@users.sourceforge.net>
2874 Make pkgInitRites/pkgLastRites processing more robust;
2875 avoid a potential race condition in mingw-get-inst.
2877 * src/rites.c: Refactor conditional code to segregate execution of...
2878 [defined IMPLEMENT_INITIATION_RITES]: ...this into distinct phases.
2879 (PHASE_ONE_RITES, PHASE_TWO_RITES): Define constants to identify them.
2880 (do_init_rites): Renamed to...
2881 (invoke_rites): ...this; inline it.
2882 (pkgLastRites): Invoke it, to pre-empt rename action of...
2883 (lastrites.exe): ...this, subsequently exec()ed process.
2884 (perror): Issue more informative diagnostic on exec() failure.
2886 * src/clistub.c (IMPLEMENT_INITIATION_RITES): Stipulate as...
2887 (PHASE_ONE_RITES): ...this phase of implementation only.
2889 * src/pkgexec.cpp (IMPLEMENT_INITIATION_RITES): Define to provide...
2890 (PHASE_TWO_RITES): ...this phase of implementation, facilitated by...
2891 (self_upgrade_rites): ...this locally defined RITES_INLINE function.
2892 (pkgActionItem::Execute): Invoke it, in remove/install loop, while...
2893 [init_rites_pending]: ...new loop local variable remains true.
2895 2010-09-10 Charles Wilson <mingw@cwilson.fastmail.fm>
2897 Fix packaging bug in -lic package.
2899 * Makefile.in (licdist): Use directory named
2900 "share", not "shared".
2902 2010-09-10 Charles Wilson <mingw@cwilson.fastmail.fm>
2904 mingw-get-0.1-mingw32-alpha-4 released.
2906 * All files (r0-1-alpha-4): Tag assigned.
2908 2010-09-10 Charles Wilson <mingw@cwilson.fastmail.fm>
2910 Add rudimentary help option.
2912 * README: Update release notes.
2914 * src/clistub.c: Add --help option.
2916 2010-09-10 Charles Wilson <mingw@cwilson.fastmail.fm>
2918 Fix "mingw-get deletes itself" bug in last rites handling.
2920 * README: Add new release notes.
2922 * configure.ac: Bump version to 0.1-alpha-4.
2924 * src/dmh.h: If __cplusplus, include <exception> and
2925 declare dmh_exception class.
2927 * src/dmh.cpp (class dmh_exception): Implement.
2928 (abort_if_fatal): If DMH_FATAL, throw dmh_exception rather
2929 than calling exit().
2931 * src/climain.cpp (climain): Wrap entire function body in try/
2932 catch block. If dmh_exception is caught, return EXIT_FAILURE.
2934 * src/clistub.c (main): Capture return value of climain(). If
2935 non-zero, perform last rites and return EXIT_FAILURE.
2937 2010-08-30 Keith Marshall <keithmarshall@users.sourceforge.net>
2939 mingw-get-0.1-mingw32-alpha-3 released.
2941 * README: Add new release notes.
2943 * All files (r0-1-alpha-3): Tag assigned.
2945 2010-08-27 Keith Marshall <keithmarshall@users.sourceforge.net>
2947 Add runtime hooks to support self-upgrade for future releases.
2949 * src/rites.c: New file; compile it free-standing, to provide...
2950 (lastrites.exe): ...this helper application for context clean-up;
2951 alternatively, use it as an include file, with pre-definition of...
2952 (IMPLEMENT_INITIATION_RITES): ...this, to implement...
2953 (pkgInitRites, pkgLastRites): ...these inline functions.
2955 * src/clistub.c (main) [argc > 1]: Use them.
2956 (progname): New local variable within `main'; set it once, then use it
2957 instead of repeated references to `basename(*argv)' in diagnostics.
2958 (MINGW_GET_DLL, MINGW_GET_GUI): Relocate to `src/rites.c'.
2960 * src/debug.h (DEBUG_INHIBIT_RITES_OF_PASSAGE):
2961 (DEBUG_FAIL_FILE_RENAME_RITE, DEBUG_FAIL_FILE_UNLINK_RITE): New
2962 defines; they facilitate debugging of the src/rites.c code.
2964 * Makefile.in (lastrites$EXEEXT): New target; build as prerequisite...
2965 (all): ...of this primary target.
2966 (install, install-strip): Install it.
2967 (SRCDIST_FILES): Remove install-sh; it is now included in...
2968 (build-aux): ...this directory; add it to...
2969 (SRCDIST_SUBDIRS): ...this.
2971 2010-08-24 Keith Marshall <keithmarshall@users.sourceforge.net>
2973 Set default sysroots relative to mingw-get installation directory.
2975 * xml/profile.xml (system-map) [name == default]: For each of...
2976 [subsystem == mingw32]: ...set sysroot path to value of %R macro...
2977 [subsystem == msys]: ...and to its %R/msys/1.0 subdirectory.
2979 2010-08-19 Keith Marshall <keithmarshall@users.sourceforge.net>
2981 Some dependency resolver enhancements and bug fixes.
2983 * src/pkgbase.h (pkgXmlNode::GetContainerAttribute): New method;
2986 * src/pkgdeps.cpp (pkgXmlNode::GetContainerAttribute): Implement it;
2987 it is used to retrieve package name attributes from the containing
2988 'package' element, when given a pointer to a 'release' element by...
2989 (assert_unmatched, assert_installed): ...these new static functions.
2990 (pkgXmlDocument::Schedule): Use them to reconstruct and register
2991 dependency reference data for previously installed packages which are
2992 no longer included in the distribution manifest.
2993 (pkgXmlDocument::ResolveDependencies): Fix a block nesting error;
2994 catch and diagnose unresolved dependencies; don't look beyond the XML
2995 document root node, (tinyxml error not caught?), when searching for
2996 requirements specified on container nodes.
2998 2010-08-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3000 Improve scheduling of package processing requests.
3002 * src/pkgexec.cpp (pkgXmlDocument::Schedule): Inspect entire `actions'
3003 list, when checking for duplicate package processing requests; decline
3004 to schedule any such duplicate, or any request which lacks a package
3007 2010-08-15 Keith Marshall <keithmarshall@users.sourceforge.net>
3009 Lay foundation for selective compilation of debugging code.
3011 * src/debug.h: New file...
3012 * src/sysroot.cpp: Include it.
3013 (pkgXmlDocument::LoadSystemMap): Make debugging output conditional...
3014 [DEBUGLEVEL & DEBUG_TRACE_INIT]: ...on this new debugging state.
3016 2010-08-15 Keith Marshall <keithmarshall@users.sourceforge.net>
3018 * src/pkgkeys.h: Typo in comment: file was previously identified as
3019 pkgkeys.c; corrected.
3021 2010-08-13 Keith Marshall <keithmarshall@users.sourceforge.net>
3023 Improve diagnostics for invalid references to non-release XML nodes.
3025 * src/pkgkeys.h (value_unknown): New global string; declare it.
3026 * src/pkgkeys.c (value_unknown): Implement it.
3028 * src/pkgname.cpp (pkgArchiveName): Identify XML element type when
3029 diagnosing references to elements of types other than release; use...
3030 (value_unknown): ...this, as appropriate.
3032 2010-08-12 Keith Marshall <keithmarshall@users.sourceforge.net>
3034 Guard against a potential buffer overrun.
3036 * src/pkgreqs.cpp (pkgSpecs::SetProperty): Allocate an additional
3037 byte to accommodate an extra field separator, when inserting a new
3038 data value into a previously empty field.
3040 2010-07-27 Cesar Strauss <cestrauss@gmail.com>
3042 Handle the GNU long name tar header format.
3044 * src/pkgproc.h (TAR_ENTITY_TYPE_GNU_LONGNAME): New manifest constant;
3046 (pkgTarArchiveProcessor::EntityDataAsString): New protected method;
3048 * src/tarproc.cpp: ...implement it.
3049 (pkgTarArchiveProcessor::Process): Before building the entry pathname,
3050 check for a GNU long name type header; when found, read pathname from
3051 the entry data area, before fetching the following header, from which
3052 to retrieve the associated entity data.
3054 2010-06-24 Keith Marshall <keithmarshall@users.sourceforge.net>
3056 Work around an autoconf bug (reported by Stefano Sabatini).
3058 * Makefile.in (VPATH): Use @top_srcdir@ instead of ${srcdir}; current
3059 autoconf incorrectly elides references to @srcdir@ and ${srcdir} when
3060 substituting within a VPATH specification for building `in-source'.
3061 Also, prefer colons to blanks as path name separators, for improved
3062 portability to non-GNU implementations of make; (recommendation by
3065 2010-06-24 Keith Marshall <keithmarshall@users.sourceforge.net>
3067 Include alias search, when matching component package name.
3069 * src/keyword.c (has_keyword): Rearrange argument declarations for
3070 more natural order; update all callers accordingly. Simplify; compare
3071 keyword to be matched with each successive candidate from match-list,
3072 character-by-character and in-place, so avoiding memory allocation
3073 for any local duplicate of the passed match-list; thus...
3074 (safe_strdup): ...this static function no longer required; delete it.
3075 (string.h): No references remain; do not include it.
3077 * src/pkgfind.cpp (pkgXmlNode::FindPackageByName): Augment component
3078 package name matching to include potential matches of the look-up name
3079 with trailing component name stripped off, when that matches the class
3080 name of an identified component package, and the initial substring of
3081 the look-up name, after stripping, matches any specified alias name
3082 for the containing package.
3084 2010-06-10 Keith Marshall <keithmarshall@users.sourceforge.net>
3086 Address FIXME relating to identification of distributable files.
3088 * install-sh: Move to...
3089 * build-aux: ...this new directory.
3091 * Makefile.in (PACKAGE_DISTVERSION): Modify `sed' edit sequence; make
3092 it depend on, and ensure that it incorporates the expansion of...
3093 (PACKAGE_SUBSYSTEM): ...this new macro; defined as substitution of...
3094 (host_os): ...this autoconf variable, set by...
3096 * configure.ac (AC_CANONICAL_HOST): ...this; add it, requiring...
3097 (AC_CONFIG_AUX_DIR): ...`build-aux' directory reference, providing...
3099 * build-aux/config.guess, build-aux/config.sub: ...these new standard
3100 files; import them from the standard `build-aux' repository.
3102 2010-05-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3104 Bump version for next release cycle.
3106 * configure.ac (AC_INIT): Bump version suffix to alpha-3.
3108 2010-05-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3110 mingw-get-0.1-mingw32-alpha-2 released.
3112 * README: Add new release notes.
3114 * xml/profile.xml: Update to use default referencing for...
3115 (package-list.xml.lzma): ...this repository master catalogue.
3117 * All files (r0-1-alpha-2): Tag assigned.
3119 2010-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
3121 Make provision to protect user's profile settings during upgrade.
3123 * Makefile.in (install): Remove `profile.xml'; replace it with...
3124 (install-profile): ...this new prerequisite installation goal; it
3125 renames the installed copy of `profile.xml' as `defaults.xml', within
3126 the installed package image.
3128 * src/pkgkeys.h (defaults_key): New key; declare it.
3129 * src/pkgkeys.c: Some cosmetic formatting (tabulation) adjustments.
3130 (defaults_key): Implement it; it refers to the `defaults.xml' file.
3132 * src/climain.cpp (climain): Check `profile_key' for accessibility of
3133 the `profile.xml' file; if [! R_OK] emit a diagnostic warning, fall
3134 back on `defaults_key', and attempt to load configuration from the
3135 distributed `defaults.xml' file.
3137 2010-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
3139 Add preliminary support for future `-reinstall' option.
3141 * src/pkgexec.cpp (pkgActionItem::Execute) [ACTION_INSTALL]: Force
3142 installation if `-reinstall' option is selected, overriding state of
3143 any prior installation; temporarily assume that this option is always
3144 selected, to permit proper `upgrade' operation in the absence of any
3145 functional `uninstall' capability, and pending implementation of a
3146 mechanism for interpreting user specified options.
3148 2010-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
3150 Correct handling for "%R" macro in relative sysroot path specs.
3152 * src/tarproc.cpp (pkgTarArchiveProcessor): In constructor, expand the
3153 sysroot path specification a second time, to capture the effect of any
3154 embedded macros, before computing the recorded `sysroot_len' value.
3156 2010-05-05 Keith Marshall <keithmarshall@users.sourceforge.net>
3158 Handle "%" wildcard matches in package and subsystem version strings.
3160 * src/pkgbase.h (pkgSpecs): Forward declare it.
3161 (pkgActionItem::~pkgActionItem): Declare explicit destructor.
3162 (pkgActionItem::SetRequirements): Add extra `pkgSpecs*' argument;
3163 update references, passing additional argument in...
3165 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): ...this.
3167 * src/pkgexec.cpp (pkgActionItem::~pkgActionItem): Implement it.
3168 (pkgActionItem::SetRequirements): Delete obsolete implementation.
3170 * src/pkginfo/pkginfo.h: Update copyright notice; add year 2010.
3171 (pkgSpecs::GetTarName): New public method; declare it.
3172 (pkgSpecs::SetProperty): New private method; declare it.
3173 (pkgSpecs::SetPackageName): New inline method; implement it.
3174 (pkgSpecs::SetPackageVersion, pkgSpecs::SetPackageBuild): Likewise.
3175 (pkgSpecs::SetSubSystemName, pkgSpecs::SetSubSystemVersion): Likewise.
3176 (pkgSpecs::SetSubSystemBuild, pkgSpecs::SetReleaseStatus): Likewise.
3177 (pkgSpecs::SetReleaseIndex, pkgSpecs::SetComponentClass): Likewise.
3178 (pkgSpecs::SetComponentVersion, pkgSpecs::SetPackageFormat): Likewise.
3179 (pkgSpecs::SetCompressionType): Likewise.
3181 * src/pkginfo/pkginfo.l: Update copyright notice; add year 2010.
3182 (TRANS): Interpret "%" as wildcard in version string matches.
3184 * src/pkgreqs.cpp: New file.
3185 (pkgActionItem::SetRequirements): Reimplement per new declaration;
3186 it now always allocates heap memory for requirements specifications.
3187 (pkgSpecs::GetTarName, pkgSpecs::SetProperty): Implement them.
3189 * Makefile.in (CORE_DLL_OBJECTS): Add `pkgreqs.$(OBJEXT)'.
3191 2010-04-30 Keith Marshall <keithmarshall@users.sourceforge.net>
3193 Revert 2010-04-04 refactoring of tarproc.cpp and tarinst.cpp
3195 * src/tarinst.cpp: File removed; its content merged into...
3196 * src/tarproc.cpp: ...this; it cannot be cleanly separated out.
3198 * Makefile.in (tarinst.$OBJEXT): Remove reference.
3200 2010-04-29 Keith Marshall <keithmarshall@users.sourceforge.net>
3202 Handle "*" wildcard matches in package and subsystem version strings.
3204 * src/vercmp.h (pkgVersionInfo::version_string): New private member
3205 variable; it stores a pointer to a dynamically allocated local copy of
3206 the invariant `version' argument, to facilitate correct parsing.
3207 (pkgVersionInfo::build_string): Likewise; it provides similar handling
3208 for the invariant `build' argument.
3209 (pkgVersionInfo::Free): New private inline method; it provides a NULL
3210 pointer safe wrapper, calling the C library `free()' function, (since
3211 some implementations are believed to be unsafe); it is used by...
3212 (pkgVersionInfo::~pkgVersionInfo): ...this new inline destructor, to
3213 release the memory allocated by the constructor, for `version_string'
3216 * src/vercmp.cpp (pkgVersionInfo::pkgVersionInfo): Allocate memory for
3217 `version_string' and `build_string', as required; populate it.
3218 Explicitly handle "*" as a `match anything' wildcard...
3219 (pkgVersionInfo::Compare): ...matching it as `equal' to everything.
3221 2010-04-18 Keith Marshall <keithmarshall@users.sourceforge.net>
3223 Correct omission from configure script prerequisite checks.
3225 * aclocal.m4 (MINGW_AC_OUTPUT): New macro; it wraps AC_OUTPUT itself,
3226 adding a trap to force an abort if any preceding prerequisite check
3227 was handled by MINGW_AC_ASSERT_MISSING.
3229 * configure.ac: Qualify package component types, in prerequisite
3230 checks handled by MINGW_AC_ASSERT_MISSING; invoke MINGW_AC_OUTPUT
3231 in place of AC_OUTPUT.
3233 2010-04-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3235 Add configure script checks for prerequisite library headers.
3236 (Thanks to Cesar Strauss for proposing a rudimentary implementation).
3238 * aclocal.m4: New file; it does no more than include...
3239 * m4/missing.m4: ...this; new file incorporated from build-aux module.
3241 * configure.ac: Add AC_CHECK_HEADER assertions for...
3242 (zlib.h, bzlib.h, lzma.h): ...these; invoke MINGW_AC_ASSERT_MISSING in
3243 respect of each failing assertion.
3245 2010-04-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3247 Case-insensitive subsystem name matching revisited.
3249 * src/pkgfind.cpp (pkgXmlDocument::FindPackageByName): Use...
3250 (subsystem_strcmp): ...this to match subsystem names, instead of...
3251 (match_if_explicit): ...this.
3253 2010-04-15 Keith Marshall <keithmarshall@users.sourceforge.net>
3255 Enable recursive processing of repository package lists.
3257 * src/pkgbase.h (pkgXmlDocument::SyncRepository): Make it public.
3259 * src/pkgbind.cpp (pkgRepository): New locally defined and implemented
3260 class; it facilitates recursive loading and parsing of package lists,
3261 replacing much of the original non-recursive functionality within...
3262 (pkgXmlDocument::BindRepositories): ...this; use it.
3264 2010-04-04 Keith Marshall <keithmarshall@users.sourceforge.net>
3266 Implement installer function; use per-package file manifests.
3268 * src/pkgproc.h (pkgManifest): New class; declare it.
3269 (pkgArchiveProcessor::origin): New protected member variable.
3270 (pkgArchiveProcessor::sysroot_len): New protected member variable.
3271 (pkgArchiveProcessor::installed): Type changed to `pkgManifest *'.
3272 (pkgTarArchiveInstaller::Process): Declare specialisation hook.
3273 (pkgTarArchiveInstaller::UpdateInstallationManifest): Disused member
3274 function; remove redundant declaration from class definition.
3275 (pkgInstall): New generalised installation function; declare it.
3276 (pkgRegister): New function; declare it.
3278 * src/pkginst.cpp: New file.
3279 (pkgManifest, pkgInstall, pkgRegister): Implement them.
3281 * src/pkgexec.cpp (pkgActionItem::Execute): Use `pkgInstall' in place
3282 of stub formerly provided here.
3284 * src/pkgkeys.h (manifest_key, reference_key): New keys; declare them.
3285 * src/pkgkeys.c (manifest_key, reference_key): Implement them.
3287 * src/tarproc.cpp: Code refactored.
3288 (pkgTarArchiveProcessor::sysroot_len): Initialise it.
3289 (pkgTarArchiveProcessor::origin): Initialise it.
3290 (pkgTarArchiveProcessor::installed): Initialise; associate it with a
3291 pkgManifest class entity, and populate this as appropriate.
3292 (pkgTarArchiveProcessor::~pkgTarArchiveProcessor): Add explicit clean
3293 up of linked `pkgManifest *' entity referenced by `installed'.
3294 (pkgTarArchiveProcessor::Process) [TAR_ENTITY_TYPE_DIRECTORY]: Add
3295 braces to demarcate localised inner scope of string scan for removal
3296 of trailing directory name separators; (thanks to Cesar Strauss for
3297 reporting invalid local pointer declaration error in GCC >= 4.4).
3298 (pkgTarArchiveInstaller::UpdateInstallationManifest): Deleted.
3299 (pkgTarArchiveInstaller::pkgTarArchiveInstaller): Factor out.
3300 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3301 (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
3302 (commit_saved_entity): Likewise.
3304 * src/tarinst.cpp: New file; it implements...
3305 (pkgTarArchiveInstaller::Process): ...this new specialisation
3306 of the original pkgTarArchiveProcessor::Process method...
3307 (pkgTarArchiveInstaller::pkgTarArchiveInstaller): ...and this
3308 refactored code, abstracted from src/tarproc.cpp and modified to
3309 use the pkgManifest class for installation tracking.
3310 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3311 (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
3312 (commit_saved_entity): Relocated from src/tarproc.cpp.
3314 * Makefile.in (CORE_DLL_OBJECTS): Add...
3315 (pkginst.OBJEXT, tarinst.OBJEXT): ...these new object files.
3317 2010-03-31 Keith Marshall <keithmarshall@users.sourceforge.net>
3319 Guard against NULL pointer dereferences in tinyxml code.
3321 * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is
3322 non-NULL, before invoking the underlying tinyxml method.
3323 (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise.
3324 (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise.
3325 (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
3326 (pkgXmlNode::GetDocumentRoot): Likewise.
3327 (pkgXmlNode::IsElementOfType): Likewise.
3329 2010-03-28 Cesar Strauss <cestrauss@gmail.com>
3331 Avoid running InternetAttemptConnect in pkgInternetAgent
3332 constructor, since it is called during DLL initialisation.
3334 * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the
3335 InternetAttemptConnect call from constructor...
3336 (pkgInternetAgent::OpenURL): ...to here.
3338 2010-03-23 Keith Marshall <keithmarshall@users.sourceforge.net>
3340 Automate object code dependency tracking.
3342 * Makefile.in (DEPFLAGS): New macro; define it.
3343 (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands...
3344 (%.d): ...to create these dependency maps; `sinclude' them, and...
3345 (clean): ...remove them.
3347 * .cvsignore (*.d): Add wild card template to match them.
3349 2010-03-22 Keith Marshall <keithmarshall@users.sourceforge.net>
3351 Support case insensitive matching for file and subsystem names.
3353 * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL
3354 argument safe comparison of strings, returning the boolean inverse of
3355 the `strcmp' result, using either case-sensitive or case-insensitive
3356 semantics; derive it from...
3357 (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp'
3358 using explicitly case-sensitive semantics.
3359 (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either
3360 case-sensitive or case-insensitive semantics, depending on...
3361 (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it
3362 fixes the choice between case-sensitive and case-insensitive matching
3363 semantics for any given implementation, at compile time.
3364 (pkg_strcmp): New macro; it invokes `safe_strcmp' with either
3365 case-sensitive or case-insensitive semantics, depending on...
3366 (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it
3367 fixes the choice between case-sensitive and case-insensitive matching
3368 semantics for any given implementation, at compile time.
3370 * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'.
3372 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
3374 Add preliminary support for virtual packages.
3376 * src/pkgkeys.h (yes_value, no_value): Redefine as aliases...
3377 (value_yes, value_no): ...for these new global strings; declare them.
3378 (value_none, value_virtual): New global strings; declare them.
3380 * src/pkgkeys.c (yes_value, no_value): Rename...
3381 (value_yes, value_no): ...to implement these, respectively.
3382 (value_none, value_virtual): Implement them.
3384 * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package
3385 node for `class' attribute set to `value_virtual'; if present, always
3386 return the effective `tarname' property as `value_none'.
3388 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages
3389 with an effective `tarname' of `value_none', do not download anything.
3391 * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an
3392 effective `tarname' of `value_none', do not invoke any tar archive
3393 processing function.
3395 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
3397 Don't write installation records for unavailable packages.
3399 * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure
3400 archive is ready for processing, before initialising an installation
3403 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
3405 Rationalise path identification for XML file locations.
3407 * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()'
3408 function to locate `sysroot' map file; free memory when done.
3409 (pkgXmlDocument::UpdateSystemMap): Likewise.
3410 (sigpath): Static global variable disused; delete it.
3412 2010-03-01 Keith Marshall <keithmarshall@users.sourceforge.net>
3414 Extend package name search to include component packages.
3416 * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into...
3417 (pkgXmlNode::FindPackageByName): ...this; augment to extend search
3418 within package definition elements, seeking a potential match on an
3419 included component package name or component class-implied name.
3421 * src/pkgkeys.h (class_key): New global string constant; declare it.
3422 * src/pkgkeys.c (class_key): Implement it.
3424 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3426 Bump version for next release cycle.
3428 * configure.ac (AC_INIT): Bump version suffix to alpha-2.
3430 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3432 mingw-get-0.1-mingw32-alpha-1 released.
3434 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3436 Prepare initial package release.
3438 * README: New file; use it to source release notes.
3440 * Makefile.in (SRCDIST_FILES): Use ...
3441 (LICENCE_FILES): ...this new macro; define it.
3442 (licdist): New build goal; implement it.
3443 (bindist): Require it; add alternative `zip' format package.
3445 * xml/profile.xml (repository): Set default `package-index' name.
3446 (system-map): Normalise spelling for default `sysroot' path names.
3448 2010-02-10 Keith Marshall <keithmarshall@users.sourceforge.net>
3450 Add directory/file records in installation manifests.
3452 * src/pkgkeys.h (dirname_key, filename_key): New strings; declare...
3453 * src/pkgkeys.c (dirname_key, filename_key): ...and implement them.
3455 * src/pkgproc.h (pkgArchiveProcessor::installed): New class member
3456 variable; declare it.
3457 (pkgTarArchiveInstaller::UpdateInstallationManifest): New method;
3460 * src/tarproc.cpp: Miscellaneous comment updates.
3461 (pkgTarArchiveInstaller): In constructor...
3462 (pkgTarArchiveInstaller::installed): ...use new member variable...
3463 (pkgArchiveProcessor::installed): ...inherited from this.
3464 (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and...
3465 (pkgTarArchiveInstaller::ProcessDataStream): ...use it.
3466 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3468 2010-02-06 Keith Marshall <keithmarshall@users.sourceforge.net>
3470 Work around a deficiency in Microsoft's stat() implementation.
3472 * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't
3473 pass a `pathname' argument with trailing slashes; strip them off.
3475 2010-02-06 Keith Marshall <keithmarshall@users.sourceforge.net>
3477 Add machinery for installation and packaging for distribution.
3479 * install-sh: New file; source it from autoconf distribution.
3481 * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'.
3482 (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these.
3483 (STRIP): New output variable; use AC_CHECK_TOOL to define it.
3485 * Makefile.in (abs_top_srcdir): Define to AC_SUBST value.
3486 (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values.
3487 (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise.
3488 (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise.
3489 (STRIP): New macro; define it using AC_CHECK_TOOL substitution.
3490 (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result.
3491 (LN_S): New macro; define it as AC_PROG_LN_S result.
3492 (dist, srcdist, bindist): New build objectives; implement them.
3493 (install, installdirs, install-strip, maintainer-clean): Likewise.
3494 (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them.
3495 (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise.
3496 (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise.
3497 (PACKAGE_CONFIG_DIR): Likewise.
3499 2010-02-02 Keith Marshall <keithmarshall@users.sourceforge.net>
3501 Implement package installer for tar archives.
3503 * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing
3504 stub implementation of installer, using methods provided by...
3505 * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap...
3506 * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry...
3507 (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect
3508 `install' requests for packages which are aleady installed.
3510 * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify
3511 dependencies as appropriate.
3513 * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit
3514 newly created `sysroot' mapping records to disk; defer to...
3515 (pkgXmlDocument::UpdateSystemMap): ...this new method.
3516 (sigpath): Make it a global variable, with file (static) scope.
3518 * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it.
3520 * src/pkgkeys.h (download_key, modified_key, source_key): New global
3521 string variables; declare them, providing their implementations...
3522 * src/pkgkeys.c (download_key, modified_key, source_key): ...here.
3523 * src/pkgname.cpp (download_key, source_key): Use them.
3525 * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace...
3526 * src/mkpath.c (pkgArchivePath): ...with this free standing function.
3527 * src/mkpath.h (pkgArchivePath): Declare its prototype.
3529 * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration.
3530 (pkgXmlDocument): Add a default constructor; implement as `inline'.
3531 (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new
3532 declaration object, instead of `auto' variable, to avoid scope error.
3533 (pkgXmlDocument::UpdateSystemMap): Declare it.
3535 2010-01-26 Keith Marshall <keithmarshall@users.sourceforge.net>
3537 Implement rudimentary dependency resolver.
3539 * src/pkgdeps.cpp: New file.
3541 * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference;
3542 establish header file dependencies.
3544 * src/pkgbase.h (to_remove, to_install, selection_types): New enum.
3545 (pkgActionItem::selection): Extend it to store as enumerated pair...
3546 (pkgActionItem::SelectPackage): New inline method; assign them.
3547 (pkgActionItem::Selection): New inline method; retrieve them.
3548 (pkgXmlNode::GetInstallationRecord): New method; declare it.
3550 * src/pkgexec.cpp (pkgActionItem): In constructor...
3551 (selection): ...initialise both references in enumerated pair.
3552 (pkgActionItem::GetReference): Use `Selection()' method.
3553 (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for
3554 making selection, and assign to `to_install' element.
3555 (pkgXmlDocument::Schedule): Don't update `request'.
3556 (pkgActionItem::Execute): Implement as stub.
3558 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new
3559 `Selection()' method.
3561 * src/pkgkeys.h (yes_value, no_value): Declare new string constants.
3562 * src/pkgkeys.c (yes_value, no_value): Implement them.
3564 * src/vercmp.cpp: Update copyright notice.
3565 (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'.
3567 2010-01-23 Keith Marshall <keithmarshall@users.sourceforge.net>
3569 Avoid segmentation faults when processing invalid data streams.
3571 * src/pkgstrm.h: Update copyright notice.
3572 (pkgArchiveStream::IsReady): New pure virtual method.
3573 (pkgRawArchiveStream::IsReady): Provide inline implementation.
3574 (pkgGzipArchiveStream::IsReady): Likewise.
3575 (pkgBzipArchiveStream::IsReady): Likewise.
3576 (pkgLzmaArchiveStream::IsReady): Likewise.
3577 (pkgXzArchiveStream::IsReady): Likewise.
3579 * src/pkgstrm.cpp: Update copyright notice.
3580 (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to
3581 perform any form of read or decode processing.
3583 * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as
3584 pseudo-descriptor for the pkgLzmaArchiveStream derived component of
3585 this internet data streaming class.
3587 2010-01-23 Keith Marshall <keithmarshall@users.sourceforge.net>
3589 Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev
3591 * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated
3592 comment; it was required to permit, (but not to enforce), linking to
3593 the static liblzma.a library, with earlier beta releases, but this
3594 anomaly has now been corrected.
3596 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
3598 Remove zlib sources from trunk.
3599 (Application builders should use free standing implementation of
3600 zlib, from MinGW's package distribution page on SourceForge).
3602 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
3604 Remove bzip2 sources from trunk.
3605 (Application builders should use free standing implementation of
3606 bzip2, from MinGW's package distribution page on SourceForge).
3608 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
3610 Add subsystem specific sysroot mapping facility.
3612 * src/pkghash.c: New file; required by...
3613 * src/sysroot.cpp: New file; it implements...
3614 (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods.
3616 * src/pkgbase.h: Update copyright notice.
3617 (pkgXmlDocument::LoadSystemMap): Declare it.
3618 (pkgXmlDocument::AddDeclaration): New inline method.
3619 (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise.
3620 (pkgXmlNode::GetSysRoot): Declare it.
3621 (pkgXmlNode::GetDocumentRoot): New inline method.
3622 (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
3624 * src/climain.cpp: Update copyright notice.
3625 (climain): Invoke pkgXmlDocument::LoadSystemMap() as required.
3627 * Makefile.in (CORE_DLL_OBJECTS): Add ...
3628 (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies.
3629 (DEBUGLEVEL): New macro; define it.
3632 2010-01-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3634 Assign standardised keys for XML database lookup.
3636 * src/pkgkeys.h: New file; provide public key declarations.
3637 * src/pkgkeys.c: New file; implement them.
3639 * src/pkgbind.cpp: Use them; update copyright notice.
3640 * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise.
3641 * src/pkgname.cpp, src/pkgspec.cpp: Likewise.
3643 * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all
3644 dependencies accordingly.
3646 2010-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
3648 Add CLI version reporting option.
3650 * configure.ac: Update copyright notice for new year.
3651 (COPYRIGHT_HOLDER): New AC_SUBST variable; define it.
3652 (YEARS_OF_ISSUE): New AC_SUBST variable; define it.
3653 (AC_CONFIG_FILES): Add `version.c'; source it from...
3655 * version.c.in: ...this new file.
3657 * Makefile.in: Update copyright notice for new year.
3658 (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'.
3659 (distclean): Add `version.c'.
3661 * configure: Regenerated.
3663 * src/clistub.c: Update copyright notice for new year.
3664 (options): New array of `struct option'; define and use it as the
3665 reference for `argv' parsing with `getopt_long_only()'.
3667 2009-12-17 Keith Marshall <keithmarshall@users.sourceforge.net>
3669 Add CLI support for "update" action.
3671 * src/pkgtask.h (ACTION_UPDATE): Define it, derived from...
3672 (action_update): ...this new entry in anonymous enumeration.
3674 * src/pkgexec.cpp (action_name): Add "update" keyword identification.
3676 * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/.
3677 (pkgXmlDocument::BindRepositories): Add `force_update' parameter...
3678 * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to...
3679 (pkgXmlDocument::SyncRepository): ...invoke this method when passed as
3680 a `true' flag, in addition to (as previously) first time reference.
3682 * src/climain.cpp (climain): Interpret "update" keyword for...
3683 [ACTION_UPDATE]: ...passing state as `force_update' parameter to...
3684 (pkgXmlDocument::BindRepositories): ...this method, then...
3685 [!ACTION_UPDATE]: Follow with normal action processing.
3687 2009-12-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3689 Add status checking for Internet URL connections.
3691 * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method.
3692 (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return
3693 value, deferring failure diagnostics to callers, i.e. to...
3694 (pkgXmlDocument::SyncRepositories): ...this, and to...
3695 (pkgActionItem::DownloadArchiveFiles): ...this.
3697 2009-11-23 Keith Marshall <keithmarshall@users.sourceforge.net>
3699 Add package download and repository synchronisation machinery.
3701 * src/pkgstrm.h: New header file.
3703 * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp,
3704 src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files.
3705 * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them.
3707 * xml: New directory.
3709 * src/climain.cpp (climain): Establish repository bindings from...
3710 * xml/profile.xml: ...this new configuration file.
3712 2009-11-16 Keith Marshall <keithmarshall@users.sourceforge.net>
3714 Add XML database bindings and preliminary action executive for CLI.
3716 * src/pkgbase.h, src/pkgtask.h,
3717 src/mkpath.h, src/vercmp.h: New header files.
3719 * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp,
3720 src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files.
3722 * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files...
3723 (mingw-get-0.dll): ...build them into this new DLL target; add it...
3724 (all): ...as prerequisite for this primary build goal.
3726 2009-11-12 Keith Marshall <keithmarshall@users.sourceforge.net>
3728 Avoid some potential GCC warnings.
3730 * src/clistub.c: Include process.h for `execv' prototype...
3731 (main): Cast `argv' to appropriately matched type when calling it.
3733 * src/pkginfo/driver.c: Include stdlib.h for `free' prototype.
3735 2009-11-11 Keith Marshall <keithmarshall@users.sourceforge.net>
3737 Create diagnostic message handler for CLI usage.
3739 * src/dmh.h: New header file; it defines the public interface.
3740 * src/dmh.cpp: New file; it implements the message handler.
3742 2009-11-05 Keith Marshall <keithmarshall@users.sourceforge.net>
3744 Correct some identified TinyXML issues.
3746 * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag
3747 probable redundancy of checks for '\n' and '\r'.
3748 * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove
3749 all such redundancies in IsWhiteSpace() calls throughout.
3751 * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format
3752 specification in sprintf()/snprintf() calls; "%lf" is invalid; replace
3755 2009-10-31 Keith Marshall <keithmarshall@users.sourceforge.net>
3757 Add CLI loader stub.
3759 * src/clistub.c: New file.
3760 * Makefile.in: Add build rule for it; build as...
3761 (mingw-get.exe): ...this; also add to...
3762 (clean): ...this goal.
3764 2009-10-31 Keith Marshall <keithmarshall@users.sourceforge.net>
3766 Set up build mechanism.
3768 * configure.ac, Makefile.in: New files.
3769 * .cvsignore (configure, autom4te.cache): Add to ignored files.
3771 2009-10-30 Keith Marshall <keithmarshall@users.sourceforge.net>
3773 Add GPL-v3 licensing terms.
3775 * COPYING: New file, sourced from gnu.org.
3777 2009-10-12 Keith Marshall <keithmarshall@users.sourceforge.net>
3779 Add pkginfo implementation.
3781 * src, src/pkginfo: New directories.
3782 * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files.
3783 * src/pkginfo/driver.c: New file.
3785 2009-10-12 Keith Marshall <keithmarshall@users.sourceforge.net>
3789 * All files (tdm-branch): Assign new branch tag.
3790 * All top-level files: Remove from trunk.
3791 * ChangeLog: New file.