Windows: product names, the editors, WSL; the Linux page's image step

Assembled from development commit c3c40f6c8fca. Since 830b193: on Windows the
products carry Windows names (ktext.exe, klammertext.dll, document.dll,
reflect.dll) and the console's output code page is UTF-8 for a run; the
editor tooling works on Windows (VS Code, Sublime Text, Vim, with the
interpreter's name chosen by platform) and Notepad++ joins it
(doc/edit/notepadpp: a User Defined Language and two Run-menu commands);
a sixth install page, doc/install/windows_wsl_install.md, for Linux
inside WSL; the Windows page opens with the three routes and gains its
editor section, the PowerShell quoting and Path notes; the Linux page
installs OpenImageIO from the python3-openimageio package and verifies
with kdiag --machine; the README lists all six install pages. Linux and
macOS behaviour is unchanged.
This commit is contained in:
ack committed 2026-09-25 18:43:22 +02:00
1 parent 830b19394d
commit ee8bcf5300
33 files changed
+741 -122

No files matched your search

+26 -6
View File
@@ -63,14 +63,16 @@ SHARED = -dynamiclib
SONAME = -install_name @rpath/$(notdir $@)
ORIGIN := @loader_path
EXPORT_DYNAMIC = -Wl,-export_dynamic
EXE :=
DSO := .so
KLAMMERTEXT_LIBFILE := libklammertext.so
else ifneq (,$(filter MINGW% MSYS%,$(UNAME_S)))
# ---------- Windows (MSYS2, UCRT64 environment; native PE binaries) ----------
# uname says MINGW64_NT-... under UCRT64 too. The compilers come from the
# environment's PATH (/ucrt64/bin). libdl.a is the mingw-w64-dlfcn shim over
# LoadLibrary, linked statically so no libdl.dll travels with the products.
# PE has no soname and no rpath; a DLL is found through PATH or
# the executable's own directory, and GNU ld's -l search list on PE does not
# include ".so", hence the exact-name form below.
# the executable's own directory.
GCC := g++
CLANG := clang++
LDFLAGS =
@@ -79,15 +81,20 @@ SHARED = -shared
SONAME =
ORIGIN := $$ORIGIN
EXPORT_DYNAMIC = -Wl,--export-all-symbols
KLAMMERTEXT_LIB = -l:libklammertext.so
EXE := .exe
DSO := .dll
KLAMMERTEXT_LIBFILE := klammertext.dll
# A Windows program finds a DLL through PATH or its own directory, never an
# rpath. So every directory that holds a program or a Python extension also
# holds the DLLs it needs: libklammertext.so and the three gcc runtime DLLs
# holds the DLLs it needs: klammertext.dll and the three gcc runtime DLLs
# the toolchain links (from the compiler's own bin/). com/ and kpy/ copy them.
GCC_BIN := $(dir $(shell cygpath -m "$$(command -v g++)"))
GCC_RUNTIME_DLLS := libstdc++-6.dll libgcc_s_seh-1.dll libwinpthread-1.dll
else
# ---------- Linux ----------
EXE :=
DSO := .so
KLAMMERTEXT_LIBFILE := libklammertext.so
GCC := /usr/bin/g++
CLANG := $(shell command -v clang++-18 2>/dev/null || command -v clang++ 2>/dev/null)
LDFLAGS = -L/usr/lib/x86_64-linux-gnu
@@ -97,8 +104,21 @@ SONAME = -Wl,-soname,$(notdir $@)
ORIGIN := $$ORIGIN
EXPORT_DYNAMIC = -rdynamic
endif
# How a link line names libklammertext (set above for Windows).
KLAMMERTEXT_LIB ?= -lklammertext
# Product names (decided 2026-09-25: Windows users get Windows names). The
# three variables above are set per platform: EXE is the executable suffix
# (".exe" on Windows, none elsewhere), DSO the suffix of a shared object
# loaded at run time (".dll" / ".so": document$(DSO), reflect$(DSO)), and
# KLAMMERTEXT_LIBFILE the library's file name (klammertext.dll /
# libklammertext.so). A make target carries the suffix so that the file the
# compiler writes IS the target: bin/ktext never existed on Windows -- gcc
# wrote ktext.exe -- and every make relinked the three commands. The engine's
# own copy of the DSO suffix is shared_library_suffix in mac/file.h.
#
# One link form everywhere: GNU ld's -l search list on PE ends with
# "<name>.dll", so -lklammertext finds klammertext.dll as it finds
# libklammertext.so on Linux (it did NOT find a DLL called libklammertext.so,
# which needed the exact-name -l: form).
KLAMMERTEXT_LIB = -lklammertext
# Resolve the compiler choice (gcc by default; clang with COMPILER=clang).
CXX := $(if $(filter clang,$(COMPILER)),$(CLANG),$(GCC))