discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installing helper tool in application bundle


From: Wolfgang Lux
Subject: Installing helper tool in application bundle
Date: Sat, 15 Dec 2007 18:30:26 +0100

Hello,

I'd like to install a small helper tool in my application. This is quite straight forward under Mac OS X, but I'm facing two problems in GNUstep.

The first is that GNUstep's NSBundle implementation lacks the - pathForAuxiliaryExecutable: method, but I can easily work around that by using -pathForResource:ofType: with a nil type argument if NSBundle does not respond to -pathForAuxiliaryExecutable:.

The more serious problem is to set up the makefile for this (let alone convince ProjectCenter to do that for me). At present I'm using a Makefile roughly as follows:

  include $(GNUSTEP_MAKEFILES)/common.make

  PACKAGE_NAME = Application
  APP_NAME = Application
  TOOL_NAME = HelperTool

  Application_RESOURCE_FILES = \
  ... \
  $(GNUSTEP_OBJ_DIR)/HelperTool

  Application_HEADER_FILES = ...
  Application_OBJC_FILES = \
  ...
  main.m

  HelperTool_OBJC_FILES = \
  HelperTool.m

  include $(GNUSTEP_MAKEFILES)/aggregate.make
  include $(GNUSTEP_MAKEFILES)/tool.make
  include $(GNUSTEP_MAKEFILES)/application.make

However, I'm not really happy with this for two reasons. First, it crucially depends on the order of Makefile includes (tool.make must appear before application.make in order to ensure that the HelperTool is built or updated before it is copied into the Application's resource directory). Second, installation -- needlessly -- copies the HelperTool into the Tools directory in the chosen installation domain. Is there any better way to achieve copying the HelperTool into the Application's bundle and avoid installing it separately?

Wolfgang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]