Le 5 août 06 à 17:45, Günther Noack a écrit :
Hi!
I want to create the long-overdue preferences window for
DictionaryReader soon. Unfortunately, looking at the PreferencesKit
example, I didn't find out how to do that in a clean way.
The things I couldn't figure out are:
- How can I include the preference pane bundles in the project in a
clean way? (I'd prefer if I could put them into the application
folder.) The way it's done in the example is to do weird copy
operations in the GNUmakefile.postamble.
Well, it's clean and not really weird :-)
It's a simple copy of the built preference pane into the built
application, precisely into the PlugIns directory of the application
bundle.
I don't know any rules available with gnustep-make to handle this.
# First create the PlugIns directory in the built application bundle
mkdir -p $(PROJECT_DIR)/PreferencesKitExample.app/PlugIns
# Then copy the built preference pane into it
cp -Rfp $(PROJECT_DIR)/SamplePrefPane/SamplePrefPane.prefPane $
(PROJECT_DIR)/PreferencesKitExample.app/PlugIns/
SamplePrefPane is a subproject of PreferencesKitExample, the
preference pane is built inside the subproject, then got to be copied
from this place as you can see in the previous line.
For now it's not possible to put the preference pane code directly
into your project without building a separate bundle for each
preference pane. Though this improvement should be added.
- Why does the example copy the PreferencesKit headers into its
project folder? Isn't it possible to use the headers from where PK
has installed itself to?
It's not needed if PreferencesKit is already installed on the system,
but if you are building the whole repository in one pass without any
previous install, it's mandatory to have this kind of wizardry.
# We link the headers of PreferencesKit into our project
ln -s $(PROJECT_DIR)/../../../Frameworks/PreferencesKit/Headers $
(PROJECT_DIR)/PreferencesKit
# Then we are able to find the headers even if the framework isn't
installed by using the flag -I./
ADDITIONAL_INCLUDE_DIRS += -I$(PROJECT_DIR)
# Finally we can even link the framework without hurdles if it has
already been built
ADDITIONAL_LIB_DIRS += -L$(PROJECT_DIR)/../../../Frameworks/
PreferencesKit/Source/PreferencesKit.framework/Versions/Current
In the future, I would like to have a file etoile.make at the root of
the repository, we can include to automatically handle this kind of
dependency. Right now, I update each module with such code when there
is a dependency to support within the repository.
hope that helps,
Quentin.
--
Quentin Mathé
[EMAIL PROTECTED]
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev