示例#1
0
    def prelaunch(self):
        if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
            create_prefix(self.prefix_path, arch=self.wine_arch)
        prefix_manager = WinePrefixManager(self.prefix_path)
        if self.runner_config.get("autoconf_joypad", True):
            prefix_manager.configure_joypads()
        self.sandbox(prefix_manager)
        self.set_regedit_keys()
        self.setup_x360ce(self.runner_config.get("x360ce-path"))
        dxvk_manager = dxvk.DXVKManager
        self.setup_dxvk(
            "dxvk",
            dxvk_manager=dxvk_manager(
                self.prefix_path,
                arch=self.wine_arch,
                version=self.runner_config.get("dxvk_version"),
            ),
        )

        try:
            self.setup_nine(
                bool(self.runner_config.get("gallium_nine")),
                bool(self.runner_config.get("dxvk")),
            )
        except nine.NineUnavailable as ex:
            raise GameConfigError("Unable to configure GalliumNine: %s" % ex)
        return True
示例#2
0
    def prelaunch(self):
        if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
            create_prefix(self.prefix_path, arch=self.wine_arch)
        prefix_manager = WinePrefixManager(self.prefix_path)
        if self.runner_config.get("autoconf_joypad", True):
            prefix_manager.configure_joypads()
        self.sandbox(prefix_manager)
        self.set_regedit_keys()
        self.setup_x360ce(self.runner_config.get("x360ce-path"))
        self.setup_dxvk(
            "dxvk",
            dxvk_manager=dxvk.DXVKManager(
                self.prefix_path,
                arch=self.wine_arch,
                version=self.runner_config.get("dxvk_version")),
        )

        # we don't want d9vk to restore d3d9.dll, because dxvk could set it already
        if bool(self.runner_config.get("d9vk")):
            self.setup_dxvk(
                "d9vk",
                dxvk_manager=dxvk.D9VKManager(
                    self.prefix_path,
                    arch=self.wine_arch,
                    version=self.runner_config.get("d9vk_version")),
            )
        return True
示例#3
0
    def prelaunch(self):
        if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
            logger.warning("No valid prefix detected in %s, creating one...",
                           self.prefix_path)
            create_prefix(self.prefix_path, arch=self.wine_arch)

        prefix_manager = WinePrefixManager(self.prefix_path)
        if self.runner_config.get("autoconf_joypad", False):
            prefix_manager.configure_joypads()
        self.sandbox(prefix_manager)
        self.set_regedit_keys()

        self.setup_dlls(DXVKManager, bool(self.runner_config.get("dxvk")),
                        self.runner_config.get("dxvk_version"))
        self.setup_dlls(VKD3DManager, bool(self.runner_config.get("vkd3d")),
                        self.runner_config.get("vkd3d_version"))
        self.setup_dlls(DXVKNVAPIManager,
                        bool(self.runner_config.get("dxvk_nvapi")),
                        self.runner_config.get("dxvk_nvapi_version"))
        self.setup_dlls(D3DExtrasManager,
                        bool(self.runner_config.get("d3d_extras")),
                        self.runner_config.get("d3d_extras_version"))
        self.setup_dlls(dgvoodoo2Manager,
                        bool(self.runner_config.get("dgvoodoo2")),
                        self.runner_config.get("dgvoodoo2_version"))
        return True
示例#4
0
    def create_prefix(self, prefix_dir, arch=None):
        logger.debug("Creating default winesteam prefix")
        if not arch:
            arch = self.default_arch
        wine_path = self.get_executable()

        if not os.path.exists(os.path.dirname(prefix_dir)):
            os.makedirs(os.path.dirname(prefix_dir))
        create_prefix(prefix_dir, arch=arch, wine_path=wine_path)
示例#5
0
 def prelaunch(self):
     if not os.path.exists(os.path.join(self.prefix_path, 'user.reg')):
         create_prefix(self.prefix_path, arch=self.wine_arch)
     prefix_manager = WinePrefixManager(self.prefix_path)
     if self.runner_config.get('autoconf_joypad', True):
         prefix_manager.configure_joypads()
     self.sandbox(prefix_manager)
     self.set_regedit_keys()
     self.setup_x360ce(self.runner_config.get('x360ce-path'))
     self.toggle_dxvk(bool(self.runner_config.get('dxvk')),
                      version=self.runner_config.get('dxvk_version'))
     return True
