holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.49k stars 112 forks source link

ConTeXt #208

Open lifepillar opened 3 years ago

lifepillar commented 3 years ago

Thanks for this app! How hard would it be to support ConTeXt?

holzschu commented 3 years ago

Good question. I was not aware that ConTeXt had branched from luaTeX (which we already support). The main goal with TeX is first to update to texlive 2021 (we're still on texlive 2019), and to make it in a way that will make future upgrades smoother. If ConTeXt is part of TL2021, it will probably be compiled at the same time.

lifepillar commented 3 years ago

If ConTeXt is part of TL2021

Yes, it is. It is also part of TeX Live 2019, for that matter.

holzschu commented 3 years ago

Hi, I'm currently recompiling the texlive 2021 binaries from their source: https://github.com/teX-Live/texlive-source/ While there are still many issues to consider, there doesn't seem to be anything specific to ConTeXt in the source or the binaries. Unless there is a hidden switch somewhere, it seems that ConTeXt will be running on the standard luatex (and if that's true, then you can have ConTeXt with the standard version of a-Shell, just by copying the relevant files).

Looking again at the documentation you linked on the first post, the status of ConTeXt with respect to texlive is somewhat fuzzy. The web site distributes binaries for many architectures, but I've been unable to find source code.

I will be needing some more help on this issue.

lifepillar commented 3 years ago

ConTeXt will be running on the standard luatex

Yes, that should be the case (actually, the latest version now uses “luametatex”, which is the next iteration on the luatex project).

ConTeXt is constantly evolving. The distributions you find in the page I have linked contain a script that install a self-contained beta (which is considered stable) for the specified architecture using rsync. Such beta is entirely self-contained and can be installed anywhere, e.g., in your home directory.

Once a year, ConTeXt's developers “freeze” the beta and prepare a release for TeX Live.

For the source code, see https://wiki.contextgarden.net/Development.

What is required for an executable to run within a-Shell?

holzschu commented 3 years ago

For an executable to run within a-Shell, it needs to be compiled for the Arm64 processor using the iOS SDK. So basically recompiled from scratch (It's not one of the architectures included in their script).

The source code must also be edited to release all memory that was allocated and re-initialize all variables. Finally, if it starts other commands or outputs things to stdout, it must be linked with ios_system. framework. All in all, not impossible, but a bit of work.

Since it's not part of the main texlive distribution, I will finish the work on TL2021 first, then have a look at the source code you linked.