Author Topic: ExportMakeFile Option  (Read 5999 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
ExportMakeFile Option
« on: October 11, 2007, 09:06:50 pm »
Export Makefile Option has been disabled from the Build Menu. I want to enable that option. How should I go about doing this?

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: ExportMakeFile Option
« Reply #1 on: October 11, 2007, 09:31:36 pm »
There's a plug-in that can help you.
Here: http://forums.codeblocks.org/index.php/topic,6241.msg47767.html

Regards, XayC

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: ExportMakeFile Option
« Reply #2 on: October 11, 2007, 10:06:37 pm »
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);
}

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: ExportMakeFile Option
« Reply #3 on: October 11, 2007, 10:13:36 pm »
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).
Quote
This functionality has been temporarily removed [...] is not anymore in-sync with the rest of the build process.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: ExportMakeFile Option
« Reply #4 on: October 11, 2007, 10:15:22 pm »
Agreed, but I still want to enable it. What is the procedure to do so?

Thanks,
Puneet

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: ExportMakeFile Option
« Reply #5 on: October 11, 2007, 10:27:35 pm »
plugins\compilergcc\compilergcc.cpp:
Code
mbar->Enable(idMenuExportMakefile, false);// !running && prj);
Try to change that line to true, so that it will enable the menuitem.
« Last Edit: October 11, 2007, 10:29:44 pm by XayC »

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: ExportMakeFile Option
« Reply #6 on: October 11, 2007, 10:54:30 pm »
Thanks for the help.