On Wed, Oct 20, 2021 at 9:10 PM Robert J. Budzyński <robert.budzyn...@fuw.edu.pl> wrote: > > > > On Wed, Oct 20, 2021 at 7:44 AM Chris Angelico <ros...@gmail.com> wrote: >> >> On Wed, Oct 20, 2021 at 2:44 PM James Latham <jrlatha...@gmail.com> wrote: >> > >> > Dear Pike lovers: >> > Thanks for the very informative Blog that you have created. >> > I would love to join in. >> > Is there any way to create a distributable pike program? >> > Ideally it would be all in one module. >> > Jim Latham >> >> >> Yes, absolutely! I've often made one-file Pike programs. For instance, >> I have a git hook that I use in a number of projects, and it's all >> contained in one file (called, surprisingly enough, "githook.pike"), >> marked executable, and with an appropriate shebang. >> >> ChrisA >> > > Er, that assumes the pike runtime is available. I believe what Jim had in > mind was a situation where you can't assume that on the user's end.
Oh. Having had experience with this kind of thing in Python, I am of the opinion that it's a lot more hassle than it's worth. Trying to make a single executable that runs on every target platform is a nightmare, so what usually happens is that someone spins up a thing using the exact version of Python and Windows (it's always Windows) on the dev system, and it won't run properly on other systems. Much much cleaner to distribute a script and then have the interpreter installed elsewhere. What would be nice, though, would be to have a cross-platform way to have a script say "hey, I need this, if you don't have it please install it". ChrisA