1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2026-02-02 22:25:47 +01:00

4 Commits

Author SHA1 Message Date
59bd1b6029 Make tempfile prefixed with fs-uae-wrapper string.
Also, included test requirements into tox file, and fixed docs.
2025-09-25 18:50:28 +02:00
f5e6471555 Removed license classifier in favor of SPDX entry. 2025-04-18 16:05:37 +02:00
4c61c3d7ea Fix user provided whdload options 2024-09-14 17:00:28 +02:00
7e3d68624f Fixed packages find in pyproject 2024-09-14 15:59:25 +02:00
7 changed files with 16 additions and 19 deletions

View File

@@ -331,8 +331,6 @@ Options used:
* ``wrapper_archive`` (optional) path to the whdload archive, defaults to same
name as configuration file with some detected archive extension. Note, that
name is case sensitive
* ``wrapper_archiver`` (optional) archiver to use for storage save state -
default ``7z``.
This module is solely used with whdload distributed games (not just whdload
slave files, but whole games, which can be found on several places on the
@@ -365,7 +363,7 @@ where the minimum dependences are:
- `WHDLoad`_ 18.9
- `SetPatch`_ 43.6
and the ``S/startup-sequence`` should at east contain:
and the ``S/startup-sequence`` should at least contain:
.. code::
@@ -379,8 +377,8 @@ To leverage more pleasant UX, additionally those bits should be installed (or -
copied into base image filesystem):
- ``Assign`` and whatever commands you'll be use in scripts from your copy of
- `uaequit`_ - this will allow to quit emulator, after quiting game
Workbench
- `uaequit`_ - this will allow to quit emulator, after quiting game
- `kgiconload`_ - tool for reading icon and executing *default tool* with
optionally defined tool types as parameters (in this case: WHDLoad)
- `SKick`_ optionally - for kickstart relocations. Also images of corresponding
@@ -509,7 +507,7 @@ And execution is as usual:
Now, similar to the archive module, it will create temporary directory, unpack
base image there, unpack WHDLoad game archive, search for slave file, and
preapre ``s:whdload-startup``, and finally pass all the configuration to
prepare ``s:whdload-startup``, and finally pass all the configuration to
fs-uae.

View File

@@ -44,7 +44,7 @@ class Base(object):
if not self._validate_options():
return False
self.dir = tempfile.mkdtemp()
self.dir = tempfile.mkdtemp(prefix='fs-uae-wrapper-')
self._normalize_options()
self._set_assets_paths()

View File

@@ -114,10 +114,10 @@ class Wrapper(base.ArchiveBase):
# find proper way to handle slave
# 1. check if there are user provided params
contents = f"cd {slave_path}\n"
if self.fsuae_options.get('wrapper_whdload_options'):
if self.all_options.get('wrapper_whdload_options'):
contents = (f"{contents}"
f"C:whdload "
f"{self.fsuae_options['wrapper_whdload_options']} "
f"{self.all_options['wrapper_whdload_options']} "
f"Slave={slave_fname}\n")
else:
# no params, find if kgiconload is available

View File

@@ -1,11 +1,11 @@
[build-system]
requires = ["setuptools >= 61.0", "wheel", "setuptools-git-versioning"]
requires = ["setuptools >= 77.0", "wheel", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"
[project]
name = "fs-uae-wrapper"
authors = [{name = "Roman Dobosz", email = "gryf73@gmail.com"}]
license = {text = "BSD"}
license = "BSD-3-Clause"
description = "Automate archives support and state saves for fs-uae"
readme = "README.rst"
requires-python = ">=3.8"
@@ -15,7 +15,6 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
@@ -34,7 +33,7 @@ Homepage = "https://github.com/gryf/fs-uae-wrapper"
fs-uae-wrapper = "fs_uae_wrapper.wrapper:run"
[tool.setuptools]
py-modules = ["fs_uae_wrapper"]
packages = ["fs_uae_wrapper"]
[tool.distutils.bdist_wheel]
universal = true

View File

@@ -1,5 +0,0 @@
pytest
pytest-cov
pytest-pep8
coverage
flake8

View File

@@ -225,7 +225,7 @@ class TestWHDLoad(TestCase):
listdir.return_value = contents
wrapper = whdload.Wrapper('Config.fs-uae', utils.CmdOption(), {})
whdl_opts = 'Preload SplashDelay=0 MMU PAL'
wrapper.fsuae_options['wrapper_whdload_options'] = whdl_opts
wrapper.all_options['wrapper_whdload_options'] = whdl_opts
with mock.patch('builtins.open', _open):
self.assertTrue(wrapper._find_slave())
handle = _open()

View File

@@ -8,7 +8,12 @@ usedevelop=True
setenv = COVERAGE_FILE = .coverage
commands = py.test --cov=fs_uae_wrapper --cov-report=term-missing
deps = -r{toxinidir}/test-requirements.txt
deps =
pytest
pytest-cov
pytest-pep8
coverage
flake8
[testenv:py3-flake8]
basepython = python3