Merge pull request #412 from encounter/report

Update to latest dtk-template
This commit is contained in:
Rainchus 2024-09-05 02:11:36 -05:00 committed by GitHub
commit 18038b2870
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 549 additions and 387 deletions

2
.gitattributes vendored
View file

@ -9,5 +9,5 @@
*.sh text eol=lf
*.sha1 text eol=lf
# DTK keeps these files with LF
# decomp-toolkit writes files with LF
config/**/*.txt text eol=lf

View file

@ -6,15 +6,12 @@ on:
jobs:
build:
# This is a *private* build container.
# See docs/github_actions.md for more information.
container: ghcr.io/rainchus/marioparty4-build:main
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Add game versions here
version: [GMPE01_00]
steps:
@ -38,17 +35,15 @@ jobs:
run: |
python configure.py --map --version ${{ matrix.version }} \
--binutils /binutils --compilers /compilers
ninja all_source build/${{ matrix.version }}/progress.json
ninja all_source build/${{ matrix.version }}/progress.json \
build/${{ matrix.version }}/report.json
# Upload progress if we're on the main branch
- name: Upload progress
# If you're using a different branch, change this to match
if: github.ref == 'refs/heads/main'
continue-on-error: true
env:
# Replace with your project slug
PROGRESS_SLUG: marioparty4
# Set the API key in your repository secrets
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ \
@ -57,7 +52,14 @@ jobs:
# Upload map files
- name: Upload map
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_maps
path: build/${{ matrix.version }}/**/*.MAP
path: build/${{ matrix.version }}/**/*.MAP
# Upload progress report
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_report
path: build/${{ matrix.version }}/report.json

View file

