def install(self): """Install the application icons.""" self.back_dir = create_backup_dir(self.get_name()) self.install_symlinks() for icon in self.get_output_icons(): if not self.data.data["backup_ignore"]: backup(self.get_back_dir(), icon["output_icon"]) self.install_icon(icon["data"], icon["path"])
def install_symlinks(self): """Create symlinks for some applications files.""" if self.has_symlinks(): symlinks = self.get_symlinks() for syml in symlinks: for directory in self.get_app_paths(): root = symlinks[syml]["root"] dest = directory + symlinks[syml]["dest"] backup(self.get_back_dir(), dest) symlink_file(root, dest)
def backup_binary(self, icon_path): """Backup binary file before modification.""" backup(self.get_back_dir(), icon_path + self.get_binary())