Pret merge (20th of June) (#4845)

* Don't assume bash is at /bin/bash

* Add NixOS install instructions

* Add support for LF line endings to gbagfx

---------

Co-authored-by: leo60228 <leo@60228.dev>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
Co-authored-by: Alex Nash <contact@alexnash.dev>
This commit is contained in:
Bassoonian 2024-06-21 12:21:29 +02:00 committed by GitHub
parent 438f478146
commit 9f7a83fd6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 4 deletions

View file

@ -475,6 +475,13 @@ devkitARM is now installed.
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### NixOS
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### Other distributions
_(Specific instructions for other distributions would be greatly appreciated!)_

View file

@ -80,7 +80,7 @@ MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
MODERN_OBJ_DIR_NAME := build/modern
SHELL := /bin/bash -o pipefail
SHELL := bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [[ -d "$DEVKITARM/bin/" ]]; then
OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"

View file

@ -46,10 +46,14 @@ void ReadJascPaletteLine(FILE *fp, char *line)
}
if (c == '\n')
FATAL_ERROR("LF line endings aren't supported.\n");
{
line[length] = 0;
return;
}
if (c == EOF)
FATAL_ERROR("Unexpected EOF. No CRLF at end of file.\n");
FATAL_ERROR("Unexpected EOF. No LF or CRLF at end of file.\n");
if (c == 0)
FATAL_ERROR("NUL character in file.\n");