ver May1st
a temporary workround for Mac hosts.
This commit is contained in:
@@ -7,6 +7,9 @@ import threading
|
|||||||
import uuid
|
import uuid
|
||||||
import zipfile
|
import zipfile
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger("desktopenv.envinit")
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
import requests
|
import requests
|
||||||
@@ -190,10 +193,12 @@ def _install_virtual_machine(vm_name, working_dir="./vm_data", downloaded_file_n
|
|||||||
def __download_and_unzip_vm():
|
def __download_and_unzip_vm():
|
||||||
# Determine the platform and CPU architecture to decide the correct VM image to download
|
# Determine the platform and CPU architecture to decide the correct VM image to download
|
||||||
if platform.system() == 'Darwin': # macOS
|
if platform.system() == 'Darwin': # macOS
|
||||||
if os.uname().machine == 'arm64': # Apple Silicon
|
#if os.uname().machine == 'arm64': # Apple Silicon
|
||||||
url = UBUNTU_ARM_URL
|
#url = UBUNTU_ARM_URL
|
||||||
else:
|
#else:
|
||||||
url = UBUNTU_X86_URL
|
#url = UBUNTU_X86_URL
|
||||||
|
url = UBUNTU_ARM_URL # a workout as most new macs are using apple silicon and they are frequently misrecognized as x86_64
|
||||||
|
logger.warning("Your platform is temporarily considered to be ARM. If this is a mistake, please manually replace the downloaded VM under ./vm_data with the VM of x86 version from %s", UBUNTU_X86_URL)
|
||||||
elif platform.machine().lower() in ['amd64', 'x86_64']:
|
elif platform.machine().lower() in ['amd64', 'x86_64']:
|
||||||
url = UBUNTU_X86_URL
|
url = UBUNTU_X86_URL
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user