mirror of
https://github.com/zeldaret/ph
synced 2026-05-23 15:01:37 -04:00
Merge pull request #68 from AetiasHax/cleanup
Cleanup + improved Linux setup
This commit is contained in:
@@ -13,3 +13,4 @@ objdiff.json
|
||||
build.ninja
|
||||
.ninja_log*
|
||||
.ninja_lock
|
||||
/wibo
|
||||
|
||||
+3
-3
@@ -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.
|
||||
@@ -48,10 +47,11 @@ Now you can run `ninja` to build a ROM for the chosen version.
|
||||
**This is optional!** You only need to follow these steps if you want a matching ROM.
|
||||
|
||||
First, [extract the ARM7 BIOS from your DS device](https://wiki.ds-homebrew.com/ds-index/ds-bios-firmware-dump). Put the
|
||||
ARM7 BIOS in the root directory of this repository, and verify that your dumped BIOS matches the one below:
|
||||
ARM7 BIOS in the root directory of this repository, and verify that your dumped BIOS matches one of the following:
|
||||
|
||||
| File name | SHA1 |
|
||||
| --------------- | ------------------------------------------ |
|
||||
| `arm7_bios.bin` | `6ee830c7f552c5bf194c20a2c13d5bb44bdb5c03` |
|
||||
| `arm7_bios.bin` | `24f67bdea115a2c847c8813a262502ee1607b7df` |
|
||||
|
||||
Now, rerun `configure.py` so it can update `build.ninja` to build a matching ROM.
|
||||
|
||||
@@ -16,8 +16,8 @@ public:
|
||||
static void Destroy();
|
||||
ActorSpawner();
|
||||
~ActorSpawner();
|
||||
void _ZN12ActorSpawner19func_ov000_020c4014Ev();
|
||||
void _ZN12ActorSpawner19func_ov000_020c4018Ev();
|
||||
void func_ov000_020c4014();
|
||||
void func_ov000_020c4018();
|
||||
Actor *CreateActor(ActorTypeId type);
|
||||
s32 Spawn(ActorTypeId type, Vec3p *pos, void *param3, ActorRef *ref);
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ ActorSpawner *ActorSpawner::Create() {}
|
||||
void ActorSpawner::Destroy() {}
|
||||
ActorSpawner::ActorSpawner() {}
|
||||
ActorSpawner::~ActorSpawner() {}
|
||||
void ActorSpawner::_ZN12ActorSpawner19func_ov000_020c4014Ev() {}
|
||||
void ActorSpawner::_ZN12ActorSpawner19func_ov000_020c4018Ev() {}
|
||||
void ActorSpawner::func_ov000_020c4014() {}
|
||||
void ActorSpawner::func_ov000_020c4018() {}
|
||||
Actor *ActorSpawner::CreateActor(ActorTypeId type) {}
|
||||
s32 ActorSpawner::Spawn(ActorTypeId type, Vec3p *pos, void *param3, ActorRef *ref) {}
|
||||
|
||||
+1
-1
@@ -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/Wibo (linux only)")
|
||||
parser.add_argument('version', help='Game version')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
+14
-1
@@ -3,8 +3,10 @@ import zipfile
|
||||
import io
|
||||
from pathlib import Path
|
||||
import platform
|
||||
import stat
|
||||
|
||||
DSD_VERSION = 'v0.4.0'
|
||||
WIBO_VERSION = '0.6.16'
|
||||
|
||||
|
||||
tools_path = Path(__file__).parent
|
||||
@@ -30,8 +32,10 @@ match platform.machine().lower():
|
||||
|
||||
print('\nInstalling dsd...')
|
||||
response = requests.get(f'https://github.com/AetiasHax/ds-decomp/releases/download/{DSD_VERSION}/dsd-{system}-{machine}{EXE}')
|
||||
with open(root_path / f'dsd{EXE}', 'wb') as f:
|
||||
dsd_path = root_path / f'dsd{EXE}'
|
||||
with open(dsd_path, 'wb') as f:
|
||||
f.write(response.content)
|
||||
dsd_path.chmod(dsd_path.stat().st_mode | stat.S_IEXEC)
|
||||
|
||||
|
||||
print('\nInstalling toolchain...')
|
||||
@@ -39,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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user