@ -2,32 +2,11 @@ Mario Party 4
[![Build Status]][actions] ![Progress] ![DOL Progress] ![RELs Progress] [![Discord Badge]][discord]
=============
<!--
Replace with your repository's URL.
-->
[Build Status]: https://github.com/Rainchus/marioparty4/actions/workflows/build.yml/badge.svg
[actions]: https://github.com/Rainchus/marioparty4/actions/workflows/build.yml
<!---
Code progress URL:
https://progress.decomp.club/data/[project]/[version]/all/?mode=shield&measure=code
URL encoded then appended to: https://img.shields.io/endpoint?label=Code&url=
-->
[Progress]: https://img.shields.io/endpoint?label=Code&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Fmarioparty4%2FGMPE01_00%2Fall%2F%3Fmode%3Dshield%26measure%3Dcode
<!---
DOL progress URL:
https://progress.decomp.club/data/[project]/[version]/dol/?mode=shield&measure=code
URL encoded then appended to: https://img.shields.io/endpoint?label=DOL&url=
-->
[DOL Progress]: https://img.shields.io/endpoint?label=DOL&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Fmarioparty4%2FGMPE01_00%2Fdol%2F%3Fmode%3Dshield%26measure%3Dcode
<!--
REL progress URL:
https://progress.decomp.club/data/[project]/[version]/modules/?mode=shield&measure=code
URL encoded then appended to: https://img.shields.io/endpoint?label=RELs&url=
-->
[RELs Progress]: https://img.shields.io/endpoint?label=RELs&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Fmarioparty4%2FGMPE01_00%2Fmodules%2F%3Fmode%3Dshield%26measure%3Dcode
<!--
Replace with your Discord server's ID and invite URL.
-->
[Discord Badge]: https://img.shields.io/discord/994839212618690590?color=%237289DA&logo=discord&logoColor=%23FFFFFF
[discord]: https://discord.gg/T4faGveujK
@ -37,12 +16,12 @@ This repository does **not** contain any game assets or assembly whatsoever. An
Supported versions:
- `GAMEID`: Rev 0 (USA)
- `GMPE01_00`: Rev 0 (USA)
Dependencies
============
Windows:
Windows
--------
On Windows, it's **highly recommended** to use native tooling. WSL or msys2 are **not** required.
@ -53,7 +32,7 @@ When running under WSL, [objdiff](#diffing) is unable to get filesystem notifica
- Download [ninja](https://github.com/ninja-build/ninja/releases) and add it to `%PATH%`.
- Quick install via pip: `pip install ninja`
macOS:
macOS
------
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages):
```
@ -69,29 +48,29 @@ After OS upgrades, if macOS complains about `Wine Crossover.app` being unverifie
sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'
```
Linux:
Linux
------
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages).
- For non-x86(_64) platforms: Install wine from your package manager.
- For x86(_64), [WiBo](https://github.com/decompals/WiBo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
- For x86(_64), [wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
Building
========
- Clone the repository:
```
git clone https://github.com/Rainchus/mp4-dtk.git
git clone https://github.com/Rainchus/marioparty4.git
```
- Using [Dolphin Emulator](https://dolphin-emu.org/), extract your game to `orig/GMPE01`.
- Using [Dolphin Emulator](https://dolphin-emu.org/), extract your game to `orig/GMPE01_00`.
![](assets/dolphin-extract.png)
- To save space, the only necessary files are the following. Any others can be deleted.
- `sys/main.dol`
- `files/rels/*.rel`
- `files/dll/*.rel`
- Configure:
```
python configure.py
```
To use a version other than `GMPE01` (USA), specify it with `--version`.
To use a version other than `GMPE01_00` (USA), specify it with `--version`.
- Build:
```
ninja

View file

@ -1,17 +1,17 @@
Sections:
.init type:code
extab type:rodata
extabindex type:rodata
.text type:code
.ctors type:rodata
.dtors type:rodata
.rodata type:rodata
.data type:data
.bss type:bss
.sdata type:data
.sbss type:bss
.sdata2 type:rodata
.sbss2 type:bss
.init type:code align:4
extab type:rodata align:32
extabindex type:rodata align:32
.text type:code align:8
.ctors type:rodata align:32
.dtors type:rodata align:32
.rodata type:rodata align:32
.data type:data align:32
.bss type:bss align:32
.sdata type:data align:4
.sbss type:bss align:8
.sdata2 type:rodata align:32
.sbss2 type:bss align:16
game/main.c:
.text start:0x800057C0 end:0x80005A5C

View file

@ -12,17 +12,11 @@
# Append --help to see available options.
###
import sys
import argparse
import sys
from pathlib import Path
from tools.project import (
Object,
ProjectConfig,
calculate_progress,
generate_build,
is_windows,
)
from typing import Any, Dict, List
from tools.project import *
# Game versions
DEFAULT_VERSION = 0
@ -30,27 +24,25 @@ VERSIONS = [
"GMPE01_00", # USA 1.0
]
if len(VERSIONS) > 1:
versions_str = ", ".join(VERSIONS[:-1]) + f" or {VERSIONS[-1]}"
else:
versions_str = VERSIONS[0]
parser = argparse.ArgumentParser()
parser.add_argument(
"mode",
choices=["configure", "progress"],
default="configure",
help="configure or progress (default: configure)",
help="script mode (default: configure)",
nargs="?",
)
parser.add_argument(
"-v",
"--version",
dest="version",
choices=VERSIONS,
type=str.upper,
default=VERSIONS[DEFAULT_VERSION],
help=f"version to build ({versions_str})",
help="version to build",
)
parser.add_argument(
"--build-dir",
dest="build_dir",
metavar="DIR",
type=Path,
default=Path("build"),
help="base build directory (default: build)",
@ -63,31 +55,24 @@ parser.add_argument(
)
parser.add_argument(
"--compilers",
dest="compilers",
metavar="DIR",
type=Path,
help="path to compilers (optional)",
)
parser.add_argument(
"--map",
dest="map",
action="store_true",
help="generate map file(s)",
)
parser.add_argument(
"--no-asm",
action="store_true",
help="don't incorporate .s files from asm directory",
)
parser.add_argument(
"--debug",
dest="debug",
action="store_true",
help="build with debug info (non-matching)",
)
if not is_windows():
parser.add_argument(
"--wrapper",
dest="wrapper",
metavar="BINARY",
type=Path,
help="path to wibo or wine (optional)",
)
@ -97,15 +82,20 @@ parser.add_argument(
type=Path,
help="path to decomp-toolkit binary or source (optional)",
)
parser.add_argument(
"--objdiff",
metavar="BINARY | DIR",
type=Path,
help="path to objdiff-cli binary or source (optional)",
)
parser.add_argument(
"--sjiswrap",
dest="sjiswrap",
metavar="EXE",
type=Path,
help="path to sjiswrap.exe (optional)",
)
parser.add_argument(
"--verbose",
dest="verbose",
action="store_true",
help="print verbose output",
)
@ -118,14 +108,13 @@ parser.add_argument(
args = parser.parse_args()
config = ProjectConfig()
config.version = args.version.upper()
if config.version not in VERSIONS:
sys.exit(f"Invalid version '{config.version}', expected {versions_str}")
config.version = str(args.version)
version_num = VERSIONS.index(config.version)
# Apply arguments
config.build_dir = args.build_dir
config.dtk_path = args.dtk
config.objdiff_path = args.objdiff
config.binutils_path = args.binutils
config.compilers_path = args.compilers
config.debug = args.debug
@ -134,13 +123,15 @@ config.non_matching = args.non_matching
config.sjiswrap_path = args.sjiswrap
if not is_windows():
config.wrapper = args.wrapper
if args.no_asm:
# Don't build asm unless we're --non-matching
if not config.non_matching:
config.asm_dir = None
# Tool versions
config.binutils_tag = "2.42-1"
config.compilers_tag = "20231018"
config.dtk_tag = "v0.7.4"
config.compilers_tag = "20240706"
config.dtk_tag = "v0.9.6"
config.objdiff_tag = "v2.0.0-beta.6"
config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.11"
@ -329,8 +320,9 @@ def Rel(lib_name, objects):
}
Matching = True
NonMatching = False
Matching = True # Object matches and should be linked
NonMatching = False # Object does not match and should not be linked
Equivalent = config.non_matching # Object should be linked when configured with --non-matching
config.warn_missing_config = True
config.warn_missing_source = False
@ -788,19 +780,18 @@ config.libs = [
"objects": [
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/empty.c"), # Must be marked as matching
Object(Matching, "REL/board_executor.c"),
],
},
Rel(
"_minigameDLL",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/_minigameDLL/_minigameDLL.c"),
},
),
Rel(
"bootDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/bootDll/main.c"),
Object(Matching, "REL/bootDll/nintendo_data.c"),
},
@ -809,14 +800,12 @@ config.libs = [
"E3setupDLL",
objects={
Object(Matching, "REL/E3setupDLL/mgselect.c"),
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/E3setupDLL/main.c"),
},
),
Rel(
"instDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/instDll/main.c"),
Object(NonMatching, "REL/instDll/font.c"),
},
@ -824,7 +813,6 @@ config.libs = [
Rel(
"m401Dll", # Manta Rings
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m401Dll/main.c"),
Object(Matching, "REL/m401Dll/main_ex.c"),
},
@ -838,7 +826,6 @@ config.libs = [
Rel(
"m403Dll", # Booksquirm
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m403Dll/main.c"),
Object(Matching, "REL/m403Dll/scene.c"),
},
@ -846,7 +833,6 @@ config.libs = [
Rel(
"m404Dll", # Trace Race
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m404Dll/main.c"),
},
),
@ -859,7 +845,6 @@ config.libs = [
Rel(
"m406Dll", # Avalanche!
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m406Dll/main.c"),
Object(Matching, "REL/m406Dll/map.c"),
Object(Matching, "REL/m406Dll/player.c"),
@ -868,7 +853,6 @@ config.libs = [
Rel(
"m407dll", # Domination
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m407dll/player.c"),
Object(Matching, "REL/m407dll/map.c"),
Object(Matching, "REL/m407dll/camera.c"),
@ -882,7 +866,6 @@ config.libs = [
Rel(
"m408Dll", # Paratrooper Plunge
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m408Dll/main.c"),
Object(Matching, "REL/m408Dll/camera.c"),
Object(Matching, "REL/m408Dll/stage.c"),
@ -892,7 +875,6 @@ config.libs = [
Rel(
"m409Dll", # Toad's Quick Draw
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m409Dll/main.c"),
Object(Matching, "REL/m409Dll/player.c"),
Object(Matching, "REL/m409Dll/cursor.c"),
@ -901,7 +883,6 @@ config.libs = [
Rel(
"m410Dll", # Three Throw
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m410Dll/main.c"),
Object(Matching, "REL/m410Dll/stage.c"),
Object(Matching, "REL/m410Dll/game.c"),
@ -911,35 +892,30 @@ config.libs = [
Rel(
"m411Dll", # Photo Finish
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m411Dll/main.c"),
},
),
Rel(
"m412Dll", # Mr. Blizzard's Brigade
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m412Dll/main.c"),
},
),
Rel(
"m413Dll", # Bob-omb Breakers
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m413Dll/main.c"),
},
),
Rel(
"m414Dll", # Long Claw of the Law
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m414Dll/main.c"),
},
),
Rel(
"m415Dll", # Stamp Out!
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m415Dll/main.c"),
Object(NonMatching, "REL/m415Dll/map.c"),
},
@ -947,7 +923,6 @@ config.libs = [
Rel(
"m416Dll", # Candlelight Flight
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m416Dll/main.c"),
Object(Matching, "REL/m416Dll/map.c"),
},
@ -955,7 +930,6 @@ config.libs = [
Rel(
"m417Dll", # Makin' Waves
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m417Dll/main.c"),
Object(Matching, "REL/m417Dll/water.c"),
Object(Matching, "REL/m417Dll/player.c"),
@ -972,14 +946,12 @@ config.libs = [
Rel(
"m419Dll", # Tree Stomp
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m419Dll/main.c"),
},
),
Rel(
"m420dll", # Fish n' Drips
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m420dll/main.c"),
Object(NonMatching, "REL/m420dll/player.c"),
Object(NonMatching, "REL/m420dll/map.c"),
@ -989,7 +961,6 @@ config.libs = [
Rel(
"m421Dll", # Hop or Pop
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m421Dll/main.c"),
Object(NonMatching, "REL/m421Dll/player.c"),
Object(NonMatching, "REL/m421Dll/map.c"),
@ -998,21 +969,18 @@ config.libs = [
Rel(
"m422Dll", # Money Belts
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m422Dll/main.c"),
},
),
Rel(
"m423Dll", # GOOOOOOOAL!!
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m423Dll/main.c"),
},
),
Rel(
"m424Dll", # Blame it on the Crane
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m424Dll/main.c"),
Object(NonMatching, "REL/m424Dll/map.c"),
Object(NonMatching, "REL/m424Dll/ball.c"),
@ -1022,7 +990,6 @@ config.libs = [
Rel(
"m425Dll", # The Great Deflate
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m425Dll/main.c"),
Object(NonMatching, "REL/m425Dll/thwomp.c"),
},
@ -1030,14 +997,12 @@ config.libs = [
Rel(
"m426Dll", # Revers-a-Bomb
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m426Dll/main.c"),
},
),
Rel(
"m427Dll", # Right Oar Left?
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m427Dll/main.c"),
Object(NonMatching, "REL/m427Dll/map.c"),
Object(NonMatching, "REL/m427Dll/player.c"),
@ -1046,7 +1011,6 @@ config.libs = [
Rel(
"m428Dll", # Cliffhangers
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m428Dll/main.c"),
Object(NonMatching, "REL/m428Dll/map.c"),
Object(NonMatching, "REL/m428Dll/player.c"),
@ -1061,7 +1025,6 @@ config.libs = [
Rel(
"m430Dll", # Pair-a-sailing
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m430Dll/main.c"),
Object(NonMatching, "REL/m430Dll/water.c"),
Object(NonMatching, "REL/m430Dll/player.c"),
@ -1070,7 +1033,6 @@ config.libs = [
Rel(
"m431Dll", # Order Up
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m431Dll/main.c"),
Object(Matching, "REL/m431Dll/object.c"),
},
@ -1084,7 +1046,6 @@ config.libs = [
Rel(
"m433Dll", # Beach Volley Folly
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m433Dll/main.c"),
Object(NonMatching, "REL/m433Dll/map.c"),
Object(NonMatching, "REL/m433Dll/player.c"),
@ -1093,7 +1054,6 @@ config.libs = [
Rel(
"m434Dll", # Cheep Cheep Sweep
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m434Dll/main.c"),
Object(Matching, "REL/m434Dll/map.c"),
Object(NonMatching, "REL/m434Dll/player.c"),
@ -1124,7 +1084,6 @@ config.libs = [
Rel(
"m438Dll", # Chain Chomp Fever
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m438Dll/main.c"),
Object(NonMatching, "REL/m438Dll/map.c"),
Object(NonMatching, "REL/m438Dll/fire.c"),
@ -1133,14 +1092,12 @@ config.libs = [
Rel(
"m439Dll", # Paths of Peril
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m439Dll/main.c"),
},
),
Rel(
"m440Dll", # Bowser's Bigger Blast
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m440Dll/main.c"),
Object(Matching, "REL/m440Dll/object.c"),
},
@ -1154,7 +1111,6 @@ config.libs = [
Rel(
"m442Dll", # Barrel Baron
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m442Dll/main.c"),
Object(Matching, "REL/m442Dll/score.c"),
},
@ -1162,7 +1118,6 @@ config.libs = [
Rel(
"m443Dll", # Mario Speedwagons
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m443Dll/main.c"),
Object(NonMatching, "REL/m443Dll/map.c"),
Object(NonMatching, "REL/m443Dll/player.c"),
@ -1171,7 +1126,6 @@ config.libs = [
Rel(
"m444dll", # Reversal of Fortune
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m444dll/main.c"),
Object(Matching, "REL/m444dll/pinball.c"),
Object(Matching, "REL/m444dll/datalist.c"),
@ -1181,14 +1135,12 @@ config.libs = [
Rel(
"m445Dll", # Bowser Bop
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m445Dll/main.c"),
},
),
Rel(
"m446dll", # Mystic Match 'Em
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m446Dll/main.c"),
Object(Matching, "REL/m446Dll/card.c"),
Object(Matching, "REL/m446Dll/deck.c"),
@ -1202,7 +1154,6 @@ config.libs = [
Rel(
"m447dll", # Archaeologuess
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m447dll/main.c"),
Object(Matching, "REL/m447dll/stage.c"),
Object(Matching, "REL/m447dll/camera.c"),
@ -1214,14 +1165,12 @@ config.libs = [
Rel(
"m448Dll", # Goomba's Chip Flip
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m448Dll/main.c"),
},
),
Rel(
"m449Dll", # Kareening Koopa
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m449Dll/main.c"),
},
),
@ -1240,7 +1189,6 @@ config.libs = [
Rel(
"m453Dll", # Challenge Booksquirm
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m453Dll/main.c"),
Object(NonMatching, "REL/m453Dll/map.c"),
Object(NonMatching, "REL/m453Dll/score.c"),
@ -1249,7 +1197,6 @@ config.libs = [
Rel(
"m455Dll", # Rumble Fishing
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/m455Dll/main.c"),
Object(NonMatching, "REL/m455Dll/stage.c"),
},
@ -1257,7 +1204,6 @@ config.libs = [
Rel(
"m456Dll", # Take a Breather
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m456Dll/main.c"),
Object(NonMatching, "REL/m456Dll/stage.c"),
},
@ -1265,28 +1211,24 @@ config.libs = [
Rel(
"m457Dll", # Bowser Wrestling
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m457Dll/main.c"),
},
),
Rel(
"m458Dll", # Panels of Doom
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m458Dll/main.c"),
},
),
Rel(
"m459dll", # Mushroom Medic
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m459dll/main.c"),
},
),
Rel(
"m460Dll", # Doors of Doom
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m460Dll/main.c"),
Object(NonMatching, "REL/m460Dll/player.c"),
Object(NonMatching, "REL/m460Dll/map.c"),
@ -1302,7 +1244,6 @@ config.libs = [
Rel(
"m462Dll", # Goomba Stomp
objects={
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/m462Dll/main.c"),
},
),
@ -1322,14 +1263,12 @@ config.libs = [
Rel(
"messDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/messDll/main.c"),
},
),
Rel(
"mgmodedll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/mgmodedll/mgmode.c"),
Object(Matching, "REL/mgmodedll/free_play.c"),
Object(Matching, "REL/mgmodedll/record.c"),
@ -1343,7 +1282,6 @@ config.libs = [
Rel(
"modeltestDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/modeltestDll/main.c"),
Object(Matching, "REL/modeltestDll/modeltest00.c"),
Object(Matching, "REL/modeltestDll/modeltest01.c"),
@ -1352,7 +1290,6 @@ config.libs = [
Rel(
"modeseldll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/modeseldll/main.c"),
Object(NonMatching, "REL/modeseldll/modesel.c"),
Object(Matching, "REL/modeseldll/filesel.c"),
@ -1410,7 +1347,6 @@ config.libs = [
Rel(
"option",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/option/scene.c"),
Object(Matching, "REL/option/camera.c"),
Object(Matching, "REL/option/room.c"),
@ -1425,7 +1361,6 @@ config.libs = [
Rel(
"present",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/present/init.c"),
Object(Matching, "REL/present/camera.c"),
Object(Matching, "REL/present/present.c"),
@ -1436,7 +1371,6 @@ config.libs = [
Rel(
"resultDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/resultDll/main.c"),
Object(Matching, "REL/resultDll/battle.c"),
Object(Matching, "REL/resultDll/datalist.c"),
@ -1451,28 +1385,24 @@ config.libs = [
Rel(
"selmenuDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/selmenuDll/main.c"),
},
),
Rel(
"staffDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/staffDll/main.c"),
},
),
Rel(
"subchrselDll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/subchrselDll/main.c"),
},
),
Rel(
"w01Dll", # Toad's Midway Madness
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w01Dll/main.c"),
Object(Matching, "REL/w01Dll/mg_coin.c"),
Object(Matching, "REL/w01Dll/mg_item.c"),
@ -1481,7 +1411,6 @@ config.libs = [
Rel(
"w02Dll", # Goomba's Greedy Gala
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w02Dll/main.c"),
Object(Matching, "REL/w02Dll/gendice.c"),
Object(Matching, "REL/w02Dll/gamble.c"),
@ -1494,7 +1423,6 @@ config.libs = [
Rel(
"w03Dll", # Shy Guy's Jungle Jam
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w03Dll/main.c"),
Object(Matching, "REL/w03Dll/statue.c"),
Object(Matching, "REL/w03Dll/condor.c"),
@ -1507,7 +1435,6 @@ config.libs = [
Rel(
"w04Dll", # Boo's Haunted Bash
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w04Dll/main.c"),
Object(Matching, "REL/w04Dll/bridge.c"),
Object(Matching, "REL/w04Dll/boo_event.c"),
@ -1519,7 +1446,6 @@ config.libs = [
Rel(
"w05Dll", # Koopa's Seaside Soiree
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w05Dll/main.c"),
Object(Matching, "REL/w05Dll/hotel.c"),
Object(Matching, "REL/w05Dll/monkey.c"),
@ -1531,7 +1457,6 @@ config.libs = [
Rel(
"w06Dll", # Bowser's Gnarly Party
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w06Dll/main.c"),
Object(Matching, "REL/w06Dll/mg_item.c"),
Object(Matching, "REL/w06Dll/mg_coin.c"),
@ -1543,7 +1468,6 @@ config.libs = [
Rel(
"w10Dll", # Tutorial board
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w10Dll/main.c"),
Object(Matching, "REL/w10Dll/host.c"),
Object(Matching, "REL/w10Dll/scene.c"),
@ -1553,21 +1477,18 @@ config.libs = [
Rel(
"w20Dll", # Mega Board Mayhem
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w20Dll/main.c"),
},
),
Rel(
"w21Dll", # Mini Board Mad Dash
objects={
Object(Matching, "REL/board_executor.c"),
Object(Matching, "REL/w21Dll/main.c"),
},
),
Rel(
"ztardll",
objects={
Object(Matching, "REL/executor.c"),
Object(Matching, "REL/ztardll/main.c"),
Object(Matching, "REL/ztardll/font.c"),
Object(Matching, "REL/ztardll/select.c"),
@ -1575,12 +1496,15 @@ config.libs = [
),
]
# Optional extra categories for progress tracking
config.progress_categories = []
config.progress_each_module = args.verbose
if args.mode == "configure":
# Write build.ninja and objdiff.json
generate_build(config)
elif args.mode == "progress":
# Print progress and write progress.json
config.progress_each_module = args.verbose
calculate_progress(config)
else:
sys.exit("Unknown mode: " + args.mode)

View file

@ -23,8 +23,8 @@ include_dirs = [
# Add additional include directories here
]
include_pattern = re.compile(r'^#include\s*[<"](.+?)[>"]$')
guard_pattern = re.compile(r"^#ifndef\s+(.*)$")
include_pattern = re.compile(r'^#\s*include\s*[<"](.+?)[>"]$')
guard_pattern = re.compile(r"^#\s*ifndef\s+(.*)$")
defines = set()

View file

@ -55,6 +55,21 @@ def dtk_url(tag: str) -> str:
repo = "https://github.com/encounter/decomp-toolkit"
return f"{repo}/releases/download/{tag}/dtk-{system}-{arch}{suffix}"
def objdiff_cli_url(tag: str) -> str:
uname = platform.uname()
suffix = ""
system = uname.system.lower()
if system == "darwin":
system = "macos"
elif system == "windows":
suffix = ".exe"
arch = uname.machine.lower()
if arch == "amd64":
arch = "x86_64"
repo = "https://github.com/encounter/objdiff"
return f"{repo}/releases/download/{tag}/objdiff-cli-{system}-{arch}{suffix}"
def sjiswrap_url(tag: str) -> str:
repo = "https://github.com/encounter/sjiswrap"
@ -70,6 +85,7 @@ TOOLS: Dict[str, Callable[[str], str]] = {
"binutils": binutils_url,
"compilers": compilers_url,
"dtk": dtk_url,
"objdiff-cli": objdiff_cli_url,
"sjiswrap": sjiswrap_url,
"wibo": wibo_url,
}

File diff suppressed because it is too large Load diff