allow different kernels for installation

pull/2/head
axtlos 2 years ago
parent 27a9511ff9
commit e866b31ec5

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" clip-rule="evenodd" d="M113.823 104.595c-1.795-1.478-3.629-2.921-5.308-4.525-1.87-1.785-3.045-3.944-2.789-6.678.147-1.573-.216-2.926-2.113-3.452.446-1.154.864-1.928 1.033-2.753.188-.92.178-1.887.204-2.834.264-9.96-3.334-18.691-8.663-26.835-2.454-3.748-5.017-7.429-7.633-11.066-4.092-5.688-5.559-12.078-5.633-18.981a47.564 47.564 0 00-1.081-9.475C80.527 11.956 77.291 7.233 71.422 4.7c-4.497-1.942-9.152-2.327-13.901-1.084-6.901 1.805-11.074 6.934-10.996 14.088.074 6.885.417 13.779.922 20.648.288 3.893-.312 7.252-2.895 10.34-2.484 2.969-4.706 6.172-6.858 9.397-1.229 1.844-2.317 3.853-3.077 5.931-2.07 5.663-3.973 11.373-7.276 16.5-1.224 1.9-1.363 4.026-.494 6.199.225.563.363 1.429.089 1.882-2.354 3.907-5.011 7.345-10.066 8.095-3.976.591-4.172 1.314-4.051 5.413.1 3.337.061 6.705-.28 10.021-.363 3.555.008 4.521 3.442 5.373 7.924 1.968 15.913 3.647 23.492 6.854 3.227 1.365 6.465.891 9.064-1.763 2.713-2.771 6.141-3.855 9.844-3.859 6.285-.005 12.572.298 18.86.369 1.702.02 2.679.653 3.364 2.199.84 1.893 2.26 3.284 4.445 3.526 4.193.462 8.013-.16 11.19-3.359 3.918-3.948 8.436-7.066 13.615-9.227 1.482-.619 2.878-1.592 4.103-2.648 2.231-1.922 2.113-3.146-.135-5zM62.426 24.12c.758-2.601 2.537-4.289 5.243-4.801 2.276-.43 4.203.688 5.639 3.246 1.546 2.758 2.054 5.64.734 8.658-1.083 2.474-1.591 2.707-4.123 1.868-.474-.157-.937-.343-1.777-.652.708-.594 1.154-1.035 1.664-1.382 1.134-.772 1.452-1.858 1.346-3.148-.139-1.694-1.471-3.194-2.837-3.175-1.225.017-2.262 1.167-2.4 2.915-.086 1.089.095 2.199.173 3.589-3.446-1.023-4.711-3.525-3.662-7.118zm-12.75-2.251c1.274-1.928 3.197-2.314 5.101-1.024 2.029 1.376 3.547 5.256 2.763 7.576-.285.844-1.127 1.5-1.716 2.241l-.604-.374c-.23-1.253-.276-2.585-.757-3.733-.304-.728-1.257-1.184-1.919-1.762-.622.739-1.693 1.443-1.757 2.228-.088 1.084.477 2.28.969 3.331.311.661 1.001 1.145 1.713 1.916l-1.922 1.51c-3.018-2.7-3.915-8.82-1.871-11.909zM87.34 86.075c-.203 2.604-.5 2.713-3.118 3.098-1.859.272-2.359.756-2.453 2.964a101.744 101.744 0 00-.012 7.753c.061 1.77-.537 3.158-1.755 4.393-6.764 6.856-14.845 10.105-24.512 8.926-4.17-.509-6.896-3.047-9.097-6.639.98-.363 1.705-.607 2.412-.894 3.122-1.27 3.706-3.955 1.213-6.277-1.884-1.757-3.986-3.283-6.007-4.892-1.954-1.555-3.934-3.078-5.891-4.629-1.668-1.323-2.305-3.028-2.345-5.188-.094-5.182.972-10.03 3.138-14.747 1.932-4.209 3.429-8.617 5.239-12.885.935-2.202 1.906-4.455 3.278-6.388 1.319-1.854 2.134-3.669 1.988-5.94-.084-1.276-.016-2.562-.016-3.843l.707-.352c1.141.985 2.302 1.949 3.423 2.959 4.045 3.646 7.892 3.813 12.319.67 1.888-1.341 3.93-2.47 5.927-3.652.497-.294 1.092-.423 1.934-.738 2.151 5.066 4.262 10.033 6.375 15 1.072 2.524 1.932 5.167 3.264 7.547 2.671 4.775 4.092 9.813 4.07 15.272-.012 2.83.137 5.67-.081 8.482z"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -25,6 +25,7 @@ class InstallPrefs {
final String crystalRoot;
final String unakiteEfiDir;
final String unakiteBootDev;
final String kernel;
InstallPrefs({
this.locale = const Location(),
@ -50,6 +51,7 @@ class InstallPrefs {
this.crystalRoot = "",
this.unakiteEfiDir = "",
this.unakiteBootDev = "",
this.kernel = "linux",
});
Map toJson() => {
@ -94,6 +96,7 @@ class InstallPrefs {
"oldroot": crystalRoot,
"efidir": unakiteEfiDir,
"bootdev": unakiteBootDev,
}
},
"kernel": kernel,
};
}

