diff --git a/installer/install b/installer/install index a0bb49d..031b7ae 100644 --- a/installer/install +++ b/installer/install @@ -2,13 +2,17 @@ import os, sys, shutil, urllib.request -print("Downloading Neuro3D Blender addon.") -archive = "https://github.com/Helveg/neuro3d/releases/download/v0.0.1a0/neuro3d.zip" -with urllib.request.urlopen(archive) as w: - with open("neuro3d.zip", 'wb') as f: - f.write(w.read()) +if "--local" in sys.argv: + print("Installing local Neuro3D Blender addon.") + shutil.make_archive("neuro3d", 'zip', ".", "neuro3d") +else: + print("Downloading Neuro3D Blender addon.") + archive = "https://github.com/Helveg/neuro3d/releases/latest/download/neuro3d.zip" + with urllib.request.urlopen(archive) as w: + with open("neuro3d.zip", 'wb') as f: + f.write(w.read()) try: - print("Launching Blender, installing.") + print("Launching Blender, installing zip.") os.system(f"blender --background --python installer/blender_install.py") finally: os.remove("neuro3d.zip")