From ba0cc3f1d7edb7e2fee271761b2f37d0c740604f Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Mon, 28 Aug 2017 13:54:19 +0300 Subject: WIP: Export IFW Add export to binary crossplatform repository/installer with GUI based on QtIFW: http://doc.qt.io/qtinstallerframework/ifw-overview.html For correct operation of these changes, you must use the corrected QtIFW: https://codereview.qt-project.org/#/c/203958 --- toolsrc/src/commands_export.cpp | 57 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 7 deletions(-) (limited to 'toolsrc/src/commands_export.cpp') diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index b416a6f3c..139f19026 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -2,6 +2,7 @@ #include "Paragraphs.h" #include "vcpkg_Commands.h" +#include "vcpkg_Commands_Export_IFW.h" #include "vcpkg_Dependencies.h" #include "vcpkg_Input.h" #include "vcpkg_System.h" @@ -215,10 +216,12 @@ namespace vcpkg::Commands::Export static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_RAW = "--raw"; static const std::string OPTION_NUGET = "--nuget"; + static const std::string OPTION_IFW = "--ifw"; static const std::string OPTION_ZIP = "--zip"; static const std::string OPTION_SEVEN_ZIP = "--7zip"; static const std::string OPTION_NUGET_ID = "--nuget-id"; static const std::string OPTION_NUGET_VERSION = "--nuget-version"; + static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; // input sanitization static const std::string EXAMPLE = @@ -236,22 +239,25 @@ namespace vcpkg::Commands::Export OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, + OPTION_IFW, OPTION_ZIP, OPTION_SEVEN_ZIP, }, { OPTION_NUGET_ID, OPTION_NUGET_VERSION, + OPTION_IFW_REPOSITORY_URL, }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); + const bool ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); const bool seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); - if (!raw && !nuget && !zip && !seven_zip && !dry_run) + if (!raw && !nuget && !ifw && !zip && !seven_zip && !dry_run) { - System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip"); + System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -263,6 +269,10 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); + auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + + Checks::check_exit(VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + // create the plan const StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); @@ -305,7 +315,11 @@ namespace vcpkg::Commands::Export Checks::exit_success(VCPKG_LINE_INFO); } - const std::string export_id = create_export_id(); + std::string export_id = create_export_id(); + if (ifw) + { + export_id = "vcpkg-export"; // TODO: Remove after debugging + } Files::Filesystem& fs = paths.get_filesystem(); const fs::path export_to_path = paths.root; @@ -315,6 +329,8 @@ namespace vcpkg::Commands::Export fs.create_directory(raw_exported_dir_path, ec); // execute the plan + std::map unique_packages; + std::set unique_triplets; for (const ExportPlanAction& action : export_plan) { if (action.plan_type != ExportPlanType::ALREADY_BUILT) @@ -327,10 +343,21 @@ namespace vcpkg::Commands::Export const BinaryParagraph& binary_paragraph = action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + unique_packages[action.spec.name()] = &action; + unique_triplets.insert(action.spec.triplet().canonical_name()); + + fs::path spec_exported_dir_path = raw_exported_dir_path / "installed"; + if (ifw) + { + // Export real package and return data dir for installation + spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); + } + const InstallDir dirs = InstallDir::from_destination_root( - raw_exported_dir_path / "installed", + spec_exported_dir_path, action.spec.triplet().to_string(), - raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + spec_exported_dir_path / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); System::println(System::Color::success, "Exporting package %s... done", display_name); @@ -351,13 +378,29 @@ namespace vcpkg::Commands::Export for (const fs::path& file : integration_files_relative_to_root) { const fs::path source = paths.root / file; - const fs::path destination = raw_exported_dir_path / file; + fs::path destination = raw_exported_dir_path / file; + if (ifw) + { + destination = raw_exported_dir_path / "integration" / "data" / file; + } fs.create_directories(destination.parent_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, !ec); fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); Checks::check_exit(VCPKG_LINE_INFO, !ec); } + if (ifw) + { + // Unigue packages + IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); + // Unigue triplets + IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); + // Integration + IFW::export_integration(raw_exported_dir_path, fs); + // Configuration + IFW::export_config(raw_exported_dir_path, maybe_ifw_repository_url.value_or(""), fs); + } + const auto print_next_step_info = [](const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; const CMakeVariable cmake_variable = @@ -417,7 +460,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console print_next_step_info("[...]"); } - if (!raw) + if (!raw && !ifw) { fs.remove_all(raw_exported_dir_path, ec); } -- cgit v1.2.3 From 5199507a5892ab997b1beee2f1b7d2a6c7e75115 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Sep 2017 02:27:00 -0700 Subject: [vcpkg-export-ifw] Use template approach for xml instead of line-by-line --- toolsrc/src/commands_export.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'toolsrc/src/commands_export.cpp') diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 139f19026..c143fb9c7 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -257,7 +257,8 @@ namespace vcpkg::Commands::Export if (!raw && !nuget && !ifw && !zip && !seven_zip && !dry_run) { - System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); + System::println(System::Color::error, + "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -271,7 +272,8 @@ namespace vcpkg::Commands::Export auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); - Checks::check_exit(VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + Checks::check_exit( + VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); // create the plan const StatusParagraphs status_db = database_load_check(paths); @@ -354,10 +356,10 @@ namespace vcpkg::Commands::Export spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); } - const InstallDir dirs = InstallDir::from_destination_root( - spec_exported_dir_path, - action.spec.triplet().to_string(), - spec_exported_dir_path / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + const InstallDir dirs = InstallDir::from_destination_root(spec_exported_dir_path, + action.spec.triplet().to_string(), + spec_exported_dir_path / "vcpkg" / "info" / + (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); System::println(System::Color::success, "Exporting package %s... done", display_name); @@ -391,9 +393,9 @@ namespace vcpkg::Commands::Export if (ifw) { - // Unigue packages + // Unique packages IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); - // Unigue triplets + // Unique triplets IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); // Integration IFW::export_integration(raw_exported_dir_path, fs); -- cgit v1.2.3 From 68b9c2d8b9119acb48643447a7561a5c2b733d25 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 22 Sep 2017 02:16:14 +0300 Subject: [vcpkg-export-ifw] Separate IFW loop Separate IFW loop compatible with main export loop Fixed mistakes in templates Set current date to ReleaseDate tag --- toolsrc/src/commands_export.cpp | 253 ++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 125 deletions(-) (limited to 'toolsrc/src/commands_export.cpp') diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index c143fb9c7..6632dfe67 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -211,6 +211,32 @@ namespace vcpkg::Commands::Export return nullopt; } + void export_integration_files(const fs::path &raw_exported_dir_path, const VcpkgPaths& paths) + { + const std::vector integration_files_relative_to_root = { + { ".vcpkg-root" }, + { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "applocal.ps1" }, + { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "vcpkg.targets" }, + { fs::path{ "scripts" } / "buildsystems" / "vcpkg.cmake" }, + { fs::path{ "scripts" } / "cmake" / "vcpkg_get_windows_sdk.cmake" }, + { fs::path{ "scripts" } / "getWindowsSDK.ps1" }, + { fs::path{ "scripts" } / "getProgramFilesPlatformBitness.ps1" }, + { fs::path{ "scripts" } / "getProgramFiles32bit.ps1" }, + }; + + for (const fs::path& file : integration_files_relative_to_root) + { + const fs::path source = paths.root / file; + fs::path destination = raw_exported_dir_path / file; + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.create_directories(destination.parent_path(), ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + } + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -222,6 +248,8 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET_ID = "--nuget-id"; static const std::string OPTION_NUGET_VERSION = "--nuget-version"; static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; // input sanitization static const std::string EXAMPLE = @@ -247,6 +275,8 @@ namespace vcpkg::Commands::Export OPTION_NUGET_ID, OPTION_NUGET_VERSION, OPTION_IFW_REPOSITORY_URL, + OPTION_IFW_PACKAGES_DIR_PATH, + OPTION_IFW_CONFIG_FILE_PATH }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -270,10 +300,19 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); - auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + IFW::Options ifw_options; + + ifw_options.maybe_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + + ifw_options.maybe_packages_dir_path = maybe_lookup(options.settings, OPTION_IFW_PACKAGES_DIR_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_packages_dir_path || ifw, "--ifw-packages-directory-path is only valid with --ifw"); + ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); Checks::check_exit( - VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + VCPKG_LINE_INFO, !ifw_options.maybe_config_file_path || ifw, "--ifw-configuration-file-path is only valid with --ifw"); // create the plan const StatusParagraphs status_db = database_load_check(paths); @@ -318,153 +357,117 @@ namespace vcpkg::Commands::Export } std::string export_id = create_export_id(); - if (ifw) - { - export_id = "vcpkg-export"; // TODO: Remove after debugging - } - Files::Filesystem& fs = paths.get_filesystem(); - const fs::path export_to_path = paths.root; - const fs::path raw_exported_dir_path = export_to_path / export_id; - std::error_code ec; - fs.remove_all(raw_exported_dir_path, ec); - fs.create_directory(raw_exported_dir_path, ec); + const auto print_next_step_info = [](const fs::path& prefix) { + const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; + const CMakeVariable cmake_variable = + CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + System::println("\n" + "To use the exported libraries in CMake projects use:" + "\n" + " %s" + "\n", + Strings::to_utf8(cmake_variable.s)); + }; - // execute the plan - std::map unique_packages; - std::set unique_triplets; - for (const ExportPlanAction& action : export_plan) + // Main loop + if (raw || nuget || zip || seven_zip) { - if (action.plan_type != ExportPlanType::ALREADY_BUILT) + Files::Filesystem& fs = paths.get_filesystem(); + const fs::path export_to_path = paths.root; + const fs::path raw_exported_dir_path = export_to_path / export_id; + std::error_code ec; + fs.remove_all(raw_exported_dir_path, ec); + fs.create_directory(raw_exported_dir_path, ec); + + // execute the plan + for (const ExportPlanAction& action : export_plan) { - Checks::unreachable(VCPKG_LINE_INFO); - } + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - unique_packages[action.spec.name()] = &action; - unique_triplets.insert(action.spec.triplet().canonical_name()); + const InstallDir dirs = InstallDir::from_destination_root( + raw_exported_dir_path / "installed", + action.spec.triplet().to_string(), + raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); - fs::path spec_exported_dir_path = raw_exported_dir_path / "installed"; - if (ifw) - { - // Export real package and return data dir for installation - spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println(System::Color::success, "Exporting package %s... done", display_name); } - const InstallDir dirs = InstallDir::from_destination_root(spec_exported_dir_path, - action.spec.triplet().to_string(), - spec_exported_dir_path / "vcpkg" / "info" / - (binary_paragraph.fullstem() + ".list")); - - Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); - } - - // Copy files needed for integration - const std::vector integration_files_relative_to_root = { - {".vcpkg-root"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, - {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, - {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, - }; + // Copy files needed for integration + export_integration_files(raw_exported_dir_path, paths); - for (const fs::path& file : integration_files_relative_to_root) - { - const fs::path source = paths.root / file; - fs::path destination = raw_exported_dir_path / file; - if (ifw) + if (raw) { - destination = raw_exported_dir_path / "integration" / "data" / file; + System::println( + System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); + print_next_step_info(export_to_path); } - fs.create_directories(destination.parent_path(), ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - } - if (ifw) - { - // Unique packages - IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); - // Unique triplets - IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); - // Integration - IFW::export_integration(raw_exported_dir_path, fs); - // Configuration - IFW::export_config(raw_exported_dir_path, maybe_ifw_repository_url.value_or(""), fs); - } - - const auto print_next_step_info = [](const fs::path& prefix) { - const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = - CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); - System::println("\n" - "To use the exported libraries in CMake projects use:" - "\n" - " %s" - "\n", - Strings::to_utf8(cmake_variable.s)); - }; - - if (raw) - { - System::println( - System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); - print_next_step_info(export_to_path); - } - - if (nuget) - { - System::println("Creating nuget package... "); + if (nuget) + { + System::println("Creating nuget package... "); - const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); - const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); - const fs::path output_path = - do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); - System::println(System::Color::success, "Creating nuget package... done"); - System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); + const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); + const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); + const fs::path output_path = + do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); + System::println(System::Color::success, "Creating nuget package... done"); + System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); - System::println(R"( + System::println(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: Install-Package %s -Source "%s" )" - "\n", - nuget_id, - output_path.parent_path().u8string()); - } + "\n", + nuget_id, + output_path.parent_path().u8string()); + } - if (zip) - { - System::println("Creating zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); - System::println(System::Color::success, "Creating zip archive... done"); - System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } + if (zip) + { + System::println("Creating zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); + System::println(System::Color::success, "Creating zip archive... done"); + System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } - if (seven_zip) - { - System::println("Creating 7zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); - System::println(System::Color::success, "Creating 7zip archive... done"); - System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); + if (seven_zip) + { + System::println("Creating 7zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); + System::println(System::Color::success, "Creating 7zip archive... done"); + System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (!raw) + { + fs.remove_all(raw_exported_dir_path, ec); + } } - if (!raw && !ifw) + // IFW loop + if (ifw) { - fs.remove_all(raw_exported_dir_path, ec); + IFW::do_export(export_plan, export_id, ifw_options, paths); + + // TODO: Download corrected QtIFW tools and automate installer creation + System::println("Use corrected QtIFW tools (for more info see: https://codereview.qt-project.org/#/c/203958) to create installer..."); + + print_next_step_info("[...]"); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From c6149fae2f9f33d9ed363650aee6aea642574b0a Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Wed, 27 Sep 2017 02:57:51 +0300 Subject: [vcpkg-export-ifw] Usage QtIFW tools Download and use tools to make repository and installer --- toolsrc/src/commands_export.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'toolsrc/src/commands_export.cpp') diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 6632dfe67..3662a46d8 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -249,7 +249,9 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET_VERSION = "--nuget-version"; static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; // input sanitization static const std::string EXAMPLE = @@ -276,7 +278,9 @@ namespace vcpkg::Commands::Export OPTION_NUGET_VERSION, OPTION_IFW_REPOSITORY_URL, OPTION_IFW_PACKAGES_DIR_PATH, - OPTION_IFW_CONFIG_FILE_PATH + OPTION_IFW_REPOSITORY_DIR_PATH, + OPTION_IFW_CONFIG_FILE_PATH, + OPTION_IFW_INSTALLER_FILE_PATH }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -310,10 +314,18 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !ifw_options.maybe_packages_dir_path || ifw, "--ifw-packages-directory-path is only valid with --ifw"); + ifw_options.maybe_repository_dir_path = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_DIR_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_repository_dir_path || ifw, "--ifw-repository-directory-path is only valid with --ifw"); + ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); Checks::check_exit( VCPKG_LINE_INFO, !ifw_options.maybe_config_file_path || ifw, "--ifw-configuration-file-path is only valid with --ifw"); + ifw_options.maybe_installer_file_path = maybe_lookup(options.settings, OPTION_IFW_INSTALLER_FILE_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_installer_file_path || ifw, "--ifw-installer-file-path is only valid with --ifw"); + // create the plan const StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); @@ -464,10 +476,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { IFW::do_export(export_plan, export_id, ifw_options, paths); - // TODO: Download corrected QtIFW tools and automate installer creation - System::println("Use corrected QtIFW tools (for more info see: https://codereview.qt-project.org/#/c/203958) to create installer..."); - - print_next_step_info("[...]"); + print_next_step_info("@RootDir@/src/vcpkg"); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3