feat(install,ide): self-extracting installers and install tasks
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 8s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 11s

This commit is contained in:
faumaray committed 2026-12-05 03:45:09 +03:00
1 parent 83ec08390f
commit d23a878eec
9 files changed
+232 -5

No files matched your search

+22 -1
View File
@@ -1668,8 +1668,11 @@ struct InstallCmdOptions {
std::optional<std::string> pkg_name_arg;
std::string pkg_ver{"0.1.0"};
std::optional<std::string> component_arg;
std::optional<std::string> archive_arg;
std::string archive_format_arg{"tar"};
bool no_cmake_export{false};
bool no_native_export{false};
bool bundle_dependencies{false};
};
int execute_install_command(const InstallCmdOptions &opts) {
@@ -1698,6 +1701,16 @@ int execute_install_command(const InstallCmdOptions &opts) {
iopts.component = opts.component_arg;
iopts.export_cmake_config = !opts.no_cmake_export;
iopts.export_native_metadata = !opts.no_native_export;
iopts.bundle_runtime_dependencies = opts.bundle_dependencies;
if (opts.archive_format_arg != "tar" && opts.archive_format_arg != "sh") {
std::cerr << "vbs install: unsupported --archive-format '"
<< opts.archive_format_arg << "' (expected tar or sh)\n";
return 2;
}
if (opts.archive_arg && !opts.archive_arg->empty()) {
iopts.archive_path = std::filesystem::path{*opts.archive_arg};
iopts.archive_as_script = opts.archive_format_arg == "sh";
}
std::error_code ec;
if (opts.pkg_name_arg && !opts.pkg_name_arg->empty()) {
@@ -2827,7 +2840,15 @@ int main(int argc, char **argv) {
.flag("--no-cmake-export", "", "Disable CMake Config.cmake export",
install_opts.no_cmake_export)
.flag("--no-native-export", "", "Disable native VBS package metadata export",
install_opts.no_native_export);
install_opts.no_native_export)
.flag("--bundle-dependencies", "",
"Bundle runtime shared libraries of installed targets into <prefix>/lib",
install_opts.bundle_dependencies)
.option("--archive", "", "Write a deterministic installer archive of the prefix",
install_opts.archive_arg)
.option_default("--archive-format", "",
"Installer archive format: tar (default) or sh (self-extracting)",
install_opts.archive_format_arg, "tar");
add_log_flags(install_cmd);
auto &uninstall_cmd =