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

Allow to install the downloaded zip with 1 click #20

Open
NikolaiVChr opened this issue Feb 25, 2020 · 2 comments
Open

Allow to install the downloaded zip with 1 click #20

NikolaiVChr opened this issue Feb 25, 2020 · 2 comments

Comments

@NikolaiVChr
Copy link
Owner

When user click download on the repo and get a zip, it would be nice if that zip could be installed just by clicking "install add-on" button in Blender.

I just cannot get it to work, in old days there was a bug that if the folder inside the zip had a dot in the name it wouldn't work. Tried that and it still don't work. The nesting into io_scene_ac3d should also not be a problem according to various sources.

@Entamut
Copy link

Entamut commented Jun 2, 2020

Hi @NikolaiVChr!

Short version: sorry, nesting seems to be the issue

I've being trying for a while and I think I solved the "issue" (it is not an issue ;) ).
I think the main problem is Blender requires the plugin files to be in the first level folder. When someone downloads a zip the plugin GitHub repo (this repo), the first level of the path is the name of the repo and the second level is the folder containing the files. That won't work for now (nesting).

Trying to clarify (steps to check my argument):

  • Download as zip this repo
  • Unzip
  • In my case I got the following folder structure: "./Blender-AC3D-2.80/io_scene_ac3d"
  • Inside the io_scene_ac3d folder I find the files of the plugin

Blender expects the files to be in the first folder, so they should be in Blender-AC3D-2.80.

Steps to fix (my proposal):

  • Rename the repo from "Blender-AC3D" to "io_scene_ac3d"
  • Move all files from "io_scene_ac3d/io_scene_ac3d" to "io_scene_ac3d"
  • Delete the empty folder "io_scene_ac3d/io_scene_ac3d"

Proof that it works:

  • I completed the steps in my own repo https://github.com/Entamut/io_scene_ac3d
  • After that I download as zip (using the button provided by GitHub and Chrome; this is a Mac and Safari unzips everything by default)
  • Then I selected "Edit -> Preferences -> Add-ons" in Blender and clicked on "Install..."

00_install_button

And the plugin got installed as shown:
01_success

Additional comments by my side:

  • Drag & drop install of add-ons seems to be removed from Blender 2.8x (for now)
  • I think this way of installing (via install button) is the preferred one. On Mac this installs the script on user's library folder (e.g. "/Users/riki/Library/Application Support/Blender/2.82/scripts/addons/io_scene_ac3d-master")
  • I think current way of installing is discouraged for a few platforms. On Mac it requires to open Blender package (application) and drop the files somewhere inside. From a standard user point of view that is crazy. It is quite similar to messing with .exe files in Windows, like you could unzip those exe files and put something inside. Totally insane ;) (e.g. "/Applications/Blender.app/Contents/Resources/2.82/scripts/addons/io_scene_ac3d")
  • Another good thing is you can remove the plugin if required (remove button appears in Mac when installing with the button, but it didn't when using the old method)
  • Unfortunately, when downloading the zip, the folder includes the name of the branch, so you get io_scene_ac3d-master. I think that is something that could be fixed via releases ;)

That's all!

@NikolaiVChr
Copy link
Owner Author

Thanks for figuring this out.
Will probably do that then, or maybe just start making releases with pre-prepared zips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants