|
|
|
@ -5,9 +5,15 @@ import 'package:jade_gui/classes/location.dart';
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
test(setOutput) async {
|
|
|
|
|
var process = await Process.start('./scripts/jadeemu.sh', []);
|
|
|
|
|
process.stdout.transform(utf8.decoder).forEach(setOutput);
|
|
|
|
|
test(setOutput, running, setRunning, config) async {
|
|
|
|
|
if (!running) {
|
|
|
|
|
const filename = "/tmp/jade.json";
|
|
|
|
|
var file = await File(filename).writeAsString(config);
|
|
|
|
|
var process =
|
|
|
|
|
await Process.start('pkexec', ['jade', 'config', '/tmp/jade.json']);
|
|
|
|
|
process.stdout.transform(utf8.decoder).forEach(setOutput);
|
|
|
|
|
setRunning(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget install(
|
|
|
|
@ -27,8 +33,9 @@ Widget install(
|
|
|
|
|
bool enableTimeshift,
|
|
|
|
|
setOutput,
|
|
|
|
|
output,
|
|
|
|
|
running,
|
|
|
|
|
setRunning,
|
|
|
|
|
) {
|
|
|
|
|
test(setOutput);
|
|
|
|
|
installPrefs prefs = installPrefs(
|
|
|
|
|
locale: locale,
|
|
|
|
|
keymap: keymap,
|
|
|
|
@ -46,7 +53,8 @@ Widget install(
|
|
|
|
|
enableTimeshift: enableTimeshift,
|
|
|
|
|
);
|
|
|
|
|
String jsonPrefs = jsonEncode(prefs.toJson());
|
|
|
|
|
print(jsonPrefs);
|
|
|
|
|
//writeConfig(jsonPrefs);
|
|
|
|
|
test(setOutput, running, setRunning, jsonPrefs);
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
const Text(
|
|
|
|
@ -59,11 +67,53 @@ Widget install(
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Text(output,
|
|
|
|
|
const SizedBox(width: 40),
|
|
|
|
|
Container(
|
|
|
|
|
width: 1000,
|
|
|
|
|
height: 500,
|
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
border: Border.all(color: Colors.black),
|
|
|
|
|
color: Color.fromARGB(255, 15, 15, 15),
|
|
|
|
|
//color: Colors.black,
|
|
|
|
|
/*boxShadow: const [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
blurRadius: 2,
|
|
|
|
|
offset: Offset(-2, 3),
|
|
|
|
|
),
|
|
|
|
|
]*/
|
|
|
|
|
),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
reverse: true,
|
|
|
|
|
child: Text(
|
|
|
|
|
output,
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255),
|
|
|
|
|
)),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontFamily: 'Monospace',
|
|
|
|
|
fontWeight: FontWeight.w100,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
|
Text(
|
|
|
|
|
"This may take a while...",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
"Please do not close this window until the installation is finished.",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color.fromARGB(255, 169, 0, 255),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|