MCSI-4 feat: generate eula file and set eula=true
This commit is contained in:
parent
a9ca80dae0
commit
5df2f06394
@ -39,6 +39,8 @@ class InstallationBloc extends Bloc<InstallationEvent, InstallationState> {
|
||||
await writeFileUseCase(startScriptFilePath, startScriptContent);
|
||||
await grantFilePermissionUseCase(startScriptFilePath);
|
||||
|
||||
await writeFileUseCase(path.join(savePath, Constants.eulaFileName), Constants.eulaFileContent);
|
||||
|
||||
emit(state.copyWith(isLocked: false, downloadProgress: const ProgressViewModel.complete()));
|
||||
});
|
||||
|
||||
|
@ -3,6 +3,9 @@ import 'dart:io';
|
||||
abstract class Constants {
|
||||
static const gameVersionListUrl = 'https://www.dropbox.com/s/mtz3moc9dpjtz7s/GameVersions.txt?dl=1';
|
||||
static const serverFileName = 'server.jar';
|
||||
static const eulaFileName = 'eula.txt';
|
||||
static const eulaFileContent =
|
||||
'#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\neula=true';
|
||||
|
||||
static final startScriptFileName = Platform.isWindows ? 'start.bat' : 'start.sh';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user