diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..8b2ebb4c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-illegal-windows-names + - id: check-json + - id: check-merge-conflict + - id: check-yaml + args: + - --allow-multiple-documents + - id: debug-statements + - id: destroyed-symlinks + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + args: + - --markdown-linebreak-ext=md + + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v19.1.5 + hooks: + - id: clang-format diff --git a/INSTALL.md b/INSTALL.md index 91c4a96c..02871b54 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -24,23 +24,16 @@ python -m pip install -r tools/requirements.txt ```shell pre-commit install ``` -5. Run the setup script: +5. Run the Ninja configure script: ```shell -python tools/setup.py -``` -6. Run the Ninja configure script: -```shell -python tools/configure.py +python tools/configure.py ``` +6. Put one or more base ROMs in the [`/extract/`](/extract/README.md) directory of this repository. -> [!IMPORTANT] -> Rerun `configure.py` often to ensure that all C/C++ code gets compiled. +Now you can run `ninja` to build a ROM for the chosen version. > [!NOTE] > For Linux users: Wibo is used by default. If you want to use Wine instead, run `configure.py` with `-w `. -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. ### Matching the base ROM @@ -53,5 +46,3 @@ ARM7 BIOS in the root directory of this repository, and verify that your dumped | --------------- | ------------------------------------------ | | `arm7_bios.bin` | `6ee830c7f552c5bf194c20a2c13d5bb44bdb5c03` | | `arm7_bios.bin` | `24f67bdea115a2c847c8813a262502ee1607b7df` | - -Now, rerun `configure.py` so it can update `build.ninja` to build a matching ROM. diff --git a/tools/requirements.txt b/tools/requirements.txt index 7edbb58e..4682190e 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -1,2 +1,3 @@ +pre-commit pyperclip requests