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

add ability to install export templates #34

Open
jolexxa opened this issue Oct 15, 2023 · 2 comments
Open

add ability to install export templates #34

jolexxa opened this issue Oct 15, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jolexxa
Copy link
Member

jolexxa commented Oct 15, 2023

It would be nice if there was a flag -e or --export-templates for godotenv godot install that would also install the relevant export templates on mac/win/linux.

Additionally, you might also need a separate command just to install the export templates (if you hadn't supplied the flag during installation) and probably one to check if they were installed.

Naturally, this would need to work across each of the 3 major OS's, which means installing the export templates to the correct location. Someone had graciously contributed the support for this to https://github.com/chickensoft-games/setup-godot a while back, and I believe I even ported some of the relevant logic for it to GodotEnv, but it will likely need updates.

@jolexxa jolexxa added enhancement New feature or request help wanted Extra attention is needed labels Oct 15, 2023
@donovani
Copy link

Great suggestion, I too would love to see this. Downloading export templates via the UI is such a manual process and not really easy to do for CI. I think it's a prime candidate for GodotEnv in particular because export templates are

  • Tied to the editor version
  • Don't really change across projects
  • Not downloadable via Godot CLI tools

The only thing I'm a little unsure of is how it should be stored. It seems like Godot stores the default templates it in your application data (eg: on Mac, it's in the Application Support folder). That might not be the easiest to store it in permission-wise, but if we can't use the default location, then that introduces another problem: How does the Godot project know where the export templates are?

AFAIK the default export template folder is not configurable, so we can't point Godot at another default path. We could override the templates for each build configuration in export_presets.cfg, but if we have a global cache folder, that path isn't going to be the same across platforms/OSes.

My thought is that perhaps we'd have to have to have more symlinks within the Godot project - perhaps something like:

addons/
|- addon-one/    (symlink to global addon cache)
|- addon-two/    (symlink to global addon cache)
|- .editorconfig
export-templates/
|- default.zip   (symlink to global export template cache)
addons.json
project.csproj
project.godot
project.sln

...and then you could just use a relative path inside of the export_presets.cfg so that it stays the same across platforms.

At least that's my initial take. Could be simpler ways I'm not aware of.

@jolexxa
Copy link
Member Author

jolexxa commented Nov 15, 2024

Note that this project is not intended for CI/CD. You can use it in CI just fine, but you won't get the cache benefits that setup-godot provides (which can also install export templates). Your proposed changes are very clever, but at that point, it's better making changes inside Godot itself to perhaps expose some CLI options. In the meantime, we can borrow the implementation of installing export templates from setup-godot (we've already pretty much solved permissions problems in this project handling different auth requirements across the 3 desktop OS's with symlinks and whatnot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants