Skip to content

Commit

Permalink
added support for instaling multiple versions of IDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Gadorek committed Aug 5, 2024
1 parent 80ed1f5 commit 4b3e1d2
Show file tree
Hide file tree
Showing 5 changed files with 358 additions and 305 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
tokio = {version = "1.37.0", features=["full"]}
idf-im-lib = { git = "https://github.com/espressif/idf-im-lib.git", branch="master" }
idf-im-lib = { path = "/Users/petrgadorek/work/idf-im/idf-im-lib" }
clap = {version = "4.5", features = ["cargo", "derive", "color"]}
crossterm = "0.27.0"
dialoguer = { git = "https://github.com/Hahihula/dialoguer.git", branch = "folder-select", features = ["folder-select"] }
Expand Down
4 changes: 2 additions & 2 deletions locales/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ wizard.spinner.message:
en: Doing something...
cn: 执行中
wizard.select_target.prompt:
en: Please select the target platform (esp chip)
cn: 请选择目标平台(ESP 芯片)
en: Please select all of the the target platforms (esp chips)
cn: 请选择所有的目标平台(esp 芯片)
wizard.select_target.prompt.failure:
en: We were unable to fetch avalible targets
cn: 无法获取可用的目标平台
Expand Down
13 changes: 10 additions & 3 deletions src/cli_args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ pub struct Settings {
pub tool_download_folder_name: Option<String>,
pub tool_install_folder_name: Option<String>,
pub target: Option<String>,
pub idf_version: Option<String>,
pub idf_versions: Option<Vec<String>>,
pub tools_json_file: Option<String>,
pub idf_tools_path: Option<String>, // relative to idf path
pub config_file: Option<PathBuf>,
pub non_interactive: Option<bool>,
pub wizard_all_questions: Option<bool>,
pub mirror: Option<String>,
pub idf_mirror: Option<String>,
}
Expand Down Expand Up @@ -67,7 +68,7 @@ pub struct Cli {
target: Option<String>,

#[arg(short, long)]
idf_version: Option<String>,
idf_versions: Option<String>,
#[arg(long)]
tool_download_folder_name: Option<String>,
#[arg(long)]
Expand All @@ -85,6 +86,11 @@ pub struct Cli {
#[arg(short, long)]
non_interactive: Option<bool>,

// #[arg(
// long,
// help = "The wizard will ask for every configurable option" //TODO: needs to be enabled inside wizard
// )]
// wizard_all_questions: Option<String>,
#[arg(
short,
long,
Expand Down Expand Up @@ -130,7 +136,8 @@ impl IntoIterator for Cli {
("target".to_string(), self.target.map(|p| p.into())),
(
"idf_version".to_string(),
self.idf_version.map(|s| s.into()),
self.idf_versions
.map(|s| s.split(",").collect::<Vec<&str>>().into()),
),
(
"tool_download_folder_name".to_string(),
Expand Down
Loading

0 comments on commit 4b3e1d2

Please sign in to comment.