Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/Flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/M5Devs/OpenROM-bins.git bins
git -C bins checkout 586f7cc54df0facf9df9d3066c70e6b434b93753
cd bins && sha256sum -c checksums.sha256 && cd ..

- name: Set up Flutter
uses: subosito/flutter-action@v2
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ jobs:
- uses: actions/checkout@v5

- name: Fetch binaries from OpenROM-bins
shell: bash
run: |
git clone --depth 1 https://github.com/M5Devs/OpenROM-bins.git bins
git -C bins checkout 586f7cc54df0facf9df9d3066c70e6b434b93753
cd bins && sha256sum -c checksums.sha256 && cd ..

- name: Copy Windows binaries
run: |
New-Item -ItemType Directory -Force -Path assets\windows
Copy-Item -Path "bins\windows\x86_64\*" -Destination "assets\windows\" -Recurse

Expand Down Expand Up @@ -150,6 +155,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/M5Devs/OpenROM-bins.git bins
git -C bins checkout 586f7cc54df0facf9df9d3066c70e6b434b93753
cd bins && sha256sum -c checksums.sha256 && cd ..
mkdir -p assets/linux/x86_64
cp -r bins/linux/x86_64/. assets/linux/x86_64/
chmod +x assets/linux/x86_64/*
Expand Down Expand Up @@ -274,6 +280,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/M5Devs/OpenROM-bins.git bins
git -C bins checkout 586f7cc54df0facf9df9d3066c70e6b434b93753
cd bins && sha256sum -c checksums.sha256 && cd ..
mkdir -p assets/linux/arm64
cp -r bins/linux/arm64/. assets/linux/arm64/
chmod +x assets/linux/arm64/*
Expand Down Expand Up @@ -381,6 +388,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/M5Devs/OpenROM-bins.git bins
git -C bins checkout 586f7cc54df0facf9df9d3066c70e6b434b93753
cd bins && (sha256sum -c checksums.sha256 || shasum -a 256 -c checksums.sha256) && cd ..
mkdir -p assets/macos/arm64 assets/macos/x86_64
cp -r bins/macos/arm64/. assets/macos/arm64/
cp -r bins/macos/x86_64/. assets/macos/x86_64/
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ Each release includes the **Flutter GUI** (`OpenROM`) and the **headless CLI** (
| WBFS | ISO | nodtool | Wii |
| GCZ | ISO | nodtool | GameCube / Wii |
| NKit | ISO | nkit | GameCube / Wii |
| WUD | ISO | nkit | Wii U |
| WUX | ISO | nkit | Wii U (compressed) |
| WUD | ISO, WUA | nkit | Wii U |
| WUX | ISO, WUA | nkit | Wii U (compressed) |
| WUA | ISO, WUD | nkit | Wii U (ZArchive) |
| ISO | NKit | nkit | GameCube / Wii |

---
Expand Down
5 changes: 5 additions & 0 deletions build_linux.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -e

if [ -d "bins" ]; then
echo "=== Verifying OpenROM-bins checksums ==="
(cd bins && sha256sum -c checksums.sha256)
fi

echo "=== Building OpenROM Core (Dart CLI) ==="
cd core
dart pub get
Expand Down
5 changes: 5 additions & 0 deletions build_mac.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -e

if [ -d "bins" ]; then
echo "=== Verifying OpenROM-bins checksums ==="
(cd bins && (sha256sum -c checksums.sha256 || shasum -a 256 -c checksums.sha256))
fi

echo "=== Building OpenROM Core (Dart CLI) ==="
cd core
dart pub get
Expand Down
12 changes: 12 additions & 0 deletions build_windows.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
@echo off
if exist bins (
echo === Verifying OpenROM-bins checksums ===
cd bins
powershell -Command "Get-Content checksums.sha256 | ForEach-Object { $line = $_; $parts = $line -split ' '; if ($parts.Length -eq 2) { $hash = $parts[0].Trim(); $file = $parts[1].Trim(); if (Test-Path $file) { $actual = (Get-FileHash -Algorithm SHA256 $file).Hash.ToLower(); if ($actual -ne $hash) { Write-Error 'Checksum mismatch'; throw 'Checksum error' } } } }"
if errorlevel 1 goto fail
cd ..
)
echo === Building OpenROM Core (Dart CLI) ===
cd core
call dart pub get
Expand All @@ -12,3 +19,8 @@ call flutter build windows --release
cd ..

echo === Build Complete ===

goto ok
:fail
call
:ok
5 changes: 3 additions & 2 deletions core/lib/src/converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ class Converter {
return _toXiso(job, src);
}

if ((['WUD', 'WUX', 'NKIT'].contains(fmt) && tgt == 'ISO') ||
if ((['WUD', 'WUX', 'NKIT', 'WUA'].contains(fmt) &&
['ISO', 'WUA', 'WUD'].contains(tgt)) ||
(fmt == 'ISO' && tgt == 'NKIT')) {
return _nkitConvert(job, src, tgt);
}
Expand Down Expand Up @@ -245,7 +246,7 @@ class Converter {
subCmd = 'createdvd';
} else {
final err =
'Error: Platform could not be detected. Please specify --media cd or --media dvd.';
"Unsupported or ambiguous media type for platform '$platform'. Please specify --media cd or --media dvd.";
_log('[ERROR] $err');
job.error = err;
return false;
Expand Down
12 changes: 10 additions & 2 deletions core/lib/src/detector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const Map<String, String> supportedInput = {
'.wbfs': 'WBFS',
'.wud': 'WUD',
'.wux': 'WUX',
'.wua': 'WUA',
'.nkit.iso': 'NKIT',
'.gcz': 'GCZ',
'.cci': 'CCI',
Expand All @@ -50,6 +51,7 @@ const Map<String, String> platformMap = {
'GCZ': 'GameCube / Wii',
'WUD': 'Wii U',
'WUX': 'Wii U',
'WUA': 'Wii U (ZArchive)',
'NKIT': 'GameCube / Wii',
'Saturn': 'Sega Saturn',
'Sega CD': 'Sega CD / Mega-CD',
Expand Down Expand Up @@ -77,6 +79,7 @@ const Map<String, String> formatColors = {
'GCZ': '#9fa8da',
'WUD': '#e65100',
'WUX': '#ef6c00',
'WUA': '#e65100',
'NKIT': '#1a237e',
'UNKNOWN': '#7a8a9a',
'Saturn': '#1565c0',
Expand All @@ -101,9 +104,10 @@ const Map<String, List<String>> conversionMap = {
'WIA': ['ISO'],
'WBFS': ['ISO'],
'GCZ': ['ISO'],
'WUD': ['ISO'],
'WUX': ['ISO'],
'WUD': ['ISO', 'WUA'],
'WUX': ['ISO', 'WUA'],
'NKIT': ['ISO'],
'WUA': ['ISO', 'WUD'],
'CCI': ['ISO'],
'ZAR': ['ISO'],
};
Expand Down Expand Up @@ -134,6 +138,10 @@ const Map<String, String> commandTemplates = {
'GCZ->ISO': 'nodtool convert "{in}" "{out}"',
'WUD->ISO': 'nkit convert -i "{in}" -o "{out}"',
'WUX->ISO': 'nkit convert -i "{in}" -o "{out}"',
'WUD->WUA': 'nkit convert -i "{in}" -o "{out}"',
'WUX->WUA': 'nkit convert -i "{in}" -o "{out}"',
'WUA->ISO': 'nkit convert -i "{in}" -o "{out}"',
'WUA->WUD': 'nkit convert -i "{in}" -o "{out}"',
'NKIT->ISO': 'nkit convert -i "{in}" -o "{out}"',
'ISO->NKIT': 'nkit convert -i "{in}" -o "{out}"',
'CCI->ISO': 'xgdtool --xiso "{in}" "{outdir}"',
Expand Down
22 changes: 20 additions & 2 deletions core/test/detector_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ import 'package:path/path.dart' as p;
import 'package:test/test.dart';

void main() {
test('wua_file_detection_and_targets', () {
final tmpDir = Directory.systemTemp.createTempSync('wua_test_');
try {
final wuaPath = p.join(tmpDir.path, 'game.wua');
File(wuaPath).writeAsBytesSync(List<int>.filled(100, 0));

final info = detectFile(wuaPath);
expect(info['format'], equals('WUA'));
expect(info['platform'], equals('Wii U (ZArchive)'));
expect(info['valid_targets'], equals(['ISO', 'WUD']));

final cmd = getCommandPreview('WUA', 'ISO', 'game.wua');
expect(cmd, equals('nkit convert -i "game.wua" -o "game.iso"'));
} finally {
tmpDir.deleteSync(recursive: true);
}
});

test('unknown_iso_platform_detection', () {
final tmpDir = Directory.systemTemp.createTempSync('unknown_iso_test_');
try {
Expand Down Expand Up @@ -205,7 +223,7 @@ void main() {
expect(
job.error,
equals(
'Error: Platform could not be detected. Please specify --media cd or --media dvd.',
"Unsupported or ambiguous media type for platform 'UNKNOWN'. Please specify --media cd or --media dvd.",
),
);
} finally {
Expand Down Expand Up @@ -270,7 +288,7 @@ void main() {
expect(
job.error,
equals(
'Error: Platform could not be detected. Please specify --media cd or --media dvd.',
"Unsupported or ambiguous media type for platform 'CustomConsoleX'. Please specify --media cd or --media dvd.",
),
);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion gui/lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
},
),
ChoiceChip(
label: const Text('Maximum Compression (Vorbis)'),
label: const Text('Max Compression (Vorbis)'),
selected: _selectedAudioCodec == 'vorbis',
selectedColor: theme.accent,
backgroundColor: theme.surface,
Expand Down
Loading