Exemplo n.º 1
0
void PSGeneralPage::Save(BuildConfigPtr buildConf, ProjectSettingsPtr projSettingsPtr)
{
    buildConf->SetOutputFileName( GetPropertyAsString(m_pgPropOutputFile) );
    buildConf->SetIntermediateDirectory( GetPropertyAsString(m_pgPropIntermediateFolder) );
    buildConf->SetCommand( GetPropertyAsString(m_pgPropProgram) );
    buildConf->SetCommandArguments(GetPropertyAsString(m_pgPropArgs));
    buildConf->SetWorkingDirectory(GetPropertyAsString(m_pgPropWorkingDirectory));

    // Get the project type selection, unlocalised
    projSettingsPtr->SetProjectType( GetPropertyAsString(m_pgPropProjectType) );
    buildConf->SetCompilerType( GetPropertyAsString(m_pgPropCompiler) );
    buildConf->SetDebuggerType( GetPropertyAsString(m_pgPropDebugger) );
    buildConf->SetPauseWhenExecEnds( GetPropertyAsBool(m_pgPropPause) );
    buildConf->SetProjectType( GetPropertyAsString(m_pgPropProjectType) );
    buildConf->SetDebugArgs( GetPropertyAsString(m_pgPropDebugArgs) );
    buildConf->SetIsGUIProgram( GetPropertyAsBool(m_pgPropGUIApp) );
    buildConf->SetIsProjectEnabled( m_checkBoxEnabled->IsChecked() );
    buildConf->SetUseSeparateDebugArgs( GetPropertyAsBool(m_pgPropUseSeparateDebuggerArgs) );
}
Exemplo n.º 2
0
bool Project::Create(const wxString &name, const wxString &description, const wxString &path, const wxString &projType)
{
    m_vdCache.clear();

    m_fileName = path + wxFileName::GetPathSeparator() + name + wxT(".project");
    m_fileName.MakeAbsolute();

    wxXmlNode *root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("CodeLite_Project"));
    m_doc.SetRoot(root);
    m_doc.GetRoot()->AddProperty(wxT("Name"), name);

    wxXmlNode *descNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Description"));
    XmlUtils::SetNodeContent(descNode, description);
    m_doc.GetRoot()->AddChild(descNode);

    // Create the default virtual directories
    wxXmlNode *srcNode = NULL, *headNode = NULL;

    srcNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("VirtualDirectory"));
    srcNode->AddProperty(wxT("Name"), wxT("src"));
    m_doc.GetRoot()->AddChild(srcNode);

    headNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("VirtualDirectory"));
    headNode->AddProperty(wxT("Name"), wxT("include"));
    m_doc.GetRoot()->AddChild(headNode);

    //creae dependencies node
    wxXmlNode *depNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Dependencies"));
    root->AddChild(depNode);

    SaveXmlFile();
    //create build settings
    SetSettings(new ProjectSettings(NULL));
    ProjectSettingsPtr settings = GetSettings();
    settings->SetProjectType(projType);
    SetSettings(settings);
    SetModified(true);
    return true;
}