File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,22 @@ func (ctx *Context) ExtractBuildOptions() *properties.Map {
187
187
return opts
188
188
}
189
189
190
+ func (ctx * Context ) InjectBuildOptions (opts * properties.Map ) {
191
+ ctx .HardwareDirs = paths .NewPathList (strings .Split (opts .Get ("hardwareFolders" ), "," )... )
192
+ ctx .BuiltInToolsDirs = paths .NewPathList (strings .Split (opts .Get ("builtInToolsFolders" ), "," )... )
193
+ ctx .BuiltInLibrariesDirs = paths .NewPathList (strings .Split (opts .Get ("builtInLibrariesFolders" ), "," )... )
194
+ ctx .OtherLibrariesDirs = paths .NewPathList (strings .Split (opts .Get ("otherLibrariesFolders" ), "," )... )
195
+ ctx .SketchLocation = opts .GetPath ("sketchLocation" )
196
+ fqbn , err := cores .ParseFQBN (opts .Get ("fqbn" ))
197
+ if err != nil {
198
+ i18n .ErrorfWithLogger (ctx .GetLogger (), "Error in FQBN: %s" , err )
199
+ }
200
+ ctx .FQBN = fqbn
201
+ ctx .ArduinoAPIVersion = opts .Get ("runtime.ide.version" )
202
+ ctx .CustomBuildProperties = strings .Split (opts .Get ("customBuildProperties" ), "," )
203
+ ctx .OptimizationFlags = opts .Get ("compiler.optimization_flags" )
204
+ }
205
+
190
206
func (ctx * Context ) GetLogger () i18n.Logger {
191
207
if ctx .logger == nil {
192
208
return & i18n.HumanLogger {}
You can’t perform that action at this time.
0 commit comments