Пример #1
0
    def prepare_prefix(self):
        for nine_file in NineManager.nine_files:
            for lib in system.LINUX_SYSTEM.iter_lib_folders():
                nine_file_path = os.path.join(lib, "wine/fakedlls", nine_file)

                if (os.path.exists(nine_file_path)
                        and CabInstaller.get_arch_from_dll(nine_file_path)
                        == "win32"):
                    shutil.copy(nine_file_path, self.get_system_path("x32"))

                if self.wine_arch == "win64":
                    if (os.path.exists(nine_file_path)
                            and CabInstaller.get_arch_from_dll(nine_file_path)
                            == "win64"):
                        shutil.copy(nine_file_path,
                                    self.get_system_path("x64"))

            if not os.path.exists(
                    os.path.join(self.get_system_path("x32"), nine_file)):
                raise NineUnavailable("could not install " + nine_file +
                                      " (x32)")

            if self.wine_arch == "win64":
                if not os.path.exists(
                        os.path.join(self.get_system_path("x64"), nine_file)):
                    raise NineUnavailable("could not install " + nine_file +
                                          " (x64)")
Пример #2
0
def install_cab_component(cabfile, component, wine_path=None, prefix=None, arch=None):
    """Install a component from a cabfile in a prefix"""
    cab_installer = CabInstaller(prefix, wine_path=wine_path, arch=arch)
    files = cab_installer.extract_from_cab(cabfile, component)
    registry_files = cab_installer.get_registry_files(files)
    for registry_file, _arch in registry_files:
        set_regedit_file(registry_file, wine_path=wine_path, prefix=prefix, arch=_arch)
    cab_installer.cleanup()
Пример #3
0
def install_cab_component(cabfile, component, wine_path=None, prefix=None, arch=None):
    """Install a component from a cabfile in a prefix"""
    cab_installer = CabInstaller(prefix, wine_path=wine_path, arch=arch)
    files = cab_installer.extract_from_cab(cabfile, component)
    registry_files = cab_installer.get_registry_files(files)
    for registry_file, _arch in registry_files:
        set_regedit_file(registry_file, wine_path=wine_path, prefix=prefix, arch=_arch)
    cab_installer.cleanup()