예제 #1
0
void wxFormBuilder::DoLaunchWxFB(const wxString& file)
{
	wxString fbpath = GetWxFBPath();
	if (fbpath.IsEmpty()) {
		wxMessageBox(_("Failed to launch wxFormBuilder, no path specified\nPlease set wxFormBuilder path from Plugins -> wxFormBuilder -> Settings..."),
		             wxT("EmbeddedLite"), wxOK|wxCENTER|wxICON_WARNING);
		return;
	}
	ConfFormBuilder confData;
	m_mgr->GetConfigTool()->ReadObject(wxT("wxFormBuilder"), &confData);
	wxString cmd = confData.GetCommand();
	cmd.Replace(wxT("$(wxfb)"), fbpath);
	cmd.Replace(wxT("$(wxfb_project)"), wxString::Format(wxT("\"%s\""), file.c_str()));

	// Launch !
	wxExecute(cmd);
}
예제 #2
0
void wxFormBuilder::DoLaunchWxFB(const wxString& file)
{
    wxString fbpath = GetWxFBPath();
    //	if (fbpath.IsEmpty()) {
    //		wxMessageBox(_("Failed to launch wxFormBuilder, no path specified\nPlease set wxFormBuilder path from
    // Plugins
    //-> wxFormBuilder -> Settings..."),
    //		             _("CodeLite"), wxOK|wxCENTER|wxICON_WARNING);
    //		return;
    //	}
    ConfFormBuilder confData;
    m_mgr->GetConfigTool()->ReadObject(wxT("wxFormBuilder"), &confData);
    wxString cmd = confData.GetCommand();
    cmd.Replace(wxT("$(wxfb)"), fbpath);
    cmd.Replace(wxT("$(wxfb_project)"), wxString::Format(wxT("\"%s\""), file.c_str()));

    WrapInShell(cmd);
    CreateAsyncProcess(this, cmd, IProcessCreateWithHiddenConsole);
}