示例#6
0
文件: wine.py 项目: TRPB/lutris
 def prelaunch(self):
     if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
         create_prefix(self.prefix_path, arch=self.wine_arch)
     prefix_manager = WinePrefixManager(self.prefix_path)
     if self.runner_config.get("autoconf_joypad", True):
         prefix_manager.configure_joypads()
     self.sandbox(prefix_manager)
     self.set_regedit_keys()
     self.setup_x360ce(self.runner_config.get("x360ce-path"))
     self.toggle_dxvk(
         bool(self.runner_config.get("dxvk")),
         version=self.runner_config.get("dxvk_version"),
     )
     return True
示例#7
0
    def create_default_prefix(self, prefix_dir, arch=None):
        """Create the default prefix for Steam

        Not sure Steam will keep on working on 32bit prefixes for long.

        Args:
            prefix_path (str): Destination of the default prefix
            arch (str): Optional architecture for the prefix, defaults to win64
        """
        logger.debug("Creating default winesteam prefix")
        arch = arch or self.default_arch

        if not system.path_exists(os.path.dirname(prefix_dir)):
            os.makedirs(os.path.dirname(prefix_dir))
        create_prefix(prefix_dir, arch=arch, wine_path=self.get_executable())
示例#8
0
    def create_default_prefix(self, prefix_dir, arch=None):
        """Create the default prefix for Steam

        Not sure Steam will keep on working on 32bit prefixes for long.

        Args:
            prefix_path (str): Destination of the default prefix
            arch (str): Optional architecture for the prefix, defaults to win64
        """
        logger.debug("Creating default winesteam prefix")
        arch = arch or self.default_arch

        if not system.path_exists(os.path.dirname(prefix_dir)):
            os.makedirs(os.path.dirname(prefix_dir))
        create_prefix(prefix_dir, arch=arch, wine_path=self.get_executable())
示例#9
0
    def prelaunch(self):
        if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
            create_prefix(self.prefix_path, arch=self.wine_arch)
        prefix_manager = WinePrefixManager(self.prefix_path)
        if self.runner_config.get("autoconf_joypad", False):
            prefix_manager.configure_joypads()
        self.sandbox(prefix_manager)
        self.set_regedit_keys()

        self.setup_dlls(DXVKManager, bool(self.runner_config.get("dxvk")),
                        self.runner_config.get("dxvk_version"))
        self.setup_dlls(VKD3DManager, bool(self.runner_config.get("vkd3d")),
                        self.runner_config.get("vkd3d_version"))
        self.setup_dlls(DXVKNVAPIManager,
                        bool(self.runner_config.get("dxvk_nvapi")),
                        self.runner_config.get("dxvk_nvapi_version"))
        return True
示例#10
0
 def prelaunch(self):
     if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
         create_prefix(self.prefix_path, arch=self.wine_arch)
     prefix_manager = WinePrefixManager(self.prefix_path)
     if self.runner_config.get("autoconf_joypad", True):
         prefix_manager.configure_joypads()
     self.sandbox(prefix_manager)
     self.set_regedit_keys()
     self.setup_x360ce(self.runner_config.get("x360ce-path"))
     try:
         dxvk_version = self.runner_config.get("dxvk_version")
         self.toggle_dxvk(
             bool(self.runner_config.get("dxvk")),
             version=dxvk_version,
         )
     except dxvk.UnavailableDXVKVersion:
         raise GameConfigError("Unable to get DXVK %s" % dxvk_version)
     return True
示例#11
0
    def prelaunch(self):
        if not system.path_exists(os.path.join(self.prefix_path, "user.reg")):
            create_prefix(self.prefix_path, arch=self.wine_arch)
        prefix_manager = WinePrefixManager(self.prefix_path)
        if self.runner_config.get("autoconf_joypad", True):
            prefix_manager.configure_joypads()
        self.sandbox(prefix_manager)
        self.set_regedit_keys()
        self.setup_x360ce(self.runner_config.get("x360ce-path"))
        self.setup_dxvk("dxvk", dxvk_manager=dxvk.DXVKManager(
                    self.prefix_path, arch=self.wine_arch, version=self.runner_config.get("dxvk_version")
                ),)

        # we don't want d9vk to restore d3d9.dll, because dxvk could set it already
        if bool(self.runner_config.get("d9vk")):
            self.setup_dxvk("d9vk", dxvk_manager=dxvk.D9VKManager(
                        self.prefix_path, arch=self.wine_arch, version=self.runner_config.get("d9vk_version")
                    ),)
        return True