Skip to content

Commit 95d235d

Browse files
committed
[BNTL] General rename to compile options with bntl_utils
1 parent fd2b919 commit 95d235d

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

plugins/bntl_utils/src/command/create.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ impl PlatformField {
124124
}
125125
}
126126

127-
pub struct FlagsField;
127+
pub struct CompilerOptionsField;
128128

129-
impl FlagsField {
129+
impl CompilerOptionsField {
130130
pub fn field() -> FormInputField {
131131
FormInputField::MultilineText {
132-
prompt: "Compiler flags".to_string(),
132+
prompt: "Compiler options".to_string(),
133133
default: None,
134134
value: None,
135135
}
136136
}
137137

138138
pub fn from_form(form: &Form) -> Option<String> {
139-
let field = form.get_field_with_name("Compiler flags")?;
139+
let field = form.get_field_with_name("Compiler options")?;
140140
field.try_value_string()
141141
}
142142
}
@@ -151,7 +151,7 @@ impl CreateFromDirectory {
151151
form.add_field(PlatformField::field());
152152
form.add_field(NameField::field());
153153
form.add_field(OutputDirectoryField::field());
154-
form.add_field(FlagsField::field());
154+
form.add_field(CompilerOptionsField::field());
155155

156156
if !form.prompt() {
157157
return;
@@ -160,15 +160,15 @@ impl CreateFromDirectory {
160160
let platform_name = PlatformField::from_form(&form).unwrap();
161161
let default_name = NameField::from_form(&form).unwrap();
162162
let output_dir = OutputDirectoryField::from_form(&form).unwrap();
163-
let flags = FlagsField::from_form(&form).unwrap();
163+
let flags = CompilerOptionsField::from_form(&form).unwrap();
164164

165165
let Some(default_platform) = Platform::by_name(&platform_name) else {
166166
tracing::error!("Invalid platform name: {}", platform_name);
167167
return;
168168
};
169169

170170
let processor = TypeLibProcessor::new(&default_name, &default_platform.name())
171-
.with_options(split_args(flags.as_str()));
171+
.with_compiler_options(split_args(flags.as_str()));
172172

173173
let background_task = BackgroundTask::new("Processing started...", true);
174174
new_processing_state_background_thread(background_task.clone(), processor.state());

plugins/bntl_utils/src/process.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ pub struct TypeLibProcessor {
435435
/// Whether to process existing type libraries when processing a binary file.
436436
process_existing_type_libraries: bool,
437437
/// The compiler flags to use when processing header files.
438-
options: Vec<String>,
438+
compiler_options: Vec<String>,
439439
}
440440

441441
impl TypeLibProcessor {
@@ -450,7 +450,7 @@ impl TypeLibProcessor {
450450
default_platform_name: default_platform_name.to_owned(),
451451
include_directories: Vec::new(),
452452
process_existing_type_libraries: false,
453-
options: Vec::new(),
453+
compiler_options: Vec::new(),
454454
}
455455
}
456456

@@ -464,8 +464,8 @@ impl TypeLibProcessor {
464464
self
465465
}
466466

467-
pub fn with_options(mut self, options: Vec<String>) -> Self {
468-
self.options = options;
467+
pub fn with_compiler_options(mut self, options: Vec<String>) -> Self {
468+
self.compiler_options = options;
469469
self
470470
}
471471

@@ -996,7 +996,7 @@ impl TypeLibProcessor {
996996
&file_name,
997997
&platform,
998998
&platform_type_container,
999-
&self.options,
999+
&self.compiler_options,
10001000
&include_dirs,
10011001
"",
10021002
)

0 commit comments

Comments
 (0)