Skip to content

Commit

Permalink
Merge branch 'zeldaret:main' into d_a_pirate_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTGL authored Oct 18, 2024
2 parents 6ea9a11 + faa0a17 commit 6a6322b
Show file tree
Hide file tree
Showing 161 changed files with 3,830 additions and 2,630 deletions.
5 changes: 5 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://clangd.llvm.org/config
CompileFlags:
Add:
- -Wno-c++11-compat-deprecated-writable-strings
- -Wno-undefined-inline
48 changes: 38 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,57 @@ permissions:

jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/zeldaret/tww-build:main

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [GZLE01, GZLP01, GZLJ01]

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

# Set Git config
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

# Copy the original files to the workspace
- name: Prepare
run: cp -R /orig/${{matrix.version}} orig
run: cp -R /orig .

# Build the project
- name: Build
run: |
python configure.py --version ${{matrix.version}} --compilers /compilers --warn error
ninja
python configure.py --version ${{matrix.version}} --compilers /compilers --warn off
ninja all_source build/${{ matrix.version }}/progress.json build/${{ matrix.version }}/report.json
python configure.py --map --version ${{ matrix.version }} \
--binutils /binutils --compilers /compilers
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: github.ref == 'refs/heads/main'
continue-on-error: true
env:
PROGRESS_API_KEY: ${{secrets.PROGRESS_API_KEY}}
PROGRESS_SLUG: tww
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ -p tww -v ${{matrix.version}} \
build/${{matrix.version}}/progress.json
python tools/upload_progress.py -b https://progress.decomp.club/ \
-p $PROGRESS_SLUG -v ${{ matrix.version }} \
build/${{ matrix.version }}/progress.json
# Upload map files
- name: Upload map
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_maps
path: build/${{ matrix.version }}/**/*.MAP

# Upload progress report
- name: Upload report
uses: actions/upload-artifact@v4
with:
Expand All @@ -52,29 +73,36 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'

steps:
- name: Checkout website code
uses: actions/checkout@v4
with:
repository: LagoLunatic/tww-decomp-website

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: GZLE01_report
path: ./artifacts

- name: Rename artifact
run: |
mv ./artifacts/report.json ./artifacts/progress.json
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x.x"

- name: Build Website
run: |
python build.py
- name: Upload website artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 30 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
# IDE folders
.idea/
.vs/

# Caches
__pycache__
.idea
.vscode
.ninja_*
.mypy_cache
*.exe
build
build.ninja
objdiff.json
.cache/

# Original files
orig/*/*
!orig/*/.gitkeep
*.dol
*.rel
*.elf
*.o
*.map
*.MAP

# Build files
build/
.ninja_*
build.ninja

# decompctx output
ctx.*
*.ctx

# Generated configs
objdiff.json
compile_commands.json

# Miscellaneous
/*.txt
ctx.c
*.exe
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"llvm-vs-code-extensions.vscode-clangd",
],
"unwantedRecommendations": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools",
]
}
34 changes: 34 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"[c]": {
"files.encoding": "utf8",
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"[cpp]": {
"files.encoding": "utf8",
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"editor.tabSize": 4,
// "files.autoSave": "onFocusChange",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.associations": {
"*.inc": "cpp",
".clangd": "yaml",
"*.json": "json",
"dspproc.c": "cpp",
"dsptask.c": "cpp",
"osdsp.c": "cpp",
"osdsp_task.c": "cpp",
},
// Disable C/C++ IntelliSense, use clangd instead
"C_Cpp.intelliSenseEngine": "disabled",
"search.useIgnoreFiles": false,
"search.exclude": {
"build/*/config.json": true,
"build/**/*.MAP": true,
"build.ninja": true,
".ninja_*": true,
"objdiff.json": true,
".cache/**": true,
},
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use Ctrl+Shift+B to run build tasks.
// Or "Run Build Task" in the Command Palette.
"version": "2.0.0",
"tasks": [
{
"label": "ninja",
"type": "shell",
"command": "ninja",
"group": {
"kind": "build",
"isDefault": true
}
},
]
}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The Legend of Zelda: The Wind Waker

[Build Status]: https://github.com/zeldaret/tww/actions/workflows/build.yml/badge.svg
[actions]: https://github.com/zeldaret/tww/actions/workflows/build.yml
[Progress]: https://img.shields.io/endpoint?label=Code&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Ftww%2FGZLE01%2Fall%2F%3Fmode%3Dshield%26measure%3Dcode
[DOL Progress]: https://img.shields.io/endpoint?label=DOL&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Ftww%2FGZLE01%2Fdol%2F%3Fmode%3Dshield%26measure%3Dcode
[RELs Progress]: https://img.shields.io/endpoint?label=RELs&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Ftww%2FGZLE01%2Fmodules%2F%3Fmode%3Dshield%26measure%3Dcode
[Progress]: https://decomp.dev/zeldaret/tww.svg?mode=shield&measure=code&label=Code&category=all
[DOL Progress]: https://decomp.dev/zeldaret/tww.svg?mode=shield&measure=code&label=DOL&category=dol
[RELs Progress]: https://decomp.dev/zeldaret/tww.svg?mode=shield&measure=code&label=RELs&category=modules
[progress site]: https://zeldaret.github.io/tww/
[Discord Badge]: https://img.shields.io/discord/688807550715560050?color=%237289DA&logo=discord&logoColor=%23FFFFFF
[discord]: https://discord.com/invite/DqwyCBYKqf/
Expand Down Expand Up @@ -64,20 +64,20 @@ Building
```
git clone https://github.com/zeldaret/tww.git
```
- Using [Dolphin Emulator](https://dolphin-emu.org/), extract your game to `orig/GZLE01` (or `GZLJ01` for JPN, `GZLP01` for PAL).
![](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/RELS.arc`

- Copy your game's disc image to `orig/GZLE01`.
- Supported formats: ISO (GCM), RVZ, WIA, WBFS, CISO, NFS, GCZ, TGC
- After the initial build, the disc image can be deleted to save space.

- Configure:
```
python configure.py
```
To use a version other than `GZLE01` (USA), specify `--version GZLJ01` (JPN) or `--version GZLP01` (PAL).

- Build:
```
ninja && ninja all_source
ninja
```

Diffing
Expand Down
Loading

0 comments on commit 6a6322b

Please sign in to comment.