-
Notifications
You must be signed in to change notification settings - Fork 478
#11489 - Transition App Needing Write Access in Install Directory + improve updater #11616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e3152ca
8e5def8
6ad5198
aca8258
bbe1730
9486a64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,12 +13,13 @@ endif() | |
|
|
||
| project(EnergyPlus) | ||
|
|
||
| # Raise an error if attempting to compile on macOS older than 10.15 - it does not work | ||
| # Raise an error if attempting to compile on macOS older than 13.3 - it does not work | ||
| # 10.15 minimum for std::filesystem, 13.3 minimum for std::format with floating-point (to_chars) | ||
| if (APPLE) | ||
| if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) | ||
| message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not set. Please set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 or greater and try again.") | ||
| elseif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.15") | ||
| message(FATAL_ERROR "The minimum required version for macOS is 10.15, however CMAKE_OSX_DEPLOYMENT_TARGET is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}.") | ||
| message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not set. Please set CMAKE_OSX_DEPLOYMENT_TARGET to 13.3 or greater and try again.") | ||
| elseif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "13.3") | ||
| message(FATAL_ERROR "The minimum required version for macOS is 13.3, however CMAKE_OSX_DEPLOYMENT_TARGET is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}.") | ||
|
Comment on lines
+16
to
+22
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix mac std::format |
||
| endif() | ||
| endif() | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ | |
|
|
||
| PKGS = { | ||
| "energyplus_launch": "3.7.4", | ||
| "energyplus_transition_tools": "2.1.4", | ||
| "energyplus_transition_tools": "3.0.0", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bump here |
||
| "ghedesigner": "2.1.1", | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,7 +257,7 @@ main_gui(True) | |
| exit(0); | ||
| }); | ||
|
|
||
| auto *updaterSubCommand = auxiliaryToolsSubcommand->add_subcommand("updater", "IDF Version Updater"); | ||
| auto *updaterSubCommand = auxiliaryToolsSubcommand->add_subcommand("updater", "IDF Version Updater GUI"); | ||
| updaterSubCommand->add_option("args", python_fwd_args, "Extra Arguments forwarded to IDF Version Updater")->option_text("ARG ..."); | ||
| updaterSubCommand->positionals_at_end(true); | ||
| updaterSubCommand->footer("You can pass extra arguments after the updater keyword, they will be forwarded to IDF Version Updater."); | ||
|
|
@@ -274,6 +274,39 @@ main_gui(True) | |
| exit(0); | ||
| }); | ||
|
|
||
| auto *updaterCLISubCommand = auxiliaryToolsSubcommand->add_subcommand("updater-cli", "IDF Version Updater CLI"); | ||
| updaterCLISubCommand->allow_extras(); | ||
| updaterCLISubCommand->footer("You can pass extra arguments after the updater-cli keyword, they will be forwarded to IDF Version Updater.\n" | ||
| "To get updater-cli's help, invoke without any arguments."); | ||
|
|
||
| updaterCLISubCommand->callback([&state, updaterCLISubCommand] { | ||
| EnergyPlus::Python::PythonEngine engine(state); | ||
| auto const &fwd_args = updaterCLISubCommand->remaining(); | ||
|
|
||
| std::string cmd = R"python(import sys | ||
| sys.argv = ["energyplus auxiliary updater-cli"] | ||
|
|
||
| from energyplus_transition.cli import main | ||
| main([)python"; | ||
| if (fwd_args.empty()) { | ||
| cmd += "\"--help\""; | ||
| } else { | ||
| // Unless specifically passed, we pass eplus-dir to the current executable directory, so it doesn't try to auto find in the usual | ||
| // installation paths | ||
| bool eplus_dir_provided = | ||
| std::any_of(fwd_args.begin(), fwd_args.end(), [](const std::string &a) { return a == "-e" || a == "--eplus-dir"; }); | ||
| if (!eplus_dir_provided) { | ||
| cmd += EnergyPlus::format(R"("--eplus-dir", "{}", )", state.dataStrGlobals->exeDirectoryPath.generic_string()); | ||
| } | ||
| for (const auto &arg : fwd_args) { | ||
| cmd += EnergyPlus::format("\"{}\", ", arg); | ||
| } | ||
| } | ||
| cmd += "])\n"; | ||
| engine.exec(cmd); | ||
| exit(0); | ||
| }); | ||
|
|
||
|
Comment on lines
+277
to
+309
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New Example, with fancy TQDM progress bars: energyplus auxiliary updater-cli --save-intermediate --progress ~/Downloads/tmp/*.idf
|
||
| auto *gheDesignerSubCommand = auxiliaryToolsSubcommand->add_subcommand("ghedesigner", "GHEDesigner Operation"); | ||
| gheDesignerSubCommand->add_option("args", python_fwd_args, "Extra Arguments forwarded to GHEDesigner")->option_text("ARG ..."); | ||
| gheDesignerSubCommand->positionals_at_end(true); | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix mac