Another fix to adding resource files of subprojects files

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@19683 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-07-04 19:22:47 +00:00
parent a47c8aa7b8
commit f8b0c67d51
7 changed files with 67 additions and 11 deletions

View file

@ -1,3 +1,25 @@
2004-07-04 Serg Stoyan <stoyan255@ukr.net>
* Library/PCProject.m:
(projectFileFromFile:forKey:): If adding files from subproject to
project add it with relative path to project's one.
* Modules/ApplicationProject/PCAppProject.m:
(writeMakefile): Do not add "Resources/" prefix if resource file
is part of subproject.
* Modules/BundleProject/PCBundleProject.m:
(writeMakefile): ditto.
* Modules/LibraryProject/PCLibProject.m:
(writeMakefile): ditto.
* Modules/RenaissanceProject/PCRenaissanceProject.m:
(writeMakefile): ditto.
* Modules/ToolProject/PCToolProject.m:
(writeMakefile): ditto.
2004-07-03 Serg Stoyan <stoyan255@ukr.net>
* Library/PCProjectManager.m:

View file

@ -621,8 +621,22 @@ NSString
- (NSString *)projectFileFromFile:(NSString *)file forKey:(NSString *)type
{
NSMutableString *projectFile = nil;
NSString *path = nil;
NSRange pathRange;
projectFile = [NSMutableString stringWithString:[file lastPathComponent]];
path = [file stringByDeletingLastPathComponent];
pathRange = [path rangeOfString:projectPath];
if (pathRange.length)
{
pathRange.length++;
projectFile = [NSMutableString stringWithString:file];
[projectFile deleteCharactersInRange:pathRange];
}
else
{
projectFile = [NSMutableString stringWithString:[file lastPathComponent]];
}
if ([type isEqualToString:PCLibraries])
{

View file

@ -439,8 +439,12 @@
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
resourceItem = [resources objectAtIndex:j];
if ([[resourceItem pathComponents] count] == 1)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
resourceItem];
}
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}

View file

@ -180,8 +180,12 @@
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
resourceItem = [resources objectAtIndex:j];
if ([[resourceItem pathComponents] count] == 1)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
resourceItem];
}
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}

View file

@ -235,8 +235,12 @@
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
resourceItem = [resources objectAtIndex:j];
if ([[resourceItem pathComponents] count] == 1)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
resourceItem];
}
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}

View file

@ -444,8 +444,12 @@
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
resourceItem = [resources objectAtIndex:j];
if ([[resourceItem pathComponents] count] == 1)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
resourceItem];
}
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}

View file

@ -248,8 +248,12 @@
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
resourceItem = [resources objectAtIndex:j];
if ([[resourceItem pathComponents] count] == 1)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
resourceItem];
}
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}