Skip to content
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

Load global scripts #365

Closed
wants to merge 3 commits into from

Conversation

madd-games
Copy link
Contributor

Here is my proposal for a system-wide script directory, in additional to the user directory which we already use.

Currently I've set it to /etc/goxel/scripts on Linux, and I'm not sure what it could be on Windows.

This would allow scripts to be installed globally, for example via a Debian package, allowing packages to add fuctionality such as additional import/export formats. So far it was possible to install scripts for a given user but not as part of a package installed on the system.

Let me know what you think

@guillaumechereau
Copy link
Owner

Why not, though I don't really like the name 'global_dir'. I think what would make sense is to use a single system function to get any kind of directory, maybe with an enum. This would also be useful for the default image saving directory for example. I'll try to have a look later at how other open source projects handle that.

@guillaumechereau
Copy link
Owner

I added a more generic way to do this with a sys_iter_paths function. Totally untested at the moment, and might break the code on linux or windows.

@madd-games
Copy link
Contributor Author

Thanks, I have tested it on Linux and it works. This branch is no longer necessary.

@madd-games madd-games closed this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants