• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Installation Manager Tool


Commit MetaInfo

修订版14f22fa3b84a6807ac7958c646237c994814028f (tree)
时间2011-02-14 06:23:58
作者Keith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Log Message

Merge from mingw-get-0.1-mingw32-alpha-5 bug-fix branch.

更改概述

差异

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,51 @@
1+2011-02-13 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Merge from mingw-get-0.1-mingw32-alpha-5 bug-fix branch.
4+
5+ * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Promote
6+ "install" action on new prerequisites, where a previously uninstalled
7+ package is required to satisfy any "upgrade" dependency.
8+
9+ * src/pkgexec.cpp (pkgActionList::Execute): Don't make misleading
10+ claims concerning package removal.
11+
12+ * src/pkgtask.h (STRICTLY_GT, STRICTLY_LT, ACTION_PRIMARY): Add one
13+ level of parentheses around defining expressions.
14+
15+2011-02-10 Keith Marshall <keithmarshall@users.sourceforge.net>
16+
17+ Publish mingw-get-0.0-mingw32-alpha-5.1 bug-fix release.
18+
19+ * README: Updated to reflect changes.
20+
21+2011-02-08 Keith Marshall <keithmarshall@users.sourceforge.net>
22+
23+ Improve diagnostics for failed GUI invocation.
24+
25+ * src/guimain.cpp: New file; currently delivers only a diagnostic
26+ stub, provided by Sze Howe Koh <axfangli@users.sourceforge.net>, to
27+ pop-up a message block explaining why GUI mode cannot be invoked.
28+
29+ * Makefile.in (GUI_LDFLAGS): New macro; it is required by...
30+ (gui$EXEEXT): ...this new build rule; add to prerequisites of...
31+ (all): ...this [default] build rule; redefine this in terms of...
32+ (BIN_PROGRAMS, LIBEXEC_PROGRAMS, LIBEXEC_DATA): ...these new macros;
33+ define them, and also use them as loop iterator objectives for...
34+ (install, install_strip): ...these; also schedule them...
35+ (clean): ...for removal by this.
36+
37+ * src/clistub.c (Copyright): Add new year.
38+ (main): Amend error message, if gui$EXEEXT doesn't start; make it
39+ more intelligible to normal users.
40+
41+2011-02-07 Keith Marshall <keithmarshall@users.sourceforge.net>
42+
43+ Correct omissions from packaged source tarball.
44+
45+ * Makefile.in (Copyright): Add new year.
46+ (SRCDIST_FILES): Add aclocal.m4
47+ (SRCDIST_SUBDIRS): Add m4
48+
149 2011-01-05 Keith Marshall <keithmarshall@users.sourceforge.net>
250
351 Reduce path names to base names, in some diagnostic message contexts.
@@ -84,7 +132,7 @@
84132
85133 mingw-get-0.1-mingw32-alpha-5 released.
86134
87- * configure.ac: Bump version to 0.1-alpha-5.
135+ * configure.ac (AC_INIT): Bump version to 0.1-alpha-5.
88136 * README: Update release notes accordingly.
89137 * All files (r0-1-alpha-5): Tag assigned.
90138
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,7 +6,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
66 PACKAGE_VERSION = @PACKAGE_VERSION@
77
88 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
9-# Copyright (C) 2009, 2010, MinGW Project
9+# Copyright (C) 2009, 2010, 2011, MinGW Project
1010 #
1111 #
1212 # Makefile template for mingw-get
@@ -63,7 +63,11 @@ CORE_DLL_OBJECTS = climain.$(OBJEXT) pkgshow.$(OBJEXT) \
6363 tinyxml.$(OBJEXT) tinyxmlparser.$(OBJEXT) \
6464 tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT)
6565
66-all: pkginfo$(EXEEXT) mingw-get$(EXEEXT) mingw-get-0.dll lastrites$(EXEEXT)
66+BIN_PROGRAMS = pkginfo$(EXEEXT) mingw-get$(EXEEXT)
67+LIBEXEC_PROGRAMS = gui$(EXEEXT) lastrites$(EXEEXT)
68+LIBEXEC_DATA = mingw-get-0.dll
69+
70+all: $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA)
6771
6872 pkginfo$(EXEEXT): driver.$(OBJEXT) pkginfo.$(OBJEXT)
6973 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $+
@@ -71,6 +75,11 @@ pkginfo$(EXEEXT): driver.$(OBJEXT) pkginfo.$(OBJEXT)
7175 mingw-get$(EXEEXT): clistub.$(OBJEXT) version.$(OBJEXT)
7276 $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $+
7377
78+GUI_LDFLAGS = -mwindows $(LDFLAGS)
79+
80+gui$(EXEEXT): guimain.$(OBJEXT)
81+ $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+
82+
7483 lastrites$(EXEEXT): rites.$(OBJEXT)
7584 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $+
7685
@@ -118,28 +127,35 @@ installdirs:
118127 $(mkinstalldirs) ${PACKAGE_CONFIG_DIR}
119128
120129 install: installdirs install-profile
121- $(INSTALL_PROGRAM) pkginfo$(EXEEXT) ${bindir}
122- $(INSTALL_PROGRAM) mingw-get$(EXEEXT) ${bindir}
123- $(INSTALL_PROGRAM) lastrites$(EXEEXT) ${libexecdir}/${PACKAGE_TARNAME}
124- $(INSTALL_DATA) mingw-get-0.dll ${libexecdir}/${PACKAGE_TARNAME}
130+ for image in $(BIN_PROGRAMS); do \
131+ $(INSTALL_PROGRAM) $$image ${bindir}; \
132+ done
133+ for image in $(LIBEXEC_PROGRAMS); do \
134+ $(INSTALL_PROGRAM) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
135+ done
136+ for image in $(LIBEXEC_DATA); do \
137+ $(INSTALL_DATA) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
138+ done
125139
126140 install-profile:
127141 $(INSTALL_DATA) ${srcdir}/xml/profile.xml \
128142 ${PACKAGE_CONFIG_DIR}/defaults.xml
129143
130144 install-strip: install
131- $(STRIP) ${bindir}/pkginfo$(EXEEXT)
132- $(STRIP) ${bindir}/mingw-get$(EXEEXT)
133- $(STRIP) ${libexecdir}/${PACKAGE_TARNAME}/lastrites$(EXEEXT)
134- $(STRIP) ${libexecdir}/${PACKAGE_TARNAME}/mingw-get-0.dll
145+ for image in $(BIN_PROGRAMS); do \
146+ $(STRIP) ${bindir}/$$image; \
147+ done
148+ for image in $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA); do \
149+ $(STRIP) ${libexecdir}/${PACKAGE_TARNAME}/$$image; \
150+ done
135151
136152 # Packaging and distribution...
137153 #
138154 LICENCE_FILES = README COPYING
139155 SRCDIST_FILES = $(LICENCE_FILES) ChangeLog \
140- configure.ac configure Makefile.in version.c.in
156+ aclocal.m4 configure.ac configure Makefile.in version.c.in
141157
142-SRCDIST_SUBDIRS = build-aux src src/pkginfo tinyxml xml
158+SRCDIST_SUBDIRS = build-aux m4 src src/pkginfo tinyxml xml
143159
144160 # The names of distributed pacakge archive files incorporate version
145161 # information, derived from PACKAGE_VERSION; this is decomposed, so that
@@ -197,7 +213,7 @@ srcdist: pkginfo.c
197213 # Workspace clean-up...
198214 #
199215 clean:
200- rm -f *.$(OBJEXT) *.d *.dll pkginfo$(EXEEXT) mingw-get$(EXEEXT)
216+ rm -f *.$(OBJEXT) *.d *.dll $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS)
201217
202218 distclean: clean
203219 rm -f config.* version.c Makefile
--- a/README
+++ b/README
@@ -28,6 +28,12 @@ User Visible Changes for mingw-get-0.1-mingw32-alpha-5
2828 way), only when performing an explicit upgrade of the mingw-get-bin
2929 package itself.
3030
31+- The follow-up release, designated as mingw-get-0.1-mingw32-alpha-5.1,
32+ is a bug-fix release to correct a critical defect in the resolution of
33+ dependencies, when performing an upgrade operation. It also provides
34+ more meaningful diagnostics when mingw-get is invoked without arguments,
35+ and corrects some omissions from the source tarball.
36+
3137
3238 ===============================================
3339
@@ -64,8 +70,10 @@ User Visible Changes for mingw-get-0.1-mingw32-alpha-4
6470
6571 - Add --help|-h option
6672
73+
6774 ===============================================
6875
76+
6977 Release Notes for mingw-get-0.1-mingw32-alpha-3
7078
7179 Preamble
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
33 # $Id$
44 #
55 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
6-# Copyright (C) 2009, 2010, MinGW Project
6+# Copyright (C) 2009, 2010, 2011, MinGW Project
77 #
88 #
99 # Configuration script for mingw-get
--- a/src/clistub.c
+++ b/src/clistub.c
@@ -4,7 +4,7 @@
44 * $Id$
55 *
66 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
7- * Copyright (C) 2009, 2010, MinGW Project
7+ * Copyright (C) 2009, 2010, 2011, MinGW Project
88 *
99 *
1010 * Initiation stub for command line invocation of mingw-get
@@ -302,8 +302,9 @@ int main( int argc, char **argv )
302302 /* If we get to here, then the GUI could not be started...
303303 * Issue a diagnostic message, before abnormal termination.
304304 */
305- fprintf( stderr, "%s: %S: unable to start application; status = %d\n",
306- progname, MINGW_GET_GUI, status
305+ fprintf( stderr,
306+ "%s: %S: unable to start GUI; helper program not installed\n",
307+ progname, MINGW_GET_GUI
307308 );
308309 return EXIT_FATAL;
309310 }
--- /dev/null
+++ b/src/guimain.cpp
@@ -0,0 +1,58 @@
1+/*
2+ * guimain.cpp
3+ *
4+ * $Id$
5+ *
6+ * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
7+ * Derived from stub by Sze Howe Koh <axfangli@users.sourceforge.net>
8+ * Copyright (C) 2011, MinGW Project
9+ *
10+ *
11+ * Implementation of the GUI main program function, which is invoked
12+ * by the command line start-up stub when invoked without arguments.
13+ * Alternatively, it may be invoked directly from a desktop shortcut,
14+ * a launch bar shortcut or a menu entry. In any of these cases, it
15+ * causes mingw-get to run as a GUI process.
16+ *
17+ *
18+ * This is free software. Permission is granted to copy, modify and
19+ * redistribute this software, under the provisions of the GNU General
20+ * Public License, Version 3, (or, at your option, any later version),
21+ * as published by the Free Software Foundation; see the file COPYING
22+ * for licensing details.
23+ *
24+ * Note, in particular, that this software is provided "as is", in the
25+ * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
26+ * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
27+ * PARTICULAR PURPOSE. Under no circumstances will the author, or the
28+ * MinGW Project, accept liability for any damages, however caused,
29+ * arising from the use of this software.
30+ *
31+ */
32+#include <windows.h>
33+
34+int APIENTRY WinMain
35+( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
36+{
37+ /* FIXME: this implementation is a stub, adapted from sample code
38+ * provided by Sze Howe Koh <axfangli@users.sourceforge.net>. It
39+ * does no more than display a message box indicating that GUI mode
40+ * is not yet supported, and directing users to use the CLI version
41+ * instead. Ultimately, this will be replaced by a functional GUI
42+ * implementation.
43+ */
44+ MessageBox( NULL,
45+ "The GUI for mingw-get is not yet available.\n"
46+ "Please use the command line version; for instructions,\n"
47+ "invoke\n\n"
48+
49+ " mingw-get --help\n\n"
50+
51+ "at your preferred CLI prompt.",
52+ "Feature Unavailable",
53+ MB_ICONWARNING
54+ );
55+ return 0;
56+}
57+
58+/* $RCSfile$: end of file */
--- a/src/pkgdeps.cpp
+++ b/src/pkgdeps.cpp
@@ -167,6 +167,7 @@ const char *pkgXmlNode::GetContainerAttribute( const char *key, const char *sub
167167
168168 void
169169 pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank )
170+# define promote( request, action ) (((request) & (~ACTION_MASK)) | action )
170171 {
171172 /* For the specified "package", (nominally a "release"), identify its
172173 * prerequisites, (as specified by "requires" tags), and schedule actions
@@ -291,14 +292,19 @@ pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank )
291292 rank = Schedule( fallback, wanted, rank );
292293 }
293294
294- else if( (request & ACTION_MASK) == ACTION_INSTALL )
295+ else if( ((request & ACTION_MASK) == ACTION_INSTALL)
295296 /*
296297 * The required package is not installed...
297- * When performing an installation, we must schedule it
298+ * When performing an installation, ...
299+ */
300+ || ((request & (ACTION_PRIMARY | ACTION_INSTALL)) == ACTION_INSTALL) )
301+ /*
302+ * or when this is a new requirement of a package
303+ * which is being upgraded, then we must schedule it
298304 * for installation now; (we may simply ignore it, if
299305 * we are performing a removal).
300306 */
301- rank = Schedule( request, wanted, rank );
307+ rank = Schedule( promote( request, ACTION_INSTALL ), wanted, rank );
302308
303309 /* Regardless of the action scheduled, we must recursively
304310 * consider further dependencies of the resolved prerequisite;
--- a/src/pkgexec.cpp
+++ b/src/pkgexec.cpp
@@ -4,7 +4,7 @@
44 * $Id$
55 *
66 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
7- * Copyright (C) 2009, 2010, MinGW Project
7+ * Copyright (C) 2009, 2010, 2011, MinGW Project
88 *
99 *
1010 * Implementation of package management task scheduler and executive.
@@ -401,7 +401,9 @@ void pkgActionItem::Execute()
401401 * manifest structure has been specified and implemented.
402402 */
403403 if( current->Selection( to_remove ) != NULL )
404- dmh_printf( " removing %s\n", current->Selection( to_remove )->GetPropVal( tarname_key, value_unknown ));
404+ dmh_printf( " FIXME:pkgRemove<stub>:not removing %s\n",
405+ current->Selection( to_remove )->GetPropVal( tarname_key, value_unknown )
406+ );
405407 }
406408
407409 if( (current->flags & ACTION_INSTALL) == ACTION_INSTALL )
--- a/src/pkgtask.h
+++ b/src/pkgtask.h
@@ -5,7 +5,7 @@
55 * $Id$
66 *
77 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8- * Copyright (C) 2009, 2010, MinGW Project
8+ * Copyright (C) 2009, 2010, 2011, MinGW Project
99 *
1010 *
1111 * This header provides manifest definitions for the action codes,
@@ -54,10 +54,10 @@ enum
5454 #define ACTION_SHOW (unsigned long)(action_show)
5555 #define ACTION_UPDATE (unsigned long)(action_update)
5656
57-#define STRICTLY_GT ACTION_MASK + 1
58-#define STRICTLY_LT STRICTLY_GT << 1
57+#define STRICTLY_GT (ACTION_MASK + 1)
58+#define STRICTLY_LT (STRICTLY_GT << 1)
5959
60-#define ACTION_PRIMARY STRICTLY_LT << 1
60+#define ACTION_PRIMARY (STRICTLY_LT << 1)
6161
6262 #ifndef EXTERN_C
6363 # ifdef __cplusplus