-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rethink extensions #20
Comments
"plugins don’t run independently" - not entirely true. There's a tetris out there that can either run if python + pygame is installed, or if dropped into the plugins folder and started by omnitool. It also uses no Terraria resources whatsoever and simply uses omnitool as "a version of python with dependencies installed". Additionally, flask projects aren't frozen. The extension modules never need to be loaded post freezing and I expect major problems if you try. What might be ok, is to make the plugins folder into just that, a folder; remove the |
how about forcing each plugin to be in the PYTHONPATH and have the the name then we can do that should also work with freezing! |
that just feels clunkier than the current implementation. What is wrong with the way it's currently done? |
|
Additionally, allowing plugins to reside "whereever" just complicates if they try to access non-python omnitool resources, like tImages.zip. |
could you elaborate? multiple folders is how pretty much all plugin systems work: you have one or more systemwide paths and one or more per-user ones. that’s true for most text editors and most browsers. e.g.:
this is why applications have data directories that they export. applications don’t rely on the CWD being somewhere, but instead have (on windows) their installation directory ( on linux, the plugin directories should probably be |
The conflict would be people installing different versions of a plugin into multiple folders and accidentally using an old version. The plugin system of omnitool is meant to be as simple as possible. A lot of the Terraria community is already overtasked with finding the omnitool folder, to put plugins into. A real improvement would be, to make plugins packages with their own extensions, say otp (omnitool package) - which would be a pyzip file with meta-info json. Omnitool's own are then in omnitool -> plugins. Third party ones in shared.appdata / plugins - automatically installed there when a otp was double clicked. Omnitool would then also have to make sure to remove older versions of a plugin, if a newer is installed. and the meta-info should be able to contain some sort of update link, so that plugins can be auto updated. That's basically my dream system. But it's a lot of work and considering there's basically no third party plugin development anymore, it just isn't a high priority. A lot more people want, for example, a new 1.3 planetoids. |
continued from this discussion.
hmm, many python plugin systems are done by placing stuff into a plugin subdirectory. (e.g. the
flask.ext
module for flask extensions)plugins don’t run independently, so they do belong to their main project. and python packages can install submodules to some subdir. but apparently that’s a problem, so flask instead accepts plugins with names beginning with
flask_
, e.g.flask_admin
,flask_assets
, …look how flask does it:
flask/ext/__init__.py
,ExtensionImporter
The text was updated successfully, but these errors were encountered: