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
+8
-8
@@ -491,7 +491,7 @@ void Machine::read(const fs::path& pathname)
|
||||
// :cpp libraries live next to the file that uses them).
|
||||
m_state.add_search_dir(fs::absolute(pathname).parent_path().string());
|
||||
m_state.open_frame("Machine state: " + pathname.string());
|
||||
input(string_from_file(pathname), pathname.string());
|
||||
input(string_from_file(pathname.string()), pathname.generic_string());
|
||||
m_sources.push_back(pathname);
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ void Machine::expand_read_katoms(
|
||||
bool klammers, bool eval, bool cond, bool read)
|
||||
{
|
||||
(void)K::log(3);
|
||||
current_filename = resolve_relative_to(current_filename);
|
||||
current_filename = resolve_relative_to(current_filename).generic_string();
|
||||
// msg() << "current_filename: " << current_filename << "\n";
|
||||
if (std::find_if(katoms.begin(), katoms.end(), begin_read) != katoms.end()) {
|
||||
(void)K::log(3);
|
||||
@@ -553,11 +553,11 @@ void Machine::expand_read_katoms(
|
||||
input_filename = fs::canonical(input_filename);
|
||||
m_state.add_search_dir(input_filename.parent_path().string());
|
||||
std::string text = trim_right(string_from_file(input_filename.string()));
|
||||
katom_list ks = katomize_lines(line_split(text), input_filename);
|
||||
katom_list ks = katomize_lines(line_split(text), input_filename.generic_string());
|
||||
// ks =
|
||||
process_katoms(
|
||||
// ks, command_pathname,
|
||||
ks, input_filename,
|
||||
ks, input_filename.generic_string(),
|
||||
nonascii, literal, ignore, whitespace, klammers, eval, cond, read);
|
||||
katoms.insert(end, ks.begin(), ks.end());
|
||||
}
|
||||
@@ -640,7 +640,7 @@ void Machine::load_klammerset_files(const Klammerset& klammerset, katom_iter ins
|
||||
std::vector<std::string> filenames {};
|
||||
for (const auto& required : klammerset.m_requires) {
|
||||
std::string path = is_klammerset_symbol(required)
|
||||
? resolve_klammerset_symbol(required, base_dir, klammerset.m_loc).string()
|
||||
? resolve_klammerset_symbol(required, base_dir, klammerset.m_loc).generic_string()
|
||||
: required;
|
||||
// ALREADY LOADED? Decided BEFORE the file is opened. The guard used
|
||||
// to sit in Klammerset_registry::add, which only runs once the file has
|
||||
@@ -682,11 +682,11 @@ void Machine::load_klammerset_files(const Klammerset& klammerset, katom_iter ins
|
||||
klammerset.m_loc);
|
||||
}
|
||||
pathname = fs::canonical(pathname);
|
||||
loaded_files.push_back(pathname.string());
|
||||
loaded_files.push_back(pathname.generic_string());
|
||||
m_state.add_search_dir(pathname.parent_path().string());
|
||||
std::string text = trim_right(string_from_file(pathname.string()));
|
||||
katom_list ks = katomize_lines(line_split(text), pathname);
|
||||
process_katoms(ks, pathname);
|
||||
katom_list ks = katomize_lines(line_split(text), pathname.generic_string());
|
||||
process_katoms(ks, pathname.generic_string());
|
||||
loaded.insert(loaded.end(), ks.begin(), ks.end());
|
||||
}
|
||||
m_katoms.insert(insert_at, loaded.begin(), loaded.end());
|
||||
|
||||
Reference in new issue
Block a user