What a Windows editor saves, and a standard user's Windows install (from dev 9d6f66456a3d)
- CRLF line endings are read as newlines on every system (the reader used to delete the pair, collapsing a Notepad++ file into one line on Linux and macOS); a leading UTF-8 byte-order mark is ignored; a UTF-16 or Windows-1252 source is refused with the encoding, the place and the remedy named. .gitattributes pins LF in every clone. - Windows source install: the repository path must hold no space (GNU Make), accented letters are fine (every linker input is relative now); python.org's Python is selected ahead of an MSYS2 one that poppler pulls in; TeX Live goes to its Windows default C:\texlive\2026. - The Python binding needs an ASCII installation path on Windows, and its suite says so there. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
fc2e848e91
commit
715d939727
15 files changed
+236
-41
No files matched your search
Vendored
+27
-6
@@ -31,6 +31,21 @@ case "$_kt_uname" in
|
||||
export KLAMMERTEXT_HOME="$(cygpath -m "$KLAMMERTEXT_HOME")"
|
||||
export TMPDIR="$(cygpath -m "${TMPDIR:-/tmp}")"
|
||||
export PYTHON="${PYTHON:-python}" # python.org installs no python3
|
||||
# "python" must be python.org's interpreter: the build embeds it and
|
||||
# pip installs OpenImageIO into it. But the UCRT64 shell puts
|
||||
# /ucrt64/bin first on PATH, and an MSYS2 package installed as a
|
||||
# dependency (poppler -> glib2 -> python) puts ITS python there, which
|
||||
# then shadows python.org's for make, the suites and the tooling.
|
||||
# python.org's launcher knows only python.org installs: put the
|
||||
# directory of the interpreter it selects first. (Its output ends
|
||||
# in CR LF, hence the tr.)
|
||||
if command -v py >/dev/null 2>&1; then
|
||||
_kt_py="$(py -3 -c 'import sys; print(sys.executable)' 2>/dev/null | tr -d '\r')"
|
||||
if [ -n "$_kt_py" ]; then
|
||||
export PATH="$(dirname "$(cygpath -u "$_kt_py")"):$PATH"
|
||||
fi
|
||||
unset _kt_py
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -50,13 +65,19 @@ fi
|
||||
# just returns nothing. The -path pattern keeps the 4-digit-year restriction.
|
||||
# Windows: a user installs under the Windows home, %USERPROFILE%\external
|
||||
# (MSYS2's $HOME is C:\msys64\home\<user>, which no Windows guide would name).
|
||||
_kt_tlroot="$HOME/external/texlive"
|
||||
case "$_kt_uname" in MINGW*|MSYS*) _kt_tlroot="$(cygpath -u "$USERPROFILE")/external/texlive";; esac
|
||||
_kt_tl="$(find "$_kt_tlroot" -maxdepth 3 -type d \
|
||||
-path "*/[0-9][0-9][0-9][0-9]/bin/$_kt_arch" 2>/dev/null \
|
||||
| sort -V | tail -1)"
|
||||
# Windows also: TeX Live's own default, C:\texlive\<year> -- the place for a
|
||||
# user whose profile path holds a space or an accented letter, which TeX
|
||||
# Live's installer and kpathsea do not take (2026-09-26). The newest YEAR
|
||||
# wins across both roots (the year is the sort key, not the path).
|
||||
_kt_tlroot="$HOME/external/texlive"; _kt_tlroot2=""
|
||||
case "$_kt_uname" in MINGW*|MSYS*) _kt_tlroot="$(cygpath -u "$USERPROFILE")/external/texlive"; _kt_tlroot2="/c/texlive";; esac
|
||||
_kt_tl="$( { find "$_kt_tlroot" -maxdepth 3 -type d \
|
||||
-path "*/[0-9][0-9][0-9][0-9]/bin/$_kt_arch" 2>/dev/null
|
||||
[ -n "$_kt_tlroot2" ] && find "$_kt_tlroot2" -maxdepth 3 -type d \
|
||||
-path "*/[0-9][0-9][0-9][0-9]/bin/$_kt_arch" 2>/dev/null; } \
|
||||
| awk -F/ '{ print $(NF-2) " " $0 }' | sort -V | tail -1 | cut -d' ' -f2-)"
|
||||
[ -n "$_kt_tl" ] && export KLAMMERTEXT_TEXLIVE_BIN="$_kt_tl"
|
||||
unset _kt_tl _kt_arch _kt_tlroot
|
||||
unset _kt_tl _kt_arch _kt_tlroot _kt_tlroot2
|
||||
|
||||
# --- PATH (TeX Live appended only if one was found) ---------------------------
|
||||
export PATH="$_kt_home_posix/bin:$_kt_home_posix/tst${KLAMMERTEXT_TEXLIVE_BIN:+:$KLAMMERTEXT_TEXLIVE_BIN}:$PATH"
|
||||
|
||||
Reference in new issue
Block a user