Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
8f3a596
update workspace
DefKorns Oct 5, 2024
9f840d8
update copyright
DefKorns Oct 5, 2024
d9b8fe8
update copyright, update shellcheck source
DefKorns Oct 5, 2024
af8618f
update gitinit
DefKorns Oct 5, 2024
1823cd2
workspace and recomended extensions
DefKorns Oct 5, 2024
cc44dd0
shellcheck
DefKorns Oct 5, 2024
40e0c1c
shellcheck
DefKorns Oct 5, 2024
6b25f12
shellcheck
DefKorns Oct 5, 2024
5cbb8c0
child
DefKorns Oct 8, 2024
a75daf7
Update shellcheck settings and modify script header comments
DefKorns Jan 23, 2025
df47968
Refactor shellcheck directives and improve script formatting
DefKorns Jan 23, 2025
eea6a9b
Format script indentation and improve readability in theme scripts
DefKorns Aug 31, 2026
33b1147
Adjust editor tab size to 2 and format shellcheck exclusions for cons…
DefKorns Aug 31, 2026
173bd88
update copyright
DefKorns Aug 31, 2026
64a9e10
Fix version bump tooling and wire tags to releases
DefKorns Aug 31, 2026
d67c5f5
Add CI configuration for linting and building with shellcheck
DefKorns Sep 1, 2026
f298fa1
Add shellcheck directive to disable SC2119 for diyThemeChecker calls
DefKorns Sep 1, 2026
0770dc2
Refactor shell command syntax for consistency and readability
DefKorns Sep 1, 2026
22ec63d
Fix whitespace issues in script for improved readability
DefKorns Sep 1, 2026
c34dff1
Refactor function names for consistency and readability; update works…
DefKorns Sep 9, 2026
915e9d3
Refactor command names and add localization support for theme options
DefKorns Sep 9, 2026
ce03637
Add submodule configuration for toolchain and pngpack
DefKorns Sep 11, 2026
5c0cc22
Update submodule commit reference for toolchain
DefKorns Sep 11, 2026
9f35599
Stop shipping a duplicate om_functions, fix stale c9999_Exit/separato…
DefKorns Sep 12, 2026
5228fec
Add .gitattributes for consistent line endings and create om_themes_v…
DefKorns Sep 12, 2026
fd6fbc8
Replace vendored chmenu/fontfix backups with surgical sed removal on …
DefKorns Sep 14, 2026
1c2203f
Generate wall/packed DIY templates from the console's own data instea…
DefKorns Sep 14, 2026
d24a377
Remove redundant om_firstrun marker hardcoded to save_path
DefKorns Sep 14, 2026
aaef02d
Remove sprite assets excluded from every build (mario/luigi/wall char…
DefKorns Sep 15, 2026
43351ce
Generate loading-screen splashes via gen_splash instead of static Eng…
DefKorns Sep 15, 2026
9275198
Add preview icons for audio/theme randomizers, clean up, DIY theme, d…
DefKorns Sep 15, 2026
9b356e0
Add fr-FR, de-DE, es-ES, it-IT, nl-NL, ru-RU, ja-JP translations, mat…
DefKorns Sep 15, 2026
2953521
fix SC1091
DefKorns Sep 15, 2026
f8f6e91
Remove orphaned PNGs and obsolete c9998/c9999 files, backfill uninsta…
DefKorns Sep 15, 2026
d51f6c6
Replace the generic options UI with a dedicated theme_manager engine
DefKorns Sep 16, 2026
faf5c60
Update subproject commit reference for OptionsMenu
DefKorns Sep 16, 2026
d79a47a
Update subproject commit reference for pngpack
DefKorns Sep 16, 2026
f0ce6a8
Update subproject commit reference for OptionsMenu
DefKorns Sep 16, 2026
96ff861
update .gitignore
DefKorns Sep 16, 2026
a3222e3
Update subproject commit reference for OptionsMenu
DefKorns Sep 16, 2026
d3f4a11
Add standalone Docker build wrapper for theme_manager
DefKorns Sep 16, 2026
cc99813
Add grid layout mode to theme_manager
DefKorns Sep 16, 2026
48e8e48
Wire --layout grid and per-screen titles into root/downloads/DIY entr…
DefKorns Sep 16, 2026
639fb90
Add gold chip icons for the grid action strip
DefKorns Sep 16, 2026
99e18f7
Fix DIY sprite category previews: title, prefix collision, and stale …
DefKorns Sep 16, 2026
633dd5a
Remove obsolete c9998_separator from DIY sprite category commands
DefKorns Sep 16, 2026
d9d253a
Fix shellcheck failures in om_themes_vars
DefKorns Sep 16, 2026
f6a2508
Update subproject commit reference in OptionsMenu
DefKorns Sep 16, 2026
20a440c
Update subproject commit reference in OptionsMenu
DefKorns Sep 17, 2026
74d6c91
Update subproject commit reference in toolchain
DefKorns Sep 17, 2026
3196533
Update subproject commit reference in OptionsMenu
DefKorns Sep 17, 2026
0bfb8f6
Update subproject commit reference in OptionsMenu
DefKorns Sep 17, 2026
e0b0d9c
Add theme downloader and theme manager to .gitignore
DefKorns Sep 17, 2026
7fe930f
Add new theme command configurations for download, clear list, refres…
DefKorns Sep 17, 2026
b712596
Add new theme command files for saving, previewing, cleaning, and ref…
DefKorns Sep 17, 2026
3216526
Update subproject commit reference in OptionsMenu
DefKorns Sep 18, 2026
511be92
Add cacert.pem to .gitignore for theme downloader
DefKorns Sep 18, 2026
bec197b
Add theme_downloader, statically-linked curl+OpenSSL binary
DefKorns Sep 18, 2026
7c11d6a
Redesign DIY Theme strip, lazy-load per-category assets, drop dead pr…
DefKorns Sep 18, 2026
23bf9fa
Update subproject commit reference in OptionsMenu
DefKorns Sep 18, 2026
1005e9e
Add uitheme.cpp to SOURCES and update texture color references to use…
DefKorns Sep 18, 2026
a0a295d
Refactor character demo names and animate mario/luigi DIY tiles, dedu…
DefKorns Sep 18, 2026
4f5b91f
Fix read command in find checks to avoid unused variable warnings
DefKorns Sep 20, 2026
4317922
Add PREVIEW_FIT_CONTAIN and PREVIEW_HIDE_LABEL options for theme tiles
DefKorns Sep 20, 2026
bca03f6
Update subproject commit reference in OptionsMenu
DefKorns Sep 20, 2026
b3d35b5
Update theme_manager references to use the lib directory
DefKorns Sep 20, 2026
90ae9df
Fix comments in .gitlab-ci.yml for clarity on frozen base-OS files
DefKorns Sep 20, 2026
313f7b6
Update subproject commit reference in toolchain
DefKorns Sep 20, 2026
2955545
Update subproject commit reference in toolchain
DefKorns Sep 20, 2026
7c63778
Update subproject commit reference in OptionsMenu
DefKorns Sep 20, 2026
9277955
Add theme_downloader implementation to src/ and remove Makefile
DefKorns Sep 20, 2026
335082f
Update .gitignore to include src/cacert.pem and modify .gitmodules fo…
DefKorns Sep 20, 2026
a6bb9f1
Update subproject commit reference in OptionsMenu
DefKorns Sep 20, 2026
5d8993e
Fix theme manager command path and add debug checkpoints in main func…
DefKorns Sep 20, 2026
ffbaffb
Refactor Makefile and build scripts for improved theme manager compil…
DefKorns Sep 21, 2026
9a30c5a
Update subproject commit reference in OptionsMenu
DefKorns Sep 21, 2026
cb72f9f
Remove commented-out scale functions and clean up variable declaratio…
DefKorns Sep 22, 2026
24639ef
Split theme_manager into command_loader/theme_manager_app/single_inst…
DefKorns Sep 23, 2026
1e8d54d
Resume the paused game UI on power-button exit from theme_manager to …
DefKorns Sep 23, 2026
d5298d6
Update wall/wall_near/wall_far preview artwork
DefKorns Sep 23, 2026
f7b40d2
Render wall/wall_near/wall_far/sbm DIY category tiles as fit-contain …
DefKorns Sep 23, 2026
8428fe6
Update subproject commit reference for OptionsMenu
DefKorns Sep 23, 2026
9c30290
Hash-dedupe DIY sprite previews before queuing the crop job, and trim…
DefKorns Sep 23, 2026
e6a8915
Add NES_ONLY/SNES_ONLY command filtering to theme_manager, replacing …
DefKorns Sep 23, 2026
c596688
Remove PREVIEW_FIT_CONTAIN from wall/wall_near/wall_far commands and …
DefKorns Sep 23, 2026
413e18e
Refactor font management in theme scripts and remove unused om_themes…
DefKorns Sep 23, 2026
2289a4e
Refactor ReadSftype to use environment variable and remove caching me…
DefKorns Sep 23, 2026
9585479
Add vendor/chmenu to .gitignore
DefKorns Sep 24, 2026
bee3919
Refactor theme management scripts: remove unused files and enhance th…
DefKorns Sep 24, 2026
34e0fbb
Add default ActiveThemeBorder color handling and update theme renderi…
DefKorns Sep 24, 2026
84728a4
Update README.md to clarify compatibility and enhance feature descrip…
DefKorns Sep 24, 2026
d60350a
Update preview images in options menu for improved visuals
DefKorns Sep 24, 2026
29b3164
Add theme applying messages in multiple languages and update theme sc…
DefKorns Sep 24, 2026
dd3c4e9
Update OptionsMenu submodule to latest commit
DefKorns Sep 24, 2026
a930c9b
Update OptionsMenu submodule to latest commit e32b11b
DefKorns Sep 25, 2026
4b24c97
Migrate theme_manager to OptionsMenu's Color type
DefKorns Sep 25, 2026
85adfed
Point Refresh at the renamed om_theme_selector script
DefKorns Sep 25, 2026
68a3f24
Fix first-run reload and settings reset when saves live on SD/USB
DefKorns Sep 25, 2026
6bef1f6
Point author links at GitHub
DefKorns Sep 25, 2026
f4ef301
Update OptionsMenu submodule to latest commit fbd9dcc
DefKorns Sep 25, 2026
806952d
Merge GitHub master (superseded 2022 README/copyright updates)
DefKorns Sep 25, 2026
d1251d2
Add GitHub Actions build and tag-driven releases, set version 3.0.0-a…
DefKorns Sep 25, 2026
cbc1b86
Fix clean-checkout builds: create output dirs, build sprite_crop from…
DefKorns Sep 25, 2026
e41bd37
Point install/uninstall at the real /bin location of the helper binaries
DefKorns Sep 25, 2026
7648200
Update OptionsMenu submodule to latest commit cfb7e3f
DefKorns Sep 25, 2026
60d3569
Update OptionsMenu submodule to commit 7609718
DefKorns Sep 25, 2026
3d2934c
Enhance uninstall process for legacy installs, including Theme Random…
DefKorns Oct 6, 2026
8985c89
Fix overlay theme staying mounted after leaving its folder
DefKorns Oct 6, 2026
7bed8e2
Add a Folder Themes screen to assign themes to folders without renaming
DefKorns Oct 6, 2026
262214e
Update OptionsMenu submodule to commit b673707
DefKorns Oct 6, 2026
98af94a
Add Music Per Folder and regroup the theme and audio settings
DefKorns Oct 6, 2026
06f758e
Update OptionsMenu submodule to latest commit 6d8053b
DefKorns Oct 6, 2026
af459cb
Update OptionsMenu submodule to commit fbdc5be
DefKorns Oct 6, 2026
1b066b7
Apply snake_case/camelCase naming to the shell scripts
DefKorns Oct 6, 2026
b9b58c2
Keep theme downloads off a full NAND and report failed installs
DefKorns Oct 6, 2026
8ba3442
Set version 3.0.0-alpha4
DefKorns Oct 6, 2026
c9cca31
Show each download's author as a strip over its grid preview
DefKorns Oct 7, 2026
f9694b3
Build and release through hmod-build"
DefKorns Oct 7, 2026
9b41ceb
Rewrite the readmes for Theme Selector 3
DefKorns Oct 7, 2026
054a424
Hide USB_ONLY downloads without a USB/SD drive and update readme
DefKorns Oct 7, 2026
090ce2e
Mark binaries in .gitattributes so CI builds aren't tagged dirty
DefKorns Oct 7, 2026
fcda646
Update DIY theme description in README files for clarity
DefKorns Oct 7, 2026
760143d
Download all themes over one connection and unpack while the next dow…
DefKorns Oct 7, 2026
a31ec74
Set the hmod category to its tab in the hub
DefKorns Oct 7, 2026
bd21fe2
Say so when Download all finds every theme already installed
DefKorns Oct 7, 2026
b4d7bb5
Size each strip chip to its label so long translations fit
DefKorns Oct 7, 2026
c34aca1
Clean up a theme download aborted with B, show Loading on return
DefKorns Oct 7, 2026
f54e9d0
Update OptionsMenu submodule to 3b9b9f5 (abort INTERNAL commands with B)
DefKorns Oct 7, 2026
21baeeb
Flag an unsaved DIY draft and the chosen DIY asset
DefKorns Oct 7, 2026
5b6c9e4
Unmount every theme bind on folder change and skip unchanged themes
DefKorns Oct 7, 2026
7320d2e
Update OptionsMenu submodule to 72f2f4b
DefKorns Oct 7, 2026
7159bc9
Confirm theme deletion with the shared dimmed dialog
DefKorns Oct 7, 2026
3518247
Update OptionsMenu submodule to 3f393cf (shared badges and confirm di…
DefKorns Oct 7, 2026
06e27d5
Update OptionsMenu submodule to f7fc180
DefKorns Oct 7, 2026
061de47
Update hmod-build submodule to 9f553b5
DefKorns Oct 7, 2026
7194bf5
Remove unused images from options menu and add new preview images
DefKorns Oct 8, 2026
d2214f0
Preview the chosen or stock DIY asset on the DIY home, follow the ima…
DefKorns Oct 8, 2026
452601e
Show the Options Menu loading bar while themes and DIY assets load
DefKorns Oct 8, 2026
5d47e91
Update OptionsMenu submodule to v2.0.0-alpha8
DefKorns Oct 8, 2026
0feae07
Update OptionsMenu submodule to v2.0.0-alpha9
DefKorns Oct 8, 2026
d24d9a9
Link sprite_crop with the Options Menu lib rpath
DefKorns Oct 12, 2026
ee0e11a
Address PR #14 review: lock, downloader and preview cache fixes
DefKorns Oct 13, 2026
0e2bc36
Align Base UI DIY previews to the top
DefKorns Oct 13, 2026
6e102bb
Update hmod-build: changelog in pre-release readmes
DefKorns Oct 13, 2026
dc0eb4e
Pin hmod-build workflow and clean vendor objects after build
DefKorns Oct 13, 2026
26a24d6
Use theme-provided Base UI previews from extras/
DefKorns Oct 13, 2026
591b59d
Update OptionsMenu submodule to v2.0.0-alpha10
DefKorns Oct 13, 2026
2969e3c
Move the shellcheck lint to GitHub Actions and drop local paths from …
DefKorns Oct 14, 2026
cbfa769
Use the NES theme catalog on the Famicom
DefKorns Oct 14, 2026
2ce51b6
Update the Options Menu submodule to the shared downloader
DefKorns Oct 14, 2026
f4fa9ca
Use the Options Menu downloader for theme downloads
DefKorns Oct 14, 2026
51b10b9
Update the Options Menu submodule to show free space while downloading
DefKorns Oct 14, 2026
1c6ef4a
Show NAND and USB free space on the downloads screen
DefKorns Oct 14, 2026
b5a7943
Write the catalog title for themes installed by All Themes
DefKorns Oct 14, 2026
19d3418
Show a download splash with a progress bar and return on success
DefKorns Oct 14, 2026
27b2207
Refresh the menu buttons after deleting a theme
DefKorns Oct 14, 2026
7a7761a
Mark new catalog themes and hide Clear List when there is nothing to …
DefKorns Oct 14, 2026
e6d8df2
Skip the loading splash on return unless many themes were added
DefKorns Oct 15, 2026
28b4c95
Clear the frame after running an internal command
DefKorns Oct 15, 2026
2a5360c
Update hmod-build: smoke test of the packaged files
DefKorns Oct 15, 2026
a620442
Update the toolchain and hmod-build: no private vendor repo
DefKorns Oct 15, 2026
50b9007
Pull the toolchain image from GHCR
DefKorns Oct 15, 2026
9aae4d3
Move pngpack and hmod-build under vendor/ and drop the toolchain subm…
DefKorns Oct 15, 2026
ee34bfb
Update hmod-build to v1.1.0
DefKorns Oct 15, 2026
a8d2e89
Move local-only ignores to .git/info/exclude
DefKorns Oct 15, 2026
5620c93
Require Options Menu v2.0.0-beta1 and add Aranthys and AxelStone to t…
DefKorns Oct 15, 2026
5a5abd2
Ask before downloading a theme that is already installed
DefKorns Oct 16, 2026
54bb0c7
Update hmod-build to v1.2.0
DefKorns Oct 16, 2026
8539219
Update hmod-build to v1.3.0
DefKorns Oct 20, 2026
f177929
Update hmod-build to v1.4.0
DefKorns Oct 20, 2026
db894fa
Update hmod-build to v1.5.0
DefKorns Oct 20, 2026
337f1a9
Track Options Menu master
DefKorns Oct 20, 2026
acd3834
Use shared download screen from Options Menu
DefKorns Oct 20, 2026
b24f4e4
Create theme folder before downloading
DefKorns Oct 20, 2026
b7220a9
Update Options Menu
DefKorns Oct 20, 2026
a083760
Rebind Console Language strings and fonts after applying a theme
DefKorns Oct 20, 2026
691bce9
Rebind Console Language strings and fonts after applying a theme
DefKorns Oct 20, 2026
97d99b4
Block deleting the applied theme and fix B hold timer stuck after a hold
DefKorns Oct 20, 2026
10cb3fd
Build with -std=c++14 and use std::make_unique
DefKorns Oct 21, 2026
45d7486
Merge pull request #16 from DefKorns/build/cxx14
DefKorns Oct 21, 2026
6ec729a
Use the Options Menu screen chrome and scroll arrows
DefKorns Oct 21, 2026
bae709d
Merge pull request #17 from DefKorns/refactor/om-list-screen
DefKorns Oct 21, 2026
b7e889f
Rebind the console language with clRebind so copyleft stays on the st…
DefKorns Oct 21, 2026
74c0089
Fit themes to the firmware's font names and apply their palette on ev…
DefKorns Oct 21, 2026
09754a8
Restore the chmenu hook on install and write it through the live path
DefKorns Oct 21, 2026
e87a5eb
Reload the current folder after a DIY preview instead of hopping folders
DefKorns Oct 21, 2026
5cfe048
Reload the current folder after a DIY preview instead of hopping folders
DefKorns Oct 21, 2026
5915aca
Remount the active theme when a previewed DIY is cleaned
DefKorns Oct 21, 2026
e044b3f
Leave the UI alone while the theme name is still the install placeholder
DefKorns Oct 21, 2026
598c924
Refresh every changed theme font and read them from the theme actuall…
DefKorns Oct 21, 2026
d3cfb77
Use the Options Menu splash, unpack and menu reload helpers
DefKorns Oct 21, 2026
7109670
Group the Downloads menu functions in om_vars
DefKorns Oct 21, 2026
8a41cdb
Rebuild only the installed themes that changed instead of the whole list
DefKorns Oct 21, 2026
a5f1900
Build the Folder Themes list without a find and two seds per theme
DefKorns Oct 21, 2026
c24307d
Draw the Folder Themes value picker with the Options Menu ValuePicker
DefKorns Oct 21, 2026
70a2731
Make the Theme Manager badges with the Options Menu BadgePainter
DefKorns Oct 21, 2026
444df27
Draw the footer divider on every Theme Manager screen
DefKorns Oct 21, 2026
c30fbd3
Merge pull request #18 from DefKorns/feat/cl-rebind
DefKorns Oct 21, 2026
cd65c8b
Merge pull request #19 from DefKorns/refactor/om-vars
DefKorns Oct 21, 2026
c2da07d
Merge pull request #20 from DefKorns/feat/value-picker
DefKorns Oct 21, 2026
b95d9da
Keep the theme list when the catalog download fails and group the dow…
DefKorns Oct 22, 2026
9b48e2d
Skip the catalog download when its published hash hasn't changed
DefKorns Oct 22, 2026
64b4c4b
Group the Settings menu in om_vars and fix its separator path
DefKorns Oct 22, 2026
040c1d6
Toggle the Settings rows in place instead of relaunching the Theme Ma…
DefKorns Oct 22, 2026
3cb6cf4
Drop renamed command rows left behind by an upgrade
DefKorns Oct 22, 2026
33849e1
Merge pull request #21 from DefKorns/refactor/settings
DefKorns Oct 22, 2026
8dad8b9
Group the main menu and installed themes functions in om_vars
DefKorns Oct 22, 2026
ca93135
Merge pull request #22 from DefKorns/refactor/installed-themes
DefKorns Oct 22, 2026
438cca1
Update the readme requirements and download steps
DefKorns Oct 22, 2026
4c4edd1
Point the readmes at the DefKorns Store and the wiki's demo image
DefKorns Oct 22, 2026
f219e39
Merge pull request #23 from DefKorns/docs/font-remount-requirement
DefKorns Oct 22, 2026
de5b921
fix readme
DefKorns Oct 22, 2026
d899610
Show the waiting splashes with a moving bar
DefKorns Oct 22, 2026
cc54c02
Merge pull request #24 from DefKorns/feat/om-loading
DefKorns Oct 22, 2026
2808e5d
Add an .editorconfig, a style check on pull requests and a Contributi…
DefKorns Oct 22, 2026
e09529d
Build against Options Menu v2.1.0
DefKorns Oct 22, 2026
71840bf
Add the missing final newlines and fix the style check on submodules
DefKorns Oct 22, 2026
0fd9911
Track the release notes, which the Visual Studio "Release" rule was h…
DefKorns Oct 22, 2026
9bc6e1b
Add the 3.0.0 release notes
DefKorns Oct 22, 2026
4b00b2d
Fix the markdown layout of the 3.0.0 release notes
DefKorns Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# shell scripts, command files and translations
[{mod/**,*.sh}]
indent_size = 2

[*.{yml,yaml,json}]
indent_size = 2

[{Makefile,*.mk}]
indent_style = tab

# two trailing spaces are a line break
[*.md]
trim_trailing_whitespace = false
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Force LF regardless of platform checkout settings (core.autocrlf, etc.) -
# GitHub Actions workflow YAML and shell here don't want a stray \r.
* text=auto eol=lf

*.ttf binary
*.png binary
*.lua binary
*.wav binary
30 changes: 30 additions & 0 deletions .github/check_style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
# check_style.sh <base>: the lines added since <base> follow .editorconfig
base="${1:-origin/master}"
failed=0

error() {
echo "::error file=$1::$2"
echo "$1: $2"
failed=1
}

git diff --check "$base...HEAD" -- . ':!*.md' || failed=1

files=$(git diff --name-only --diff-filter=ACMR "$base...HEAD")
for file in $files; do
[ -f "$file" ] || continue
case "$file" in
*.png | *.ttf | *.hmod | *.xz | *.pem) continue ;;
esac
added=$(git diff -U0 "$base...HEAD" -- "$file" | grep '^+' | grep -v '^+++' || true)
[ -n "$added" ] || continue
printf '%s\n' "$added" | grep -q "$(printf '\r')" && error "$file" "CRLF line endings; use LF"
case "$file" in
Makefile | *.mk | *.md | .gitmodules) ;;
*) printf '%s\n' "$added" | grep -q "^+$(printf '\t')" && error "$file" "indented with tabs; use spaces (see .editorconfig)" ;;
esac
[ -n "$(tail -c1 "$file")" ] && error "$file" "missing newline at the end of the file"
done

exit "$failed"
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build

on:
push:
branches: ["**"]
tags: ["v*"]
pull_request:

jobs:
hmod:
uses: DefKorns/hmod-build/.github/workflows/hmod.yml@v1.5.0
with:
release-name: Theme Selector
docker: true
secrets: inherit
permissions:
contents: write
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push:
branches: ['**']
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

# om_chmenu_og / om_fontfix_og are frozen copies of base-OS files, only used by uninstall
- name: shellcheck
run: |
files=$(
{ echo mod/install; echo mod/uninstall; find mod -type f -name 'om_*'; } |
grep -v -e om_chmenu_og -e om_fontfix_og |
sort -u | xargs grep -lE '^#!/bin/(sh|bash)'
)
shellcheck -x -e SC3046,SC3051,SC3014 $files
17 changes: 17 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Style

# checks only the lines a pull request adds, so older files never fail a PR they didn't touch
on:
pull_request:

jobs:
changed-lines:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Trailing whitespace, line endings and indentation
env:
BASE: origin/${{ github.base_ref }}
run: sh .github/check_style.sh "$BASE"
29 changes: 6 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
*.o
[Dd]ebug*/
[Rr]elease*/
!release-notes/
*.mode*
*.app/
*.pyc
Expand Down Expand Up @@ -498,27 +499,9 @@ out/
default-strings.lng
default/
temp/
mod/etc/options_menu/themes/scripts/b8024_themeselector
mod-/
out--/
mod/etc/options_menu/themes-old/
modules/
mod/etc/options_menu/themes/scripts/scripts/*
mod/etc/options_menu/themes/scripts/80s_neon*
mod/etc/options_menu/themes/scripts/ghost*

mod/etc/options_menu/themes/scripts/images/
mod/etc/options_menu/themes/scripts/commands/c0009_*
mod/etc/options_menu/themes/scripts/commands/c0010_*
mod/etc/options_menu/themes/settings/commandss/
mod/etc/options_menu/images/retro_gaming.zip
Makefile
mod/etc/options_menu/themes/downloads/scripts/getAll
retro_gaming.zip
mod/etc/options_menu/b8025_fontfix
mod/etc/options_menu/p8025_fontfix
old.themescript.sh
out---backup/
BACKUP.gpg
out---/

mod/etc/options_menu/lib/
.deps/

# local-only files (console dumps, test hmods)
local/
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[submodule "vendor/OptionsMenu"]
path = vendor/OptionsMenu
url = https://github.com/DefKorns/OptionsMenu
branch = master
[submodule "hmod-build"]
path = vendor/hmod-build
url = https://github.com/DefKorns/hmod-build.git
[submodule "vendor/pngpack"]
path = vendor/pngpack
url = https://github.com/DefKorns/pngpack.git
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"timonwong.shellcheck",
"foxundermoon.shell-format",
"mads-hartmann.bash-ide-vscode",
"designbyajay.bash-cli-snippets",
]
}
12 changes: 3 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"files.autoSave": "off",
// PowerShell
//"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
// Git Bash
// "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
// Command Prompt
//"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"git.autofetch": true,
"editor.tabSize": 4,
"editor.insertSpaces": true,
Expand All @@ -29,4 +21,6 @@
"editor.tabSize": 2,
},
"diffEditor.ignoreTrimWhitespace": false,
}
"shellcheck.useWorkspaceRootAsCwd": true,
"cmake.sourceDirectory": "E:/Documents/_projects/hmods/om_theme-selector/vendor/pngpack/jsoncpp",
}
161 changes: 60 additions & 101 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,105 +1,64 @@
SHELL = /bin/sh
UNAME = $(shell uname)
MOD_NAME := Options Menu - Theme Selector
MOD_CREATOR := DefKorns
MOD_CATEGORY := User Interface

LAST_TAG_COMMIT = $(shell git rev-list --tags --max-count=1)
LAST_TAG = $(shell git describe --tags $(LAST_TAG_COMMIT) )
TAG_PREFIX = "v"
CURRENT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
GIT_REMOTES = $(shell git remote | xargs echo )
GIT_DIRTY = $(shell git diff --shortstat 2> /dev/null | tail -n1 )
GET_VER = $(shell git describe --tags $(LAST_TAG_COMMIT) | sed "s/^$(TAG_PREFIX)//")
#MOD_VER = $(shell [ -f VERSION ] && head VERSION || echo "0.0.1")
MOD_VER = $(shell [ -f VERSION ] && head VERSION || echo $(GET_VER))
MAJOR = $(shell echo $(MOD_VER) | sed "s/^\([0-9]*\).*/\1/")
MINOR = $(shell echo $(MOD_VER) | sed "s/[0-9]*\.\([0-9]*\).*/\1/")
PATCH = $(shell echo $(MOD_VER) | sed "s/[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/")
RC = $(shell echo $(MOD_VER) | grep -oP '(?<=rc)[0-9]+')

# total number of commits
BUILD = $(shell git log --oneline | wc -l | sed -e "s/[ \t]*//g")
NEXT_MAJOR_VERSION = $(shell expr $(MAJOR) + 1).0.0
NEXT_MINOR_VERSION = $(MAJOR).$(shell expr $(MINOR) + 1).0-b$(BUILD)
NEXT_PATCH_VERSION = $(MAJOR).$(MINOR).$(shell expr $(PATCH) + 1)-b$(BUILD)
NEXT_RC_VERSION = $(MAJOR).$(MINOR).$(PATCH)-rc$(shell expr $(RC) + 1)

MOD_URL=`git config --get remote.origin.url`
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD --`")
GIT_DIRTY = $(shell git diff --shortstat 2> /dev/null | tail -n1 )
RSYNC = $(shell rsync -a --exclude-from=exclude-file.txt mod/etc/options_menu/ temp/ --links --delete)
MOD_FILENAME = $(shell basename `pwd`)
DEV_DIR = $(shell realpath .)
#DEV_DIR=/d/om_theme-selectorv2
# DEV_DIR=/i/om_theme-selectorv2
OUT=$(DEV_DIR)/out


all: hmod tar zip
rm -r temp/

deploy: customlang localization patches upload

hmod: clean

mkdir -p out/ temp/
rsync -a --exclude-from=exclude-file.txt mod/ temp/ --links --delete

printf "%s\n" \
"---" \
"Name: $(MOD_NAME)" \
"Creator: $(MOD_CREATOR)" \
"Category: $(MOD_CATEGORY)" \
"Version: $(MOD_VER)" \
"Built on: $(shell date +"%A, %d %b %Y - %T")" \
"Git commit: $(GIT_COMMIT)" \
"---" > temp/readme.md

sed 1d mod/readme.md >> temp/readme.md

cd temp/; tar -czf $(OUT)/$(MOD_FILENAME)-$(MOD_VER).hmod *
rm -r temp/

tar:
mkdir -p out/ temp/
$(RSYNC)
cd temp/; tar -czf $(OUT)/$(MOD_FILENAME)-$(MOD_VER).tar.gz *
rm -r temp/

zip:
mkdir -p out/ temp/
#$(RSYNC)
cd temp/; zip -r $(OUT)/$(MOD_FILENAME)-$(MOD_VER).zip *

fix: hmod
@echo $(NEXT_PATCH_VERSION) > VERSION

rc: hmod
@echo $(NEXT_RC_VERSION) > VERSION

update: all
@echo $(NEXT_MINOR_VERSION) > VERSION

upgrade: all
@echo $(NEXT_MAJOR_VERSION) > VERSION

upload:
rm -f $(OUT)/$(MOD_FILENAME).*
rsync -e ssh --progress --exclude 'rsync*' --exclude 'src' -avzzp out/* defkorns@hakchicloud.com:/var/www/html/Hakchi_Themes/options_menu

info:
@echo "Mod Dir: $(MOD_FILENAME)"
@echo "Current version: $(MOD_VER)"
@echo "Last tag: $(LAST_TAG)"
@echo "$(shell git rev-list $(LAST_TAG).. --count) commit(s) since last tag"
@echo "Build: $(BUILD) (total number of commits)"
@echo "next major version: $(NEXT_MAJOR_VERSION)"
@echo "next minor version: $(NEXT_MINOR_VERSION)"
@echo "next patch version: $(NEXT_PATCH_VERSION)"
MOD_ID := om_theme-selector
MOD_NAME := Options Menu - Theme Selector
MOD_CATEGORY := Options Menu - Addons
MOD_EXCLUDE := exclude-file.txt
MOD_DEPS := mod/etc/options_menu/lib/theme_manager mod/bin/sprite_crop

# Set CROSS_PREFIX=arm-linux-gnueabihf- to cross-compile for the console
# (build.sh does this inside the Docker toolchain); leave unset to build natively.
FRAMEWORK_DIR = vendor/OptionsMenu/src/framework
CXX = g++
STRIP = strip
ifdef CROSS_PREFIX
PKG_CONFIG_LIBDIR = /usr/lib/arm-linux-gnueabihf/pkgconfig
SDL_CFLAGS = -I/usr/include/arm-linux-gnueabihf $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --cflags sdl2 SDL2_ttf libpng)
SDL_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs sdl2 SDL2_ttf libpng)
LDFLAGS = -Wl,--allow-shlib-undefined
else
SDL_CFLAGS = $(shell sdl2-config --cflags) $(shell pkg-config --cflags SDL2_ttf)
SDL_LIBS = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_ttf) -lpng
LDFLAGS =
endif
CXXFLAGS = -std=c++14 -Os -Ivendor/OptionsMenu/src $(SDL_CFLAGS) -DMOD_VERSION=\"v$(MOD_VER)\"
LDLIBS = $(SDL_LIBS)
VENDOR_SRC_DIR = vendor/OptionsMenu/src
SOURCES = src/main.cpp src/single_instance_lock.cpp src/command_loader.cpp src/texture_utils.cpp src/theme_manager_app.cpp src/folder_theme_model.cpp src/folder_themes_layout.cpp src/storage_indicator.cpp $(VENDOR_SRC_DIR)/command.cpp $(VENDOR_SRC_DIR)/download_screen.cpp $(VENDOR_SRC_DIR)/localization.cpp $(FRAMEWORK_DIR)/sdl_context.cpp $(FRAMEWORK_DIR)/texture.cpp $(FRAMEWORK_DIR)/controller.cpp $(FRAMEWORK_DIR)/powerwatch.cpp $(FRAMEWORK_DIR)/draw_helpers.cpp $(FRAMEWORK_DIR)/utf8.cpp $(FRAMEWORK_DIR)/font8x8_lookup.cpp $(FRAMEWORK_DIR)/uitheme.cpp $(FRAMEWORK_DIR)/badge.cpp $(FRAMEWORK_DIR)/dialog.cpp $(FRAMEWORK_DIR)/list_screen.cpp $(FRAMEWORK_DIR)/text_layout.cpp $(FRAMEWORK_DIR)/close_on_exec.cpp
OBJECTS = $(SOURCES:.cpp=.o)

all: hmod

compile: $(MOD_DEPS)

mod/etc/options_menu/lib/theme_manager: $(OBJECTS)
mkdir -p $(@D)
$(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -Wl,-rpath,/etc/options_menu/lib -o $@
$(CROSS_PREFIX)$(STRIP) $@

DEPDIR = .deps

%.o: %.cpp
@mkdir -p $(DEPDIR)
$(CROSS_PREFIX)$(CXX) $(CXXFLAGS) -MMD -MP -MF $(DEPDIR)/$(subst /,_,$*).d -c $< -o $@

-include $(wildcard $(DEPDIR)/*.d)

# DIY sprite previews (om_vars). Built by pngpack's own Makefile; its default
# LDFLAGS (-dead_strip) is macOS-only. The rpath picks up options_menu_compat's
# private libstdc++ when another hmod has replaced the system one.
mod/bin/sprite_crop: vendor/pngpack/pngpacker/sprite_crop.cpp vendor/pngpack/pngpacker/pixeltools.cpp
mkdir -p $(@D)
$(MAKE) -C vendor/pngpack build/sprite_crop CROSS=$(CROSS_PREFIX) LDFLAGS='-Wl,--gc-sections -Wl,-rpath,/etc/options_menu/lib'
cp vendor/pngpack/build/sprite_crop $@

update-headers:
sh tools/update-license-headers.sh $(YEAR)

clean:
rm -rf out/ temp/
find . -name "*.o" -type f -not -path "./vendor/*" -delete
rm -rf $(DEPDIR)
rm -f $(MOD_DEPS)
rm -rf out/

include vendor/hmod-build/hmod.mk

.PHONY: clean
.PHONY: all compile update-headers clean
Loading
Loading