diff --git a/README.md b/README.md index 9a2f111..7668037 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ Installation guides are in [`doc/install/`](doc/install/): - Linux, from source — `doc/install/linux_source_install.md` - macOS, from source — `doc/install/macos_source_install.md` -- Windows, from source (native) — `doc/install/windows_source_install.md` - Windows, Linux inside WSL — `doc/install/windows_wsl_install.md` - Linux, container — `doc/install/linux_container_install.md` - macOS, container — `doc/install/macos_container_install.md` @@ -54,7 +53,7 @@ are regenerated on each release — patches cannot be merged directly. Report problems (or send patches) to the author; accepted changes are applied to the development tree and appear in a following snapshot. -This snapshot was assembled from development commit `823558bfeab7`. +This snapshot was assembled from development commit `a9756dac74c6`. ## License diff --git a/doc/edit/notepadpp/README.md b/doc/edit/notepadpp/README.md index c2f8fd8..edd0799 100644 --- a/doc/edit/notepadpp/README.md +++ b/doc/edit/notepadpp/README.md @@ -24,8 +24,11 @@ current file, and this package uses exactly those two things. - Notepad++ 7.9 or later (the `userDefineLangs` folder; any recent version qualifies). -- For the Run commands: `python` on the `Path`, which the Klammertext - installation already needs. +- For the Run commands: `python` on the `Path` -- Python for Windows + from python.org, with "Add python.exe to PATH" selected. The commands + are Python and do not need Klammertext itself, which on Windows lives + in WSL (the install page `windows_wsl_install.md`); a file there is opened + through `\\wsl.localhost\Ubuntu\...`. - Files saved as UTF-8 (Notepad++'s default for new files; **Encoding → Convert to UTF-8** for an older one). Line endings do not matter, and a file in another encoding is refused by `ktext` with the remedy named. diff --git a/doc/edit/vscode/README.md b/doc/edit/vscode/README.md index 0dc75ad..9a63612 100644 --- a/doc/edit/vscode/README.md +++ b/doc/edit/vscode/README.md @@ -33,9 +33,10 @@ language's structure, everywhere. ## Install Package the extension as a `.vsix` and install it (the builder needs only -bash and Python — on Windows, run it in the MSYS2 shell the Klammertext -build uses; the editing zip from the Klammertext website ships a prebuilt -`klammertext.vsix`, so there the first step is already done): +bash and Python — on Windows, run it at the Linux prompt of WSL, where +Klammertext is installed; the editing zip from the Klammertext website +ships a prebuilt `klammertext.vsix`, so there the first step is already +done): ./make_vsix.sh code --install-extension klammertext.vsix diff --git a/doc/edit/vscode/make_vsix.sh b/doc/edit/vscode/make_vsix.sh index 54f04af..ccb8a56 100755 --- a/doc/edit/vscode/make_vsix.sh +++ b/doc/edit/vscode/make_vsix.sh @@ -20,7 +20,7 @@ cd "$(dirname "$0")" # The interpreter: $PYTHON if the environment names one (env/runtime.env # does), else python3, else python -- the only name python.org installs on -# Windows, where this runs in the MSYS2 shell. +# Windows, should this run in a bash there. PYTHON="${PYTHON:-$(command -v python3 || command -v python)}" [ -n "$PYTHON" ] || { echo "make_vsix.sh: no python3 or python on PATH" >&2; exit 1; } diff --git a/doc/install/windows_source_install.md b/doc/install/windows_source_install.md deleted file mode 100644 index 80bc638..0000000 --- a/doc/install/windows_source_install.md +++ /dev/null @@ -1,437 +0,0 @@ -# Klammertext source installation on Windows - -This document describes how to build and install Klammertext from source on -Windows 10 or 11, so that the three commands `ktext`, `kdesc` and `kdiag` -run as native Windows programs. Klammertext is developed on Linux and -macOS; Windows is a supported place to *use* it, and installing it there -takes more steps than on those systems, because Windows has no package -manager that supplies a C++ compiler and `make`. The steps below were -followed on a fresh Windows 11 machine and are the ones that worked. - -The installation uses three things a Windows user installs once: -**MSYS2**, which provides the compiler, `make` and a Unix-style shell for -building; **Python** from python.org, which Klammertext embeds; and **TeX -Live**, for PDF output. Everyday use needs only PowerShell. - -This is one of three ways to have Klammertext on Windows. If you are at -home in Linux, the Windows Subsystem for Linux gives you the Linux -installation unchanged, with the Windows editors and browser alongside: -`windows_wsl_install.md`. If you want no build at all, the prebuilt -container images run on Windows through Docker Desktop, which that page -also describes. This page is the native route: Windows programs, no -Linux layer. - -**Before you start.** The prerequisites install for all users of the -machine, so the account you use must be an administrator, which on a -personal machine it normally is; the build and everyday use need no -special rights. Allow an hour or two the first time: the downloads are -about a gigabyte in all, TeX Live alone takes twenty to thirty minutes, -and the build a few minutes. Nothing here needs to be done twice. - -**Smart App Control must be off.** A clean installation of Windows 11 -runs Smart App Control, a security feature that blocks any program -Microsoft has not seen signed and widespread — and the MSYS2 compiler, -`make` and the `bash` shell on which this page depends are not signed, nor -is the Perl that TeX Live's installer brings with it, so with it on the -MSYS2 installer never finishes, the MSYS2 shell does not open, the build -cannot start and TeX Live cannot be installed ("An Application Control -policy has blocked this file"; the notice from Windows Security says the -program "might not work because we can't confirm who published it"). -Check it first: -Windows Security → **App & browser control** → **Smart App Control -settings**. It is in one of three states. *Off* is what you need. *On* -blocks MSYS2; switch it off. *Evaluation* lets everything run for now, -but Windows turns it on by itself when it decides the machine is used -"safely", at which point a working installation stops without warning — -so switch it off at once rather than wait. Switching it off cannot be -undone short of reinstalling Windows, which is why Microsoft asks you to -confirm; the rest of Windows Security (Defender, SmartScreen for -downloads) stays on and is not affected. A machine upgraded from Windows -10, or one on which an unsigned program has already been installed, has -it off already. - - -## Prerequisites - -### Git and Python - -In PowerShell (search for "PowerShell" in the Start menu): - -```powershell -winget install --id Git.Git -e -winget install --id Python.Python.3.12 -e --override "/quiet InstallAllUsers=1 PrependPath=1" -``` - -The second command installs Python for all users into `C:\Program -Files\Python312` and puts it on the `Path`. Open a new PowerShell window -(the `Path` of an open one does not change) and install the image library -the `@image` klammer uses: - -```powershell -python -m pip install OpenImageIO -python -c "import OpenImageIO" -``` - -To use a PDF file as an image (`@image` of a `.pdf`), Klammertext runs -poppler's `pdfinfo` and `pdftoppm`; without them such a document stops -with a message naming the package. MSYS2 (installed below) provides them: -in the UCRT64 shell `pacman -S mingw-w64-ucrt-x86_64-poppler`, and for use -from PowerShell put `C:\msys64\ucrt64\bin` on your `Path` as well. - -Note that the interpreter is called `python` on Windows. There is no -`python3`; the `python3` that Windows itself offers is a placeholder that -opens the Microsoft Store, and Klammertext does not use it. - -### MSYS2 and the compiler - -Install MSYS2 from https://www.msys2.org/ (or `winget install --id -MSYS2.MSYS2 -e`). It installs into `C:\msys64`. Open the **"MSYS2 UCRT64"** -shell from the Start menu — that one, not "MSYS2 MSYS" or "MINGW64": the -UCRT64 environment shares its C runtime with python.org's Python, which is -what lets the two be linked together. Update it and install the toolchain: - -```bash -pacman -Syu # if it closes the window, reopen the UCRT64 shell and run it again -pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-make make \ - mingw-w64-ucrt-x86_64-pkgconf mingw-w64-ucrt-x86_64-dlfcn diffutils -``` - -`diffutils` is only needed to run Klammertext's test suites. - -By default the MSYS2 shell does not see the programs Windows has on its -`Path`, which means it cannot see `git` or `python`. Tell it to, once, in -PowerShell, then reopen the UCRT64 shell: - -```powershell -setx MSYS2_PATH_TYPE inherit -``` - -Verify, in the UCRT64 shell: - -```bash -g++ --version # g++.exe (Rev4, Built by MSYS2 project) 16.x -python --version # Python 3.12.x (python.org's, from the Windows Path) -git --version -``` - - -## Clone the repository - -In the UCRT64 shell. Windows paths are written with forward slashes there, -`/c/Users/` for `C:\Users\`: - -```bash -cd /c/Users/ -git clone https://git.andykopra.com/ack/klammertext.git -cd klammertext -``` - -The repository's path must contain no space: GNU Make cannot build under -one. If your user name has a space in it (`C:\Users\Anna Maria`), clone -somewhere else, for example into `C:\klammertext`, and write that path -wherever `C:\Users\\klammertext` appears below. Accented letters in -the path are fine for the commands; only the Python binding (`kpy\`) needs -a path of plain ASCII letters. - -Klammertext's `.kt` files, `.k` files and shell scripts are LF files, and -the repository says so itself (`.gitattributes`), so the clone is correct -whatever your Git's `core.autocrlf` setting. A `.kt` you write with -Windows line endings is fine too: ktext reads them as newlines. - - -## Environment variables - -Klammertext's runtime environment is one self-configuring file, the same -one Linux and macOS use. Source it from the UCRT64 shell's profile: - -```bash -echo 'source "/c/Users//klammertext/env/runtime.env"' >> ~/.bashrc -source ~/.bashrc -``` - -On Windows it sets `KLAMMERTEXT_HOME` and `TMPDIR` in the form Windows -programs understand (`C:/Users//klammertext`), adds `bin/` to `PATH`, -finds a TeX Live installed under `C:\texlive\` (see below), and -sets `PYTHON=python`. Nothing is edited by hand. - - -## Build - -In the UCRT64 shell, in the repository: - -```bash -make -C com -``` - -The build compiles as many files at once as the machine has cores. On a -machine with 8 GB of memory or less the optimizing compiler may run out -of memory and report `out of memory allocating`; if so, `make -C com -JOBS=2`, or `JOBS=1`: slower, and it finishes. - -This builds the library (`klammertext.dll`), the Standard Klammer Set's -components and the three commands (`ktext.exe`, `kdesc.exe`, `kdiag.exe`) -into `bin\`, and copies the library and the compiler's runtime DLLs there -too, so `bin\` is self-contained. The Python binding is built into `kpy\`. -Verify: - -```bash -ktext -s '@eval 1 + 1 @' -d # prints 2 -ktext -s '@eval :shell echo hello | tr a-z A-Z @' -d # prints HELLO -``` - -The second line shows that `@eval :shell` runs a POSIX shell on Windows as -it does elsewhere: Klammertext ships one (`win\busybox\`), so a document's -`:shell` command means the same thing on every system. - -For a first document, create `hello.kt`: - -``` -@document -:structure article -:title Hello -:text -@s1 Hello, Klammertext @ - -This document was built from source on Windows. -@ -``` - -and render it: - -```bash -ktext hello.kt -t html # writes hello\index.html -``` - - -## TeX Live (for PDF output) - -The Standard Klammer Set renders PDF with **XeLaTeX**. Install TeX Live's -`scheme-small` plus the packages the SKS needs into `C:\texlive\2026`, -TeX Live's own default location on Windows, where `runtime.env` finds it. -(It also looks under `C:\Users\\external\texlive\`, the place -the Linux and macOS pages use, but TeX Live does not work under a path -with a space or an accented letter, and a user name may have either.) -This is a download of about 600 MB and takes twenty to thirty minutes. - -1. Download `install-tl.zip` from a CTAN mirror, for example - `https://ctan.math.illinois.edu/systems/texlive/tlnet/install-tl.zip`, - and unzip it. It unpacks into a folder named `install-tl-`. - -2. In that folder, create a file `texlive.profile` with this content: - - ``` - selected_scheme scheme-small - TEXDIR C:/texlive/2026 - TEXMFLOCAL C:/texlive/2026/texmf-local - TEXMFSYSCONFIG C:/texlive/2026/texmf-config - TEXMFSYSVAR C:/texlive/2026/texmf-var - TEXMFHOME C:/texlive/2026/texmf-home - TEXMFVAR C:/texlive/2026/texmf-uvar - TEXMFCONFIG C:/texlive/2026/texmf-uconfig - tlpdbopt_install_docfiles 0 - tlpdbopt_install_srcfiles 0 - tlpdbopt_autobackup 0 - tlpdbopt_desktop_integration 0 - tlpdbopt_file_assocs 0 - tlpdbopt_w32_multi_user 0 - ``` - -3. In PowerShell, in that folder, run the installer without its graphical - interface, naming the same mirror: - - ```powershell - .\install-tl-windows.bat -no-gui -profile texlive.profile -repository https://ctan.math.illinois.edu/systems/texlive/tlnet - ``` - - Leave the window open until it reports that the installation is - complete. (A warning about `tlaunch.ini` is harmless.) - -4. Still in PowerShell, install the additional packages the SKS requires - beyond `scheme-small` — the same list `doc/install/texlive_additional_packages.sh` - installs on Linux and macOS — and rebuild the formats: - - ```powershell - $tl = "C:\texlive\2026\bin\windows" - $env:Path = "$tl;$env:Path" - & "$tl\tlmgr.bat" option repository https://ctan.math.illinois.edu/systems/texlive/tlnet - & "$tl\tlmgr.bat" install adjustbox collectbox collection-fontsrecommended enumitem fontaxes footmisc inconsolata layouts mdframed multirow needspace opensans pict2e textpos titlesec upquote zref - & "$tl\fmtutil-sys.exe" --all - ``` - - The second line matters: `tlmgr` and `fmtutil` start helper programs - such as `kpsewhich` by name and find them only through the `Path`. - -Open a new UCRT64 shell (so `runtime.env` runs again and finds the tree) -and verify: - -```bash -xelatex --version -ktext hello.kt -t pdf # writes hello.pdf -``` - - -## Using the commands from PowerShell - -Building needs the UCRT64 shell; using Klammertext does not. For everyday -use from PowerShell, put two directories on the `Path` and set -`KLAMMERTEXT_HOME`, once, as user environment variables (Settings ▸ -System ▸ About ▸ Advanced system settings ▸ Environment Variables, or -from PowerShell): - -```powershell -[Environment]::SetEnvironmentVariable("KLAMMERTEXT_HOME", "C:\Users\\klammertext", "User") -$p = [Environment]::GetEnvironmentVariable("Path", "User") -[Environment]::SetEnvironmentVariable("Path", "$p;C:\Users\\klammertext\bin;C:\texlive\2026\bin\windows", "User") -``` - -(Not `setx Path "$env:Path;…"`: `$env:Path` is the machine and user -values merged, so that copies every machine entry into your user `Path`, -and `setx` silently cuts a value over 1024 characters.) Python is already -on the `Path` from its installer. Open a new PowerShell -window and `ktext`, `kdesc` and `kdiag` work there directly. Paths -Klammertext prints use forward slashes on every system; paths you type may -use either. - -One PowerShell rule to know when you pass Klammertext text with `-s`: an -apostrophe inside a single-quoted string ends the string, so `It's` must -be written `It''s` (two apostrophes), or the whole text put in double -quotes. The error you get otherwise mentions a "here-string header", -because PowerShell reads the next `@'` as one; it is PowerShell's message, -not Klammertext's. - -```powershell -ktext -s '@i It''s a Pyrrhic victory! @' -d -ktext -s "@i It's a Pyrrhic victory! @" -d -``` - - -## Verifying the installation - -In the UCRT64 shell: - -```bash -ktext -s '@eval 1 + 1 @' -d # Python evaluation -ktext -s '@eval :shell date @' -d # shell evaluation (the bundled sh) -kdesc -t # the targets -kdesc --typeface # the fonts Klammertext ships -ktext hello.kt -t html # html -ktext hello.kt -t pdf # pdf, requires TeX Live - -make -C $KLAMMERTEXT_HOME/tst test # the engine's test suites -``` - -A few suite cases report `SKIP` on Windows for things the MSYS2 shell -cannot provide, such as a real terminal for the colour tests or a -symbolic link; that is expected. (The Standard Klammer Set's own suites -are part of the development repository, not of this distribution.) - - -## Updating - -In the UCRT64 shell: - -```bash -cd $KLAMMERTEXT_HOME -git pull -make -C com -``` - - -## Editor support - -Klammertext's editor support (`doc\edit\`, one shared implementation -behind VS Code, Sublime Text, Vim and Emacs integrations) works on Windows -with the Python already installed. Each editor's README in `doc\edit\` -has the details; the Windows-specific steps are these. - -**Visual Studio Code.** Build the extension package in the UCRT64 shell, -then install it from PowerShell (or from any window where `code` is on the -`Path`): - -```bash -cd ~/klammertext/doc/edit/vscode && ./make_vsix.sh -``` - -```powershell -code --install-extension C:\Users\\klammertext\doc\edit\vscode\klammertext.vsix -``` - -Reload VS Code. The extension runs `python` from the `Path` and finds the -language server inside the package; nothing needs configuring. - -**Sublime Text 4.** Copy the package and the shared core into Sublime's -`Packages` directory (**Preferences → Browse Packages…** opens it): - -```powershell -$p = "$env:AppData\Sublime Text\Packages\Klammertext" -New-Item -ItemType Directory -Force $p | Out-Null -Copy-Item C:\Users\\klammertext\doc\edit\sublime\* $p -Copy-Item C:\Users\\klammertext\doc\edit\shared\klammertext_edit.py $p -``` - -Sublime loads the package live. - -**Notepad++.** Highlighting comes from a User Defined Language file, the -delimiter check and reindentation from two Run-menu commands -(`doc\edit\notepadpp\README.md` has both): - -```powershell -$d = "$env:AppData\Notepad++\userDefineLangs" -New-Item -ItemType Directory -Force $d | Out-Null -Copy-Item C:\Users\\klammertext\doc\edit\notepadpp\Klammertext.udl.xml $d -``` - -Restart Notepad++; `.kt` and `.k` files open as Klammertext. - -**Vim.** As in `doc\edit\vim\README.md`; the plugin runs the shared core -through `python` on Windows automatically. - - -## Troubleshooting - -**The command window closes at once, or "The code execution cannot proceed -because python312.dll was not found".** Python's directory is not on the -`Path` of that window. Reinstall Python with "Add to PATH" selected, or add -`C:\Program Files\Python312` to the `Path` yourself, and open a new window. - -**`import OpenImageIO` fails with "DLL load failed while importing -OpenImageIO".** The OpenImageIO package needs the Microsoft Visual C++ -runtime, which nearly every Windows machine already has but a freshly -installed one may not. Install it from -https://aka.ms/vs/17/release/vc_redist.x64.exe and try the import again. - -**"klammertext.dll was not found" or "libstdc++-6.dll was not found".** -`bin\` is not on the `Path`, or the build did not finish: `make -C com` -places the library and the runtime DLLs in `bin\` beside the commands. - -**"The shell Klammertext runs sh commands with on Windows is missing".** -`win\busybox\busybox64u.exe` is part of the repository; the clone is -incomplete or `KLAMMERTEXT_HOME` points elsewhere. - -**"The 'xelatex' command required to make PDF files is not installed".** -TeX Live's `bin\windows` directory is not on the `Path` of the shell you -are using. In the UCRT64 shell `runtime.env` adds it when the tree is under -`C:\texlive\` or `C:\Users\\external\texlive\`; in -PowerShell add it as shown above. - -**`make` stops at once with `"python" is C:/msys64/ucrt64/python, not -python.org's interpreter`.** MSYS2's own Python was installed as a -dependency (poppler brings it), and in the UCRT64 shell it precedes -python.org's on the `Path`. `runtime.env` puts python.org's first: source -it (a new UCRT64 shell does, once the line is in `~/.bashrc`) and run -`make` again. - -**`git` or `python` are "command not found" in the UCRT64 shell.** -`MSYS2_PATH_TYPE` is not set to `inherit`, or the shell was opened before -you set it. Set it and open a new UCRT64 shell. - -**"An Application Control policy has blocked this file", the MSYS2 -installer runs without ever finishing, or the MSYS2 shell does not open.** -Smart App Control is on; see *Before you start*. Close the installer, -switch Smart App Control off, and run the installer again. -It can turn itself on after the installation, in which case the -installation is intact and only the setting needs changing. - -**The build is slow.** Windows Defender scans every file the compiler -writes. Excluding the repository folder from real-time scanning speeds the -build up considerably; it is not required. diff --git a/doc/install/windows_wsl_install.md b/doc/install/windows_wsl_install.md index 56fc7f9..d0ad03d 100644 --- a/doc/install/windows_wsl_install.md +++ b/doc/install/windows_wsl_install.md @@ -1,9 +1,8 @@ # Klammertext on Windows through the Windows Subsystem for Linux -This page is for someone who works in Linux by habit and has a Windows -machine to work on. The Windows Subsystem for Linux (WSL 2) runs a real -Linux kernel and an ordinary Ubuntu inside Windows, and Klammertext's -Linux installation applies there unchanged: the same compiler, the same +This is how Klammertext is installed on Windows. The Windows Subsystem +for Linux (WSL 2) runs a real Linux kernel and an ordinary Ubuntu inside +Windows, and Klammertext's Linux installation applies there unchanged: the same compiler, the same Python, the same TeX Live, the same `runtime.env`. So this page is short. It gets you to an Ubuntu prompt, sends you to the Linux page, and then says what is specific to living in WSL: where files belong, how to look @@ -11,10 +10,10 @@ at the output from Windows, and how the Windows editors reach the Linux side. The steps were followed on a Windows 11 machine with WSL 2.7 and the Ubuntu it installs today, 26.04. -There are two other ways to have Klammertext on Windows: as native -Windows programs built from source (`windows_source_install.md`), and -from the prebuilt container images, which this page covers at the end, -since Docker runs inside WSL as it runs on Linux. +The commands are Linux programs, run from the Ubuntu prompt; there is no +native Windows build. The other way to have Klammertext on Windows is the +prebuilt container images, which this page covers at the end, since +Docker runs inside WSL as it runs on Linux. ## Getting Linux @@ -114,11 +113,16 @@ are a separate list and do not run in WSL windows.) **Emacs and Vim** are Linux programs: `sudo apt-get install emacs` or `vim`, then the Emacs and Vim packages under `doc/edit/` as on Linux. -**Sublime Text and Notepad++** on Windows can open the Linux files -through `\\wsl.localhost\Ubuntu\...` and highlight them with their -Klammertext packages (`doc/edit/sublime/`, `doc/edit/notepadpp/`); their -commands that run the shared core would run the Windows `python`, so for -those two editors the native Windows installation is the better fit. +**Sublime Text and Notepad++** on Windows open the Linux files through +`\\wsl.localhost\Ubuntu\...`, with their Klammertext packages +(`doc/edit/sublime/`, `doc/edit/notepadpp/`) installed on the Windows +side. The packages are self-contained: they highlight, and their commands +-- matching delimiters, reindentation, table alignment, the delimiter +check -- are Python programs that never run Klammertext itself, so the +Linux side is not involved. Sublime Text runs them in its own +interpreter. Notepad++'s Run commands, and the optional language server +for Sublime Text, start `python`, which means a Python for Windows from +python.org on the `Path`. ## The container route diff --git a/win/busybox/LICENSE b/win/busybox/LICENSE deleted file mode 100644 index 6f50a71..0000000 --- a/win/busybox/LICENSE +++ /dev/null @@ -1,348 +0,0 @@ ---- A note on GPL versions - -BusyBox is distributed under version 2 of the General Public License (included -in its entirety, below). Version 2 is the only version of this license which -this version of BusyBox (or modified versions derived from this one) may be -distributed under. - ------------------------------------------------------------------------- - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/win/busybox/README.md b/win/busybox/README.md deleted file mode 100644 index 4d8b30b..0000000 --- a/win/busybox/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# BusyBox for Windows — the shell behind `@eval :shell` on Windows - -`busybox64u.exe` is [BusyBox for Windows](https://frippery.org/busybox/) -(busybox-w32) by Ron Yorston, release **FRP-6075-g169694ebd** of -2026-05-07, the 64-bit Unicode build, downloaded from -`https://frippery.org/files/busybox/busybox64u.exe` on 2026-09-24. - - sha256 6e263d154d8548d1eb936f65d1d8312c80df31c45974e48d6335e4dcc0f4f34c - size 675840 bytes - -## Why it is here - -On Linux and macOS `popen()` runs a `:shell` command with `/bin/sh`, so -`@eval :shell …` has always meant a POSIX shell command. On Windows -`popen()` runs `cmd.exe`, a different language, and the same document would -mean something else. Klammertext therefore runs `:shell` commands on -Windows with this `sh` (`mac/eval.cpp`, `shell_command_line()`), and a -document's `:shell` command means the same thing on every system. - -## Licence - -BusyBox is distributed under the GNU General Public License version 2 -(`LICENSE`, the copy from the busybox-w32 repository). Klammertext invokes -it as a separate program and does not link against it. The corresponding -source is the busybox-w32 repository, `https://github.com/rmyorston/busybox-w32`, -at the release above; anyone who receives this binary from a Klammertext -distribution is entitled to that source under the GPL, and this file is the -written offer's pointer. diff --git a/win/busybox/busybox64u.exe b/win/busybox/busybox64u.exe deleted file mode 100644 index 8d28cba..0000000 Binary files a/win/busybox/busybox64u.exe and /dev/null differ