Improved methods for mounting and such
dirthsj opened this issue ยท 2 comments
As far as I can tell, there isn't a way to mount and automatically run a lua file (from the Java side of things). Specifically, I would like to run a short program adding mymount/programs
to the shell path, and adding auto-completion support for the program(s) that are mounted.
I would also like a method for determining the absolute directory of a computer (ei C:/somebody/...) as I need that for another API. I've been working around this without much trouble, but it should be trivial to implement.
edit
A virtual file system (with limited space) would be even better, as suggested by SquidDev
/edit
It would also be nice if it was possible to add Java-side APIs to computers (without peripherals / upgrades / etc.). I've been using CCTweaks to get around this, perhaps @SquidDev could provide some idea of what would need to be done for this. I would honestly just PR the extra API, except for the "no additional dependencies" rule, and this is one huge frigging dependency.
These are just a couple things I've run into during the development of CCGit
As far as I can tell, there isn't a way to mount and automatically run a lua file
I don't know if you can mount something in the rom/autorun
folder - shell startup should automatically run that.
It would also be nice if it was possible to add Java-side APIs to computers
I wrote a PR a while back which moved ILuaAPI
to the CC API and provided a system to register them. However, I wasn't entirely sure how much information should be exposed - perhaps something to discuss. I was thinking IComputerAccess
+ a few other methods.
I would also like a method for determining the absolute directory of a computer
My one concern with this (and this is something CCGit does wrong) is that APIs can go over a computer's size limit. Maybe exposing a limited file system which correctly handles limits would be better.
I realise CCTweaks does this all already, but if an equivalent feature is added to CC, I want to get it right. :)
I don't know if you can mount something in the rom/autorun folder - shell startup should automatically run that.
This wouldn't solve every case, take for example a mount being added while the computer is running (ei peripheral attach)
I wrote a PR a while back which moved ILuaAPI to the CC API and provided a system to register them. However, I wasn't entirely sure how much information should be exposed - perhaps something to discuss. I was thinking IComputerAccess + a few other methods.
IComputerAccess for sure, though I'm not sure what else you'd need.
My one concern with this (and this is something CCGit does wrong) is that APIs can go over a computer's size limit. Maybe exposing a limited file system which correctly handles limits would be better.
That's a very good point.