Auto-install wibo

This commit is contained in:
Aetias
2025-02-06 18:15:25 +01:00
parent de6431687d
commit 326c2a51c6
4 changed files with 13 additions and 3 deletions
+1
View File
@@ -13,3 +13,4 @@ objdiff.json
build.ninja
.ninja_log*
.ninja_lock
/wibo
+1 -2
View File
@@ -16,7 +16,6 @@ Contents:
- Python 3.11+ and pip
- GCC 9+
- Ninja
- **On Linux**: Wine/Wibo
3. Install the Python dependencies:
```shell
python -m pip install -r tools/requirements.txt
@@ -38,7 +37,7 @@ python tools/configure.py <eur|usa>
> Rerun `configure.py` often to ensure that all C/C++ code gets compiled.
> [!NOTE]
> For Linux users: If you plan to use Wibo instead of Wine, run `configure.py` with `-w <path/to/wibo>`.
> For Linux users: Wibo is used by default. If you want to use Wine instead, run `configure.py` with `-w <path/to/wine>`.
7. Put one or more base ROMs in the [`/extract/`](/extract/README.md) directory of this repository.
Now you can run `ninja` to build a ROM for the chosen version.
+1 -1
View File
@@ -10,7 +10,7 @@ import ninja_syntax
parser = argparse.ArgumentParser(description="Generates build.ninja")
parser.add_argument('-w', type=str, default="wine", dest="wine", required=False, help="Path to Wine (linux only)")
parser.add_argument('-w', type=str, default="wibo", dest="wine", required=False, help="Path to Wine (linux only)")
parser.add_argument('version', help='Game version')
args = parser.parse_args()
+10
View File
@@ -6,6 +6,7 @@ import platform
import stat
DSD_VERSION = 'v0.4.0'
WIBO_VERSION = '0.6.16'
tools_path = Path(__file__).parent
@@ -42,3 +43,12 @@ response = requests.get('http://decomp.aetias.com/files/mwccarm.zip')
zip_file = zipfile.ZipFile(io.BytesIO(response.content))
zip_file.extractall(tools_path)
if system == "linux":
print('\nInstalling wibo...')
response = requests.get(f'https://github.com/decompals/wibo/releases/download/{WIBO_VERSION}/wibo')
wibo_path = root_path / 'wibo'
with open(wibo_path, 'wb') as f:
f.write(response.content)
wibo_path.chmod(wibo_path.stat().st_mode | stat.S_IEXEC)