Klammertext runs natively on Windows; a Windows source-install guide; the bundled sh for @eval :shell
Assembled from klammertext-dev f344a37d772c. The commands, the library,
the Standard Klammer Set, the reflection klammerset and the Python
binding build and run natively on Windows (MSYS2 UCRT64 gcc, python.org
Python), and both test tiers pass there. doc/install/windows_source_install.md
is the fifth install guide: a source install parallel to the Linux and
macOS ones, verified by following it on a pristine Windows 11.
Behaviour on every system: paths Klammertext prints use forward slashes;
output is LF; the command line is UTF-8 on Windows; @eval :shell is a
POSIX shell command everywhere -- on Windows it runs the sh Klammertext
ships, BusyBox for Windows (win/busybox/, GPLv2, with its licence and the
source pointer). KLAMMERTEXT_FONTS and KLAMMERTEXT_KLAMMERSETS are lists in
the system's PATH convention (';' on Windows). On Linux and macOS nothing
observable changes.
This commit is contained in:
1 parent
f9af1ff869
commit
830b19394d
55 files changed
+1182
-153
No files matched your search
@@ -48,7 +48,7 @@ deps :
|
||||
# Shared object - link against libklammertext.so
|
||||
document.so : $(LOCAL_OBJECTS) $(SKS_OBJECTS) $(LIBRARY) document.cpp | deps
|
||||
$(CXX) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CXXFLAGS) $(DOC_LDFLAGS) $(LDFLAGS) \
|
||||
document.cpp -o $@ $(ALL_OBJECTS) -lklammertext $(LDLIBS)
|
||||
document.cpp -o $@ $(ALL_OBJECTS) $(KLAMMERTEXT_LIB) $(LDLIBS)
|
||||
|
||||
clean :
|
||||
rm -f $(LOCAL_OBJECTS) $(LOCAL_DEPFILES) *.so *~
|
||||
|
||||
@@ -178,7 +178,7 @@ fs::path parse_input_filename(const std::string& s, const std::string& input_dir
|
||||
Locator::none());
|
||||
}
|
||||
// The resolved path itself shows kt/ -- no label needed.
|
||||
(void)K::log(1, "Input file \"" + s + "\": " + in_kt.string());
|
||||
(void)K::log(1, "Input file \"" + s + "\": " + in_kt.generic_string());
|
||||
return in_kt;
|
||||
}
|
||||
if (p.extension() != ".kt") {
|
||||
@@ -188,7 +188,7 @@ fs::path parse_input_filename(const std::string& s, const std::string& input_dir
|
||||
return p;
|
||||
}
|
||||
fs::path in_input_dir = fs::path(input_dir) / p;
|
||||
(void)K::log(1, "Input file \"" + s + "\": " + in_input_dir.string());
|
||||
(void)K::log(1, "Input file \"" + s + "\": " + in_input_dir.generic_string());
|
||||
return in_input_dir;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ std::string insert_ids(const std::string& html_text)
|
||||
std::string Document_class::make_help_page()
|
||||
{
|
||||
(void)K::log(3);
|
||||
std::string kt_filename = klammertext_filename("doc/html_help.kt");
|
||||
std::string kt_filename = klammertext_filename("doc/html_help.kt").string();
|
||||
std::string basename = "help";
|
||||
std::string help_page;
|
||||
//if (!in_modification_order(kt_filename, output_filename, no_cache)) {
|
||||
@@ -306,14 +306,14 @@ void Document_class::process_input_files()
|
||||
size_t basename_width = 0;
|
||||
for (auto input_filename : m_files) {
|
||||
fs::path inpath = input_filename;
|
||||
if (!file_exists(inpath)) {
|
||||
if (!file_exists(inpath.string())) {
|
||||
inpath = parse_input_filename(input_filename, m_input_dir);
|
||||
}
|
||||
std::string basename = file_basename(input_filename);
|
||||
basename_width = std::max(basename_width, basename.size());
|
||||
std::string html_text;
|
||||
//if (true || !in_modification_order(inpath, cached_filename, m_no_cache)) {
|
||||
if (m_no_cache || cache_requires_update(m_cache_dir, inpath, basename)) {
|
||||
if (m_no_cache || cache_requires_update(m_cache_dir, inpath.string(), basename)) {
|
||||
Machine M = m_machine;
|
||||
M.read(inpath);
|
||||
html_text = trim(M.apply("html"));
|
||||
|
||||
@@ -36,7 +36,7 @@ std::string Document_class::tex()
|
||||
std::string cached_filename = m_cache_dir + "/" + basename;
|
||||
fs::path inpath = parse_input_filename(input_filename, m_input_dir);
|
||||
// if (!in_modification_order(input_filename, cached_filename, m_no_cache)) {
|
||||
if (m_no_cache || cache_requires_update(m_cache_dir, inpath, basename)) {
|
||||
if (m_no_cache || cache_requires_update(m_cache_dir, inpath.string(), basename)) {
|
||||
Machine M = m_machine;
|
||||
M.m_state.set("document_landscape", landscape ? "true" : "false"); // , "Landscape mode");
|
||||
M.read(inpath);
|
||||
|
||||
@@ -163,7 +163,7 @@ make_navigation_table_of_contents(std::vector<Heading> headings)
|
||||
void show_table_of_contents(
|
||||
const std::string& kt_root_filename, const std::string& title, std::vector<Heading> headings)
|
||||
{
|
||||
long unsigned int width = kt_root_filename.size();
|
||||
std::size_t width = kt_root_filename.size();
|
||||
for (Heading h : headings) {
|
||||
width = std::max(width, h.m_filename.size());
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void show_table_of_contents(
|
||||
std::string cache_table_of_contents(
|
||||
const std::string& kt_root_filename, const std::string& title, std::vector<Heading> headings)
|
||||
{
|
||||
long unsigned int width = kt_root_filename.size();
|
||||
std::size_t width = kt_root_filename.size();
|
||||
for (Heading h : headings) {
|
||||
width = std::max(width, h.m_filename.size());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user