Beispiel #1
0
VCProject::VCProject(VSTemplateProject* projTemplate, const std::string& id)
: m_template(projTemplate)
{
  sbAssert(projTemplate);
  sbAssert(isAbsolutePath(projTemplate->getPath()));

  // Determine subtype (shared or not)
   m_subType = projTemplate->isShared() ? VCShared : VCNone;

  // TODO: validate passed in id
  if (!id.empty())
    m_id = id;
  else
    m_id = sole::uuid4().str();

  string guid = formatVSGUID(m_id);
  if (m_subType == VCShared)
  {
      TELEMETRY_EVENT_GUID(L"VSImporterSharedProjectGuid", guid);
  }
  else
  {
      TELEMETRY_EVENT_GUID(L"VSImporterProjectGuid", guid);
  }
  addGlobalProperty("ProjectGuid", guid);
}
Beispiel #2
0
void VSSolution::writeProjectConfigurationPlatforms(std::ostream& out) const {
    out << "\t"
        << "GlobalSection(ProjectConfigurationPlatforms) = postSolution" << std::endl;
    for (auto project : m_buildableProjects) {
        std::string projId = formatVSGUID(project.second->getId());

        // Keeping for now - will be phased out once we get enough traction on project tracking for
        // solution folder, shared project, standard project
        TELEMETRY_EVENT_GUID(L"VSImporterNewProject", projId);

        // Ignore shared projects
        if (project.second->getProject()->getSubType() == VCShared)
            continue;
        bool isDeployable = project.second->getProject()->isDeployable();
        for (auto config : m_configurations) {
            for (auto platform : m_platforms) {
                std::string projConfig = project.second->getMappedConfiguration(config);
                std::string projPlatform = project.second->getMappedPlatform(platform);
                out << "\t\t" << projId << "." << config << "|" << platform << ".ActiveCfg = " << projConfig << "|" << projPlatform
                    << std::endl;
                out << "\t\t" << projId << "." << config << "|" << platform << ".Build.0 = " << projConfig << "|" << projPlatform
                    << std::endl;
                if (isDeployable) {
                    out << "\t\t" << projId << "." << config << "|" << platform << ".Deploy.0 = " << projConfig << "|" << projPlatform
                        << std::endl;
                }
            }
        }
    }
    out << "\t"
        << "EndGlobalSection" << std::endl;
}
VSSolutionFolderProject::VSSolutionFolderProject(const std::string& name, VSSolution& parent) : VSSolutionProject(parent), m_name(name) {
    m_id = sole::uuid4().str();
    std::string guid = formatVSGUID(m_id);
    TELEMETRY_EVENT_GUID(L"VSImporterSolutionFolderGuid", guid);
}