VS2013 Introjucer Exporter


#1

Changes missing are related to adding the usage of the new exporter. The rest is as follows:

Changes to VC2010BuildConfiguration:

virtual String getToolsVersion() const { return "4.0"; }

//[...]

//==============================================================================
void fillInProjectXml (XmlElement& projectXml) const
{
    projectXml.setAttribute ("DefaultTargets", "Build");
    projectXml.setAttribute ("ToolsVersion", getToolsVersion());

VS2013 exporter itself:

//==============================================================================
class MSVCProjectExporterVC2013 : public MSVCProjectExporterVC2010
{
public:
    MSVCProjectExporterVC2013 (Project& p, const ValueTree& t)
        : MSVCProjectExporterVC2010 (p, t, "VisualStudio2013")
    {
        name = getName();
    }

    static const char* getName()                { return "Visual Studio 2013"; }
    static const char* getValueTreeTypeName()   { return "VS2013"; }
    int getVisualStudioVersion() const          { return 11; }
    String getSolutionComment() const           { return "# Visual Studio 2013"; }
    virtual String getToolsVersion() const      { return "12.0"; }

    String getPlatformToolset() const
    {
        const String s (settings [Ids::toolset].toString());
        return s.isNotEmpty() ? s : "v120";
    }

    Value getPlatformToolsetValue()             { return getSetting (Ids::toolset); }

    static MSVCProjectExporterVC2013* createForSettings (Project& project, const ValueTree& settings)
    {
        if (settings.hasType (getValueTreeTypeName()))
            return new MSVCProjectExporterVC2013 (project, settings);

        return nullptr;
    }

    void createExporterProperties (PropertyListBuilder& props)
    {
        MSVCProjectExporterVC2010::createExporterProperties (props);

        const char* const toolsetNames[] = { "(default)", "v120", "v120_xp", nullptr };
        const var toolsets[]             = { var(),       "v120", "v120_xp" };

        props.add (new ChoicePropertyComponent (getPlatformToolsetValue(), "Platform Toolset",
                                                StringArray (toolsetNames),
                                                Array<var> (toolsets, numElementsInArray (toolsets))));
    }

private:
    void addPlatformToolsetToPropertyGroup (XmlElement& p) const
    {
        forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
        {
            XmlElement* platformToolset (new XmlElement ("PlatformToolset"));
            platformToolset->addTextElement (getPlatformToolset());

            e->addChildElement (platformToolset);
        }
    }

    JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2013)
};

#2

Oh Microsoft, not yet another version to show on our list…!

Thanks, I’ll get around to adding this at some point!


#3

Yeah, I don’t think it’s gonna end there, either!


#4

Hey Jules,

VS2013 saves its projects with tools version 12.0. For consistency, which is why I added this in the first place, could you change this (Line 1445):

void fillInFiltersXml (XmlElement& filterXml) const
{
    filterXml.setAttribute ("ToolsVersion", "4.0");

to this:

void fillInFiltersXml (XmlElement& filterXml) const
{
    filterXml.setAttribute ("ToolsVersion", getToolsVersion());

#5

Ah yes, gotcha. thanks, will update that!


#6

Would it be possible to add the other optimization options for it?

 


#7

It's already there; that option is per exporter configuration. :)

(now how the hell do I place inline screenshots now?)