.
Index: kitsh/buildsrc/kitsh-0.0/installvfs.tcl
==================================================================
--- kitsh/buildsrc/kitsh-0.0/installvfs.tcl
+++ kitsh/buildsrc/kitsh-0.0/installvfs.tcl
@@ -34,10 +34,13 @@
proc copy_file {srcfile destfile} {
switch -glob -- $srcfile {
"*.tcl" - "*.txt" {
set ifd [open $srcfile r]
set ofd [open $destfile w]
+
+ # Force tcl files to have lf line endings inside tclkit.
+ fconfigure $ofd -translation lf
set ret [fcopy $ifd $ofd]
close $ofd
close $ifd
Index: kitsh/buildsrc/kitsh-0.0/kit.rc
==================================================================
--- kitsh/buildsrc/kitsh-0.0/kit.rc
+++ kitsh/buildsrc/kitsh-0.0/kit.rc
@@ -62,5 +62,17 @@
//
// Icon
//
tclsh ICON DISCARDABLE "tclkit.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 "tclkit.exe.manifest"
Index: tk/build.sh
==================================================================
--- tk/build.sh
+++ tk/build.sh
@@ -21,10 +21,11 @@
esac
SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
SRCHASH='-'
+KITCREATOR_DIR="$(pwd)/.."
BUILDDIR="$(pwd)/build/tk${TCLVERS_CLEAN}"
PATCHDIR="$(pwd)/patches"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
@@ -266,10 +267,18 @@
cp "${KITCREATOR_ICON}" rc/tk.ico
echo ' *** Importing user-specified resources'
cat "${KITCREATOR_RC}" | grep -v '^ *tclsh *ICON' >> "./rc/tk_base.rc"
+ if [ -f "$KITCREATOR_DIR/tclkit.exe.manifest" ]; then
+ KITCREATOR_MANIFEST="$KITCREATOR_DIR/tclkit.exe.manifest"
+ else
+ KITCREATOR_MANIFEST="$BUILDDIR/win/wish.exe.manifest"
+ fi
+ echo " *** Creating tclkit.exe.manifest from $KITCREATOR_MANIFEST"
+ cat "${KITCREATOR_MANIFEST}" | sed 's@name="Tcl.Tk.wish"@name="Tcl.tclkit"@' >> tclkit.exe.manifest
+
echo ' *** Creating tkbase.res.o to support Windows build'
echo "\"${RC:-windres}\" -o tkbase.res.o --define STATIC_BUILD --include \"./../generic\" --include \"${TCLCONFIGDIR}/../generic\" --include \"${TCLCONFIGDIR}\" --include \"./rc\" \"./rc/tk_base.rc\""
"${RC:-windres}" -o tkbase.res.o --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc"
if [ -f "tkbase.res.o" ]; then