The MinGW.org Installation Manager Tool
リビジョン | 7687627c1dc5f4cebe519df19cdeae8aaf6b2058 (tree) |
---|---|
日時 | 2013-05-15 18:59:03 |
作者 | Keith Marshall <keithmarshall@user...> |
コミッター | Keith Marshall |
Add resources for specification of product version.
@@ -1,3 +1,21 @@ | ||
1 | +2013-05-15 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Add resources for specification of product version. | |
4 | + | |
5 | + * src/verinfo.rc src/verinfo.h.in: New files; included by... | |
6 | + * src/guimain.rc: ...this, whence also specify version information... | |
7 | + (VERINFO_FILE_NAME, VERINFO_INTERNAL_NAME, VERINFO_FILE_DESCRIPTION): | |
8 | + (VERINFO_FILE_VERSION, VERINFO_FILE_VERSION_STRING): ...per these new | |
9 | + manifest constant macros; define them, with propagation to... | |
10 | + (ID_MAIN_WINDOW_CAPTION): ...this; keep it consistent. | |
11 | + | |
12 | + * Makefile.in (TAG_SCRIPT): Include invocation for... | |
13 | + (PACKAGE_VERINFO_SCRIPT): ...this new macro; defined to interpret... | |
14 | + (PACKAGE_VERINFO_PRODUCT_VERSION): ...this new substitution template; | |
15 | + it is used in src/verinfo.h.in, whence verinfo.h is generated. | |
16 | + (RC_INCLUDES): Add current working directory, for... | |
17 | + (verinfo.h): ...this; add rule and dependencies to generate it. | |
18 | + | |
1 | 19 | 2013-05-14 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 20 | |
3 | 21 | Make application manifest resource definition reusable. |
@@ -130,10 +130,21 @@ VERSION_SCRIPT = tag=$(BUILD_TAG); \ | ||
130 | 130 | TAG_SCRIPT = sed \ |
131 | 131 | -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \ |
132 | 132 | -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \ |
133 | + -e "s!%PACKAGE_VERINFO_PRODUCT_VERSION%!`$(PACKAGE_VERINFO_SCRIPT)`!g" \ | |
133 | 134 | -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \ |
134 | 135 | -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g" |
135 | 136 | |
136 | -RC_INCLUDES = -I ${srcdir}/src -I ${srcdir}/icons | |
137 | +PACKAGE_VERINFO_SCRIPT = \ | |
138 | + echo $(PACKAGE_VERSION) | awk -F. '{ \ | |
139 | + printf "%d, %d, ", $$1, $$2 * 100 + $$3 \ | |
140 | + }'; \ | |
141 | + (test -f build.tag && cat build.tag || date +%Y%m%d-0) | awk -F- '{ \ | |
142 | + printf "%d, %d", (( substr( $$1, 1, 4 ) - 1970 ) * 16 \ | |
143 | + + substr( $$1, 5, 2 )) * 32 + substr( $$1, 7, 2 ), \ | |
144 | + $$2 \ | |
145 | + }' | |
146 | + | |
147 | +RC_INCLUDES = -I . -I ${srcdir}/src -I ${srcdir}/icons | |
137 | 148 | |
138 | 149 | # Specify extensions, and link-time requirements, for binary |
139 | 150 | # package deliverables. |
@@ -260,7 +271,13 @@ time-stamp: | ||
260 | 271 | %.c: %.c.in |
261 | 272 | $(VERSION_SCRIPT) $< > $@ |
262 | 273 | |
263 | -version.c guimain.res.$(OBJEXT): Makefile build.time | |
274 | +%.h: %.h.in | |
275 | + $(VERSION_SCRIPT) $< > $@ | |
276 | + | |
277 | +# The following dependencies must be explicitly declared. | |
278 | +# | |
279 | +guimain.res.$(OBJEXT): Makefile build.time verinfo.h | |
280 | +verinfo.h version.c: Makefile build.time | |
264 | 281 | |
265 | 282 | # Installation tools and directory paths... |
266 | 283 | # |
@@ -27,6 +27,20 @@ | ||
27 | 27 | #include "guimain.h" |
28 | 28 | #include <windows.h> |
29 | 29 | |
30 | +/* Version identification resources which are specific to guimain.exe | |
31 | + */ | |
32 | +#define VERINFO_INTERNAL_NAME "guimain" | |
33 | + | |
34 | +#define VERINFO_FILE_NAME VERINFO_INTERNAL_NAME ".exe" | |
35 | +#define VERINFO_FILE_DESCRIPTION "MinGW Installation Manager" | |
36 | +#define VERINFO_FILE_VERSION_STRING VERINFO_PRODUCT_VERSION_STRING | |
37 | +#define VERINFO_FILE_VERSION VERINFO_PRODUCT_VERSION | |
38 | + | |
39 | +/* Interpret the foregoing, together with common product version | |
40 | + * information, in this package component context. | |
41 | + */ | |
42 | +#include "verinfo.rc" | |
43 | + | |
30 | 44 | /* The icon representing the mingw-get application; it is a clone |
31 | 45 | * of the icon representing the synaptic package for Debian APT. |
32 | 46 | */ |
@@ -63,7 +77,7 @@ END | ||
63 | 77 | STRINGTABLE DISCARDABLE |
64 | 78 | BEGIN |
65 | 79 | ID_MAIN_WINDOW_CLASS "mingw-get-gui" |
66 | - ID_MAIN_WINDOW_CAPTION "MinGW Installation Manager" | |
80 | + ID_MAIN_WINDOW_CAPTION VERINFO_FILE_DESCRIPTION | |
67 | 81 | ID_SASH_WINDOW_PANE_CLASS "mingw-get-sash-pane" |
68 | 82 | ID_FONT_PREF "Verdana" |
69 | 83 | END |
@@ -0,0 +1,48 @@ | ||
1 | +#ifndef VERINFO_H | |
2 | +/* | |
3 | + * verinfo.h, verinfo.h.in | |
4 | + * | |
5 | + * $Id$ | |
6 | + * | |
7 | + * Written by Keith Marshall <keithmarshall@users.sourceforge.net> | |
8 | + * Copyright (C) 2013, MinGW.org Project | |
9 | + * | |
10 | + * | |
11 | + * Product version resource definitions which are common to all | |
12 | + * distributable components of the mingw-get package implementation; | |
13 | + * the deployable verinfo.h is generated from the source template, | |
14 | + * verinfo.h.in, at package build time. | |
15 | + * | |
16 | + * | |
17 | + * This is free software. Permission is granted to copy, modify and | |
18 | + * redistribute this software, under the provisions of the GNU General | |
19 | + * Public License, Version 3, (or, at your option, any later version), | |
20 | + * as published by the Free Software Foundation; see the file COPYING | |
21 | + * for licensing details. | |
22 | + * | |
23 | + * Note, in particular, that this software is provided "as is", in the | |
24 | + * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not | |
25 | + * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY | |
26 | + * PARTICULAR PURPOSE. Under no circumstances will the author, or the | |
27 | + * MinGW Project, accept liability for any damages, however caused, | |
28 | + * arising from the use of this software. | |
29 | + * | |
30 | + */ | |
31 | +#define VERINFO_H 1 | |
32 | + | |
33 | +#define VERINFO_PRODUCT_NAME "%PACKAGE_NAME%" | |
34 | +#define VERINFO_PRODUCT_VERSION %PACKAGE_VERINFO_PRODUCT_VERSION% | |
35 | +#define VERINFO_PRODUCT_VERSION_STRING "%PACKAGE_VERSION%" | |
36 | + | |
37 | +#define VERINFO_COMPANY_NAME "%COPYRIGHT_HOLDER%" | |
38 | +#define VERINFO_COPYRIGHT_NOTICE "Copyright \xa9 %YEARS_OF_ISSUE%, %COPYRIGHT_HOLDER%" | |
39 | + | |
40 | +#define VERINFO_FILE_OS VOS__WINDOWS32 | |
41 | +#define VERINFO_FILE_TYPE VFT_APP | |
42 | +#define VERINFO_FILE_SUBTYPE VFT2_UNKNOWN | |
43 | +#define VERINFO_FILE_FLAGS VS_FF_PRERELEASE | |
44 | + | |
45 | +#define VERINFO_DEFAULT_LOCALE "080904E4" /* U.K. English, code page 1252 */ | |
46 | +#define VERINFO_LOCALE_TUPLES 0x0809, 1252 | |
47 | + | |
48 | +#endif /* VERINFO_H: $RCSfile$: end of file */ |
@@ -0,0 +1,59 @@ | ||
1 | +/* | |
2 | + * verinfo.rc | |
3 | + * | |
4 | + * $Id$ | |
5 | + * | |
6 | + * Written by Keith Marshall <keithmarshall@users.sourceforge.net> | |
7 | + * Copyright (C) 2013, MinGW.org Project | |
8 | + * | |
9 | + * | |
10 | + * Resource definition template for adding version information | |
11 | + * properties to an application module. | |
12 | + * | |
13 | + * | |
14 | + * This is free software. Permission is granted to copy, modify and | |
15 | + * redistribute this software, under the provisions of the GNU General | |
16 | + * Public License, Version 3, (or, at your option, any later version), | |
17 | + * as published by the Free Software Foundation; see the file COPYING | |
18 | + * for licensing details. | |
19 | + * | |
20 | + * Note, in particular, that this software is provided "as is", in the | |
21 | + * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not | |
22 | + * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY | |
23 | + * PARTICULAR PURPOSE. Under no circumstances will the author, or the | |
24 | + * MinGW Project, accept liability for any damages, however caused, | |
25 | + * arising from the use of this software. | |
26 | + * | |
27 | + */ | |
28 | +#include "verinfo.h" | |
29 | + | |
30 | +VS_VERSION_INFO VERSIONINFO | |
31 | + FILEVERSION VERINFO_FILE_VERSION | |
32 | + PRODUCTVERSION VERINFO_PRODUCT_VERSION | |
33 | + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | |
34 | + FILEFLAGS VERINFO_FILE_FLAGS | |
35 | + FILEOS VERINFO_FILE_OS | |
36 | + FILETYPE VERINFO_FILE_TYPE | |
37 | + FILESUBTYPE VERINFO_FILE_SUBTYPE | |
38 | + BEGIN | |
39 | + BLOCK "StringFileInfo" | |
40 | + BEGIN | |
41 | + BLOCK VERINFO_DEFAULT_LOCALE | |
42 | + BEGIN | |
43 | + VALUE "ProductName", VERINFO_PRODUCT_NAME | |
44 | + VALUE "ProductVersion", VERINFO_PRODUCT_VERSION_STRING | |
45 | + VALUE "CompanyName", VERINFO_COMPANY_NAME | |
46 | + VALUE "LegalCopyright", VERINFO_COPYRIGHT_NOTICE | |
47 | + VALUE "OriginalFileName", VERINFO_FILE_NAME | |
48 | + VALUE "FileDescription", VERINFO_FILE_DESCRIPTION | |
49 | + VALUE "FileVersion", VERINFO_FILE_VERSION_STRING | |
50 | + VALUE "InternalName", VERINFO_INTERNAL_NAME | |
51 | + END | |
52 | + END | |
53 | + BLOCK "VarFileInfo" | |
54 | + BEGIN | |
55 | + VALUE "Translation", VERINFO_LOCALE_TUPLES | |
56 | + END | |
57 | + END | |
58 | + | |
59 | +/* $RCSfile$: end of file */ |