Select the installed language pack when launching MoonWell
Pass WOW_LOCALE=auto alongside the selected Data directory so inherited locale settings cannot override an installed ruRU pack. Keep language archives in the regular manifest download and verification flow. Document the contract and prepare launcher version 1.0.7+10 for the localization release. Verified on Windows through FVM: full format check and flutter analyze passed; all 76 Flutter tests passed, including manifest retention and verification of Russian archives and the game's child environment. No macOS build was run.
This commit is contained in:
@@ -421,6 +421,7 @@ void main() {
|
||||
'WOW_PASS': 'A1B2C3D4E5F6G7H8',
|
||||
'WOW_HOST': '127.0.0.1:3724',
|
||||
'WOW_DATA': '${rootDirectory.path}${Platform.pathSeparator}Data',
|
||||
'WOW_LOCALE': 'auto',
|
||||
'BENILLA_HOME':
|
||||
'${rootDirectory.path}${Platform.pathSeparator}benilla-config',
|
||||
});
|
||||
@@ -479,6 +480,46 @@ void main() {
|
||||
expect(recordingService.environment?['WOW_DATA'], nestedData.path);
|
||||
});
|
||||
|
||||
test('verifies and retains Russian archives before launching', () async {
|
||||
final paths = [
|
||||
'MoonWell.exe',
|
||||
'Data/common.MPQ',
|
||||
'Data/ruRU/patch-1.MPQ',
|
||||
'Data/ruRU/patch-2.MPQ',
|
||||
'Data/ruRU/patch-3.MPQ',
|
||||
];
|
||||
for (final path in paths.skip(2)) {
|
||||
final file = File(service.resolveClientPath(rootDirectory.path, path));
|
||||
await file.parent.create(recursive: true);
|
||||
await file.writeAsString('localized archive: $path');
|
||||
}
|
||||
final manifest = await _manifestForPaths(service, rootDirectory, paths);
|
||||
final snapshot = await service.scanInstallation(
|
||||
rootDirectory.path,
|
||||
manifest: manifest,
|
||||
);
|
||||
expect(snapshot.buildHash, manifest.buildHash);
|
||||
expect(snapshot.stalePaths, isEmpty);
|
||||
final recordingService = _RecordingGameInstallationService();
|
||||
await recordingService.launchGame(
|
||||
rootDirectory.path,
|
||||
authorization: _validTicket(),
|
||||
);
|
||||
expect(recordingService.environment?['WOW_LOCALE'], 'auto');
|
||||
expect(
|
||||
recordingService.environment?['WOW_DATA'],
|
||||
'${rootDirectory.path}${Platform.pathSeparator}Data',
|
||||
);
|
||||
for (final path in paths.skip(2)) {
|
||||
expect(
|
||||
await File(
|
||||
service.resolveClientPath(rootDirectory.path, path),
|
||||
).readAsString(),
|
||||
'localized archive: $path',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('configured auth address overrides the install realmlist', () async {
|
||||
final configured = _RecordingGameInstallationService(
|
||||
authAddress: 'login.example:3725',
|
||||
|
||||
Reference in New Issue
Block a user