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
+22
@@ -16,6 +16,28 @@ std::string relative_pathname(const std::string& filename, const std::string& ba
|
||||
|
||||
fs::path relative_to_cwd(const fs::path& input);
|
||||
|
||||
// The separator of a directory list in an environment variable
|
||||
// (KLAMMERTEXT_FONTS, KLAMMERTEXT_KLAMMERSETS): ';' on Windows, where a drive
|
||||
// letter puts a colon inside every absolute path, ':' everywhere else -- the
|
||||
// convention of PATH on each system.
|
||||
#ifdef _WIN32
|
||||
constexpr char path_list_separator = ';';
|
||||
#else
|
||||
constexpr char path_list_separator = ':';
|
||||
#endif
|
||||
// The user's home directory as the system names it: HOME, and on Windows
|
||||
// USERPROFILE when HOME is unset (a plain PowerShell or cmd sets no HOME;
|
||||
// an MSYS2 shell does). Empty when neither is set.
|
||||
std::string home_directory();
|
||||
// The first PROGRAM on PATH (split on path_list_separator; on Windows the
|
||||
// name also tried with ".exe"), or "" when none: what "which" answers, without
|
||||
// spawning a shell -- on Windows popen()'s cmd.exe has no "which".
|
||||
std::string find_in_path(const std::string& program);
|
||||
// The directories listed in an environment variable, split on
|
||||
// path_list_separator, empty entries dropped; DEFAULT_SUBDIR under the home
|
||||
// directory when the variable is unset or empty.
|
||||
std::vector<std::string> directory_list(const char* variable, const std::string& default_subdir);
|
||||
|
||||
bool file_exists(const std::string& pathname, bool error_if_not=false, bool is_directory=false);
|
||||
|
||||
// Text to its lines, and a file to (its whole text, its lines). These
|
||||
|
||||
Reference in new issue
Block a user