[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Adding build configurations
|
Thank you very much for the help. I've been able to generate new
configurations and dig into the build chain. Fun stuff. Some new
questions have come up though.
1: How do you save a new build configuration permanently? Presently the
ones I generate with this method are absent after restarting Eclipse.
ManagedBuildManager.saveBuildInfo(project.getProject(),true); was the
only method I could find that seemed like it might address this, but
using it only seems to break the managed build system of the target
project (it becomes unavailable). The same thing happens if the new
configuration is selected and applied via the UI before restarting
Eclipse.
Does the build configuration ID (or does other configuration data) need
to conform to any particular format to ensure that it can be properly
saved to a CDT project's persistent files?
On a possibly related note,
ManagedBuildManager.setSelectedConfiguration(project.getProject(),newConfig);
does not seem to have any effect. (It isn't documented but I would
expect it to be the programmatic equivalent of selecting and applying a
build configuration in the UI).
2: How do you modify the configuration-specific environment settings?
I've checked out the EnvironmentVariableSupplier and
EnvironmentVariableProvider systems. There are lots of 'gets' but I
haven't yet discovered a way of programmatically setting or appending to
the environment.
Thanks Again,
Wyatt
Treggiari, Leo wrote:
You should use the interfaces/methods defined in
org.eclipse.cdt.managedbuilder.core. These are the "somewhat" public
managed build system interfaces. I say "somewhat" since they aren't
documented, and it is possible that some might change, be removed, etc.
when we do document the public interfaces. But we won't make changes
without good reason.
Here is an example of how you would add a new configuration to a
project.
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
IManagedProject managedProj = info.getManagedProject();
IConfiguration newConfig =
managedProj.createConfiguration(parentConfig, id);
Regards,
Leo
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of wspear
Sent: Tuesday, August 23, 2005 2:39 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Adding build configurations
Greetings,
I'm looking for a good way to programmatically (with a plugin) add new
build configurations (supplementing Debug and Release) to the CDT's
managed make build system (either for specified projects or globally).
A means of automatically defining configuration environment variables,
in particular, would be useful.
If someone could point me to the relevant chunk of the CDT API or source
(if such functions are implemented) that would be great. Editing the
relevant XML file(s) directly has been the only method I've found so far
and I'm guessing that's not the best practice (plus I haven't yet found
how to add configuration environment variables via the XML file(s)).
Thanks,
Wyatt Spear
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev