Hi,
when I start the Introjucer, I have multiple project targets in the ‘Config’ panel.
If I want to open the Visual Studio 2010 project with the open button, it won’t do it
until there is a Visual Studio 2008 project. It works if I delete it.
I looked into the code and found this:
[code]ProjectExporter *ProjectExporter::createPlatformDefaultExporter(Project &project)
{
ScopedPointer best;
int bestPref = 0;
DBG(("A1)"))
for (Project::ExporterIterator exporter(project); exporter.next();)
{
DBG(("A2)"))
const int pref = exporter->getLaunchPreferenceOrderForCurrentOS();
DBG(("pref = ") + String(pref))
if (pref > bestPref)
{
bestPref = pref;
DBG(("bestPref = ") + String(bestPref))
best = exporter.exporter;
}
}
return best.release();
}[/code]
‘pref’ get the number 4 for the 2008 project and a 3 for 2010 project.
I changed the number between the two projects and it works. But I don’t know,
if there other classes involved with this numbers (btw: I would prefer constants or enums).
[code]class MSVCProjectExporterVC2008 : public MSVCProjectExporterBase
{
public:
//==============================================================================
MSVCProjectExporterVC2008 (Project& project_, const ValueTree& settings_, const char* folderName = “VisualStudio2008”)
: MSVCProjectExporterBase (project_, settings_, folderName)
{
name = getName();
}
static const char* getName() { return "Visual Studio 2008"; }
static const char* getValueTreeTypeName() { return "VS2008"; }
int getVisualStudioVersion() const { return 9; }
void launchProject() { getSLNFile().startAsProcess(); }
int getLaunchPreferenceOrderForCurrentOS()
{
#if JUCE_WINDOWS
return 3; /* My change */
#else
return 0;
#endif
}
…
[/code]
And, it would be nice to have the same name from the ‘Target Project Folder’ (right side) in the ‘Config’ tree, if there are
more than one project target for the same IDE.
Example:
Create two Visual Studio 2010 project targets and you see the name twice, whatever is in the ‘Target Project Folder’ named.
Thomas
