Minor improvements for maintainability (#77)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
* Update SC64 F/W version.
* Update build actions.
* Improve credits (use my name rather than twitter pseudonym).
* Improve function name for bool conversion.
* Use arg for SC64 tools version in dockerfile.

## Motivation and Context
<!--- What does this sample do? What problem does it solve? -->
<!--- If it fixes/closes/resolves an open issue, please link to the
issue here -->
Improves code maintainability.

## How Has This Been Tested?
<!-- (if applicable) -->
<!--- Please describe in detail how you tested your sample/changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Works on my local devcontainer, cart and fork.

## Screenshots
<!-- (if appropriate): -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Improvement (non-breaking change that adds a new feature)
- [ ] Bug fix (fixes an issue)
- [ ] Breaking change (breaking change)
- [x] Config and build (change in the configuration and build system,
has no impact on code or features)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

<!--- It would be nice if you could sign off your contribution by
replacing the name with your GitHub user name and GitHub email contact.
-->
Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>
This commit is contained in:
Robin Jones 2023-12-22 20:50:54 +00:00 committed by GitHub
parent be87588b85
commit 70675d085c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 20 deletions

View File

@ -1,14 +1,15 @@
FROM debian:bookworm-slim FROM debian:bookworm-slim
ARG SC64_DEPLOYER_VERSION=v2.18.0
RUN apt-get update && \ RUN apt-get update && \
apt-get upgrade -y && \ apt-get upgrade -y && \
apt-get install build-essential doxygen git python3 wget -y && \ apt-get install build-essential doxygen git python3 wget -y && \
wget https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-x86_64.deb && \ wget https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-x86_64.deb && \
dpkg -i gcc-toolchain-mips64-x86_64.deb && \ dpkg -i gcc-toolchain-mips64-x86_64.deb && \
rm gcc-toolchain-mips64-x86_64.deb && \ rm gcc-toolchain-mips64-x86_64.deb && \
wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.17.0/sc64-deployer-linux-v2.17.0.tar.gz && \ wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/$SC64_DEPLOYER_VERSION/sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz && \
tar -xf sc64-deployer-linux-v2.17.0.tar.gz -C /usr/local/bin && \ tar -xf sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz -C /usr/local/bin && \
rm sc64-deployer-linux-v2.17.0.tar.gz && \ rm sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz && \
git config --global --add safe.directory "*" && \ git config --global --add safe.directory "*" && \
SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \ SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
echo "$SNIPPET" >> "/root/.bashrc" echo "$SNIPPET" >> "/root/.bashrc"

View File

@ -37,7 +37,7 @@ jobs:
FLAGS: -DNDEBUG FLAGS: -DNDEBUG
- name: Upload artifact (Standard ROM) - name: Upload artifact (Standard ROM)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: N64FlashcartMenu name: N64FlashcartMenu
path: | path: |
@ -45,25 +45,25 @@ jobs:
./build/N64FlashcartMenu.elf ./build/N64FlashcartMenu.elf
- name: Upload artifact (64drive version) - name: Upload artifact (64drive version)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: 64drive name: 64drive
path: ./output/menu.bin path: ./output/menu.bin
- name: Upload artifact (ED64 version) - name: Upload artifact (ED64 version)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: ED64 name: ED64
path: ./output/OS64.v64 path: ./output/OS64.v64
- name: Upload artifact (ED64P version) - name: Upload artifact (ED64P version)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: ED64P name: ED64P
path: ./output/OS64P.v64 path: ./output/OS64P.v64
- name: Upload artifact (SC64 version) - name: Upload artifact (SC64 version)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: SC64 name: SC64
path: ./output/sc64menu.n64 path: ./output/sc64menu.n64

View File

@ -88,11 +88,11 @@ You can use a dev container in VSCode to ease development.
## To deploy: ## To deploy:
### SC64 ### SC64
* Download the deployer [here](https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.17.0/sc64-deployer-windows-v2.17.0.zip) * Download the deployer [here](https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.18.0/sc64-deployer-windows-v2.18.0.zip)
* Extract and place `sc64deployer.exe` in the `tools/sc64` directory. * Extract and place `sc64deployer.exe` in the `tools/sc64` directory.
Make sure that your firmware is compatible (currently v2.17.0+) Make sure that your firmware is compatible (currently v2.18.0+)
See: [here](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.17.0/docs/00_quick_startup_guide.md#firmware-backupupdate) See: [here](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.18.0/docs/00_quick_startup_guide.md#firmware-backupupdate)
#### From the devcontainer #### From the devcontainer

View File

@ -6,8 +6,9 @@
#include "constants.h" #include "constants.h"
#include "utils/fs.h" #include "utils/fs.h"
#ifndef BOXART_DIRECTORY
#define BOXART_DIRECTORY "sd:/menu/boxart" #define BOXART_DIRECTORY "sd:/menu/boxart"
#endif
static void png_decoder_callback (png_err_t err, surface_t *decoded_image, void *callback_data) { static void png_decoder_callback (png_err_t err, surface_t *decoded_image, void *callback_data) {

View File

@ -33,7 +33,7 @@ static void draw (menu_t *menu, surface_t *d) {
"Github:\n" "Github:\n"
" https://github.com/Polprzewodnikowy/N64FlashcartMenu\n" " https://github.com/Polprzewodnikowy/N64FlashcartMenu\n"
"Authors:\n" "Authors:\n"
" JonesAlmighty / NetworkFusion\n" " Robin Jones / NetworkFusion\n"
" Mateusz Faderewski / Polprzewodnikowy\n" " Mateusz Faderewski / Polprzewodnikowy\n"
"Credits:\n" "Credits:\n"
" N64Brew / libdragon contributors\n" " N64Brew / libdragon contributors\n"

View File

@ -1,6 +1,6 @@
#include "views.h" #include "views.h"
static char *convert_boolean (int state) { static char *format_boolean_type (int state) {
switch (state) { switch (state) {
case 0: return "Off"; case 0: return "Off";
case 1: return "On"; case 1: return "On";
@ -38,13 +38,13 @@ static void draw (menu_t *menu, surface_t *d) {
"bgm_enabled: %s\n" "bgm_enabled: %s\n"
"sound_enabled: %s\n" "sound_enabled: %s\n"
"rumble_enabled: %s\n", "rumble_enabled: %s\n",
convert_boolean(menu->settings.pal60_enabled), format_boolean_type(menu->settings.pal60_enabled),
convert_boolean(menu->settings.hidden_files_enabled), format_boolean_type(menu->settings.hidden_files_enabled),
menu->settings.default_directory, menu->settings.default_directory,
convert_boolean(menu->settings.use_saves_folder), format_boolean_type(menu->settings.use_saves_folder),
convert_boolean(menu->settings.bgm_enabled), format_boolean_type(menu->settings.bgm_enabled),
convert_boolean(menu->settings.sound_enabled), format_boolean_type(menu->settings.sound_enabled),
convert_boolean(menu->settings.rumble_enabled) format_boolean_type(menu->settings.rumble_enabled)
); );