|
|
@ -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,8 +75,22 @@ Widget install(
|
|
|
|
test(setOutput, running, setRunning, jsonPrefs, writeToLog);
|
|
|
|
test(setOutput, running, setRunning, jsonPrefs, writeToLog);
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Image(
|
|
|
|
|
|
|
|
image: output
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
.contains("Installation finished! You may reboot now!")
|
|
|
|
|
|
|
|
? const AssetImage("assets/success.png")
|
|
|
|
|
|
|
|
: const AssetImage("assets/loadanim.gif"),
|
|
|
|
|
|
|
|
width: 50,
|
|
|
|
|
|
|
|
height: 50,
|
|
|
|
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
output.toString().contains("Installation finished! You may reboot now!")
|
|
|
|
output
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
.contains("Installation finished! You may reboot now!")
|
|
|
|
? "Installed!"
|
|
|
|
? "Installed!"
|
|
|
|
: " Installing...",
|
|
|
|
: " Installing...",
|
|
|
|
style: const TextStyle(
|
|
|
|
style: const TextStyle(
|
|
|
@ -84,6 +98,8 @@ Widget install(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255)),
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 20,
|
|
|
|
height: 20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|