Skip to content

Commit abbb1bb

Browse files
feat: add MinUI build
1 parent 6bcea38 commit abbb1bb

14 files changed

Lines changed: 559 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
run: task build extract
8989

9090
- name: Package ARM64 platforms
91-
run: task package-next package-muos package-knulli package-spruce package-rocknix package-trimui package-batocera
91+
run: task package-next package-muos package-knulli package-spruce package-rocknix package-trimui package-minui package-batocera
9292

9393
- name: Rename binary
9494
run: cp build64/grout build64/grout-arm64
@@ -101,6 +101,7 @@ jobs:
101101
cd dist/Spruce && zip -r Grout.spruce.zip Grout && mv Grout.spruce.zip ../Grout.spruce.zip && cd ../..
102102
cd dist/ROCKNIX && zip -r ../Grout-ROCKNIX.zip Grout.sh Grout && cd ../..
103103
cd dist/Trimui && zip -r ../Grout-Trimui.zip Grout && cd ../..
104+
cd dist/MinUI-arm64 && zip -r ../Grout-MinUI-arm64.zip Grout && cd ../..
104105
cd dist/Batocera-arm64 && zip -r ../Grout-Batocera-arm64.zip Grout.sh Grout && cd ../..
105106
106107
- name: Upload artifacts
@@ -114,6 +115,7 @@ jobs:
114115
dist/Grout-Knulli.zip
115116
dist/Grout-ROCKNIX.zip
116117
dist/Grout-Trimui.zip
118+
dist/Grout-MinUI-arm64.zip
117119
dist/Grout-Batocera-arm64.zip
118120
build64/grout
119121
build64/grout-arm64
@@ -221,7 +223,7 @@ jobs:
221223
run: task build-32 extract-32
222224

223225
- name: Package ARM32 platforms
224-
run: task package-allium package-onion
226+
run: task package-allium package-onion package-minui-arm32
225227

226228
- name: Rename binary
227229
run: cp build32/grout build32/grout-arm32
@@ -230,6 +232,7 @@ jobs:
230232
run: |
231233
cd dist/Allium && zip -r ../Grout-Allium.zip Grout.pak && cd ../..
232234
cd dist/Onion && zip -r ../Grout-Onion.zip Grout && cd ../..
235+
cd dist/MinUI-arm32 && zip -r ../Grout-MinUI-arm32.zip Grout && cd ../..
233236
234237
- name: Upload artifacts
235238
uses: actions/upload-artifact@v4
@@ -238,6 +241,7 @@ jobs:
238241
path: |
239242
dist/Grout-Allium.zip
240243
dist/Grout-Onion.zip
244+
dist/Grout-MinUI-arm32.zip
241245
build32/grout-arm32
242246
243247
release:
@@ -269,6 +273,8 @@ jobs:
269273
dist/Grout-Knulli.zip
270274
dist/Grout-ROCKNIX.zip
271275
dist/Grout-Trimui.zip
276+
dist/Grout-MinUI-arm64.zip
277+
dist/Grout-MinUI-arm32.zip
272278
dist/Grout-Batocera-arm64.zip
273279
dist/Grout-Batocera-x86.zip
274280
dist/Grout-Batocera-amd64.zip

cfw/cfw.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ const (
1818
Allium CFW = "ALLIUM"
1919
Onion CFW = "ONION"
2020
Batocera CFW = "BATOCERA"
21+
MinUI CFW = "MINUI"
2122
)
2223

2324
func GetCFW() CFW {
2425
cfwEnv := strings.ToUpper(os.Getenv("CFW"))
2526
cfw := CFW(cfwEnv)
2627

2728
switch cfw {
28-
case MuOS, NextUI, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Batocera:
29+
case MuOS, NextUI, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Batocera, MinUI:
2930
return cfw
3031
default:
3132
log.SetOutput(os.Stderr)
32-
log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Batocera", cfwEnv)
33+
log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Batocera, MinUI", cfwEnv)
3334
return ""
3435
}
3536
}

cfw/directories.go

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"grout/cfw/allium"
55
"grout/cfw/batocera"
66
"grout/cfw/knulli"
7+
"grout/cfw/minui"
78
"grout/cfw/muos"
89
"grout/cfw/nextui"
910
"grout/cfw/onion"
@@ -34,15 +35,20 @@ func GetRomDirectory() string {
3435
return onion.GetRomDirectory()
3536
case Batocera:
3637
return batocera.GetRomDirectory()
38+
case MinUI:
39+
return minui.GetRomDirectory()
3740
}
3841
return ""
3942
}
4043

4144
// RomFolderBase returns the base folder name for ROM matching.
4245
// tagParser is a function that extracts tags from paths (for NextUI).
4346
func RomFolderBase(path string, tagParser func(string) string) string {
44-
if GetCFW() == NextUI {
47+
switch GetCFW() {
48+
case NextUI:
4549
return nextui.RomFolderBase(path, tagParser)
50+
case MinUI:
51+
return minui.RomFolderBase(path, tagParser)
4652
}
4753
return path
4854
}
@@ -68,14 +74,19 @@ func GetBIOSDirectory() string {
6874
return onion.GetBIOSDirectory()
6975
case Batocera:
7076
return batocera.GetBIOSDirectory()
77+
case MinUI:
78+
return minui.GetBIOSDirectory()
7179
}
7280
return ""
7381
}
7482

