@@ -45,9 +45,9 @@ type GCCPreprocRunner struct {
4545}
4646
4747func (s * GCCPreprocRunner ) Run (context map [string ]interface {}, ctx * types.Context ) error {
48- sketchBuildPath := context [ constants . CTX_SKETCH_BUILD_PATH ].( string )
48+ sketchBuildPath := ctx . SketchBuildPath
4949 sketch := context [constants .CTX_SKETCH ].(* types.Sketch )
50- properties , targetFilePath , err := prepareGCCPreprocRecipeProperties (context , filepath .Join (sketchBuildPath , filepath .Base (sketch .MainFile .Name )+ ".cpp" ), s .TargetFileName )
50+ properties , targetFilePath , err := prepareGCCPreprocRecipeProperties (context , ctx , filepath .Join (sketchBuildPath , filepath .Base (sketch .MainFile .Name )+ ".cpp" ), s .TargetFileName )
5151 if err != nil {
5252 return i18n .WrapError (err )
5353 }
@@ -75,7 +75,7 @@ type GCCPreprocRunnerForDiscoveringIncludes struct {
7575}
7676
7777func (s * GCCPreprocRunnerForDiscoveringIncludes ) Run (context map [string ]interface {}, ctx * types.Context ) error {
78- properties , _ , err := prepareGCCPreprocRecipeProperties (context , s .SourceFilePath , s .TargetFilePath )
78+ properties , _ , err := prepareGCCPreprocRecipeProperties (context , ctx , s .SourceFilePath , s .TargetFilePath )
7979 if err != nil {
8080 return i18n .WrapError (err )
8181 }
@@ -98,9 +98,9 @@ func (s *GCCPreprocRunnerForDiscoveringIncludes) Run(context map[string]interfac
9898 return nil
9999}
100100
101- func prepareGCCPreprocRecipeProperties (context map [string ]interface {}, sourceFilePath string , targetFilePath string ) (props.PropertiesMap , string , error ) {
101+ func prepareGCCPreprocRecipeProperties (context map [string ]interface {}, ctx * types. Context , sourceFilePath string , targetFilePath string ) (props.PropertiesMap , string , error ) {
102102 if targetFilePath != utils .NULLFile () {
103- preprocPath := context [ constants . CTX_PREPROC_PATH ].( string )
103+ preprocPath := ctx . PreprocPath
104104 err := utils .EnsureFolderExists (preprocPath )
105105 if err != nil {
106106 return nil , "" , i18n .WrapError (err )
0 commit comments