Skip to content

Conversation

@youthyJJ
Copy link

feat: Add functionality to manually install formatter plugins via zip files in the menu

Please check if the PR fulfills these requirements:

  • The commit message follows our guidelines.
  • You tested the changes.

Related issue (if applicable): #

What kind of change does this PR introduce?
This PR introduces a new feature that allows users to manually install formatter plugins from local zip files, providing an alternative installation method when GitHub access is unreliable.

Does this PR introduce a breaking change?
No, this change is fully backward compatible. The existing GitHub download functionality remains unchanged, and the local zip installation is added as an additional option.

New feature or change

Added a new menu option to install formatter from local zip file, which is especially useful in network environments with limited access to GitHub.

What is the current behavior?
Currently, the plugin only supports downloading formatter binaries directly from GitHub releases. Users in regions with poor GitHub connectivity may experience frequent download failures.

What is the new behavior?
Users now have two installation options:

  1. The original GitHub download functionality (unchanged)
  2. A new manual installation option that allows selecting a pre-downloaded zip file from the local file system

The new functionality extracts and installs the formatter binary from the local zip file, providing a reliable fallback when GitHub access is problematic.

Other information
This change enhances the plugin's usability in various network environments while maintaining full compatibility with existing workflows. The implementation includes proper error handling for zip file operations and maintains the same installation directory structure as the GitHub download method.

@NathanLovato
Copy link
Contributor

Thank you for taking time to contribute!

The formatter does already support using your local copy of the program. You don't have to download it through Godot. You can bring over a copy of the formatter through a USB key and configure the add-on to use it. It's also documented: https://www.gdquest.com/library/gdscript_formatter_godot_addon/

I don't want to add an extra persistent format menu entry just for unzipping the program and changing the editor setting for the user.

I'd like instead to move toward #107 for something like this: a contextual wizard/popup window that'll surface install options, the most important config, and link to the documentation. Then you can have a field there to use a local copy of the addon (selecting either the binary or a zip file containing the binary through a file browser) or download and install the latest version automatically (plus some checkboxes with tooltips to select reorder mode, safe mode, etc.).

I'll leave it open for now to keep the code around, but I will not merge this pull request as is.

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.

3 participants