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

+15 -12
View File
@@ -13,8 +13,10 @@ COMMANDS := kdiag kdesc ktext
# Build output directory: commands are linked directly into ../bin, so there is
# exactly one copy of each (no redundant executables in com/) and make still
# tracks them by path for incremental builds.
# The targets carry the system's executable suffix (makefile.env's EXE) so
# that on Windows the file gcc writes, ktext.exe, is the target itself.
BINDIR := ../bin
BINCOMMANDS := $(addprefix $(BINDIR)/,$(COMMANDS))
BINCOMMANDS := $(addprefix $(BINDIR)/,$(addsuffix $(EXE),$(COMMANDS)))
# System install location (out-of-tree). Override on the command line, e.g.
# make install PREFIX=/opt DESTDIR=/tmp/stage
@@ -23,7 +25,7 @@ DESTDIR ?=
# Shared library location
LIBDIR := ../lib
LIBRARY := $(LIBDIR)/libklammertext.so
LIBRARY := $(LIBDIR)/$(KLAMMERTEXT_LIBFILE)
# Linker flags for commands
COM_LDFLAGS := $(EXPORT_DYNAMIC) -Wl,-rpath,'$(ORIGIN)/../lib' -L$(LIBDIR)
@@ -36,7 +38,7 @@ ifneq (,$(filter MINGW% MSYS%,$(UNAME_S)))
MANIFEST_OBJ := manifest.o
# The DLLs beside the commands (makefile.env explains); with them, bin/ on
# PATH is all a Windows user needs besides Python.
RUNTIME_DLLS := $(addprefix $(BINDIR)/,libklammertext.so $(GCC_RUNTIME_DLLS))
RUNTIME_DLLS := $(addprefix $(BINDIR)/,$(KLAMMERTEXT_LIBFILE) $(GCC_RUNTIME_DLLS))
else
MANIFEST_OBJ :=
RUNTIME_DLLS :=
@@ -46,8 +48,9 @@ endif
DEPFILES := $(addsuffix .d,$(COMMANDS))
# Compiler flags for dependency generation ($(@F) keeps the .d files in com/,
# not in the ../bin output directory).
DEPFLAGS = -MMD -MP -MF $(@F).d
# not in the ../bin output directory; $(basename) drops the .exe so the file
# is ktext.d on every system, the name DEPFILES includes and clean removes).
DEPFLAGS = -MMD -MP -MF $(basename $(@F)).d
.PHONY: all clean redo clang mac sks install
@@ -65,7 +68,7 @@ commands : $(BINCOMMANDS) $(RUNTIME_DLLS)
ifneq (,$(filter MINGW% MSYS%,$(UNAME_S)))
manifest.o : klammertext.rc klammertext.manifest
windres $< $@
$(BINDIR)/libklammertext.so : $(LIBRARY) | $(BINDIR)
$(BINDIR)/$(KLAMMERTEXT_LIBFILE) : $(LIBRARY) | $(BINDIR)
cp $< $@
$(BINDIR)/%.dll : $(GCC_BIN)%.dll | $(BINDIR)
cp $< $@
@@ -86,18 +89,18 @@ sks : | mac
$(MAKE) -C $(KS)/document
# Explicit rules for each command - link against shared library, output to bin/
$(BINDIR)/kdiag : kdiag.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(BINDIR)/kdiag$(EXE) : kdiag.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEPFLAGS) $(COM_LDFLAGS) $(LDFLAGS) $< $(MANIFEST_OBJ) -o $@ $(KLAMMERTEXT_LIB) $(LDLIBS)
$(BINDIR)/kdesc : kdesc.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(BINDIR)/kdesc$(EXE) : kdesc.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEPFLAGS) $(COM_LDFLAGS) $(LDFLAGS) $< $(MANIFEST_OBJ) -o $@ $(KLAMMERTEXT_LIB) $(LDLIBS)
$(BINDIR)/ktext : ktext.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(BINDIR)/ktext$(EXE) : ktext.cpp $(LIBRARY) $(MANIFEST_OBJ) | $(BINDIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEPFLAGS) $(COM_LDFLAGS) $(LDFLAGS) $< $(MANIFEST_OBJ) -o $@ $(KLAMMERTEXT_LIB) $(LDLIBS)
# Out-of-tree system install (copies; the build tree stays intact). The
# installed commands still need KLAMMERTEXT_HOME pointing at a Klammertext tree
# for sks/ and the Python modules; their rpath finds libklammertext.so in
# for sks/ and the Python modules; their rpath finds the library in
# $(PREFIX)/lib.
install : all
install -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib
@@ -115,9 +118,9 @@ else
$(MAKE) -C $(KS)/kutil clean
$(MAKE) -C $(KS)/target clean
$(MAKE) -C $(KS)/document clean
# ref/reflect.so links against libklammertext.so and is dlopened, so
# ref/reflect$(DSO) links against the library and is dlopened, so
# it shares the class layouts: a stale one after a header change is
# the same memory-corruption hazard as a stale sks/document.so.
# the same memory-corruption hazard as a stale sks/document$(DSO).
$(MAKE) -C $(K)/ref clean
$(MAKE) -C $(K)/kpy clean
$(MAKE) clean