3 class myApp : public wxApp
7 int OnExit() { return true; }
11 CREA_WXMAIN_WITH_CONSOLE
17 //See http://www.wxwindows.org/faqgtk.htm#locale
18 setlocale(LC_NUMERIC, "C");
20 wxInitAllImageHandlers();
22 wxString dir = wxDirSelector(_T("Select directory in which to create the project"), _T(""), wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
24 if (dir.IsEmpty()) return false;
26 wxString name = wxGetTextFromUser(_T("Enter project name"),
29 if (name.IsEmpty()) return false;
32 std::string command("creaNewProject.bat ");
34 std::string command("creaNewProject.sh ");
36 command += crea::wx2std(dir) + " " + crea::wx2std(name);
38 if ( ! system ( command.c_str() ) )
40 wxMessageBox(_T("Done !"),_T("creaNewProject"),
41 wxOK | wxICON_INFORMATION);
45 wxString err(_T("An error occured while running '"));
46 err += crea::std2wx(command) + _T("'");
47 wxMessageBox(err,_T("creaNewProject"),wxOK | wxICON_ERROR);