|
|
@ -11,8 +11,8 @@ test(setOutput, running, setRunning, config, writeToLog) async {
|
|
|
|
await File(filename).writeAsString(config);
|
|
|
|
await File(filename).writeAsString(config);
|
|
|
|
writeToLog("Json config: $config");
|
|
|
|
writeToLog("Json config: $config");
|
|
|
|
var process =
|
|
|
|
var process =
|
|
|
|
await Process.start('pkexec', ['/opt/jade_gui/scripts/jadewrapper.sh']);
|
|
|
|
//await Process.start('pkexec', ['/opt/jade_gui/scripts/jadewrapper.sh']);
|
|
|
|
//await Process.start('/opt/jade_gui/scripts/jadeemu.sh', []);
|
|
|
|
await Process.start('/opt/jade_gui/scripts/jadeemu.sh', []);
|
|
|
|
process.stdout.transform(utf8.decoder).forEach(setOutput);
|
|
|
|
process.stdout.transform(utf8.decoder).forEach(setOutput);
|
|
|
|
setRunning(true);
|
|
|
|
setRunning(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,14 +75,30 @@ Widget install(
|
|
|
|
test(setOutput, running, setRunning, jsonPrefs, writeToLog);
|
|
|
|
test(setOutput, running, setRunning, jsonPrefs, writeToLog);
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Row(
|
|
|
|
output.toString().contains("Installation finished! You may reboot now!")
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
? "Installed!"
|
|
|
|
children: [
|
|
|
|
: "Installing...",
|
|
|
|
Image(
|
|
|
|
style: const TextStyle(
|
|
|
|
image: output
|
|
|
|
fontSize: 50,
|
|
|
|
.toString()
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
.contains("Installation finished! You may reboot now!")
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255)),
|
|
|
|
? const AssetImage("assets/success.png")
|
|
|
|
|
|
|
|
: const AssetImage("assets/loadanim.gif"),
|
|
|
|
|
|
|
|
width: 50,
|
|
|
|
|
|
|
|
height: 50,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
output
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
.contains("Installation finished! You may reboot now!")
|
|
|
|
|
|
|
|
? "Installed!"
|
|
|
|
|
|
|
|
: " Installing...",
|
|
|
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
|
|
|
fontSize: 50,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 20,
|
|
|
|
height: 20,
|
|
|
|