@ -38,6 +38,7 @@ Widget install(
String unakiteBootDev,
String unakiteEfiDir,
String crystalRoot,
String kernel,
setOutput,
output,
running,
@ -82,6 +83,7 @@ Widget install(
unakiteBootDev: unakiteBootDev,
unakiteEfiDir: unakiteEfiDir,
crystalRoot: crystalRoot,
kernel: kernel,
);
String jsonPrefs = jsonEncode(prefs.toJson());
//writeConfig(jsonPrefs);

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:adwaita_icons/adwaita_icons.dart';
import 'package:flutter_svg/svg.dart';
final _formKey = GlobalKey<FormState>();
RegExp hostnameRegex = RegExp(
@ -19,8 +20,16 @@ Widget misc(
confirmRootPass,
enableFlatpak,
setFlatpak,
setKernel,
String selectedKernel,
next) {
bool flatpak = true;
List<String> availableKernels = [
"linux",
"linux-lts",
"linux-zen",
"linux-hardened",
];
return Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -113,6 +122,7 @@ Widget misc(
padding: const EdgeInsets.fromLTRB(10, 10, 10, 13),
child: const Text(
'#',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
@ -282,6 +292,62 @@ Widget misc(
),
),
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
border: Border.all(color: Colors.black45),
color: const Color.fromARGB(100, 30, 30, 30),
),
child: Tooltip(
message: "Installs a different kernel",
child: Row(
children: [
const SizedBox(width: 15),
Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
),
padding: const EdgeInsets.fromLTRB(10, 10, 10, 13),
child:
SvgPicture.asset(
'assets/tux_monochrome.svg',
color: Colors.black,
height: 25,
width: 25,
),
),
const SizedBox(width: 15),
const Text('Kernel to install',
style: TextStyle(color: Colors.white, fontSize: 17)),
const Spacer(),
DropdownButton(
icon: const Icon(Icons.arrow_downward),
elevation: 16,
style: const TextStyle(color: Colors.deepPurple),
dropdownColor: const Color.fromARGB(255, 23, 23, 23),
underline: Container(
height: 2,
color: Colors.deepPurpleAccent,
),
value: selectedKernel,
onChanged: (String? value) {
setKernel(value);
},
items: availableKernels.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value,
style: const TextStyle(color: Colors.white)),
);
}).toList(),
),
],
),
),
),
const SizedBox(height: 10),
],
),
),

@ -170,6 +170,7 @@ class _JadeguiState extends State<Jadegui> {
String unakiteBootDev = "";
String ip = "";
String key = "";
String selectedKernel = "linux";
Desktop currDesktop = desktops[0];
Keymap chosenLayout = Keymap();
List<Partition> partitions = [];
@ -619,6 +620,12 @@ class _JadeguiState extends State<Jadegui> {
writeToLog("Enable flatpak: $enableFlatpak");
});
},
(value) {
setState(() {
selectedKernel = value;
});
},
selectedKernel,
() {
setState(() {
_selectedIndex = _selectedIndex + 1;

@ -98,12 +98,12 @@ packages:
source: hosted
version: "1.0.4"
flutter_svg:
dependency: transitive
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.1.0"
flutter_test:
dependency: "direct dev"
description: flutter
@ -220,7 +220,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
version: "5.0.0"
platform:
dependency: transitive
description:
@ -360,7 +360,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
version: "6.1.0"
yaml:
dependency: transitive
description:
@ -369,5 +369,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.8.0"
dart: ">=2.17.0 <3.0.0"
flutter: ">=2.11.0-0.1.pre"

@ -44,6 +44,7 @@ dependencies:
adwaita_icons: ^0.2.1
qr_flutter: ^4.0.0
open_url: ^2.0.0
flutter_svg: ^1.1.0
dev_dependencies:

Loading…
Cancel
Save