7583
// GetBIOSFilePaths returns the BIOS file paths for a given relative path and platform.
7684
func GetBIOSFilePaths(relativePath string, platformFSSlug string) []string {
77-
if GetCFW() == NextUI {
85+
switch GetCFW() {
86+
case NextUI:
7887
return nextui.GetBIOSFilePaths(relativePath, platformFSSlug)
88+
case MinUI:
89+
return minui.GetBIOSFilePaths(relativePath, platformFSSlug)
7990
}
8091
return []string{filepath.Join(GetBIOSDirectory(), relativePath)}
8192
}
@@ -112,6 +123,8 @@ func GetArtDirectory(romDir string, platformFSSlug, platformName string) string
112123
return onion.GetArtDirectory(romDir)
113124
case Batocera:
114125
return batocera.GetArtDirectory(romDir)
126+
case MinUI:
127+
return minui.GetArtDirectory(romDir)
115128
default:
116129
return ""
117130
}
@@ -156,6 +169,8 @@ func BaseSavePath() string {
156169
return onion.GetBaseSavePath()
157170
case Batocera:
158171
return batocera.GetBaseSavePath()
172+
case MinUI:
173+
return minui.GetBaseSavePath()
159174
}
160175
return ""
161176
}

cfw/minui/data/platforms.json

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"3do": [],
3+
"3ds": [
4+
"Nintendo 3DS (3DS)"
5+
],
6+
"acpc": [
7+
"Amstrad CPC (CPC)"
8+
],
9+
"amiga": [
10+
"Amiga (PUAE)"
11+
],
12+
"arcade": [
13+
"Arcade (FBN)"
14+
],
15+
"arduboy": [],
16+
"atari-st": [],
17+
"atari2600": [
18+
"Atari 2600 (A2600)"
19+
],
20+
"atari5200": [
21+
"Atari 5200 (A5200)"
22+
],
23+
"atari7800": [
24+
"Atari 7800 (A7800)"
25+
],
26+
"c128": [
27+
"Commodore 128 (C128)"
28+
],
29+
"c64": [
30+
"Commodore 64 (C64)"
31+
],
32+
"cave-story": [],
33+
"colecovision": [
34+
"Colecovision (COLECO)"
35+
],
36+
"cpet": [
37+
"Commodore PET (PET)"
38+
],
39+
"dc": [
40+
"Sega Dreamcast (DC)"
41+
],
42+
"dos": [],
43+
"fairchild-channel-f": [],
44+
"famicom": [
45+
"Nintendo Entertainment System (FC)"
46+
],
47+
"fds": [
48+
"Famicom Disk System (FDS)"
49+
],
50+
"g-and-w": [],
51+
"galaksija": [],
52+
"gamegear": [
53+
"Sega Game Gear (GG)"
54+
],
55+
"gb": [
56+
"Game Boy (GB)"
57+
],
58+
"gba": [
59+
"Game Boy Advance (MGBA)",
60+
"Game Boy Advance (GBA)"
61+
],
62+
"gbc": [
63+
"Game Boy Color (GBC)"
64+
],
65+
"genesis": [
66+
"Sega Genesis (MD)"
67+
],
68+
"intellivision": [],
69+
"j2me": [],
70+
"jaguar": [],
71+
"lynx": [
72+
"Atari Lynx (LYNX)"
73+
],
74+
"mega-duck-slash-cougar-boy": [],
75+
"msx": [
76+
"Microsoft MSX (MSX)"
77+
],
78+
"n64": [
79+
"Nintendo 64 (N64)"
80+
],
81+
"nds": [
82+
"Nintendo DS (NDS)"
83+
],
84+
"neo-geo-cd": [],
85+
"neo-geo-pocket": [
86+
"Neo Geo Pocket (NGP)"
87+
],
88+
"neo-geo-pocket-color": [
89+
"Neo Geo Pocket Color (NGPC)"
90+
],
91+
"neogeoaes": [],
92+
"neogeomvs": [],
93+
"nes": [
94+
"Nintendo Entertainment System (FC)"
95+
],
96+
"odyssey": [],
97+
"openbor": [],
98+
"pc-8000": [],
99+
"pc-9800-series": [],
100+
"pc-fx": [],
101+
"philips-cd-i": [],
102+
"pico": [
103+
"Pico-8 (P8)"
104+
],
105+
"pico-8": [
106+
"Pico-8 (P8)"
107+
],
108+
"pokemon-mini": [
109+
"Pokemon mini (PKM)"
110+
],
111+
"ps2": [
112+
"Sony PlayStation 2 (PS2)"
113+
],
114+
"psp": [
115+
"Sony PlayStation Portable (PSP)"
116+
],
117+
"psx": [
118+
"Sony PlayStation (PS)"
119+
],
120+
"saturn": [],
121+
"sega32": [
122+
"Sega 32X (32X)"
123+
],
124+
"segacd": [
125+
"Sega CD (SEGACD)"
126+
],
127+
"sfam": [
128+
"Super Nintendo Entertainment System (SFC)"
129+
],
130+
"sg1000": [
131+
"Sega SG-1000 (SG1000)"
132+
],
133+
"sharp-x68000": [],
134+
"sms": [
135+
"Sega Master System (SMS)"
136+
],
137+
"snes": [
138+
"Super Nintendo Entertainment System (SFC)"
139+
],
140+
"supergrafx": [],
141+
"supervision": [],
142+
"tg16": [
143+
"TurboGrafx-16 (PCE)"
144+
],
145+
"tic-80": [],
146+
"turbografx-cd": [],
147+
"vectrex": [],
148+
"vic-20": [
149+
"Commodore VIC20 (VIC)"
150+
],
151+
"virtualboy": [
152+
"Virtual Boy (VB)"
153+
],
154+
"wonderswan": [
155+
"WS"
156+
],
157+
"wonderswan-color": [
158+
"WSC"
159+
],
160+
"x1": [],
161+
"zx81": [],
162+
"zxs": []
163+
}

0 commit comments

Comments
 (0)