News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

ExportMakeFile Option

Started by puneet_m, October 11, 2007, 09:06:50 PM

Previous topic - Next topic

puneet_m

Export Makefile Option has been disabled from the Build Menu. I want to enable that option. How should I go about doing this?

XayC


puneet_m

I want to enable the following function at the location plugins\compilergcc\compilergcc.cpp-->
I have made the change in compiler_menu.xrc, but it still diabled. So how should I enable it?

void CompilerGCC::OnExportMakefile(wxCommandEvent& event)
{
    cbMessageBox(_("This functionality has been temporarily removed from Code::Blocks.\n"
                    "With all the updates from the last couple of months, the makefile exporter "
                    "is not anymore in-sync with the rest of the build process.\n"
                    "We are sorry for the inconvenience..."),
                    _T("Warning"),
                    wxICON_WARNING);
    return;

    if (!CompilerValid())
        return;
    wxString makefile = wxGetTextFromUser(_("Please enter the \"Makefile\" name:"), _("Export Makefile"), ProjectMakefile());
    if (makefile.IsEmpty())
        return;

    wxSetWorkingDirectory(m_Project->GetBasePath());
    if (UseMake())
    {
        DoCreateMakefile(false, makefile);
    }
    else
    {
        MakefileGenerator generator(this, m_Project, makefile, m_PageIndex);
        generator.CreateMakefile();
    }
    wxString msg;
    msg.Printf(_("\"%s\" has been exported in the same directory as the project file."), makefile.c_str());
    cbMessageBox(msg);
}

XayC

Although I don't know much about that, I guess that if the feature has been removed there's a reason (which seems quite well described by a portion of code you quoted).
QuoteThis functionality has been temporarily removed [...] is not anymore in-sync with the rest of the build process.

puneet_m

Agreed, but I still want to enable it. What is the procedure to do so?

Thanks,
Puneet

XayC

#5
plugins\compilergcc\compilergcc.cpp:
mbar->Enable(idMenuExportMakefile, false);// !running && prj);
Try to change that line to true, so that it will enable the menuitem.

puneet_m