dom0: create appmenus template and icon for all VMs
This commit is contained in:
parent
950d848ede
commit
7b81659593
@ -980,9 +980,18 @@ class QubesVm(object):
|
||||
for f in ("vmlinuz", "initramfs", "modules.img"):
|
||||
shutil.copy(kernels_dir + '/' + f, self.dir_path + '/kernels/' + f)
|
||||
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}".\
|
||||
format(source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
shutil.copytree (source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
|
||||
# Create volatile.img
|
||||
self.reset_volatile_storage(source_template = source_template, verbose=verbose)
|
||||
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Creating icon symlink: {0} -> {1}".format(self.icon_path, self.label.icon_path)
|
||||
os.symlink (self.label.icon_path, self.icon_path)
|
||||
|
||||
def create_appmenus(self, verbose, source_template = None):
|
||||
if source_template is None:
|
||||
source_template = self.template
|
||||
@ -2117,16 +2126,6 @@ class QubesAppVm(QubesVm):
|
||||
|
||||
super(QubesAppVm, self).create_on_disk(verbose, source_template=source_template)
|
||||
|
||||
if self.updateable:
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}".\
|
||||
format(source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
shutil.copytree (source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Creating icon symlink: {0} -> {1}".format(self.icon_path, self.label.icon_path)
|
||||
os.symlink (self.label.icon_path, self.icon_path)
|
||||
|
||||
if not self.internal:
|
||||
self.create_appmenus (verbose, source_template=source_template)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user