Skip to content

Commit

Permalink
Switched download url to latest and added local option
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Apr 20, 2021
1 parent 573b38f commit 02c48a1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 02c48a1

Please sign in to comment.