diff --git a/core/Makefile b/core/Makefile index 93e89520..41481354 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,4 +1,7 @@ +OS ?= Linux + PYTHON_QUBESPATH = $(PYTHON_SITEPATH)/qubes +SETTINGS_SUFFIX = $(BACKEND_VMM)-$(OS) all: python -m compileall . @@ -19,3 +22,11 @@ endif cp notify.py[co] $(DESTDIR)$(PYTHON_QUBESPATH) cp backup.py $(DESTDIR)$(PYTHON_QUBESPATH) cp backup.py[co] $(DESTDIR)$(PYTHON_QUBESPATH) +ifneq ($(BACKEND_VMM),) + test -r settings-$(SETTINGS_SUFFIX).py && \ + cp settings-$(SETTINGS_SUFFIX).py $(DESTDIR)$(PYTHON_QUBESPATH)/settings.py + test -r settings-$(SETTINGS_SUFFIX).pyc && \ + cp settings-$(SETTINGS_SUFFIX).pyc $(DESTDIR)$(PYTHON_QUBESPATH)/settings.pyc + test -r settings-$(SETTINGS_SUFFIX).pyo && \ + cp settings-$(SETTINGS_SUFFIX).pyo $(DESTDIR)$(PYTHON_QUBESPATH)/settings.pyo +endif diff --git a/core/qubes.py b/core/qubes.py index 68b78bdd..693fffe2 100755 --- a/core/qubes.py +++ b/core/qubes.py @@ -21,6 +21,8 @@ # # +from __future__ import absolute_import + import sys import os import os.path @@ -868,6 +870,13 @@ for module_file in sorted(os.listdir(modules_dir)): continue __import__('qubes.modules.%s' % module_file[:-3]) +try: + import qubes.settings + qubes.settings.apply(system_path, vm_files, defaults) +#except ImportError: +finally: + pass + for path_key in system_path.keys(): system_path[path_key] = system_path[path_key].format( base_dir=system_path['qubes_base_dir'] diff --git a/core/settings-wni-Windows_NT.py b/core/settings-wni-Windows_NT.py new file mode 100644 index 00000000..a2739b98 --- /dev/null +++ b/core/settings-wni-Windows_NT.py @@ -0,0 +1,4 @@ +#!/usr/bin/python2 + +def apply(system_path, vm_files, defaults): + system_path['qubes_base_dir'] = 'c:/qubes'