Change the way we look for Qemu path

Fix #302
This commit is contained in:
Julien Duponchelle committed 2015-08-27 18:27:17 +02:00
1 parent c361d27531
commit d853ffe791
3 files changed
+11 -6

No files matched your search

+2 -2
View File
@@ -70,9 +70,9 @@ class Qemu(BaseManager):
if "PROGRAMFILES" in os.environ and os.path.exists(os.environ["PROGRAMFILES"]):
paths.add(os.path.join(os.environ["PROGRAMFILES"], "qemu"))
elif sys.platform.startswith("darwin"):
# add specific locations on Mac OS X regardless of what's in $PATH
paths.update(["/usr/bin", "/usr/local/bin", "/opt/local/bin"])
if hasattr(sys, "frozen"):
# add specific locations on Mac OS X regardless of what's in $PATH
paths.update(["/usr/bin", "/usr/local/bin", "/opt/local/bin"])
try:
exec_dir = os.path.dirname(os.path.abspath(sys.executable))
paths.add(os.path.abspath(os.path.join(exec_dir, "../Resources/qemu/bin/")))