summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-10-08 13:18:15 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-10-08 13:18:15 (GMT)
commit9845cc7c9ceedb5f71e3f0223391fb952156b7d1 (patch)
treed91c6391f8f4a317b8119098a9722c108d6bfcab /win
parentfdc29e53d31d86bad4fd5489197ec23e34369052 (diff)
downloadtcl-9845cc7c9ceedb5f71e3f0223391fb952156b7d1.zip
tcl-9845cc7c9ceedb5f71e3f0223391fb952156b7d1.tar.gz
tcl-9845cc7c9ceedb5f71e3f0223391fb952156b7d1.tar.bz2
Add default rc template so extensions do not have to write their own
Diffstat (limited to 'win')
-rw-r--r--win/rules.vc46
-rw-r--r--win/tcl.rc20
2 files changed, 43 insertions, 23 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 702e313..d5952fd 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -398,8 +398,6 @@ _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -ou
CFG_ENCODING = \"cp1252\"
!endif
-!message =====================================================================
-
################################################################
# 4. Build the nmakehlp program
# This is a helper app we need to overcome nmake's limiting
@@ -1337,12 +1335,12 @@ MAKEGUICMD = $(link32) $(guilflags) -out:$@ $(baselibs) $(tcllibs)
MAKERESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \
$(TCL_INCLUDES) \
-DDEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
- -DTCL_THREADS=$(TCL_THREADS) \
- -DSTATIC_BUILD=$(STATIC_BUILD) \
-DCOMMAVERSION=$(DOTVERSION:.=,),0 \
-DDOTVERSION=\"$(DOTVERSION)\" \
-DVERSION=\"$(VERSION)\" \
-DSUFX=\"$(SUFX)\" \
+ -DPROJECT=\"$(PROJECT)\" \
+ -DPRJLIBNAME=\"$(PRJLIBNAME)\" \
$<
@@ -1404,6 +1402,43 @@ default-setup:
@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
+default-rc:
+ @$(COPY) << $(TMP_DIR)\$(PROJECT).rc
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION COMMAVERSION
+ PRODUCTVERSION COMMAVERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Tcl extension " PROJECT
+ VALUE "OriginalFilename", PRJLIBNAME
+ VALUE "FileVersion", DOTVERSION
+ VALUE "ProductName", "Package " PROJECT " for Tcl"
+ VALUE "ProductVersion", DOTVERSION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+<<
+
+
!ifndef DISABLE_IMPLICIT_RULES
# Implicit rule definitions - only for building library objects. For stubs and
# main application, the master makefile should define explicit rules.
@@ -1429,6 +1464,9 @@ $<
{$(WINDIR)}.rc{$(TMP_DIR)}.res:
$(MAKERESCMD)
+{$(TMP_DIR)}.rc{$(TMP_DIR)}.res:
+ $(MAKERESCMD)
+
.SUFFIXES:
.SUFFIXES:.c .rc
diff --git a/win/tcl.rc b/win/tcl.rc
index be5e0a7..2ca6015 100644
--- a/win/tcl.rc
+++ b/win/tcl.rc
@@ -4,24 +4,6 @@
#include <winver.h>
#include <tcl.h>
-//
-// build-up the name suffix that defines the type of build this is.
-//
-#if TCL_THREADS
-#define SUFFIX_THREADS "t"
-#else
-#define SUFFIX_THREADS ""
-#endif
-
-#if DEBUG && !UNCHECKED
-#define SUFFIX_DEBUG "g"
-#else
-#define SUFFIX_DEBUG ""
-#endif
-
-#define SUFFIX SUFFIX_THREADS SUFFIX_DEBUG
-
-
LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */
VS_VERSION_INFO VERSIONINFO
@@ -42,7 +24,7 @@ BEGIN
BLOCK "040904b0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
BEGIN
VALUE "FileDescription", "Tcl DLL\0"
- VALUE "OriginalFilename", "tcl" STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) SUFFIX ".dll\0"
+ VALUE "OriginalFilename", PRJLIBNAME
VALUE "CompanyName", "ActiveState Corporation\0"
VALUE "FileVersion", TCL_PATCH_LEVEL
VALUE "LegalCopyright", "Copyright \251 2001 by ActiveState Corporation, et al\0"