Franck Pommereau

added icons

No preview for this file type
No preview for this file type
1 -import os, shutil, glob, subprocess 1 +import os, shutil, glob, subprocess, platform
2 2
3 def clean (dist=False) : 3 def clean (dist=False) :
4 shutil.rmtree("build") 4 shutil.rmtree("build")
...@@ -7,9 +7,13 @@ def clean (dist=False) : ...@@ -7,9 +7,13 @@ def clean (dist=False) :
7 for path in glob.glob("*.spec") : 7 for path in glob.glob("*.spec") :
8 os.remove(path) 8 os.remove(path)
9 9
10 +icon = {"Windows" : ["--icon", "bones.ico"],
11 + "Darwin" : ["--icon", "bones.icns"]}
12 +args = ["pyinstaller", "--clean", "-F", "-w"] + icon.get(platform.system(), [])
13 +
10 clean(True) 14 clean(True)
11 -args = ["bones.py", "bones_edit.py", "bones_machine.py"] 15 +targets = ["bones.py", "bones_edit.py", "bones_machine.py"]
12 -while args : 16 +while targets :
13 - subprocess.call(["pyinstaller", "--clean", "-F", "-w"] + args) 17 + subprocess.call(args + targets)
14 - args.pop(0) 18 + targets.pop(0)
15 clean() 19 clean()
......