/** Implementation of NSBundle class
   Copyright (C) 2004  M. Uli Kusterer.

   Written by:  M. Uli Kusterer <witness.of.teachtext@gmx.net>
   Date: October 2004

   This file is part of the GNUstep Base Library.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.


   <title>NSBundle class reference</title>
   $Date: 2004/02/27 14:08:00 $ $Revision: 1.128 $
*/

#include "NSBundle+BuiltInPlugInsPath.h"


#define NSBUNDLE_FRAMEWORK	3		// FIXME! This is defined in NSBundle.m and may go out of sync!

@implementation NSBundle (BuiltInPlugInsPath)

- (NSString *) builtInPlugInsPath
{
  NSString  *version = _frameworkVersion;

  if (!version)
    version = @"Current";

  if (_bundleType == NSBUNDLE_FRAMEWORK)
    {
      return [_path stringByAppendingPathComponent:
					[NSString stringWithFormat:@"Versions/%@/PlugIns", 
					version]];
    }
  else
    {
      return [_path stringByAppendingPathComponent: @"PlugIns"];
    }
}

@end

