Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df2ff9d43d | ||
|
|
980b9441a4 | ||
|
|
a67ca85c2b | ||
|
|
e00d26bace | ||
|
|
4dc1ddd646 | ||
|
|
5b20eff788 | ||
|
|
3916b47358 | ||
|
|
207bf9aa69 | ||
|
|
974b592602 | ||
|
|
9d4ac69dfc | ||
|
|
e9fe9e755c | ||
|
|
45b9ed7703 | ||
|
|
090e5041f7 | ||
|
|
67681ec324 | ||
|
|
8e247cc6a3 | ||
|
|
d1d3fd976d | ||
|
|
d8dbc22dc7 | ||
|
|
f2e4744fc4 | ||
|
|
2c5e45746f | ||
|
|
6beacbba8a | ||
|
|
ad696be16d | ||
|
|
8e89253fad |
@@ -153,6 +153,7 @@ jobs:
|
||||
run: |
|
||||
make binaries libraries
|
||||
echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
|
||||
rm tclsh*c*.exe
|
||||
working-directory: win
|
||||
- name: Get Exact Version
|
||||
run: |
|
||||
|
||||
@@ -53,6 +53,7 @@ static Tcl_ObjCmdProc EncodingDirsObjCmd;
|
||||
static Tcl_ObjCmdProc EncodingNamesObjCmd;
|
||||
static Tcl_ObjCmdProc EncodingProfilesObjCmd;
|
||||
static Tcl_ObjCmdProc EncodingSystemObjCmd;
|
||||
static Tcl_ObjCmdProc EncodingUserObjCmd;
|
||||
static inline int ForeachAssignments(Tcl_Interp *interp,
|
||||
struct ForeachState *statePtr);
|
||||
static inline void ForeachCleanup(Tcl_Interp *interp,
|
||||
@@ -394,6 +395,7 @@ TclInitEncodingCmd(
|
||||
{"names", EncodingNamesObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
|
||||
{"profiles", EncodingProfilesObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
|
||||
{"system", EncodingSystemObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1},
|
||||
{"user", EncodingUserObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 1},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -828,6 +830,41 @@ EncodingSystemObjCmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*-----------------------------------------------------------------------------
|
||||
*
|
||||
* EncodingUserObjCmd --
|
||||
*
|
||||
* This command retrieves the encoding as per the user settings.
|
||||
*
|
||||
* Results:
|
||||
* Returns a standard Tcl result
|
||||
*
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
EncodingUserObjCmd(
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp* interp, /* Tcl interpreter */
|
||||
int objc, /* Number of command line args */
|
||||
Tcl_Obj* const objv[]) /* Vector of command line args */
|
||||
{
|
||||
if (objc != 1) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
const char *encodingName = Tcl_GetEncodingName(TclWinGetUserEncoding(interp));
|
||||
if (encodingName) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(encodingName, -1));
|
||||
}
|
||||
return TCL_OK;
|
||||
#else
|
||||
return EncodingSystemObjCmd(NULL, interp, objc, objv);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -683,6 +683,9 @@ declare 8 {
|
||||
declare 9 {
|
||||
TclFile TclpCreateTempFile(const char *contents)
|
||||
}
|
||||
declare 10 {
|
||||
Tcl_Encoding TclWinGetUserEncoding(Tcl_Interp *interp)
|
||||
}
|
||||
declare 11 {
|
||||
void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
|
||||
}
|
||||
|
||||
@@ -547,7 +547,8 @@ EXTERN TclFile TclpOpenFile(const char *fname, int mode);
|
||||
EXTERN Tcl_Size TclpGetPid(Tcl_Pid pid);
|
||||
/* 9 */
|
||||
EXTERN TclFile TclpCreateTempFile(const char *contents);
|
||||
/* Slot 10 is reserved */
|
||||
/* 10 */
|
||||
EXTERN Tcl_Encoding TclWinGetUserEncoding(Tcl_Interp *interp);
|
||||
/* 11 */
|
||||
EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
|
||||
Tcl_Channel chan);
|
||||
@@ -600,7 +601,7 @@ typedef struct TclIntPlatStubs {
|
||||
TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
|
||||
Tcl_Size (*tclpGetPid) (Tcl_Pid pid); /* 8 */
|
||||
TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
|
||||
void (*reserved10)(void);
|
||||
Tcl_Encoding (*tclWinGetUserEncoding) (Tcl_Interp *interp); /* 10 */
|
||||
void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
|
||||
void (*reserved12)(void);
|
||||
void (*reserved13)(void);
|
||||
@@ -654,7 +655,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
|
||||
(tclIntPlatStubsPtr->tclpGetPid) /* 8 */
|
||||
#define TclpCreateTempFile \
|
||||
(tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
|
||||
/* Slot 10 is reserved */
|
||||
#define TclWinGetUserEncoding \
|
||||
(tclIntPlatStubsPtr->tclWinGetUserEncoding) /* 10 */
|
||||
#define TclGetAndDetachPids \
|
||||
(tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
|
||||
/* Slot 12 is reserved */
|
||||
@@ -736,4 +738,12 @@ MODULE_SCOPE int TclMacOSXMatchType(Tcl_Interp *interp,
|
||||
# define TclpGetPid(pid) ((Tcl_Size)(pid))
|
||||
#endif
|
||||
|
||||
#ifdef USE_TCL_STUBS
|
||||
/* Protect TclWinGetUserEncoding() for environments it doen't exist, e.g. Tcl 9.0.0/9.0.1 */
|
||||
#undef TclWinGetUserEncoding
|
||||
#define TclWinGetUserEncoding(interp) \
|
||||
(tclIntPlatStubsPtr->tclWinGetUserEncoding ? tclIntPlatStubsPtr->tclWinGetUserEncoding(interp) : NULL)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _TCLINTPLATDECLS */
|
||||
|
||||
@@ -69,6 +69,10 @@
|
||||
# undef Tcl_WinConvertError
|
||||
# define Tcl_WinConvertError 0
|
||||
#endif
|
||||
#if !defined(_WIN32)
|
||||
# undef TclWinGetUserEncoding
|
||||
# define TclWinGetUserEncoding 0
|
||||
#endif
|
||||
#undef TclGetStringFromObj
|
||||
#if defined(TCL_NO_DEPRECATED)
|
||||
# define TclGetStringFromObj 0
|
||||
@@ -692,7 +696,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
|
||||
TclpOpenFile, /* 7 */
|
||||
TclpGetPid, /* 8 */
|
||||
TclpCreateTempFile, /* 9 */
|
||||
0, /* 10 */
|
||||
TclWinGetUserEncoding, /* 10 */
|
||||
TclGetAndDetachPids, /* 11 */
|
||||
0, /* 12 */
|
||||
0, /* 13 */
|
||||
|
||||
+1
-1
@@ -323,7 +323,7 @@ test cmdAH-4.1.1 {encoding} -returnCodes error -body {
|
||||
} -result {wrong # args: should be "encoding subcommand ?arg ...?"}
|
||||
test cmdAH-4.1.2 {Tcl_EncodingObjCmd} -returnCodes error -body {
|
||||
encoding foo
|
||||
} -result {unknown or ambiguous subcommand "foo": must be convertfrom, convertto, dirs, names, profiles, or system}
|
||||
} -result {unknown or ambiguous subcommand "foo": must be convertfrom, convertto, dirs, names, profiles, system, or user}
|
||||
|
||||
#
|
||||
# encoding system 4.2.*
|
||||
|
||||
@@ -1150,6 +1150,16 @@ test encoding-30.3 {encoding convertfrom large strings > 4GB} -constraints {
|
||||
list [string length [set s [string repeat A 0x100000000]]] [string equal $s [encoding convertfrom ascii $s]]
|
||||
} -result {4294967296 1}
|
||||
|
||||
# TIP 718 test
|
||||
test encoding-31.0 {encoding user} -constraints win -body {
|
||||
package require registry
|
||||
set acp cp[registry get HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage ACP]
|
||||
if {$acp eq "cp65001"} {set acp utf-8}
|
||||
string equal [encoding user] $acp
|
||||
} -cleanup {
|
||||
unset acp
|
||||
} -result 1
|
||||
|
||||
test encoding-bug-6a3e2cb0f0-1 {Bug [6a3e2cb0f0] - invalid bytes in escape encodings} -body {
|
||||
encoding convertfrom -profile tcl8 iso2022-jp x\x1B\x7Aaby
|
||||
} -result x\uFFFDy
|
||||
|
||||
+1
-1
@@ -880,7 +880,7 @@ test scan-14.2 {negative infinity} {
|
||||
return $d
|
||||
} -Inf
|
||||
|
||||
test scan-15.1 {scan %g overflow for small numbers and big mantissa bug 42d14c495a} {
|
||||
test scan-15.1 {scan %g overflow for small numbers and big mantissa bug 42d14c495a} knownBug {
|
||||
set result [list]
|
||||
# xfail: n<num> = not expected at all, x<num> expected when unfixed
|
||||
foreach {exp numdig ret xfail} {
|
||||
|
||||
+1
-1
@@ -2410,7 +2410,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in gen
|
||||
$(DIST_INSTALL_DATA) $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
|
||||
$(DIST_INSTALL_DATA) $(TOP_DIR)/win/configure.ac \
|
||||
$(TOP_DIR)/win/tclConfig.sh.in $(TOP_DIR)/win/tclooConfig.sh \
|
||||
$(TOP_DIR)/win/tcl.m4 $(TOP_DIR)/win/aclocal.m4 \
|
||||
$(TOP_DIR)/win/tcl.m4 $(TOP_DIR)/win/aclocal.m4 $(TOP_DIR)/win/tcl.dll.manifest.in \
|
||||
$(TOP_DIR)/win/tclsh.exe.manifest.in $(TOP_DIR)/win/tclUuid.h.in \
|
||||
$(TOP_DIR)/win/gitmanifest.in $(TOP_DIR)/win/svnmanifest.in \
|
||||
$(TOP_DIR)/win/x86_64-w64-mingw32-nmakehlp.exe $(DISTDIR)/win
|
||||
|
||||
+20
-10
@@ -171,6 +171,7 @@ SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@
|
||||
STATIC_LIBRARIES = $(TCL_LIB_FILE)
|
||||
|
||||
TCLSH = tclsh$(VER)${EXESUFFIX}
|
||||
TCLSHC = tclsh$(VER)c${EXESUFFIX}
|
||||
WINE = @WINE@
|
||||
CAT32 = cat32$(EXEEXT)
|
||||
|
||||
@@ -532,7 +533,7 @@ tcltest.sh: tcltest.cmd
|
||||
|
||||
tcltest: binaries $(TEST_EXE_FILE) $(TEST_DLL_FILE) $(CAT32) tcltest.cmd
|
||||
|
||||
binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ winextensions ${TCL_ZIP_FILE} $(TCLSH)
|
||||
binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ winextensions ${TCL_ZIP_FILE} $(TCLSH) $(TCLSHC)
|
||||
|
||||
winextensions: ${DDE_DLL_FILE} ${REG_DLL_FILE} ${DDE_DLL_FILE8} ${REG_DLL_FILE8}
|
||||
|
||||
@@ -568,6 +569,15 @@ $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) ${TCL_ZIP_
|
||||
cat ${TCL_ZIP_FILE} >> ${TCLSH}; \
|
||||
fi
|
||||
|
||||
$(TCLSHC): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclshc.$(RES) ${TCL_ZIP_FILE}
|
||||
$(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \
|
||||
tclshc.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
|
||||
$(COPY) tcl.dll.manifest $(TCLSHC).manifest
|
||||
@VC_MANIFEST_EMBED_EXE@
|
||||
@if test "${ZIPFS_BUILD}" = "2" ; then \
|
||||
cat ${TCL_ZIP_FILE} >> ${TCLSH}; \
|
||||
fi
|
||||
|
||||
cat32.$(OBJEXT): cat.c
|
||||
$(CC) -c $(CC_SWITCHES) -DUNICODE -D_UNICODE @DEPARG@ $(CC_OBJNAME)
|
||||
|
||||
@@ -585,7 +595,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} ${DDE_OBJS} ${REG_OBJS}
|
||||
${TCL_DLL_FILE}: ${TCL_LIB_FILE} ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@ ${TCL_ZIP_FILE}
|
||||
@$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE)
|
||||
@MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${TCL_DLL_FILE}.manifest
|
||||
$(COPY) tcl.dll.manifest ${TCL_DLL_FILE}.manifest
|
||||
@VC_MANIFEST_EMBED_DLL@
|
||||
@if test "${ZIPFS_BUILD}" = "1" ; then \
|
||||
cat ${TCL_ZIP_FILE} >> ${TCL_DLL_FILE}; \
|
||||
@@ -603,24 +613,24 @@ endif
|
||||
|
||||
${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${DDE_OBJS}
|
||||
@MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${DDE_DLL_FILE}.manifest
|
||||
$(COPY) tcl.dll.manifest ${DDE_DLL_FILE}.manifest
|
||||
|
||||
${REG_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${REG_OBJS}
|
||||
@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${REG_DLL_FILE}.manifest
|
||||
$(COPY) tcl.dll.manifest ${REG_DLL_FILE}.manifest
|
||||
|
||||
${DDE_DLL_FILE8}: ${TCL_STUB_LIB_FILE} tcl8WinDde.$(OBJEXT)
|
||||
@MAKE_DLL@ tcl8WinDde.$(OBJEXT) $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${DDE_DLL_FILE8}.manifest
|
||||
$(COPY) tcl.dll.manifest ${DDE_DLL_FILE8}.manifest
|
||||
|
||||
${REG_DLL_FILE8}: ${TCL_STUB_LIB_FILE} tcl8WinReg.$(OBJEXT)
|
||||
@MAKE_DLL@ -DTCL_MAJOR_VERSION=8 tcl8WinReg.$(OBJEXT) $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${REG_DLL_FILE8}.manifest
|
||||
$(COPY) tcl.dll.manifest ${REG_DLL_FILE8}.manifest
|
||||
|
||||
${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
|
||||
@$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}
|
||||
@MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
|
||||
$(COPY) tclsh.exe.manifest ${TEST_DLL_FILE}.manifest
|
||||
$(COPY) tcl.dll.manifest ${TEST_DLL_FILE}.manifest
|
||||
|
||||
${TEST_EXE_FILE}: @LIBRARIES@ ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} tclTestMain.${OBJEXT}
|
||||
@$(RM) ${TEST_EXE_FILE}
|
||||
@@ -860,7 +870,7 @@ install-binaries: binaries
|
||||
else true; \
|
||||
fi; \
|
||||
done;
|
||||
@for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TOMMATH_DLL_FILE) $(TCLSH); \
|
||||
@for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TOMMATH_DLL_FILE) $(TCLSH) $(TCLSHC); \
|
||||
do \
|
||||
if [ -f $$i ]; then \
|
||||
echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \
|
||||
@@ -1056,10 +1066,10 @@ cleanhelp:
|
||||
|
||||
clean: cleanhelp clean-packages
|
||||
$(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out
|
||||
$(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh
|
||||
$(RM) $(TCLSH) $(TCLSHC) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh
|
||||
# remaining binaries (inclusive manifests) by version/branch switch, but retain tclsh.exe.manifest (that created on configure phase)
|
||||
find . -maxdepth 1 -type f -regex '\./tcl\(sh[^.]+\|test\|[^.]+.dll\)\.[^.]*\(\.manifest\)?' \
|
||||
-a -not -name 'tclsh.exe.manifest' -exec rm {} \;
|
||||
-a -not -name 'tclsh.exe.manifest' -a -not -name 'tcl.dll.manifest' -exec rm {} \;
|
||||
$(RM) *.pch *.ilk *.pdb *.zip
|
||||
$(RM) minizip${HOST_EXEEXT} *.${HOST_OBJEXT}
|
||||
$(RMDIR) *.vfs
|
||||
|
||||
Vendored
+2
-1
@@ -6048,7 +6048,7 @@ TCL_WIN_VERSION="$TCL_VERSION.$TCL_RELEASE_LEVEL.`echo $TCL_PATCH_LEVEL | tr -d
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile tclConfig.sh tclsh.exe.manifest"
|
||||
ac_config_files="$ac_config_files Makefile tclConfig.sh tclsh.exe.manifest tcl.dll.manifest"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -6754,6 +6754,7 @@ do
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;;
|
||||
"tclsh.exe.manifest") CONFIG_FILES="$CONFIG_FILES tclsh.exe.manifest" ;;
|
||||
"tcl.dll.manifest") CONFIG_FILES="$CONFIG_FILES tcl.dll.manifest" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
||||
+1
-1
@@ -485,7 +485,7 @@ AC_SUBST(RC_DEFINE)
|
||||
AC_SUBST(RC_DEFINES)
|
||||
AC_SUBST(RES)
|
||||
|
||||
AC_CONFIG_FILES([Makefile tclConfig.sh tclsh.exe.manifest])
|
||||
AC_CONFIG_FILES([Makefile tclConfig.sh tclsh.exe.manifest tcl.dll.manifest])
|
||||
AC_OUTPUT
|
||||
|
||||
dnl Local Variables:
|
||||
|
||||
+25
-4
@@ -145,7 +145,12 @@ RCFILE = tcl.rc
|
||||
# The tclsh executable without the embedded libzip. We need this
|
||||
# separately from tclsh to have dependency and build order work right.
|
||||
# Ditto for the DLL and tcltest
|
||||
|
||||
TCLSHCNAME = $(PROJECT)sh$(VERSION)c$(SUFX).exe
|
||||
TCLSHC = $(OUT_DIR)\$(TCLSHCNAME)
|
||||
|
||||
TCLSHRAW=$(TCLSH:.exe=-raw.exe)
|
||||
TCLSHCRAW=$(TCLSHC:.exe=-raw.exe)
|
||||
TCLLIBRAW=$(TCLLIB:.dll=-raw.dll)
|
||||
|
||||
# Tcl version info based on macros set up by rules.vc
|
||||
@@ -226,7 +231,6 @@ TCLTESTRAW = $(TCLTEST:.exe=-raw.exe)
|
||||
|
||||
TCLSHOBJS = \
|
||||
$(TMP_DIR)\tclAppInit.obj \
|
||||
$(TMP_DIR)\tclsh.res
|
||||
|
||||
TCLTESTOBJS = \
|
||||
$(TMP_DIR)\tclTest.obj \
|
||||
@@ -528,10 +532,11 @@ core: libtclzip
|
||||
@$(COPY) /b "$(TCLLIBRAW)"+"$(TCLSCRIPTZIP)" "$(TCLLIB)"
|
||||
!endif
|
||||
|
||||
shell: setup core $(TCLSH)
|
||||
shell: setup core $(TCLSH) $(TCLSHC)
|
||||
!if $(TCL_EMBED_SCRIPTS) && $(STATIC_BUILD)
|
||||
shell: libtclzip
|
||||
@$(COPY) /b "$(TCLSHRAW)"+"$(TCLSCRIPTZIP)" "$(TCLSH)"
|
||||
@$(COPY) /b "$(TCLSHCRAW)"+"$(TCLSCRIPTZIP)" "$(TCLSHC)"
|
||||
!endif
|
||||
|
||||
dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll
|
||||
@@ -590,7 +595,7 @@ $(TCLIMPLIB): $(TCLLIB)
|
||||
$(TCLSTUBLIB): $(TCLSTUBOBJS)
|
||||
$(LIBCMD) -nodefaultlib $(TCLSTUBOBJS)
|
||||
|
||||
$(TCLSH): $(TCLSHOBJS) $(TCLSTUBLIB) $(TCLIMPLIB)
|
||||
$(TCLSH): $(TCLSHOBJS) $(TMP_DIR)\tclsh.res $(TCLSTUBLIB) $(TCLIMPLIB)
|
||||
$(CONEXECMD) -stack:2300000 $**
|
||||
copy $(TMP_DIR)\tclsh.exe.manifest $(TCLSH).manifest
|
||||
$(_VC_MANIFEST_EMBED_EXE)
|
||||
@@ -598,6 +603,14 @@ $(TCLSH): $(TCLSHOBJS) $(TCLSTUBLIB) $(TCLIMPLIB)
|
||||
$(COPY) $@ $(TCLSHRAW)
|
||||
!endif
|
||||
|
||||
$(TCLSHC): $(TCLSHOBJS) $(TMP_DIR)\tclshc.res $(TCLSTUBLIB) $(TCLIMPLIB)
|
||||
$(CONEXECMD) -stack:2300000 $**
|
||||
copy $(TMP_DIR)\tcl.dll.manifest $(TCLSHC).manifest
|
||||
$(_VC_MANIFEST_EMBED_EXE)
|
||||
!if $(TCL_EMBED_SCRIPTS) && $(STATIC_BUILD)
|
||||
$(COPY) $@ $(TCLSHCRAW)
|
||||
!endif
|
||||
|
||||
|
||||
$(TCLTEST): $(TCLTESTOBJS) $(TCLSTUBLIB) $(TCLIMPLIB)
|
||||
$(CONEXECMD) -stack:2300000 $**
|
||||
@@ -654,7 +667,7 @@ $(OUT_DIR)\tommath.lib: $(TOMMATHDIR)\win64\tommath.lib
|
||||
$(COPY) $(TOMMATHDIR)\win64\tommath.lib $(OUT_DIR)\tommath.lib
|
||||
!endif
|
||||
|
||||
$(TCLSCRIPTZIP): $(TCLLIB) $(TCLSH) dlls
|
||||
$(TCLSCRIPTZIP): $(TCLLIB) $(TCLSH) $(TCLSHC) dlls
|
||||
@echo Building Tcl library zip file $(TCLSCRIPTZIP)
|
||||
@set TCL_LIBRARY=$(ROOT:\=/)/library
|
||||
@if exist "$(LIBTCLVFS)" $(RMDIR) "$(LIBTCLVFS)"
|
||||
@@ -982,6 +995,12 @@ $(TMP_DIR)\tclsh.exe.manifest: $(WIN_DIR)\tclsh.exe.manifest.in
|
||||
@TCL_WIN_VERSION@ $(DOTVERSION).0.0
|
||||
<<
|
||||
|
||||
$(TMP_DIR)\tcl.dll.manifest: $(WIN_DIR)\tcl.dll.manifest.in
|
||||
@nmakehlp -s << $** >$@
|
||||
@MACHINE@ $(MACHINE:IX86=X86)
|
||||
@TCL_WIN_VERSION@ $(DOTVERSION).0.0
|
||||
<<
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Generate the source dependencies. Having dependency rules will
|
||||
# improve incremental build accuracy without having to resort to a
|
||||
@@ -1035,6 +1054,8 @@ $<
|
||||
|
||||
$(TMP_DIR)\tclsh.res: $(TMP_DIR)\tclsh.exe.manifest $(WIN_DIR)\tclsh.rc
|
||||
|
||||
$(TMP_DIR)\tclshc.res: $(TMP_DIR)\tcl.dll.manifest $(WIN_DIR)\tclshc.rc
|
||||
|
||||
$(TMP_DIR)\tcltest.res: $(TMP_DIR)\tclsh.exe.manifest $(WIN_DIR)\tcltest.rc
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<assemblyIdentity
|
||||
version="@TCL_WIN_VERSION@"
|
||||
processorArchitecture="@MACHINE@"
|
||||
name="Tcl.tclsh"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Tcl command line shell (tclsh)</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false"
|
||||
/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings
|
||||
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="@MACHINE@"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
@@ -35,6 +35,12 @@ typedef struct {
|
||||
WORD wReserved;
|
||||
} OemId;
|
||||
|
||||
typedef struct {
|
||||
Tcl_Encoding userEncoding;
|
||||
} ThreadSpecificData;
|
||||
|
||||
static Tcl_ThreadDataKey dataKey;
|
||||
|
||||
/*
|
||||
* The following arrays contain the human readable strings for the
|
||||
* processor values.
|
||||
@@ -453,6 +459,55 @@ TclpSetInitialEncodings(void)
|
||||
Tcl_DStringFree(&encodingName);
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* TclWinGetUserEncoding --
|
||||
*
|
||||
* Determines the encoding corresponding to the GetACP() call.
|
||||
* Since GetACP() cannot be thrusted, poke the
|
||||
* value from the registry directly.
|
||||
*
|
||||
* Results:
|
||||
* The found encoding. Or NULL if the encoding cannot be found.
|
||||
*
|
||||
* Side effects:
|
||||
* The returned encoding is valid until a future TclWinGetUserEncoding()
|
||||
* call determines that the ACP encoding changed. That should never happen.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
Tcl_Encoding
|
||||
TclWinGetUserEncoding(Tcl_Interp *interp)
|
||||
{
|
||||
WCHAR buf[32] = L"cp";
|
||||
|
||||
HKEY hKey;
|
||||
DWORD type = -1;
|
||||
DWORD size=sizeof(buf) - 2;
|
||||
Tcl_DString ds;
|
||||
RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage",
|
||||
0, KEY_READ, &hKey);
|
||||
RegQueryValueExW(hKey, L"ACP", NULL, &type, (BYTE *)&buf[2], &size);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
|
||||
if (!wcscmp(buf, L"cp65001")) {
|
||||
wcscpy(buf, L"utf-8");
|
||||
}
|
||||
Tcl_DStringInit(&ds);
|
||||
Tcl_WCharToUtfDString(buf, -1, &ds);
|
||||
if (!tsdPtr->userEncoding
|
||||
|| strcmp(Tcl_GetEncodingName(tsdPtr->userEncoding), Tcl_DStringValue(&ds))) {
|
||||
if (tsdPtr->userEncoding) {
|
||||
Tcl_FreeEncoding(tsdPtr->userEncoding);
|
||||
}
|
||||
tsdPtr->userEncoding = Tcl_GetEncoding(interp, Tcl_DStringValue(&ds));
|
||||
}
|
||||
Tcl_DStringFree(&ds);
|
||||
return tsdPtr->userEncoding;
|
||||
}
|
||||
|
||||
const char *
|
||||
Tcl_GetEncodingNameFromEnvironment(
|
||||
Tcl_DString *bufPtr)
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// Version Resource Script
|
||||
//
|
||||
|
||||
#include <winver.h>
|
||||
#include <tcl.h>
|
||||
|
||||
//
|
||||
// build-up the name suffix that defines the type of build this is.
|
||||
//
|
||||
#if STATIC_BUILD
|
||||
#define SUFFIX_STATIC "s"
|
||||
#else
|
||||
#define SUFFIX_STATIC ""
|
||||
#endif
|
||||
|
||||
#if DEBUG && !UNCHECKED
|
||||
#define SUFFIX_DEBUG "g"
|
||||
#else
|
||||
#define SUFFIX_DEBUG ""
|
||||
#endif
|
||||
|
||||
#define SUFFIX SUFFIX_STATIC SUFFIX_DEBUG
|
||||
|
||||
|
||||
LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL
|
||||
PRODUCTVERSION TCL_MAJOR_VERSION,TCL_MINOR_VERSION,TCL_RELEASE_LEVEL,TCL_RELEASE_SERIAL
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "Tclsh Application\0"
|
||||
VALUE "OriginalFilename", "tclsh" STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) SUFFIX ".exe\0"
|
||||
VALUE "FileVersion", TCL_PATCH_LEVEL
|
||||
VALUE "LegalCopyright", "Copyright \251 1987-2022 Regents of the University of California and other parties\0"
|
||||
VALUE "ProductName", "Tcl " TCL_VERSION " for Windows\0"
|
||||
VALUE "ProductVersion", TCL_PATCH_LEVEL
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
tclsh ICON DISCARDABLE "tclsh.ico"
|
||||
|
||||
//
|
||||
// This is needed for Windows 8.1 onwards.
|
||||
//
|
||||
|
||||
#ifndef RT_MANIFEST
|
||||
#define RT_MANIFEST 24
|
||||
#endif
|
||||
#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
|
||||
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
|
||||
#endif
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "tcl.dll.manifest"
|
||||
Reference in New Issue
Block a user