1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Generate sample VC++ project files
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "makeproj.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
19 #if defined(__BORLANDC__)
24 #include "wx/resource.h"
30 #include "projgenrc.h"
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
35 // the application icon
36 #if defined(__WXGTK__) || defined(__WXMOTIF__)
37 #include "mondrian.xpm"
40 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
44 const wxStringList wxEmptyStringList
;
46 // Define a new application type, each program should derive a class from wxApp
47 class MyApp
: public wxApp
50 // override base class virtuals
51 // ----------------------------
53 // this one is called on application startup and is a good place for the app
54 // initialization (doing it here and not in the ctor allows to have an error
55 // return: if OnInit() returns false, the application terminates)
56 virtual bool OnInit();
58 bool GenerateSample(const wxString
& projectName
, const wxString
& targetName
,
59 const wxString
& path
, const wxStringList
& sourceFiles
, const wxString
& relativeRootPath
= "../..",
60 const wxStringList
& extraLibsDebug
= wxEmptyStringList
,
61 const wxStringList
& extraLibsRelease
= wxEmptyStringList
);
62 void GenerateSamples(const wxString
& dir
); // Takes wxWindows directory path
65 // Define a new frame type: this is going to be our main frame
66 class MyFrame
: public wxFrame
70 MyFrame(const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
);
72 // event handlers (these functions should _not_ be virtual)
73 void OnQuit(wxCommandEvent
& event
);
74 void OnAbout(wxCommandEvent
& event
);
75 void OnGenerate(wxCommandEvent
& event
);
77 bool GenerateSample(const wxString
& projectName
, const wxString
& targetName
,
78 const wxString
& path
, const wxStringList
& sourceFiles
, const wxString
& relativeRootPath
= "../..");
81 // any class wishing to process wxWindows events must use this macro
85 // Define a dialog: this will be our main dialog
86 class MyDialog
: public wxDialog
90 MyDialog(const wxString
& title
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
);
92 // event handlers (these functions should _not_ be virtual)
93 void OnQuit(wxCommandEvent
& event
);
94 void OnAbout(wxCommandEvent
& event
);
95 void OnGenerate(wxCommandEvent
& event
);
96 void OnGenerateSamples(wxCommandEvent
& event
);
99 // any class wishing to process wxWindows events must use this macro
100 DECLARE_EVENT_TABLE()
104 // ----------------------------------------------------------------------------
106 // ----------------------------------------------------------------------------
108 // IDs for the controls and the menu commands
112 MakeProject_Quit
= 1,
114 MakeProject_Generate
,
115 MakeProject_GenerateSamples
,
117 // controls start here (the numbers are, of course, arbitrary)
118 MakeProject_Text
= 1000,
121 // ----------------------------------------------------------------------------
122 // event tables and other macros for wxWindows
123 // ----------------------------------------------------------------------------
125 // the event tables connect the wxWindows events with the functions (event
126 // handlers) which process them. It can be also done at run-time, but for the
127 // simple menu events like this the static method is much simpler.
128 BEGIN_EVENT_TABLE(MyFrame
, wxFrame
)
129 EVT_MENU(MakeProject_Quit
, MyFrame::OnQuit
)
130 EVT_MENU(MakeProject_About
, MyFrame::OnAbout
)
131 EVT_MENU(MakeProject_Generate
, MyFrame::OnGenerate
)
134 // Create a new application object: this macro will allow wxWindows to create
135 // the application object during program execution (it's better than using a
136 // static object for many reasons) and also declares the accessor function
137 // wxGetApp() which will return the reference of the right type (i.e. MyApp and
141 // ============================================================================
143 // ============================================================================
145 // ----------------------------------------------------------------------------
146 // the application class
147 // ----------------------------------------------------------------------------
149 // 'Main program' equivalent: the program execution "starts" here
153 // Create the main application window
154 MyFrame
*frame
= new MyFrame("MakeProject wxWindows App",
155 wxPoint(50, 50), wxSize(450, 340));
160 wxResourceParseFile("projgenrc.wxr");
162 MyDialog
* dialog
= new MyDialog("VC++ MakeProject");
170 bool MyApp::GenerateSample(const wxString
& projectName
, const wxString
& targetName
,
171 const wxString
& path
, const wxStringList
& sourceFiles
, const wxString
& relativeRootPath
,
172 const wxStringList
& extraLibsDebug
, const wxStringList
& extraLibsRelease
)
174 wxString
relativeIncludePath(relativeRootPath
+ wxString("/include"));
175 wxString
relativeLibPath(relativeRootPath
+ wxString("/lib"));
176 wxString
relativeIncludePathContrib(relativeRootPath
+ wxString("/contrib/include"));
177 wxString
relativeLibPathContrib(relativeRootPath
+ wxString("/contrib/lib"));
182 project
.SetIncludeDirs(wxStringList((const char*) relativeIncludePath
, (const char*) relativeIncludePathContrib
, 0));
183 project
.SetResourceIncludeDirs(wxStringList((const char*) relativeIncludePath
, (const char*) relativeIncludePathContrib
, 0));
184 project
.SetLibDirs(wxStringList((const char*) relativeLibPath
, (const char*) relativeLibPathContrib
, 0));
186 // project.SetExtraLibsDebug(wxStringList("opengl32.lib", "glu32.lib", 0));
187 // project.SetExtraLibsRelease(wxStringList("opengl32.lib", "glu32.lib", 0));
188 project
.SetExtraLibsDebug(extraLibsDebug
);
189 project
.SetExtraLibsRelease(extraLibsRelease
);
191 project
.SetProjectName(projectName
);
192 project
.SetTargetName(targetName
);
193 project
.SetProjectPath(path
);
194 project
.SetSourceFiles(sourceFiles
);
196 if (!project
.GenerateVCProject())
198 wxString
msg("Could not generate ");
207 void MyApp::GenerateSamples(const wxString
& dir
)
209 // Small bug. Because we don't distinguish between Debug/DebugDLL, Release/ReleaseDLL,
210 // we can't yet make a sample that uses other wxWindows static libraries + the wxWindows DLL library.
214 GenerateSample("CalendarVC", "calendar", dir
+ wxString("/samples/calendar"), wxStringList("calendar.cpp", 0));
215 GenerateSample("CaretVC", "caret", dir
+ wxString("/samples/caret"), wxStringList("caret.cpp", 0));
216 GenerateSample("CheckLstVC", "checklst", dir
+ wxString("/samples/checklst"), wxStringList("checklst.cpp", 0));
217 GenerateSample("ConfigVC", "conftest", dir
+ wxString("/samples/config"), wxStringList("conftest.cpp", 0));
218 GenerateSample("ControlsVC", "controls", dir
+ wxString("/samples/controls"), wxStringList("controls.cpp", 0));
219 GenerateSample("DbVC", "dbtest", dir
+ wxString("/samples/db"),
220 wxStringList("dbtest.cpp", "listdb.cpp", "dbtest.h", "listdb.h", 0));
221 GenerateSample("DialogsVC", "dialogs", dir
+ wxString("/samples/dialogs"),
222 wxStringList("dialogs.cpp", "dialogs.h", 0));
223 GenerateSample("DndVC", "dnd", dir
+ wxString("/samples/dnd"), wxStringList("dnd.cpp", 0));
224 GenerateSample("DocViewVC", "docview", dir
+ wxString("/samples/docview"),
225 wxStringList("docview.cpp", "doc.cpp", "view.cpp", "docview.h", "doc.h", "view.h", 0));
226 GenerateSample("DocVwMDIVC", "docview", dir
+ wxString("/samples/docvwmdi"),
227 wxStringList("docview.cpp", "doc.cpp", "view.cpp", "docview.h", "doc.h", "view.h", 0));
228 GenerateSample("DynamicVC", "dynamic", dir
+ wxString("/samples/dynamic"), wxStringList("dynamic.cpp", 0));
229 GenerateSample("DrawingVC", "drawing", dir
+ wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
230 GenerateSample("ExecVC", "exec", dir
+ wxString("/samples/exec"), wxStringList("exec.cpp", 0));
231 GenerateSample("EventVC", "event", dir
+ wxString("/samples/event"), wxStringList("event.cpp", 0));
232 GenerateSample("GridVC", "grid", dir
+ wxString("/samples/grid"), wxStringList("grid.cpp", 0));
233 GenerateSample("NewGridVC", "griddemo", dir
+ wxString("/samples/newgrid"), wxStringList("griddemo.cpp", 0));
234 GenerateSample("HelpVC", "demo", dir
+ wxString("/samples/help"), wxStringList("demo.cpp", 0));
237 GenerateSample("CubeVC", "cube", dir
+ wxString("/samples/opengl/cube"), wxStringList("cube.cpp", "cube.h", 0),
238 "../../..", wxStringList("opengl32.lib", "glu32.lib", 0), wxStringList("opengl32.lib", "glu32.lib", 0));
239 GenerateSample("IsosurfVC", "isosurf", dir
+ wxString("/samples/opengl/isosurf"), wxStringList("isosurf.cpp", "isousrf.h", 0),
240 "../../..", wxStringList("opengl32.lib", "glu32.lib", 0), wxStringList("opengl32.lib", "glu32.lib", 0));
241 GenerateSample("PenguinVC", "penguin", dir
+ wxString("/samples/opengl/penguin"), wxStringList("penguin.cpp", "penguin.h",
242 "lw.cpp", "lw.h", "trackball.c", "trackball.h", 0),
243 "../../..", wxStringList("opengl32.lib", "glu32.lib", 0), wxStringList("opengl32.lib", "glu32.lib", 0));
246 GenerateSample("AboutVC", "about", dir
+ wxString("/samples/html/about"), wxStringList("about.cpp", 0),
248 GenerateSample("HelpVC", "help", dir
+ wxString("/samples/html/help"), wxStringList("help.cpp", 0),
250 GenerateSample("PrintingVC", "printing", dir
+ wxString("/samples/html/printing"), wxStringList("printing.cpp", 0),
252 GenerateSample("TestVC", "test", dir
+ wxString("/samples/html/test"), wxStringList("test.cpp", 0),
254 GenerateSample("VirtualVC", "virtual", dir
+ wxString("/samples/html/virtual"), wxStringList("virtual.cpp", 0),
256 GenerateSample("WidgetVC", "widget", dir
+ wxString("/samples/html/widget"), wxStringList("widget.cpp", 0),
258 GenerateSample("ZipVC", "zip", dir
+ wxString("/samples/html/zip"), wxStringList("zip.cpp", 0),
260 GenerateSample("HelpViewVC", "helpview", dir
+ wxString("/samples/html/helpview"), wxStringList("helpview.cpp", 0),
263 GenerateSample("ImageVC", "image", dir
+ wxString("/samples/image"), wxStringList("image.cpp", 0));
264 GenerateSample("InternatVC", "internat", dir
+ wxString("/samples/internat"), wxStringList("internat.cpp", 0));
265 GenerateSample("JoytestVC", "joytest", dir
+ wxString("/samples/joytest"), wxStringList("joytest.cpp", "joytest.h", 0));
266 GenerateSample("LayoutVC", "layout", dir
+ wxString("/samples/layout"), wxStringList("layout.cpp", "layout.h", 0));
267 GenerateSample("ListctrlVC", "listtest", dir
+ wxString("/samples/listctrl"), wxStringList("listtest.cpp", "listtest.h", 0));
268 GenerateSample("MdiVC", "mdi", dir
+ wxString("/samples/mdi"), wxStringList("mdi.cpp", "mdi.h", 0));
269 GenerateSample("MemcheckVC", "memcheck", dir
+ wxString("/samples/memcheck"), wxStringList("memcheck.cpp", 0));
270 // Don't always generate this project since it has to be tweaked by hand.
271 // GenerateSample("MfcVC", "mfctest", dir + wxString("/samples/mfc"), wxStringList("mfctest.cpp", "mfctest.h", 0));
272 GenerateSample("MiniframVC", "minifram", dir
+ wxString("/samples/minifram"), wxStringList("minifram.cpp", "minifram.h", 0));
273 GenerateSample("MinimalVC", "minimal", dir
+ wxString("/samples/minimal"), wxStringList("minimal.cpp", 0));
274 GenerateSample("NativdlgVC", "nativdlg", dir
+ wxString("/samples/nativdlg"), wxStringList("nativdlg.cpp", "nativdlg.h", "resource.h", 0));
275 GenerateSample("DialupVC", "nettest", dir
+ wxString("/samples/dialup"), wxStringList("nettest.cpp", 0));
276 GenerateSample("NotebookVC", "notebook", dir
+ wxString("/samples/notebook"), wxStringList("notebook.cpp", "notebook.h", 0));
277 GenerateSample("OleautoVC", "oleauto", dir
+ wxString("/samples/oleauto"), wxStringList("oleauto.cpp", 0));
278 GenerateSample("OwnerdrwVC", "ownerdrw", dir
+ wxString("/samples/ownerdrw"), wxStringList("ownerdrw.cpp", 0));
279 GenerateSample("PngVC", "pngdemo", dir
+ wxString("/samples/png"), wxStringList("pngdemo.cpp", "pngdemo.h", 0));
280 GenerateSample("PrintingVC", "printing", dir
+ wxString("/samples/printing"), wxStringList("printing.cpp", "printing.h", 0));
281 GenerateSample("ProplistVC", "proplist", dir
+ wxString("/samples/proplist"), wxStringList("proplist.cpp", "proplist.h", 0));
282 GenerateSample("PropsizeVC", "propsize", dir
+ wxString("/samples/propsize"), wxStringList("propsize.cpp", 0));
283 GenerateSample("RegtestVC", "regtest", dir
+ wxString("/samples/regtest"), wxStringList("regtest.cpp", 0));
284 GenerateSample("ResourceVC", "resource", dir
+ wxString("/samples/resource"), wxStringList("resource.cpp", "resource.h", 0));
285 GenerateSample("RichEditVC", "wxLayout", dir
+ wxString("/samples/richedit"), wxStringList("wxLayout.cpp",
286 "kbList.cpp", "wxllist.cpp", "wxlparser.cpp", "wxlwindow.cpp", 0));
287 GenerateSample("SashtestVC", "sashtest", dir
+ wxString("/samples/sashtest"), wxStringList("sashtest.cpp", "sashtest.h", 0));
288 GenerateSample("ScrollVC", "scroll", dir
+ wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
289 GenerateSample("ScrollsubVC", "scrollsub", dir
+ wxString("/samples/scrollsub"), wxStringList("scrollsub.cpp", 0));
290 GenerateSample("SplitterVC", "splitter", dir
+ wxString("/samples/splitter"), wxStringList("splitter.cpp", 0));
291 GenerateSample("StatbarVC", "statbar", dir
+ wxString("/samples/statbar"), wxStringList("statbar.cpp", 0));
292 GenerateSample("TabVC", "tab", dir
+ wxString("/samples/tab"), wxStringList("tab.cpp", "tab.h", 0));
293 GenerateSample("TaskbarVC", "tbtest", dir
+ wxString("/samples/taskbar"), wxStringList("tbtest.cpp", "tbtest.h", 0));
294 GenerateSample("TextVC", "text", dir
+ wxString("/samples/text"), wxStringList("text.cpp", 0));
295 GenerateSample("ThreadVC", "thread", dir
+ wxString("/samples/thread"), wxStringList("thread.cpp", 0));
296 GenerateSample("ToolbarVC", "toolbar", dir
+ wxString("/samples/toolbar"), wxStringList("toolbar.cpp", 0));
297 GenerateSample("TreectrlVC", "treectrl", dir
+ wxString("/samples/treectrl"), wxStringList("treectrl.cpp", "treectrl.h", 0));
298 GenerateSample("TypetestVC", "typetest", dir
+ wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0));
299 GenerateSample("ValidateVC", "validate", dir
+ wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0));
300 GenerateSample("ClientVC", "client", dir
+ wxString("/samples/sockets"), wxStringList("client.cpp", 0));
301 GenerateSample("ServerVC", "server", dir
+ wxString("/samples/sockets"), wxStringList("server.cpp", 0));
302 GenerateSample("ClientVC", "client", dir
+ wxString("/samples/ipc"), wxStringList("client.cpp", "client.h", "ddesetup.h", 0));
303 GenerateSample("ServerVC", "server", dir
+ wxString("/samples/ipc"), wxStringList("server.cpp", "server.h", "ddesetup.h", 0));
304 GenerateSample("CaretVC", "caret", dir
+ wxString("/samples/caret"), wxStringList("caret.cpp", 0));
305 GenerateSample("DrawingVC", "drawing", dir
+ wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
306 GenerateSample("ScrollVC", "scroll", dir
+ wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
307 GenerateSample("WizardVC", "wizard", dir
+ wxString("/samples/wizard"), wxStringList("wizard.cpp", 0));
308 GenerateSample("RotateVC", "rotate", dir
+ wxString("/samples/rotate"), wxStringList("rotate.cpp", 0));
309 GenerateSample("ExecVC", "exec", dir
+ wxString("/samples/exec"), wxStringList("exec.cpp", 0));
310 GenerateSample("FontVC", "font", dir
+ wxString("/samples/font"), wxStringList("font.cpp", 0));
311 GenerateSample("MenuVC", "menu", dir
+ wxString("/samples/menu"), wxStringList("menu.cpp", 0));
312 GenerateSample("TreelayVC", "treelay", dir
+ wxString("/samples/treelay"), wxStringList("treelay.cpp", "treelay.h", 0));
313 GenerateSample("DragimagVC", "dragimag", dir
+ wxString("/samples/dragimag"), wxStringList("dragimag.cpp", "dragimag.h", 0));
314 GenerateSample("PlotVC", "plot", dir
+ wxString("/samples/plot"), wxStringList("plot.cpp", 0));
318 GenerateSample("BombsVC", "bombs", dir
+ wxString("/demos/bombs"),
319 wxStringList("bombs.cpp", "bombs1.cpp", "game.cpp", "bombs.h", "game.h", 0));
321 GenerateSample("FortyVC", "forty", dir
+ wxString("/demos/forty"),
322 wxStringList("forty.cpp", "canvas.cpp", "card.cpp", "game.cpp", "pile.cpp", "playerdg.cpp", "scoredg.cpp", "scorefil.cpp",
323 "canvas.h", "forty.h", "card.h", "game.h", "pile.h", "playerdg.h", "scoredg.h", "scorefil.h",
326 GenerateSample("FractalVC", "fractal", dir
+ wxString("/demos/fractal"), wxStringList("fractal.cpp", 0));
328 GenerateSample("LifeVC", "life", dir
+ wxString("/demos/life"),
329 wxStringList("life.cpp", "game.cpp", "dialogs.cpp", "life.h", "game.h", "dialogs.h", 0));
331 GenerateSample("PoemVC", "wxpoem", dir
+ wxString("/demos/poem"), wxStringList("wxpoem.cpp", "wxpoem.h", 0));
333 GenerateSample("DbbrowseVC", "dbbrowse", dir
+ wxString("/demos/dbbrowse"),
334 wxStringList("dbbrowse.cpp", "browsedb.cpp", "dbgrid.cpp", "dbtree.cpp", "dlguser.cpp", "doc.cpp",
335 "pgmctrl.cpp", "tabpgwin.cpp",
336 "dbbrowse.h", "browsedb.h", "dbgrid.h", "dbtree.h", "dlguser.h", "doc.h", "pgmctrl.h", "std.h", "tabpgwin.h",
339 //// Samples in contrib
343 GenerateSample("OGLEditVC", "ogledit", dir
+ wxString("/contrib/samples/ogl/ogledit"),
344 wxStringList("ogledit.cpp", "doc.cpp", "palette.cpp", "view.cpp",
345 "doc.h", "ogledit.h", "palette.h", "view.h", 0),
347 wxStringList("ogld.lib", 0), wxStringList("ogl.lib", 0));
351 GenerateSample("StudioVC", "studio", dir
+ wxString("/contrib/samples/ogl/studio"),
352 wxStringList("studio.cpp", "cspalette.cpp", "dialogs.cpp", "view.cpp",
353 "doc.cpp", "mainfrm.cpp", "project.cpp", "shapes.cpp", "symbols.cpp", "csprint.cpp",
354 "studio.h", "cspalette.h", "dialogs.h", "view.h",
355 "doc.h", "mainfrm.h", "project.h", "shapes.h", "symbols.h", 0),
357 wxStringList("ogld.lib", 0), wxStringList("ogl.lib", 0));
361 GenerateSample("MMboardVC", "mmboard", dir
+ wxString("/contrib/samples/mmedia"),
362 wxStringList("mmboard.cpp", "mmboard.h", "mmbman.cpp", "mmbman.h", 0),
364 wxStringList("mmediad.lib", 0), wxStringList("mmedia.lib", 0));
366 // STC (Scintilla widget)
368 GenerateSample("StcTestVC", "stctest", dir
+ wxString("/contrib/samples/stc"),
369 wxStringList("stctest.cpp", 0),
371 wxStringList("stcd.lib", 0), wxStringList("stc.lib", 0));
377 GenerateSample("DialogEdVC", "dialoged", dir
+ wxString("/utils/dialoged/src"),
378 wxStringList("dialoged.cpp", "dlghndlr.cpp", "edlist.cpp", "edtree.cpp",
379 "reseditr.cpp", "reswrite.cpp", "symbtabl.cpp", "winstyle.cpp", "winprop.cpp",
380 "dialoged.h", "dlghndlr.h", "edlist.h", "edtree.h", "reseditr.h", "symbtabl.h", "winprop.h",
386 GenerateSample("Tex2RTFVC", "tex2rtf", dir
+ wxString("/utils/tex2rtf/src"),
387 wxStringList("tex2rtf.cpp", "htmlutil.cpp", "readshg.cpp", "rtfutils.cpp",
388 "table.cpp", "tex2any.cpp", "texutils.cpp", "xlputils.cpp",
389 "bmputils.h", "readshg.h", "rtfutils.h", "table.h", "tex2any.h", "tex2rtf.h", "wxhlpblk.h",
395 GenerateSample("HelpGenVC", "helpgen", dir
+ wxString("/utils/helpgen/src"),
396 wxStringList("helpgen.cpp", "cjparser.cpp", "docripper.cpp", "ifcontext.cpp",
397 "markup.cpp", "ripper_main.cpp", "scriptbinder.cpp", "sourcepainter.cpp",
399 "cjparser.h", "docripper.h", "ifcontext.h", "markup.h", "scriptbinder.h", "sourcepainter.h",
400 "srcparser.h", "wxstlac.h", "wxstllst.h", "wxstlvec.h", 0),
404 GenerateSample("ProjGenVC", "makeproj", dir
+ wxString("/utils/projgen"),
405 wxStringList("makeproj.cpp", "makeproj.h", 0),
410 GenerateSample("hhp2cachedVC", "hhp2cached", dir
+ wxString("/utils/hhp2cached"),
411 wxStringList("hhp2cached.cpp", 0),
416 // ----------------------------------------------------------------------------
418 // ----------------------------------------------------------------------------
421 MyFrame::MyFrame(const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
)
422 : wxFrame((wxFrame
*)NULL
, -1, title
, pos
, size
)
424 // set the frame icon
425 SetIcon(wxICON(mondrian
));
428 wxMenu
*menuFile
= new wxMenu
;
430 menuFile
->Append(MakeProject_Generate
, "&Generate");
431 menuFile
->Append(MakeProject_About
, "&About...");
432 menuFile
->AppendSeparator();
433 menuFile
->Append(MakeProject_Quit
, "E&xit");
435 // now append the freshly created menu to the menu bar...
436 wxMenuBar
*menuBar
= new wxMenuBar
;
437 menuBar
->Append(menuFile
, "&File");
439 // ... and attach this menu bar to the frame
442 // create a status bar just for fun (by default with 1 pane only)
444 SetStatusText("Welcome to wxWindows!");
450 void MyFrame::OnQuit(wxCommandEvent
& WXUNUSED(event
))
452 // TRUE is to force the frame to close
456 void MyFrame::OnAbout(wxCommandEvent
& WXUNUSED(event
))
458 wxMessageBox("MakeProject: generates VC++ project files",
459 "About MakeProject", wxOK
| wxICON_INFORMATION
, this);
462 void MyFrame::OnGenerate(wxCommandEvent
& WXUNUSED(event
))
464 wxGetApp().GenerateSamples("d:/wx2/wxWindows");
467 bool MyFrame::GenerateSample(const wxString
& projectName
, const wxString
& targetName
,
468 const wxString
& path
, const wxStringList
& sourceFiles
, const wxString
& relativeRootPath
)
470 return wxGetApp().GenerateSample(projectName
, targetName
, path
, sourceFiles
, relativeRootPath
);
477 wxProject::wxProject()
481 wxProject::~wxProject()
486 bool wxProject::GenerateVCProject()
488 wxString fullProjectName
= m_path
+ wxString("/") + m_projectName
+ ".dsp";
490 ofstream
stream(fullProjectName
);
494 /////////////////////// General stuff
496 stream
<< "# Microsoft Developer Studio Project File - Name=\"" << m_projectName
<< "\" - Package Owner=<4>\n";
497 stream
<< "# Microsoft Developer Studio Generated Build File, Format Version 5.00\n";
498 stream
<< "# (Actually, generated by MakeProject, (c) Julian Smart, 1998)\n";
499 stream
<< "# ** DO NOT EDIT **\n\n";
500 stream
<< "# TARGTYPE \"Win32 (x86) Application\" 0x0101\n\n";
501 stream
<< "CFG=" << m_projectName
<< " - Win32 Debug\n";
502 stream
<< "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n";
503 stream
<< "!MESSAGE use the Export Makefile command and run\n";
504 stream
<< "!MESSAGE\n";
505 stream
<< "!MESSAGE NMAKE /f \"" << m_projectName
<< ".mak\".\n";
506 stream
<< "!MESSAGE\n";
507 stream
<< "!MESSAGE You can specify a configuration when running NMAKE\n";
508 stream
<< "!MESSAGE by defining the macro CFG on the command line. For example:\n";
509 stream
<< "!MESSAGE\n";
510 stream
<< "!MESSAGE NMAKE /f \"" << m_projectName
<< ".mak\" CFG=\"" << m_projectName
<< " - Win32 Debug\"\n";
511 stream
<< "!MESSAGE\n";
512 stream
<< "!MESSAGE Possible choices for configuration are:\n";
513 stream
<< "!MESSAGE\n";
514 stream
<< "!MESSAGE \"" << m_projectName
<< " - Win32 Release\" (based on \"Win32 (x86) Application\")\n";
515 stream
<< "!MESSAGE \"" << m_projectName
<< " - Win32 Debug\" (based on \"Win32 (x86) Application\")\n";
516 stream
<< "!MESSAGE \"" << m_projectName
<< " - Win32 Debug DLL\" (based on \"Win32 (x86) Application\")\n";
517 stream
<< "!MESSAGE \"" << m_projectName
<< " - Win32 Release DLL\" (based on \"Win32 (x86) Application\")\n";
518 stream
<< "!MESSAGE\n";
520 stream
<< "# Begin Project\n";
521 stream
<< "# PROP Scc_ProjName \"\"\n";
522 stream
<< "# PROP Scc_LocalPath \"\"\n";
523 stream
<< "CPP=cl.exe\n";
524 stream
<< "MTL=midl.exe\n";
525 stream
<< "RSC=rc.exe\n";
528 /////////////////////// Win32 Release target
530 stream
<< "!IF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Release\"\n";
532 stream
<< "# PROP BASE Use_MFC 0\n";
533 stream
<< "# PROP BASE Use_Debug_Libraries 0\n";
534 stream
<< "# PROP BASE Output_Dir \"Release\"\n";
535 stream
<< "# PROP BASE Intermediate_Dir \"Release\"\n";
536 stream
<< "# PROP BASE Target_Dir \"\"\n";
537 stream
<< "# PROP Use_MFC 0\n";
538 stream
<< "# PROP Use_Debug_Libraries 0\n";
539 stream
<< "# PROP Output_Dir \"Release\"\n";
540 stream
<< "# PROP Intermediate_Dir \"Release\"\n";
541 stream
<< "# PROP Ignore_Export_Lib 0\n";
542 stream
<< "# PROP Target_Dir \"\"\n";
543 stream
<< "# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /YX /FD /c\n";
544 stream
<< "# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2";
546 int n
= m_includeDirs
.Number();
548 for (i
= 0; i
< n
; i
++)
550 wxString includeDir
= m_includeDirs
[i
];
551 stream
<< " /I \"" << includeDir
<< "\"";
554 stream
<< " /D \"NDEBUG\" /D \"WIN32\" /D \"_WINDOWS\" /D \"__WINDOWS__\" /D \"__WXMSW__\" /D \"__WIN95__\" /D \"__WIN32__\" /D WINVER=0x0400 /D \"STRICT\" /FD /c\n";
555 stream
<< "# SUBTRACT CPP /YX\n";
556 stream
<< "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /o NUL /win32\n";
557 stream
<< "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /o NUL /win32\n";
558 stream
<< "# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\n";
559 stream
<< "# ADD RSC /l 0x809 /d \"NDEBUG\"\n";
560 stream
<< "BSC32=bscmake.exe\n";
561 stream
<< "# ADD BASE BSC32 /nologo\n";
562 stream
<< "# ADD BSC32 /nologo\n";
563 stream
<< "LINK32=link.exe\n";
564 stream
<< "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386\n";
565 stream
<< "# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib ";
566 n
= m_extraLibsRelease
.Number();
567 for (i
= 0; i
< n
; i
++)
569 wxString lib
= m_extraLibsRelease
[i
];
570 stream
<< lib
<< " ";
573 stream
<< "/nologo /subsystem:windows /machine:I386 /nodefaultlib:\"libc.lib,libci.lib,msvcrtd.lib\" /out:\"Release/" << m_targetName
<< ".exe\"";
575 n
= m_releaseLibDirs
.Number();
576 for (i
= 0; i
< n
; i
++)
578 wxString libDir
= m_releaseLibDirs
[i
];
579 stream
<< " /libpath:\"" << libDir
<< "\"";
581 n
= m_libDirs
.Number();
582 for (i
= 0; i
< n
; i
++)
584 wxString libDir
= m_libDirs
[i
];
585 stream
<< " /libpath:\"" << libDir
<< "\"";
590 /////////////////////// Win32 Debug target
592 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Debug\"\n";
594 stream
<< "# PROP BASE Use_MFC 0\n";
595 stream
<< "# PROP BASE Use_Debug_Libraries 1\n";
596 stream
<< "# PROP BASE Output_Dir \"Debug\"\n";
597 stream
<< "# PROP BASE Intermediate_Dir \"Debug\"\n";
598 stream
<< "# PROP BASE Target_Dir \"\"\n";
599 stream
<< "# PROP Use_MFC 0\n";
600 stream
<< "# PROP Use_Debug_Libraries 1\n";
601 stream
<< "# PROP Output_Dir \"Debug\"\n";
602 stream
<< "# PROP Intermediate_Dir \"Debug\"\n";
603 stream
<< "# PROP Ignore_Export_Lib 0\n";
604 stream
<< "# PROP Target_Dir \"\"\n";
605 stream
<< "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /YX /FD /c\n";
606 stream
<< "# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od";
608 n
= m_includeDirs
.Number();
609 for (i
= 0; i
< n
; i
++)
611 wxString includeDir
= m_includeDirs
[i
];
612 stream
<< " /I \"" << includeDir
<< "\"";
615 stream
<< " /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"__WINDOWS__\" /D \"__WXMSW__\" /D DEBUG=1 /D \"__WXDEBUG__\" /D \"__WIN95__\" /D \"__WIN32__\" /D WINVER=0x0400 /D \"STRICT\" /Yu\"wx/wxprec.h\" /FD /c\n";
616 stream
<< "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\n";
617 stream
<< "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\n";
618 stream
<< "# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\n";
619 stream
<< "# ADD RSC /l 0x809 /d \"_DEBUG\"\n";
620 stream
<< "BSC32=bscmake.exe\n";
621 stream
<< "# ADD BASE BSC32 /nologo\n";
622 stream
<< "# ADD BSC32 /nologo\n";
623 stream
<< "LINK32=link.exe\n";
624 stream
<< "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
625 stream
<< "# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ";
626 n
= m_extraLibsDebug
.Number();
627 for (i
= 0; i
< n
; i
++)
629 wxString lib
= m_extraLibsDebug
[i
];
630 stream
<< lib
<< " ";
632 stream
<< "/nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:\"libcd.lib,libcid.lib,msvcrt.lib\" /out:\"Debug/" << m_targetName
<< ".exe\" /pdbtype:sept";
634 n
= m_debugLibDirs
.Number();
635 for (i
= 0; i
< n
; i
++)
637 wxString libDir
= m_debugLibDirs
[i
];
638 stream
<< " /libpath:\"" << libDir
<< "\"";
640 n
= m_libDirs
.Number();
641 for (i
= 0; i
< n
; i
++)
643 wxString libDir
= m_libDirs
[i
];
644 stream
<< " /libpath:\"" << libDir
<< "\"";
648 // stream << "!ENDIF\n";
651 /////////////////////// Win32 Debug DLL target
653 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Debug DLL\"\n";
655 stream
<< "# PROP BASE Use_MFC 0\n";
656 stream
<< "# PROP BASE Use_Debug_Libraries 1\n";
657 stream
<< "# PROP BASE Output_Dir \"DebugDLL\"\n";
658 stream
<< "# PROP BASE Intermediate_Dir \"DebugDLL\"\n";
659 stream
<< "# PROP BASE Target_Dir \"\"\n";
660 stream
<< "# PROP Use_MFC 0\n";
661 stream
<< "# PROP Use_Debug_Libraries 1\n";
662 stream
<< "# PROP Output_Dir \"DebugDLL\"\n";
663 stream
<< "# PROP Intermediate_Dir \"DebugDLL\"\n";
664 stream
<< "# PROP Ignore_Export_Lib 0\n";
665 stream
<< "# PROP Target_Dir \"\"\n";
666 stream
<< "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /YX /FD /c\n";
667 stream
<< "# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od";
669 n
= m_includeDirs
.Number();
670 for (i
= 0; i
< n
; i
++)
672 wxString includeDir
= m_includeDirs
[i
];
673 stream
<< " /I \"" << includeDir
<< "\"";
676 stream
<< " /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"__WINDOWS__\" /D \"__WXMSW__\" /D DEBUG=1 /D \"__WXDEBUG__\" /D \"__WIN95__\" /D \"__WIN32__\" /D WINVER=0x0400 /D \"STRICT\" /D WXUSINGDLL=1 /Yu\"wx/wxprec.h\" /FD /c\n";
677 stream
<< "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\n";
678 stream
<< "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\n";
679 stream
<< "# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\n";
680 stream
<< "# ADD RSC /l 0x809 /d \"_DEBUG\"\n";
681 stream
<< "BSC32=bscmake.exe\n";
682 stream
<< "# ADD BASE BSC32 /nologo\n";
683 stream
<< "# ADD BSC32 /nologo\n";
684 stream
<< "LINK32=link.exe\n";
685 stream
<< "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
686 stream
<< "# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdlld.lib ";
687 n
= m_extraLibsDebug
.Number();
688 for (i
= 0; i
< n
; i
++)
690 wxString lib
= m_extraLibsDebug
[i
];
691 stream
<< lib
<< " ";
693 stream
<< "/nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:\"libcd.lib\" /nodefaultlib:\"libcid.lib\" /out:\"DebugDLL/" << m_targetName
<< ".exe\" /pdbtype:sept";
695 n
= m_debugLibDirs
.Number();
696 for (i
= 0; i
< n
; i
++)
698 wxString libDir
= m_debugLibDirs
[i
];
699 libDir
+= "DLL"; // Assume that we have e.g. Debug so make it DebugDLL
700 stream
<< " /libpath:\"" << libDir
<< "\"";
702 n
= m_libDirs
.Number();
703 for (i
= 0; i
< n
; i
++)
705 wxString libDir
= m_libDirs
[i
];
706 stream
<< " /libpath:\"" << libDir
<< "\"";
710 // stream << "!ENDIF\n";
713 /////////////////////// Win32 Release DLL target
715 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Release DLL\"\n";
717 stream
<< "# PROP BASE Use_MFC 0\n";
718 stream
<< "# PROP BASE Use_Debug_Libraries 0\n";
719 stream
<< "# PROP BASE Output_Dir \"ReleaseDLL\"\n";
720 stream
<< "# PROP BASE Intermediate_Dir \"ReleaseDLL\"\n";
721 stream
<< "# PROP BASE Target_Dir \"\"\n";
722 stream
<< "# PROP Use_MFC 0\n";
723 stream
<< "# PROP Use_Debug_Libraries 0\n";
724 stream
<< "# PROP Output_Dir \"ReleaseDLL\"\n";
725 stream
<< "# PROP Intermediate_Dir \"ReleaseDLL\"\n";
726 stream
<< "# PROP Ignore_Export_Lib 0\n";
727 stream
<< "# PROP Target_Dir \"\"\n";
728 stream
<< "# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /YX /FD /c\n";
729 stream
<< "# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2";
731 n
= m_includeDirs
.Number();
732 for (i
= 0; i
< n
; i
++)
734 wxString includeDir
= m_includeDirs
[i
];
735 stream
<< " /I \"" << includeDir
<< "\"";
738 stream
<< " /D \"NDEBUG\" /D \"WIN32\" /D \"_WINDOWS\" /D \"__WINDOWS__\" /D \"__WXMSW__\" /D \"__WIN95__\" /D \"__WIN32__\" /D WINVER=0x0400 /D \"STRICT\" /D WXUSINGDLL=1 /FD /c\n";
739 stream
<< "# SUBTRACT CPP /YX\n";
740 stream
<< "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /o NUL /win32\n";
741 stream
<< "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /o NUL /win32\n";
742 stream
<< "# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\n";
743 stream
<< "# ADD RSC /l 0x809 /d \"NDEBUG\"\n";
744 stream
<< "BSC32=bscmake.exe\n";
745 stream
<< "# ADD BASE BSC32 /nologo\n";
746 stream
<< "# ADD BSC32 /nologo\n";
747 stream
<< "LINK32=link.exe\n";
748 stream
<< "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386\n";
749 stream
<< "# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdll.lib ";
750 n
= m_extraLibsRelease
.Number();
751 for (i
= 0; i
< n
; i
++)
753 wxString lib
= m_extraLibsRelease
[i
];
754 stream
<< lib
<< " ";
756 stream
<< "/nologo /subsystem:windows /machine:I386 /nodefaultlib:\"libc.lib\" /nodefaultlib:\"libci.lib\" /out:\"ReleaseDLL/" << m_targetName
<< ".exe\"";
758 n
= m_releaseLibDirs
.Number();
759 for (i
= 0; i
< n
; i
++)
761 wxString libDir
= m_releaseLibDirs
[i
];
762 libDir
+= "DLL"; // Assume that we have e.g. Release so make it ReleaseDLL
763 stream
<< " /libpath:\"" << libDir
<< "\"";
765 n
= m_libDirs
.Number();
766 for (i
= 0; i
< n
; i
++)
768 wxString libDir
= m_libDirs
[i
];
769 stream
<< " /libpath:\"" << libDir
<< "\"";
773 stream
<< "!ENDIF\n";
776 /////////////////////// Source code for targets
778 stream
<< "# Begin Target\n";
780 stream
<< "# Name \"" << m_projectName
<< " - Win32 Release\"\n";
781 stream
<< "# Name \"" << m_projectName
<< " - Win32 Debug\"\n";
782 stream
<< "# Name \"" << m_projectName
<< " - Win32 Debug DLL\"\n";
783 stream
<< "# Name \"" << m_projectName
<< " - Win32 Release DLL\"\n";
786 n
= m_sourceFiles
.Number();
787 for (i
= 0; i
< n
; i
++)
789 wxString sourceFile
= m_sourceFiles
[i
];
791 stream
<< "# Begin Source File\n";
793 stream
<< "SOURCE=.\\" << sourceFile
<< "\n";
795 stream
<< "!IF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Release\"\n";
797 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Debug\"\n";
799 stream
<< "# SUBTRACT CPP /YX /Yc /Yu\n";
801 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Debug DLL\"\n";
803 stream
<< "# SUBTRACT BASE CPP /YX /Yc /Yu\n";
804 stream
<< "# SUBTRACT CPP /YX /Yc /Yu\n";
806 stream
<< "!ELSEIF \"$(CFG)\" == \"" << m_projectName
<< " - Win32 Release DLL\"\n";
808 stream
<< "!ENDIF\n";
810 stream
<< "# End Source File\n";
813 // The .rc file: assume it has the target name + rc extension.
814 stream
<< "# Begin Source File\n";
816 stream
<< "SOURCE=.\\" << m_targetName
<< ".rc\n";
817 stream
<< "# ADD BASE RSC /l 0x809\n";
818 stream
<< "# ADD RSC /l 0x809";
820 n
= m_resourceIncludeDirs
.Number();
821 for (i
= 0; i
< n
; i
++)
823 wxString includeDir
= m_resourceIncludeDirs
[i
];
824 stream
<< " /i \"" << includeDir
<< "\"";
828 stream
<< "# End Source File\n";
829 stream
<< "# End Target\n";
830 stream
<< "# End Project\n";
832 // Now generate the .dsw workspace file
834 wxString fullWorkSpaceName
= m_path
+ wxString("/") + m_projectName
+ ".dsw";
836 ofstream
stream2(fullWorkSpaceName
);
840 stream2
<< "Microsoft Developer Studio Workspace File, Format Version 5.00\n";
841 stream2
<< "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n";
843 stream2
<< "###############################################################################\n";
845 stream2
<< "Project: \"" << m_projectName
<< "\"=.\\" << m_projectName
<< ".dsp - Package Owner=<4>\n";
847 stream2
<< "Package=<5>\n";
851 stream2
<< "Package=<4>\n";
855 stream2
<< "###############################################################################\n";
857 stream2
<< "Global:\n";
859 stream2
<< "Package=<5>\n";
863 stream2
<< "Package=<3>\n";
867 stream2
<< "###############################################################################\n";
873 BEGIN_EVENT_TABLE(MyDialog
, wxDialog
)
874 EVT_BUTTON(wxID_EXIT
, MyDialog::OnQuit
)
875 EVT_BUTTON(ID_GENERATE_PROJECT
, MyDialog::OnGenerate
)
876 EVT_BUTTON(ID_GENERATE_SAMPLES
, MyDialog::OnGenerateSamples
)
879 // ----------------------------------------------------------------------------
881 // ----------------------------------------------------------------------------
884 MyDialog::MyDialog(const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
):
887 LoadFromResource((wxWindow
*) NULL
, "project_dialog");
891 void MyDialog::OnQuit(wxCommandEvent
& event
)
893 this->EndModal(wxID_OK
);
896 void MyDialog::OnAbout(wxCommandEvent
& event
)
900 void MyDialog::OnGenerate(wxCommandEvent
& event
)
904 void MyDialog::OnGenerateSamples(wxCommandEvent
& event
)
906 char* dir
= getenv("WXWIN");
910 wxTextEntryDialog
dialog(this, "Please enter the wxWindows directory", "Text entry", dirStr
, wxOK
|wxCANCEL
);
911 if (dialog
.ShowModal() == wxID_OK
)
913 if (wxDirExists(dialog
.GetValue()))
915 // wxGetApp().GenerateSample("MinimalVC", "minimal", dir + wxString("/samples/minimal"),
916 // wxStringList("minimal.cpp", 0));
918 wxGetApp().GenerateSamples(dialog
.GetValue());
922 wxMessageBox("This directory doesn't exist.");