mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 05:52:23 +08:00
🚧 chwd: remove obsolete flags
Some checks failed
Build / Build with CMake (push) Has been cancelled
Build / Build with CMake (DEVENV OFF) (push) Has been cancelled
Build / Build with Meson (push) Has been cancelled
Build / Build with Meson (DEVENV OFF) (push) Has been cancelled
Checks / cpp-linter (push) Has been cancelled
Checks / Check C++ style (push) Has been cancelled
Some checks failed
Build / Build with CMake (push) Has been cancelled
Build / Build with CMake (DEVENV OFF) (push) Has been cancelled
Build / Build with Meson (push) Has been cancelled
Build / Build with Meson (DEVENV OFF) (push) Has been cancelled
Checks / cpp-linter (push) Has been cancelled
Checks / Check C++ style (push) Has been cancelled
This commit is contained in:
parent
4c613309d8
commit
f054a1d629
13
Vagrantfile
vendored
13
Vagrantfile
vendored
@ -70,10 +70,10 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = false
|
||||
|
||||
|
||||
# Customize the amount of CPUs on the VM:
|
||||
vb.cpus = "4"
|
||||
|
||||
|
||||
# Customize the amount of memory on the VM:
|
||||
vb.memory = "6144"
|
||||
|
||||
@ -102,9 +102,9 @@ Vagrant.configure("2") do |config|
|
||||
export NM=llvm-nm
|
||||
export RANLIB=llvm-ranlib
|
||||
|
||||
wget https://raw.githubusercontent.com/CachyOS/CachyOS-CLI-ISO/master/archiso/airootfs/etc/pacman-more.conf
|
||||
mv pacman-more.conf /etc/
|
||||
|
||||
#wget https://raw.githubusercontent.com/CachyOS/CachyOS-CLI-ISO/master/archiso/airootfs/etc/pacman-more.conf
|
||||
#mv pacman-more.conf /etc/
|
||||
|
||||
cat << EOF > settings.json
|
||||
{
|
||||
"menus": 1,
|
||||
@ -121,8 +121,7 @@ Vagrant.configure("2") do |config|
|
||||
"root_pass": "secure",
|
||||
"kernel": "linux-cachyos",
|
||||
"desktop": "kde",
|
||||
"bootloader": "systemd-boot",
|
||||
"drivers_type": "free"
|
||||
"bootloader": "systemd-boot"
|
||||
}
|
||||
EOF
|
||||
|
||||
|
@ -321,21 +321,6 @@ Example configuration:
|
||||
"bootloader": "systemd-boot"
|
||||
```
|
||||
---
|
||||
### `drivers_type`
|
||||
|
||||
This will detect drivers automatically and install them.
|
||||
|
||||
Valid types:
|
||||
* `nonfree`
|
||||
* `free`
|
||||
|
||||
Defaults to `free`.
|
||||
|
||||
Example configuration:
|
||||
```json
|
||||
"drivers_type": "free"
|
||||
```
|
||||
---
|
||||
### `post_install`
|
||||
|
||||
This will be launched after install is done.
|
||||
|
@ -28,6 +28,5 @@
|
||||
"root_pass": "secure",
|
||||
"kernel": "linux-cachyos",
|
||||
"desktop": "kde",
|
||||
"bootloader": "systemd-boot",
|
||||
"drivers_type": "free"
|
||||
"bootloader": "systemd-boot"
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ bool Config::initialize() noexcept {
|
||||
s_config->m_data["HEADLESS_MODE"] = 0;
|
||||
s_config->m_data["SERVER_MODE"] = 0;
|
||||
s_config->m_data["GRAPHIC_CARD"] = "";
|
||||
s_config->m_data["DRIVERS_TYPE"] = "free";
|
||||
}
|
||||
|
||||
return s_config.get();
|
||||
|
@ -54,11 +54,11 @@ void setup_graphics_card() noexcept {
|
||||
const auto& cachepath = std::get<std::string>(config_data["cachepath"]);
|
||||
|
||||
#ifdef NDEVENV
|
||||
const auto& cmd_formatted = fmt::format(FMT_COMPILE("chwd --pmcachedir \"{}\" --pmroot {} -f -i pci {} 2>>/tmp/cachyos-install.log 2>&1"), cachepath, mountpoint, driver);
|
||||
const auto& cmd_formatted = fmt::format(FMT_COMPILE("chwd --pmcachedir \"{}\" --pmroot {} -f -i {} 2>>/tmp/cachyos-install.log 2>&1"), cachepath, mountpoint, driver);
|
||||
tui::detail::follow_process_log_widget({"/bin/sh", "-c", cmd_formatted});
|
||||
std::ofstream{fmt::format(FMT_COMPILE("{}/.video_installed"), mountpoint)};
|
||||
#else
|
||||
spdlog::debug("chwd --pmcachedir \"{}\" --pmroot {} -f -i pci {} 2>>/tmp/cachyos-install.log 2>&1", cachepath, mountpoint, driver);
|
||||
spdlog::debug("chwd --pmcachedir \"{}\" --pmroot {} -f -i {} 2>>/tmp/cachyos-install.log 2>&1", cachepath, mountpoint, driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ void install_graphics_menu() noexcept {
|
||||
switch (selected) {
|
||||
#ifdef NDEVENV
|
||||
case 0:
|
||||
utils::arch_chroot("chwd --autoconfigure"sv);
|
||||
utils::arch_chroot("chwd -a"sv);
|
||||
std::ofstream{fmt::format(FMT_COMPILE("{}/.video_installed"), mountpoint)}; // NOLINT
|
||||
break;
|
||||
#endif
|
||||
|
@ -50,7 +50,6 @@ struct UserSelections {
|
||||
std::string root_pass;
|
||||
std::string kernel;
|
||||
std::string desktop;
|
||||
std::string drivers_type;
|
||||
std::string post_install;
|
||||
std::string mount_options;
|
||||
std::vector<std::string> ready_partitions;
|
||||
@ -401,7 +400,6 @@ UserSelections gather_user_selections() noexcept {
|
||||
const auto& kernel = std::get<std::string>(config_data["KERNEL"]);
|
||||
const auto& desktop = std::get<std::string>(config_data["DE"]);
|
||||
auto& bootloader = std::get<std::string>(config_data["BOOTLOADER"]);
|
||||
const auto& drivers_type = std::get<std::string>(config_data["DRIVERS_TYPE"]);
|
||||
const auto& post_install = std::get<std::string>(config_data["POST_INSTALL"]);
|
||||
const auto& server_mode = std::get<std::int32_t>(config_data["SERVER_MODE"]);
|
||||
|
||||
@ -474,7 +472,6 @@ UserSelections gather_user_selections() noexcept {
|
||||
|
||||
selections.kernel = kernel;
|
||||
selections.desktop = desktop;
|
||||
selections.drivers_type = drivers_type;
|
||||
selections.post_install = post_install;
|
||||
selections.server_mode = server_mode != 0;
|
||||
selections.mount_options = mount_opts_info;
|
||||
@ -573,7 +570,7 @@ void apply_user_selections(const UserSelections& selections) noexcept {
|
||||
|
||||
#ifdef NDEVENV
|
||||
if (!selections.server_mode) {
|
||||
utils::arch_chroot(fmt::format(FMT_COMPILE("chwd -a pci {} 0300"), selections.drivers_type));
|
||||
utils::arch_chroot("chwd -a");
|
||||
std::ofstream{fmt::format(FMT_COMPILE("{}/.video_installed"), mountpoint)};
|
||||
}
|
||||
#endif
|
||||
@ -601,16 +598,14 @@ void apply_user_selections(const UserSelections& selections) noexcept {
|
||||
fmt::format(FMT_COMPILE("Filesystem: {}"), selections.filesystem),
|
||||
fmt::format(FMT_COMPILE("Filesystem opts: {}"), selections.mount_options), 80);
|
||||
|
||||
fmt::print("┌{0:─^{5}}┐\n"
|
||||
"│{1: ^{5}}│\n"
|
||||
"│{2: ^{5}}│\n"
|
||||
"│{3: ^{5}}│\n"
|
||||
"│{4: ^{5}}│\n"
|
||||
"└{0:─^{5}}┘\n",
|
||||
fmt::print("┌{0:─^{4}}┐\n"
|
||||
"│{1: ^{4}}│\n"
|
||||
"│{2: ^{4}}│\n"
|
||||
"│{3: ^{4}}│\n"
|
||||
"└{0:─^{4}}┘\n",
|
||||
"",
|
||||
fmt::format(FMT_COMPILE("Kernel: {}"), selections.kernel),
|
||||
fmt::format(FMT_COMPILE("Desktop: {}"), (!selections.server_mode) ? selections.desktop : "---"),
|
||||
fmt::format(FMT_COMPILE("Drivers type: {}"), selections.drivers_type),
|
||||
fmt::format(FMT_COMPILE("Bootloader: {}"), selections.bootloader), 80);
|
||||
}
|
||||
|
||||
|
@ -1972,19 +1972,6 @@ bool parse_config() noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string drivers_type{"free"};
|
||||
if (doc.HasMember("drivers_type")) {
|
||||
assert(doc["drivers_type"].IsString());
|
||||
drivers_type = doc["drivers_type"].GetString();
|
||||
|
||||
if (drivers_type != "nonfree"sv && drivers_type != "free"sv) {
|
||||
spdlog::error("Unknown value: {}!", drivers_type);
|
||||
drivers_type = "free";
|
||||
}
|
||||
}
|
||||
|
||||
config_data["DRIVERS_TYPE"] = drivers_type;
|
||||
|
||||
if (doc.HasMember("post_install")) {
|
||||
assert(doc["post_install"].IsString());
|
||||
config_data["POST_INSTALL"] = std::string{doc["post_install"].GetString()};
|
||||
|
Loading…
Reference in New Issue
Block a user