@@ -35,7 +35,8 @@ import { ResManager } from './ResManager';
3535import { GlobalEvent } from './GlobalEvents' ;
3636import { AbstractProject , CheckError , DataChangeType , VirtualSource } from './EIDEProject' ;
3737import { ToolchainName , ToolchainManager } from './ToolchainManager' ;
38- import { CreateOptions , PackInfo , ComponentFileItem , DeviceInfo , getComponentKeyDescription , VirtualFolder , VirtualFile , ImportOptions , ProjectTargetInfo , ArmBaseCompileData , ProjectConfigData , ProjectType , ArmBaseCompileConfigModel , RiscvCompileData , AnyGccCompileData } from './EIDETypeDefine' ;
38+ import { CreateOptions , VirtualFolder , VirtualFile , ImportOptions , ProjectTargetInfo , ProjectConfigData , ProjectType } from './EIDETypeDefine' ;
39+ import { PackInfo , ComponentFileItem , DeviceInfo , getComponentKeyDescription , ArmBaseCompileData , ArmBaseCompileConfigModel , RiscvCompileData , AnyGccCompileData } from "./EIDEProjectModules" ;
3940import { WorkspaceManager } from './WorkspaceManager' ;
4041import {
4142 can_not_close_project , project_is_opened , project_load_failed ,
@@ -1448,6 +1449,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
14481449
14491450 const basePrj = AbstractProject . NewProject ( ) . createBase ( {
14501451 name : ePrjInfo . name ,
1452+ projectName : ePrjInfo . name ,
14511453 type : nPrjType ,
14521454 outDir : ePrjRoot
14531455 } , false ) ;
@@ -1459,7 +1461,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
14591461 nPrjConfig . outDir = 'build' ;
14601462 nPrjConfig . srcDirs = File . NotMatchFilter ( ePrjRoot . GetList ( File . EMPTY_FILTER ) , File . EMPTY_FILTER ,
14611463 [ / ^ \. / , / ^ ( b u i l d | d i s t | o u t | b i n | o b j | e x e | d e b u g | r e l e a s e | l o g [ s ] ? | i p c h | d o c s | d o c | i m g | i m a g e [ s ] ? ) $ / i] )
1462- . map ( d => ePrjRoot . ToRelativePath ( d . path , false ) || d . path ) ;
1464+ . map ( d => ePrjRoot . ToRelativePath ( d . path ) || d . path ) ;
14631465
14641466 // init all target
14651467 for ( const eTarget of ePrjInfo . targets ) {
@@ -1752,6 +1754,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
17521754
17531755 const baseInfo = AbstractProject . NewProject ( ) . createBase ( {
17541756 name : nPrjOutDir . name ,
1757+ projectName : keilPrjFile . noSuffixName ,
17551758 type : targets [ 0 ] . type ,
17561759 outDir : nPrjOutDir
17571760 } , false ) ;
@@ -1835,7 +1838,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
18351838 if ( ! srcFile . IsFile ( ) ) { continue ; }
18361839 if ( dep . category == 'source' && ! vFolder ) { continue ; }
18371840
1838- let srcRePath : string | undefined = baseInfo . rootFolder . ToRelativePath ( srcFile . path , false ) ;
1841+ let srcRePath : string | undefined = baseInfo . rootFolder . ToRelativePath ( srcFile . path ) ;
18391842
18401843 /* if it's not in workspace, copy it */
18411844 if ( srcRePath == undefined ) {
@@ -1887,7 +1890,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
18871890 let locate = dep . packPath ;
18881891 if ( dep . instance ) {
18891892 locate = baseInfo . rootFolder
1890- . ToRelativePath ( dep . instance [ 0 ] , false ) || dep . instance [ 0 ]
1893+ . ToRelativePath ( dep . instance [ 0 ] ) || dep . instance [ 0 ]
18911894 }
18921895
18931896 const nLine : string [ ] = [
@@ -3328,7 +3331,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
33283331 for ( const folderUri of folderList ) {
33293332
33303333 const folderPath = folderUri . fsPath ;
3331- const rePath = prj . ToRelativePath ( folderPath , false ) ;
3334+ const rePath = prj . ToRelativePath ( folderPath ) ;
33323335
33333336 // if can't calculate repath, skip
33343337 if ( rePath === undefined || rePath . trim ( ) === '' ) {
@@ -3841,7 +3844,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
38413844 if ( source . disabled ) continue ;
38423845 // skip non-source and asm file
38433846 if ( ! srcFilter . test ( source . file . path ) ) continue ;
3844- const rePath = confRootDir . ToRelativePath ( source . file . path , false ) ;
3847+ const rePath = confRootDir . ToRelativePath ( source . file . path ) ;
38453848 srcList . push ( rePath || source . file . path ) ;
38463849 }
38473850 }
@@ -4388,7 +4391,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
43884391 if ( uris && uris . length > 0 ) {
43894392 const dupLi = prj
43904393 . addIncludePaths ( uris . map ( uri => { return uri . fsPath ; } ) )
4391- . map ( path => prj . ToRelativePath ( path , false ) || path ) ;
4394+ . map ( path => prj . ToRelativePath ( path ) || path ) ;
43924395 if ( dupLi . length > 0 ) {
43934396 const msg = `${ dupLi . length } redundant include paths (ignored): ${ JSON . stringify ( dupLi ) } ` ;
43944397 GlobalEvent . emit ( 'msg' , newMessage ( 'Warning' , msg ) ) ;
@@ -4445,14 +4448,14 @@ export class ProjectExplorer implements CustomConfigurationProvider {
44454448 prj . GetConfiguration ( ) . getAllDepGroup ( ) . forEach ( ( group ) => {
44464449 for ( const dep of group . depList ) {
44474450 for ( const incPath of dep . incList ) {
4448- includesMap . set ( prj . ToRelativePath ( incPath , false ) || incPath , group . groupName ) ;
4451+ includesMap . set ( prj . ToRelativePath ( incPath ) || incPath , group . groupName ) ;
44494452 }
44504453 }
44514454 } ) ;
44524455
44534456 // add source include paths
44544457 prj . getSourceIncludeList ( ) . forEach ( ( incPath ) => {
4455- includesMap . set ( prj . ToRelativePath ( incPath , false ) || incPath , 'source' ) ;
4458+ includesMap . set ( prj . ToRelativePath ( incPath ) || incPath , 'source' ) ;
44564459 } ) ;
44574460
44584461 for ( const keyVal of includesMap ) {
@@ -4489,7 +4492,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
44894492 prj . GetConfiguration ( ) . getAllDepGroup ( ) . forEach ( ( group ) => {
44904493 for ( const dep of group . depList ) {
44914494 for ( const libPath of dep . libList ) {
4492- libMaps . set ( prj . ToRelativePath ( libPath , false ) || libPath , group . groupName ) ;
4495+ libMaps . set ( prj . ToRelativePath ( libPath ) || libPath , group . groupName ) ;
44934496 }
44944497 }
44954498 } ) ;
0 commit comments