Hi!
I am trying to implement substitution of prefixes to MBS tools names in my plugin (like in Cross GCC plugin). I want to use different prefixes and different paths for build tools according to OS (where eclipse IDE is running). E.g. "/opt/i686-gcc/bin/i686-nptl-linux-gnu-g++"
on Linux (native compiler) and "C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin\i686-pc-linux-gnu-g++"
on Windows (cross compiler).
1. Tell me, am I right? I am implementing IManagedCommandLineGenerator (prefix for commandName) and IProjectEnvironmentVariableSupplier (additional directory for $PATH). I have next tool-chain options:
<toolChain ...>
<optionCategory
id="cdt.managedbuild.optionCategory.myplugin.settings.arm"
name="ARM tool-chain settings">
</optionCategory>
<option browseType="directory"
category="cdt.managedbuild.optionCategory.myplugin.settings.arm"
id="cdt.managedbuild.option.myplugin.arm.path.windows"
name="Windows tool-chain path"
...
defaultValue="C:\\Program Files (x86)\\CodeSourcery\\Sourcery G++ Lite\\">
</option>
<option browseType="directory"
category="cdt.managedbuild.optionCategory.myplugin.settings.arm"
id="cdt.managedbuild.option.myplugin.arm.path.linux"
name="Linux tool-chain path"
...
defaultValue="/opt/PalmPDK/arm-gcc/">
</option>
<optionCategory
id="cdt.managedbuild.optionCategory.myplugin.settings.ia32"
name="IA32 tool-chain settings">
</optionCategory>
...similar options for IA32 architecture
...tools declarations
</toolChain>
and 4 configurations: ARM Debug/Release, IA32 Debug/Release.
How can I get e.g. "cdt.managedbuild.option.myplugin.arm.path.linux" value from Java code ( from IManagedCommandLineGenerator.generateCommandLineInfo() ).
Is there a better method to implement my needs?
2. I could create 2 tool-chains (for ARM and for IA32) and not use prefixes substitution. But I don't understand: which tool-chain should user choose at New Project page. Can you explain please, what depends on that tool-chain (chosen by user at New Project page)?
3. Can you give sources or links to sources of org.eclipse.cdt.build.crossgcc, or org.eclipse.cdt.cross.arm.gnu, or any other project taht implements IManagedCommandLineGenerator and/or IProjectEnvironmentVariableSupplier?
Will be very appreciate!
[Updated on: Thu, 11 August 2011 18:54]
Report message to a moderator