philburk / pforth

Portable Forth in C
BSD Zero Clause License
602 stars 99 forks source link

Need docs for building standalone pForth executable #146

Open philburk opened 1 year ago

philburk commented 1 year ago
    If I wanted to install pForth in /usr/local/bin, where is pForth going to find the dictionary file?  Where is it going to write it?  Perhaps env variables?

I think it might be useful to be able to run a turnkey forth application from any directory…. Like we have save-Forth built in, maybe some kind of installer word built-in, too?

is shebang supported? Something like this would work:

somefile.f (chmod 755):

!/usr/local/bin/pforth -i path-to-application

forth code here (ASCII)

Just thinking out loud here…

Originally posted by @mschwartz in https://github.com/philburk/pforth/issues/106#issuecomment-1345419715

philburk commented 1 year ago

PForth supports a standalone mode that does not use a dictionary file. I recommend using that when installing pForth.

But I see that this feature is not really documented! I will add better docs.

The Unix Makefile builds a pforth_standalone file. See "platforms/unix/Makefile".