mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: Added a VS2012 exporter type.
This commit is contained in:
parent
d3c202e92e
commit
f68d0af5c2
2 changed files with 65 additions and 15 deletions
|
|
@ -536,7 +536,7 @@ protected:
|
|||
: (".\\" + filename);
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterBase);
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterBase)
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -545,7 +545,8 @@ class MSVCProjectExporterVC2008 : public MSVCProjectExporterBase
|
|||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
MSVCProjectExporterVC2008 (Project& project_, const ValueTree& settings_, const char* folderName = "VisualStudio2008")
|
||||
MSVCProjectExporterVC2008 (Project& project_, const ValueTree& settings_,
|
||||
const char* folderName = "VisualStudio2008")
|
||||
: MSVCProjectExporterBase (project_, settings_, folderName)
|
||||
{
|
||||
name = getName();
|
||||
|
|
@ -883,7 +884,7 @@ protected:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2008);
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2008)
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -913,22 +914,24 @@ protected:
|
|||
String getProjectVersionString() const { return "8.00"; }
|
||||
String getSolutionVersionString() const { return "9.00" + newLine + "# Visual C++ Express 2005"; }
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2005);
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2005)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class MSVCProjectExporterVC2010 : public MSVCProjectExporterBase
|
||||
{
|
||||
public:
|
||||
MSVCProjectExporterVC2010 (Project& p, const ValueTree& t)
|
||||
: MSVCProjectExporterBase (p, t, "VisualStudio2010")
|
||||
MSVCProjectExporterVC2010 (Project& p, const ValueTree& t, const char* folderName = "VisualStudio2010")
|
||||
: MSVCProjectExporterBase (p, t, folderName)
|
||||
{
|
||||
name = getName();
|
||||
}
|
||||
|
||||
static const char* getName() { return "Visual Studio 2010"; }
|
||||
static const char* getValueTreeTypeName() { return "VS2010"; }
|
||||
int getVisualStudioVersion() const { return 10; }
|
||||
static const char* getName() { return "Visual Studio 2010"; }
|
||||
static const char* getValueTreeTypeName() { return "VS2010"; }
|
||||
int getVisualStudioVersion() const { return 10; }
|
||||
virtual String getPlatformToolset() const { return "Windows7.1SDK"; }
|
||||
virtual String getSolutionComment() const { return "# Visual Studio 2010"; }
|
||||
|
||||
static MSVCProjectExporterVC2010* createForSettings (Project& project, const ValueTree& settings)
|
||||
{
|
||||
|
|
@ -946,6 +949,8 @@ public:
|
|||
{
|
||||
XmlElement projectXml ("Project");
|
||||
fillInProjectXml (projectXml);
|
||||
addPlatformToolsetToPropertyGroup (projectXml);
|
||||
|
||||
writeXmlOrThrow (projectXml, getVCProjFile(), "utf-8", 100);
|
||||
}
|
||||
|
||||
|
|
@ -957,7 +962,7 @@ public:
|
|||
|
||||
{
|
||||
MemoryOutputStream mo;
|
||||
writeSolutionFile (mo, "11.00", "# Visual Studio 2010", getVCProjFile());
|
||||
writeSolutionFile (mo, "11.00", getSolutionComment(), getVCProjFile());
|
||||
|
||||
overwriteFileIfDifferentOrThrow (getSLNFile(), mo);
|
||||
}
|
||||
|
|
@ -993,6 +998,9 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
virtual void addPlatformToolsetToPropertyGroup (XmlElement&) const {}
|
||||
|
||||
|
||||
BuildConfiguration::Ptr createBuildConfig (const ValueTree& settings) const
|
||||
{
|
||||
return new VC2010BuildConfiguration (project, settings);
|
||||
|
|
@ -1064,7 +1072,7 @@ protected:
|
|||
e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true");
|
||||
|
||||
if (is64Bit (config))
|
||||
e->createNewChildElement ("PlatformToolset")->addTextElement ("Windows7.1SDK");
|
||||
e->createNewChildElement ("PlatformToolset")->addTextElement (getPlatformToolset());
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -1431,8 +1439,46 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2010);
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2010)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class MSVCProjectExporterVC2012 : public MSVCProjectExporterVC2010
|
||||
{
|
||||
public:
|
||||
MSVCProjectExporterVC2012 (Project& p, const ValueTree& t)
|
||||
: MSVCProjectExporterVC2010 (p, t, "VisualStudio2012")
|
||||
{
|
||||
name = getName();
|
||||
}
|
||||
|
||||
static const char* getName() { return "Visual Studio 2012"; }
|
||||
static const char* getValueTreeTypeName() { return "VS2012"; }
|
||||
int getVisualStudioVersion() const { return 11; }
|
||||
String getPlatformToolset() const { return "v110_xp"; }
|
||||
String getSolutionComment() const { return "# Visual Studio 2012"; }
|
||||
|
||||
static MSVCProjectExporterVC2012* createForSettings (Project& project, const ValueTree& settings)
|
||||
{
|
||||
if (settings.hasType (getValueTreeTypeName()))
|
||||
return new MSVCProjectExporterVC2012 (project, settings);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
void addPlatformToolsetToPropertyGroup (XmlElement& project) const
|
||||
{
|
||||
forEachXmlChildElementWithTagName (project, e, "PropertyGroup")
|
||||
{
|
||||
XmlElement* platformToolset (new XmlElement ("PlatformToolset"));
|
||||
platformToolset->addTextElement (getPlatformToolset());
|
||||
|
||||
e->addChildElement (platformToolset);
|
||||
}
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2012)
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ StringArray ProjectExporter::getExporterNames()
|
|||
s.add (MSVCProjectExporterVC2005::getName());
|
||||
s.add (MSVCProjectExporterVC2008::getName());
|
||||
s.add (MSVCProjectExporterVC2010::getName());
|
||||
s.add (MSVCProjectExporterVC2012::getName());
|
||||
s.add (MakefileProjectExporter::getNameLinux());
|
||||
s.add (AndroidProjectExporter::getNameAndroid());
|
||||
return s;
|
||||
|
|
@ -68,8 +69,9 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int
|
|||
case 2: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
|
||||
case 3: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
|
||||
case 4: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
|
||||
case 5: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break;
|
||||
case 6: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break;
|
||||
case 5: exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break;
|
||||
case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break;
|
||||
case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break;
|
||||
default: jassertfalse; return 0;
|
||||
}
|
||||
|
||||
|
|
@ -96,6 +98,7 @@ ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueT
|
|||
ProjectExporter* exp = MSVCProjectExporterVC2005::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2012::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = XCodeProjectExporter ::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MakefileProjectExporter ::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = AndroidProjectExporter ::createForSettings (project, settings);
|
||||
|
|
@ -117,6 +120,7 @@ bool ProjectExporter::canProjectBeLaunched (Project* project)
|
|||
MSVCProjectExporterVC2005::getValueTreeTypeName(),
|
||||
MSVCProjectExporterVC2008::getValueTreeTypeName(),
|
||||
MSVCProjectExporterVC2010::getValueTreeTypeName(),
|
||||
MSVCProjectExporterVC2012::getValueTreeTypeName(),
|
||||
#elif JUCE_LINUX
|
||||
// (this doesn't currently launch.. not really sure what it would do on linux)
|
||||
//MakefileProjectExporter::getValueTreeTypeName(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue