- Add support for adding the base folder to PATH. - Only display one pop up window at a time in order to avoid confusion. - Add automatic updates feature: - Windows and Linux versions will be shipped with an updater program used to update both Artemis and the updater itself. - MacOs versions will not have the updater. Instead the user will be asked to download the new software version (if present) via browser.
35 lines
724 B
Python
35 lines
724 B
Python
import sys
|
|
from constants import SupportedOs
|
|
|
|
|
|
def _is_mac_os():
|
|
"""Return True if running OS is Mac."""
|
|
return sys.platform == 'darwin'
|
|
|
|
|
|
def _is_win_os():
|
|
"""Return True if running OS is Windows."""
|
|
return sys.platform == 'win32'
|
|
|
|
|
|
def _is_linux_os():
|
|
"""Return True if running OS is Linux."""
|
|
return sys.platform == 'linux'
|
|
|
|
|
|
IS_MAC = _is_mac_os()
|
|
IS_LINUX = _is_linux_os()
|
|
IS_WINDOWS = _is_win_os()
|
|
|
|
|
|
def get_os():
|
|
"""Get the name of the current running operating system."""
|
|
if IS_WINDOWS:
|
|
return SupportedOs.WINDOWS
|
|
elif IS_LINUX:
|
|
return SupportedOs.LINUX
|
|
elif IS_MAC:
|
|
return SupportedOs.MAC
|
|
else:
|
|
raise Exception("ERROR: OS not recognized.")
|