mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-17 14:38:10 +08:00
[vcpkg-export-ifw] Some improvements
Improvements: - fix typos; - remove outdated repository directory.
This commit is contained in:
parent
c6149fae2f
commit
d25fd5c7b3
@ -35,7 +35,7 @@ namespace vcpkg::Commands::Export::IFW
|
|||||||
|
|
||||||
fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths)
|
fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths)
|
||||||
{
|
{
|
||||||
return ifw_options.maybe_packages_dir_path.has_value() ?
|
return ifw_options.maybe_repository_dir_path.has_value() ?
|
||||||
fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO))
|
fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO))
|
||||||
: paths.root / (export_id + "-ifw-repository");
|
: paths.root / (export_id + "-ifw-repository");
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ namespace vcpkg::Commands::Export::IFW
|
|||||||
|
|
||||||
fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths)
|
fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths)
|
||||||
{
|
{
|
||||||
return ifw_options.maybe_config_file_path.has_value() ?
|
return ifw_options.maybe_installer_file_path.has_value() ?
|
||||||
fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO))
|
fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO))
|
||||||
: paths.root / (export_id + "-ifw-installer.exe");
|
: paths.root / (export_id + "-ifw-installer.exe");
|
||||||
}
|
}
|
||||||
@ -279,6 +279,15 @@ R"###(<?xml version="1.0"?>
|
|||||||
|
|
||||||
System::println("Generating repository %s...", repository_dir.generic_string());
|
System::println("Generating repository %s...", repository_dir.generic_string());
|
||||||
|
|
||||||
|
std::error_code ec;
|
||||||
|
Files::Filesystem& fs = paths.get_filesystem();
|
||||||
|
|
||||||
|
fs.remove_all(repository_dir, ec);
|
||||||
|
Checks::check_exit(VCPKG_LINE_INFO,
|
||||||
|
!ec,
|
||||||
|
"Could not remove outdated repository directory %s",
|
||||||
|
repository_dir.generic_string());
|
||||||
|
|
||||||
const std::wstring cmd_line =
|
const std::wstring cmd_line =
|
||||||
Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)",
|
Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)",
|
||||||
repogen_exe.native(),
|
repogen_exe.native(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user