File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ export class DependenceManager implements ManagerInterface {
6868
6969 InstallComponent ( packName : string , component : Component , clearDir : boolean = true ) {
7070
71+ // try add dep root to project before install a component
72+ this . tryAddCompRootDirToProject ( ) ;
73+
7174 const config = this . project . GetConfiguration ( ) ;
7275 const toolchain = this . project . getToolchain ( ) ;
7376
@@ -239,7 +242,7 @@ export class DependenceManager implements ManagerInterface {
239242
240243 getDependenceRootFolder ( ) : File {
241244 if ( this . depDir === undefined ) {
242- throw new Error ( 'depDir is undefined' ) ;
245+ throw new Error ( 'eide depDir is undefined' ) ;
243246 }
244247 return this . depDir ;
245248 }
@@ -318,6 +321,14 @@ export class DependenceManager implements ManagerInterface {
318321
319322 //--
320323
324+ private tryAddCompRootDirToProject ( ) {
325+ const depRoot = this . getDependenceRootFolder ( ) ;
326+ if ( ! depRoot . IsDir ( ) ) depRoot . CreateDir ( false ) ;
327+ const prjConfig = this . project . GetConfiguration ( ) ;
328+ prjConfig . addSrcDirAtFirst ( depRoot . path ) ;
329+ prjConfig . CustomDep_AddIncDir ( depRoot ) ;
330+ }
331+
321332 private getDepDir ( ) : File {
322333 this . depDir ?. CreateDir ( false ) ;
323334 return < File > this . depDir ;
You can’t perform that action at this time.
0 commit comments