Add /.args feature to Redbean/Lua/SQLite/Python/QuickJS

You now have some ability to truly make an executable yours, by adding a
`.args` file to the root of the zip structure. If this is specified,
then you'll be overriding the default CLI args.

This will be a great feature for folks who want to distribute their own
apps, using the interpreter executable, but have the executable appears
to be just your app rather than being the interpreter.
This commit is contained in:
Justine Tunney 2022-05-12 11:01:58 -07:00
parent 0f6251f4d2
commit 4499f98e76
19 changed files with 421 additions and 19 deletions

View file

@ -41,6 +41,7 @@
#include "third_party/python/Include/pythonrun.h"
#include "third_party/python/Include/unicodeobject.h"
#include "third_party/python/Include/yoink.h"
#include "tool/args/args.h"
/* clang-format off */
STATIC_STACK_SIZE(0x100000);
@ -348,5 +349,6 @@ RunPythonModule(int argc, char **argv)
int
main(int argc, char **argv)
{
LoadZipArgs(&argc, &argv);
return RunPythonModule(argc, argv);
}