• R/O
  • SSH

libctools: Commit

This library contains code that extends and simplifies different operations
for C language based programs.


Commit MetaInfo

Revisión5b0028253cac689d394b159b310818ffa55bbc0e (tree)
Tiempo2023-02-26 04:23:14
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

file_propert_*.rc now are templates

Cambiar Resumen

Diferencia incremental

diff -r f55e6b4fe7d8 -r 5b0028253cac CMakeLists.txt
--- a/CMakeLists.txt Sat Feb 25 21:57:05 2023 +0300
+++ b/CMakeLists.txt Sat Feb 25 22:23:14 2023 +0300
@@ -90,6 +90,10 @@
9090 file(GLOB_RECURSE INC3 build_info/include/*.h)
9191
9292 if (WIN32)
93+ execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_build_info.py
94+ "CT" ${CMAKE_CURRENT_LIST_DIR}/build_info
95+ )
96+
9397 set(RC_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/build_info")
9498 set(RC_FILES "${RC_INCLUDE}/file_property.rc")
9599
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/file_property.rc
--- a/build_info/file_property.rc Sat Feb 25 21:57:05 2023 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
1-#include "windows.h"
2-
3-#include <ctools\predef\compiler.h>
4-#include <ctools\version_info.h>
5-
6-
7-#define VER_COMMA(hi, lo, build) CT_NUMBERIZE(hi),CT_NUMBERIZE(lo),CT_NUMBERIZE(build),0 // Like 0,2,0,0
8-#define FILE_VER_COMMA VER_COMMA(CT_MAJOR_VERSION, CT_MINOR_VERSION, CT_BUILD_REVISION)
9-
10-#if CT_INTERNAL_BUILD == true
11- #define VER_DEBUG VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
12-#else
13- #define VER_DEBUG 0
14-#endif
15-
16-#define VER_FILE_DESCRIPTION_STR CT_LIBRARY_NAME " library"
17-
18-#ifdef CT_COMPL_GCC_EMULATION
19-# define VER_ORIGINAL_FILE_NAME_STR "lib" CT_LIBRARY_NAME ".dll"
20-#else
21-# define VER_ORIGINAL_FILE_NAME_STR CT_LIBRARY_NAME ".dll"
22-#endif
23-
24-// --------- resources of type Version -----------
25-
26-1 VERSIONINFO
27-FILEVERSION FILE_VER_COMMA
28-PRODUCTVERSION FILE_VER_COMMA
29-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
30-FILEFLAGS VER_DEBUG
31-FILEOS VOS__WINDOWS32
32-FILETYPE VFT_APP
33-FILESUBTYPE VFT2_UNKNOWN
34-
35-BEGIN
36- BLOCK "StringFileInfo"
37- BEGIN
38- BLOCK "040904e4"
39- BEGIN
40- VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
41- VALUE "FileVersion", CT_K_VERSION
42- VALUE "InternalName", CT_LIBRARY_NAME
43- VALUE "LegalCopyright", "All rights reserved"
44- VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
45- VALUE "ProductName", CT_LIBRARY_NAME
46- VALUE "ProductVersion", CT_K_VERSION
47- END
48- END
49- BLOCK "VarFileInfo"
50- BEGIN
51- /* The following line should only be modified for localized versions. */
52- /* It consists of any number of WORD,WORD pairs, with each pair */
53- /* describing a language,codepage combination supported by the file. */
54- /* */
55- /* For example, a file might have values "0x409,1252" indicating that it */
56- /* supports English language (0x409) in the Windows ANSI codepage (1252). */
57-
58- VALUE "Translation", 0x409, 1252
59- END
60-END
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/file_property.rc.template
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build_info/file_property.rc.template Sat Feb 25 22:23:14 2023 +0300
@@ -0,0 +1,73 @@
1+/*
2+ * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3+ * @section LICENSE
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+ *
8+ * @section DESCRIPTION
9+ * This file should be processed by C/C++ compilers and MS resource compiler.
10+ * Do not edit. Automatically generated file
11+ */
12+
13+
14+#include "windows.h"
15+
16+#include <ctools\predef\compiler.h>
17+#include <ctools\version_info.h>
18+
19+
20+#define VER_COMMA(hi, lo, build) CT_NUMBERIZE(hi),CT_NUMBERIZE(lo),CT_NUMBERIZE(build),0 // Like 0,2,0,0
21+#define FILE_VER_COMMA VER_COMMA({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION)
22+
23+#if {prefix}_INTERNAL_BUILD == true
24+ #define VER_DEBUG VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
25+#else
26+ #define VER_DEBUG 0
27+#endif
28+
29+#define VER_FILE_DESCRIPTION_STR {prefix}_LIBRARY_NAME " library"
30+
31+#ifdef CT_COMPL_GCC_EMULATION
32+# define VER_ORIGINAL_FILE_NAME_STR "lib" {prefix}_LIBRARY_NAME ".dll"
33+#else
34+# define VER_ORIGINAL_FILE_NAME_STR {prefix}_LIBRARY_NAME ".dll"
35+#endif
36+
37+// --------- resources of type Version -----------
38+
39+1 VERSIONINFO
40+FILEVERSION FILE_VER_COMMA
41+PRODUCTVERSION FILE_VER_COMMA
42+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
43+FILEFLAGS VER_DEBUG
44+FILEOS VOS__WINDOWS32
45+FILETYPE VFT_APP
46+FILESUBTYPE VFT2_UNKNOWN
47+
48+BEGIN
49+ BLOCK "StringFileInfo"
50+ BEGIN
51+ BLOCK "040904e4"
52+ BEGIN
53+ VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
54+ VALUE "FileVersion", {prefix}_K_VERSION
55+ VALUE "InternalName", {prefix}_LIBRARY_NAME
56+ VALUE "LegalCopyright", "All rights reserved"
57+ VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
58+ VALUE "ProductName", {prefix}_LIBRARY_NAME
59+ VALUE "ProductVersion", {prefix}_K_VERSION
60+ END
61+ END
62+ BLOCK "VarFileInfo"
63+ BEGIN
64+ /* The following line should only be modified for localized versions. */
65+ /* It consists of any number of WORD,WORD pairs, with each pair */
66+ /* describing a language,codepage combination supported by the file. */
67+ /* */
68+ /* For example, a file might have values "0x409,1252" indicating that it */
69+ /* supports English language (0x409) in the Windows ANSI codepage (1252). */
70+
71+ VALUE "Translation", 0x409, 1252
72+ END
73+END
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/file_property_app.rc
--- a/build_info/file_property_app.rc Sat Feb 25 21:57:05 2023 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
1-/*
2- * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3- * @section LICENSE
4- * This Source Code Form is subject to the terms of the Mozilla Public
5- * License, v. 2.0. If a copy of the MPL was not distributed with this
6- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7- *
8- * @section DESCRIPTION
9- * This file should be processed by C/C++ compilers and MS resource compiler
10- * Do not edit. Automatically generated file.
11- * Template for applications only, copy it to the application project
12- */
13-
14-
15-#include "windows.h"
16-
17-#include "version_info.h"
18-
19-
20-#define VER_COMMA(hi, lo, build) CT_NUMBERIZE(hi),CT_NUMBERIZE(lo),CT_NUMBERIZE(build),0 // Like 0,2,0,0
21-#define FILE_VER_COMMA VER_COMMA(RZDT_MAJOR_VERSION, RZDT_MINOR_VERSION, RZDT_BUILD_REVISION)
22-
23-#if RZDT_INTERNAL_BUILD == true
24- #define VER_DEBUG VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
25-#else
26- #define VER_DEBUG 0
27-#endif
28-
29-#define VER_FILE_DESCRIPTION_STR {prefix}_APPLICATION_NAME
30-
31-#define VER_ORIGINAL_FILE_NAME_STR {prefix}_APPLICATION_NAME ".exe"
32-
33-MAINICON ICON DISCARDABLE {prefix}_ICON_PATH
34-
35-// --------- resources of type Version -----------
36-
37-1 VERSIONINFO
38-FILEVERSION FILE_VER_COMMA
39-PRODUCTVERSION FILE_VER_COMMA
40-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
41-FILEFLAGS VER_DEBUG
42-FILEOS VOS__WINDOWS32
43-FILETYPE VFT_APP
44-FILESUBTYPE VFT2_UNKNOWN
45-
46-BEGIN
47- BLOCK "StringFileInfo"
48- BEGIN
49- BLOCK "040904e4"
50- BEGIN
51- VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
52- VALUE "FileVersion", {prefix}_K_VERSION
53- VALUE "InternalName", {prefix}_APPLICATION_NAME
54- VALUE "LegalCopyright", "All rights reserved"
55- VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
56- VALUE "ProductName", {prefix}_APPLICATION_NAME
57- VALUE "ProductVersion", {prefix}_K_VERSION
58- END
59- END
60- BLOCK "VarFileInfo"
61- BEGIN
62- /* The following line should only be modified for localized versions. */
63- /* It consists of any number of WORD,WORD pairs, with each pair */
64- /* describing a language,codepage combination supported by the file. */
65- /* */
66- /* For example, a file might have values "0x409,1252" indicating that it */
67- /* supports English language (0x409) in the Windows ANSI codepage (1252). */
68-
69- VALUE "Translation", 0x409, 1252
70- END
71-END
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/file_property_app.rc.template
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build_info/file_property_app.rc.template Sat Feb 25 22:23:14 2023 +0300
@@ -0,0 +1,71 @@
1+/*
2+ * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3+ * @section LICENSE
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+ *
8+ * @section DESCRIPTION
9+ * This file should be processed by C/C++ compilers and MS resource compiler.
10+ * Do not edit. Automatically generated file.
11+ * Template for applications only, copy it to the application project
12+ */
13+
14+
15+#include "windows.h"
16+
17+#include "version_info.h"
18+
19+
20+#define VER_COMMA(hi, lo, build) CT_NUMBERIZE(hi),CT_NUMBERIZE(lo),CT_NUMBERIZE(build),0 // Like 0,2,0,0
21+#define FILE_VER_COMMA VER_COMMA({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION)
22+
23+#if {prefix}_INTERNAL_BUILD == true
24+ #define VER_DEBUG VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
25+#else
26+ #define VER_DEBUG 0
27+#endif
28+
29+#define VER_FILE_DESCRIPTION_STR {prefix}_APPLICATION_NAME
30+
31+#define VER_ORIGINAL_FILE_NAME_STR {prefix}_APPLICATION_NAME ".exe"
32+
33+MAINICON ICON DISCARDABLE {prefix}_ICON_PATH
34+
35+// --------- resources of type Version -----------
36+
37+1 VERSIONINFO
38+FILEVERSION FILE_VER_COMMA
39+PRODUCTVERSION FILE_VER_COMMA
40+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
41+FILEFLAGS VER_DEBUG
42+FILEOS VOS__WINDOWS32
43+FILETYPE VFT_APP
44+FILESUBTYPE VFT2_UNKNOWN
45+
46+BEGIN
47+ BLOCK "StringFileInfo"
48+ BEGIN
49+ BLOCK "040904e4"
50+ BEGIN
51+ VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
52+ VALUE "FileVersion", {prefix}_K_VERSION
53+ VALUE "InternalName", {prefix}_APPLICATION_NAME
54+ VALUE "LegalCopyright", "All rights reserved"
55+ VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
56+ VALUE "ProductName", {prefix}_APPLICATION_NAME
57+ VALUE "ProductVersion", {prefix}_K_VERSION
58+ END
59+ END
60+ BLOCK "VarFileInfo"
61+ BEGIN
62+ /* The following line should only be modified for localized versions. */
63+ /* It consists of any number of WORD,WORD pairs, with each pair */
64+ /* describing a language,codepage combination supported by the file. */
65+ /* */
66+ /* For example, a file might have values "0x409,1252" indicating that it */
67+ /* supports English language (0x409) in the Windows ANSI codepage (1252). */
68+
69+ VALUE "Translation", 0x409, 1252
70+ END
71+END
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/include/ctools/version_info.h.template
--- a/build_info/include/ctools/version_info.h.template Sat Feb 25 21:57:05 2023 +0300
+++ b/build_info/include/ctools/version_info.h.template Sat Feb 25 22:23:14 2023 +0300
@@ -6,7 +6,7 @@
66 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
77 *
88 * @section DESCRIPTION
9- * This file should be processed by C/C++ compilers and MS resource compiler
9+ * This file should be processed by C/C++ compilers and MS resource compiler.
1010 * Do not edit. Automatically generated file
1111 */
1212
diff -r f55e6b4fe7d8 -r 5b0028253cac build_info/include/ctools/version_info_app.h.template
--- a/build_info/include/ctools/version_info_app.h.template Sat Feb 25 21:57:05 2023 +0300
+++ b/build_info/include/ctools/version_info_app.h.template Sat Feb 25 22:23:14 2023 +0300
@@ -6,7 +6,7 @@
66 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
77 *
88 * @section DESCRIPTION
9- * This file should be processed by C/C++ compilers and MS resource compiler
9+ * This file should be processed by C/C++ compilers and MS resource compiler.
1010 * Do not edit. Automatically generated file.
1111 * Template for applications only, copy it to the application project
1212 */
diff -r f55e6b4fe7d8 -r 5b0028253cac scripts/cleanall.py
--- a/scripts/cleanall.py Sat Feb 25 21:57:05 2023 +0300
+++ b/scripts/cleanall.py Sat Feb 25 22:23:14 2023 +0300
@@ -25,6 +25,9 @@
2525 # build_info on non-standard path
2626 fsys.removeFile(os.path.join(parentDir, 'build_info', 'include', 'ctools', 'version_info.h'))
2727
28+ fsys.removeFile(os.path.join(parentDir, 'build_info', 'file_property.rc'))
29+ fsys.removeFile(os.path.join(parentDir, 'build_info', 'file_property_app.rc'))
30+
2831 fsys.removeFile(os.path.join(parentDir, 'include', 'ctools', 'trace_bcc.h'))
2932 fsys.cleanDir(os.path.join(parentDir, 'build', 'runners'))
3033
Show on old repository browser