~ubuntu-branches/ubuntu/vivid/projectcenter.app/vivid

« back to all changes in this revision

Viewing changes to Modules/Projects/Tool/PCToolProject.m

  • Committer: Bazaar Package Importer
  • Author(s): Gürkan Sengün
  • Date: 2011-02-08 14:48:25 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110208144825-kww817wxl5y9ail8
Tags: 0.6.0-1
* New upstream release.
* Add myself to uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
   GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
3
3
 
4
 
   Copyright (C) 2001-2004 Free Software Foundation
 
4
   Copyright (C) 2001-2010 Free Software Foundation
5
5
 
6
6
   Authors: Philippe C.D. Robert
7
7
            Serg Stoyan
 
8
            Riccardo Mottola
8
9
 
9
10
   This file is part of GNUstep.
10
11
 
165
166
                  forKey:PCCreationDate];
166
167
  [projectDict setObject:NSFullUserName() forKey:PCProjectCreator];
167
168
  [projectDict setObject:NSFullUserName() forKey:PCProjectMaintainer];
 
169
  [projectDict setObject:[NSUserDefaults userLanguages] forKey:PCUserLanguages];
168
170
 
169
171
  // Copy the project files to the provided path
170
172
  _file = [projectBundle pathForResource:@"main" ofType:@"m"];
304
306
      [resources addObjectsFromArray:[projectDict objectForKey:key]];
305
307
    }
306
308
  // Remove localized resource files from gathered array
307
 
  count = [resources count];
308
309
  localizedResources = [projectDict objectForKey:PCLocalizedResources];
309
 
  for (i = 0; i < count; i++)
 
310
  for (i = [resources count] - 1; i >= 0; i--)
310
311
    {
311
312
      if ([localizedResources containsObject:[resources objectAtIndex:i]])
312
313
        {
313
314
          [resources removeObjectAtIndex:i];
314
 
          count--;
315
315
        }
316
316
    }
317
317
  [mf appendResources:resources inDir:@"Resources"];
344
344
 
345
345
- (void)appendHead:(PCMakefileFactory *)mff
346
346
{
347
 
  NSString *installDir = [projectDict objectForKey:PCInstallDir];
 
347
  NSString *installDomain = [projectDict objectForKey:PCInstallDomain];
348
348
 
349
349
  [mff appendString:@"\n#\n# Tool\n#\n"];
350
350
  [mff appendString:[NSString stringWithFormat:@"VERSION = %@\n",
356
356
  [mff appendString:[NSString stringWithFormat:@"%@_TOOL_ICON = %@\n",
357
357
    projectName, [projectDict objectForKey:PCToolIcon]]];
358
358
 
359
 
  if ([installDir isEqualToString:@""])
360
 
    {
361
 
      [mff appendString:
362
 
        [NSString stringWithFormat:@"%@_STANDARD_INSTALL = no\n",
363
 
        projectName]];
364
 
    }
365
 
  else if (![installDir isEqualToString:@"LOCAL"] &&
366
 
           ![installDir isEqualToString:@"SYSTEM"] &&
367
 
           ![installDir isEqualToString:@"USER"] &&
368
 
           ![installDir isEqualToString:@"NETWORK"] &&
369
 
           ![installDir isAbsolutePath] &&
370
 
           [installDir characterAtIndex:0] != '$')
371
 
    {
372
 
      [mff appendString:
373
 
        [NSString stringWithFormat:@"%@_COPY_INTO_DIR = %@\n",
374
 
        projectName, installDir]];
375
 
    }
376
 
  else
377
 
    {
378
 
      /* IMPORTANT FIXME/TODO: We should be using GNUSTEP_INSTALLATION_DOMAIN,
379
 
       * not GNUSTEP_INSTALLATION_DIR.  Even better, we shouldn't specify
380
 
       * this in the GNUmakefile itself at all unless explicitly requested
381
 
       * by the user!
382
 
       */
383
 
      /*
384
 
      [mff appendString:
385
 
        [NSString stringWithFormat:@"GNUSTEP_INSTALLATION_DIR = %@\n",
386
 
        installDir]];
387
 
      */
 
359
  /* FIXME %@_COPY_INTO_DIR needs to be properly reinstantiated
 
360
     as well as %@_STANDARD_INSTALL = no  */
 
361
 
 
362
  /* set the domain if it was specified */
 
363
  if (!(installDomain == nil) && ![installDomain isEqualToString:@""])
 
364
    {
 
365
      [mff appendString:
 
366
             [NSString stringWithFormat:@"GNUSTEP_INSTALLATION_DOMAIN = %@\n",[installDomain uppercaseString]]];
388
367
    }
389
368
}
390
369