]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/projgen/makeproj.cpp
Added rotate sample and comment about masks in wxImage::Rotate
[wxWidgets.git] / utils / projgen / makeproj.cpp
index 5d72b24de2aa44170de39f1513f97e4cf419dc2a..88f2c6fa30eba17f121ab3ecb2c458b7d7eab6f6 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual bool OnInit();
 
     bool GenerateSample(const wxString& projectName, const wxString& targetName,
     virtual bool OnInit();
 
     bool GenerateSample(const wxString& projectName, const wxString& targetName,
-        const wxString& path, const wxStringList& sourceFiles);
+        const wxString& path, const wxStringList& sourceFiles, const wxString& relativeRootPath = "../..");
     void GenerateSamples(const wxString& dir); // Takes wxWindows directory path
 };
 
     void GenerateSamples(const wxString& dir); // Takes wxWindows directory path
 };
 
@@ -71,7 +71,7 @@ public:
     void OnGenerate(wxCommandEvent& event);
 
     bool GenerateSample(const wxString& projectName, const wxString& targetName,
     void OnGenerate(wxCommandEvent& event);
 
     bool GenerateSample(const wxString& projectName, const wxString& targetName,
-        const wxString& path, const wxStringList& sourceFiles);
+        const wxString& path, const wxStringList& sourceFiles, const wxString& relativeRootPath = "../..");
 
 private:
     // any class wishing to process wxWindows events must use this macro
 
 private:
     // any class wishing to process wxWindows events must use this macro
@@ -158,20 +158,32 @@ bool MyApp::OnInit()
     MyDialog* dialog = new MyDialog("VC++ MakeProject");
     dialog->ShowModal();
 
     MyDialog* dialog = new MyDialog("VC++ MakeProject");
     dialog->ShowModal();
 
+    delete dialog;
+
     return FALSE;
 }
 
 bool MyApp::GenerateSample(const wxString& projectName, const wxString& targetName,
     return FALSE;
 }
 
 bool MyApp::GenerateSample(const wxString& projectName, const wxString& targetName,
-    const wxString& path, const wxStringList& sourceFiles)
+    const wxString& path, const wxStringList& sourceFiles, const wxString& relativeRootPath)
 {
 {
+    wxString relativeIncludePath(relativeRootPath + wxString("/include"));
+    wxString relativeLibPath(relativeRootPath + wxString("/lib"));
+    wxString relativeDebugPath(relativeRootPath + wxString("/src/Debug"));
+    wxString relativeReleasePath(relativeRootPath + wxString("/src/Release"));
+    wxString relativeDebugPathJPEG(relativeRootPath + wxString("/src/jpeg/Debug"));
+    wxString relativeReleasePathJPEG(relativeRootPath + wxString("/src/jpeg/Release"));
+    wxString relativeDebugPathTIFF(relativeRootPath + wxString("/src/tiff/Debug"));
+    wxString relativeReleasePathTIFF(relativeRootPath + wxString("/src/tiff/Release"));
+
     wxProject project;
 
     // For all samples
     wxProject project;
 
     // For all samples
-    project.SetIncludeDirs(wxStringList("../../include", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../include", 0));
-    project.SetLibDirs(wxStringList("../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../src/Release", 0));
+    project.SetIncludeDirs(wxStringList((const char*) relativeIncludePath, 0));
+    project.SetResourceIncludeDirs(wxStringList((const char*) relativeIncludePath, 0));
+    project.SetLibDirs(wxStringList((const char*) relativeLibPath, 0));
+    project.SetDebugLibDirs(wxStringList((const char*) relativeDebugPath, (const char*) relativeDebugPathJPEG, (const char*) relativeDebugPathTIFF, 0));
+    project.SetReleaseLibDirs(wxStringList((const char*) relativeReleasePath, (const char*) relativeReleasePathJPEG, (const char*) relativeReleasePathTIFF, 0));
+    project.SetExtraLibs(wxStringList("opengl32.lib", "glu32.lib", 0));
 
     project.SetProjectName(projectName);
     project.SetTargetName(targetName);
 
     project.SetProjectName(projectName);
     project.SetTargetName(targetName);
@@ -194,8 +206,9 @@ void MyApp::GenerateSamples(const wxString& dir)
     // Small bug. Because we don't distinguish between Debug/DebugDLL, Release/ReleaseDLL,
     // we can't yet make a sample that uses other wxWindows static libraries + the wxWindows DLL library.
 
     // Small bug. Because we don't distinguish between Debug/DebugDLL, Release/ReleaseDLL,
     // we can't yet make a sample that uses other wxWindows static libraries + the wxWindows DLL library.
 
-    GenerateSample("BombsVC", "bombs", dir + wxString("/samples/bombs"),
-        wxStringList("bombs.cpp", "bombs1.cpp", "game.cpp", "bombs.h", "game.h", 0));
+    //// Samples
+
+    GenerateSample("CalendarVC", "calendar", dir + wxString("/samples/calendar"), wxStringList("calendar.cpp", 0));
     GenerateSample("CaretVC", "caret", dir + wxString("/samples/caret"), wxStringList("caret.cpp", 0));
     GenerateSample("CheckLstVC", "checklst", dir + wxString("/samples/checklst"), wxStringList("checklst.cpp", 0));
     GenerateSample("ConfigVC", "conftest", dir + wxString("/samples/config"), wxStringList("conftest.cpp", 0));
     GenerateSample("CaretVC", "caret", dir + wxString("/samples/caret"), wxStringList("caret.cpp", 0));
     GenerateSample("CheckLstVC", "checklst", dir + wxString("/samples/checklst"), wxStringList("checklst.cpp", 0));
     GenerateSample("ConfigVC", "conftest", dir + wxString("/samples/config"), wxStringList("conftest.cpp", 0));
@@ -210,23 +223,37 @@ void MyApp::GenerateSamples(const wxString& dir)
     GenerateSample("DocVwMDIVC", "docview", dir + wxString("/samples/docvwmdi"),
         wxStringList("docview.cpp", "doc.cpp", "view.cpp", "docview.h", "doc.h", "view.h", 0));
     GenerateSample("DynamicVC", "dynamic", dir + wxString("/samples/dynamic"), wxStringList("dynamic.cpp", 0));
     GenerateSample("DocVwMDIVC", "docview", dir + wxString("/samples/docvwmdi"),
         wxStringList("docview.cpp", "doc.cpp", "view.cpp", "docview.h", "doc.h", "view.h", 0));
     GenerateSample("DynamicVC", "dynamic", dir + wxString("/samples/dynamic"), wxStringList("dynamic.cpp", 0));
-    GenerateSample("FortyVC", "forty", dir + wxString("/samples/forty"),
-       wxStringList("forty.cpp", "canvas.cpp", "card.cpp", "game.cpp", "pile.cpp", "playerdg.cpp", "scoredg.cpp", "scorefil.cpp",
-       "canvas.h", "forty.h", "card.h", "game.h", "pile.h", "playerdg.h", "scoredg.h", "scorefil.h",
-       0));
-    GenerateSample("FractalVC", "fractal", dir + wxString("/samples/fractal"), wxStringList("fractal.cpp", 0));
+    GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
+    GenerateSample("ExecVC", "exec", dir + wxString("/samples/exec"), wxStringList("exec.cpp", 0));
     GenerateSample("GridVC", "test", dir + wxString("/samples/grid"), wxStringList("test.cpp", 0));
     GenerateSample("NewGridVC", "griddemo", dir + wxString("/samples/newgrid"), wxStringList("griddemo.cpp", 0));
     GenerateSample("HelpVC", "demo", dir + wxString("/samples/help"), wxStringList("demo.cpp", 0));
 
     GenerateSample("GridVC", "test", dir + wxString("/samples/grid"), wxStringList("test.cpp", 0));
     GenerateSample("NewGridVC", "griddemo", dir + wxString("/samples/newgrid"), wxStringList("griddemo.cpp", 0));
     GenerateSample("HelpVC", "demo", dir + wxString("/samples/help"), wxStringList("demo.cpp", 0));
 
+    // OpenGL samples
+    GenerateSample("CubeVC", "cube", dir + wxString("/samples/opengl/cube"), wxStringList("cube.cpp", "cube.h", 0),
+        "../../..");
+    GenerateSample("IsosurfVC", "isosurf", dir + wxString("/samples/opengl/isosurf"), wxStringList("isosurf.cpp", "isousrf.h", 0),
+        "../../..");
+    GenerateSample("PenguinVC", "penguin", dir + wxString("/samples/opengl/penguin"), wxStringList("penguin.cpp", "penguin.h",
+        "lw.cpp", "lw.h", "trackball.c", "trackball.h", 0), "../../..");
+
     // wxHTML samples
     // wxHTML samples
-    GenerateSample("AboutVC", "about", dir + wxString("/samples/html/about"), wxStringList("about.cpp", 0));
-    GenerateSample("HelpVC", "help", dir + wxString("/samples/html/help"), wxStringList("help.cpp", 0));
-    GenerateSample("PrintingVC", "printing", dir + wxString("/samples/html/printing"), wxStringList("printing.cpp", 0));
-    GenerateSample("TestVC", "test", dir + wxString("/samples/html/test"), wxStringList("test.cpp", 0));
-    GenerateSample("VirtualVC", "virtual", dir + wxString("/samples/html/virtual"), wxStringList("virtual.cpp", 0));
-    GenerateSample("WidgetVC", "widget", dir + wxString("/samples/html/widget"), wxStringList("widget.cpp", 0));
-    GenerateSample("ZipVC", "zip", dir + wxString("/samples/html/zip"), wxStringList("zip.cpp", 0));
+    GenerateSample("AboutVC", "about", dir + wxString("/samples/html/about"), wxStringList("about.cpp", 0),
+        "../../..");
+    GenerateSample("HelpVC", "help", dir + wxString("/samples/html/help"), wxStringList("help.cpp", 0),
+        "../../..");
+    GenerateSample("PrintingVC", "printing", dir + wxString("/samples/html/printing"), wxStringList("printing.cpp", 0),
+        "../../..");
+    GenerateSample("TestVC", "test", dir + wxString("/samples/html/test"), wxStringList("test.cpp", 0),
+        "../../..");
+    GenerateSample("VirtualVC", "virtual", dir + wxString("/samples/html/virtual"), wxStringList("virtual.cpp", 0),
+        "../../..");
+    GenerateSample("WidgetVC", "widget", dir + wxString("/samples/html/widget"), wxStringList("widget.cpp", 0),
+        "../../..");
+    GenerateSample("ZipVC", "zip", dir + wxString("/samples/html/zip"), wxStringList("zip.cpp", 0),
+        "../../..");
+    GenerateSample("HelpViewVC", "helpview", dir + wxString("/samples/html/helpview"), wxStringList("helpview.cpp", 0),
+        "../../..");
 
     GenerateSample("ImageVC", "image", dir + wxString("/samples/image"), wxStringList("image.cpp", 0));
     GenerateSample("InternatVC", "internat", dir + wxString("/samples/internat"), wxStringList("internat.cpp", 0));
 
     GenerateSample("ImageVC", "image", dir + wxString("/samples/image"), wxStringList("image.cpp", 0));
     GenerateSample("InternatVC", "internat", dir + wxString("/samples/internat"), wxStringList("internat.cpp", 0));
@@ -240,36 +267,67 @@ void MyApp::GenerateSamples(const wxString& dir)
     GenerateSample("MiniframVC", "test", dir + wxString("/samples/minifram"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("MinimalVC", "minimal", dir + wxString("/samples/minimal"), wxStringList("minimal.cpp", 0));
     GenerateSample("NativdlgVC", "nativdlg", dir + wxString("/samples/nativdlg"), wxStringList("nativdlg.cpp", "nativdlg.h", "resource.h", 0));
     GenerateSample("MiniframVC", "test", dir + wxString("/samples/minifram"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("MinimalVC", "minimal", dir + wxString("/samples/minimal"), wxStringList("minimal.cpp", 0));
     GenerateSample("NativdlgVC", "nativdlg", dir + wxString("/samples/nativdlg"), wxStringList("nativdlg.cpp", "nativdlg.h", "resource.h", 0));
-    GenerateSample("NettestVC", "nettest", dir + wxString("/samples/nettest"), wxStringList("nettest.cpp", 0));
+    GenerateSample("DialupVC", "nettest", dir + wxString("/samples/dialup"), wxStringList("nettest.cpp", 0));
     GenerateSample("NotebookVC", "test", dir + wxString("/samples/notebook"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("OleautoVC", "oleauto", dir + wxString("/samples/oleauto"), wxStringList("oleauto.cpp", 0));
     GenerateSample("OwnerdrwVC", "ownerdrw", dir + wxString("/samples/ownerdrw"), wxStringList("ownerdrw.cpp", 0));
     GenerateSample("PngVC", "pngdemo", dir + wxString("/samples/png"), wxStringList("pngdemo.cpp", "pngdemo.h", 0));
     GenerateSample("PrintingVC", "printing", dir + wxString("/samples/printing"), wxStringList("printing.cpp", "printing.h", 0));
     GenerateSample("ProplistVC", "test", dir + wxString("/samples/proplist"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("NotebookVC", "test", dir + wxString("/samples/notebook"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("OleautoVC", "oleauto", dir + wxString("/samples/oleauto"), wxStringList("oleauto.cpp", 0));
     GenerateSample("OwnerdrwVC", "ownerdrw", dir + wxString("/samples/ownerdrw"), wxStringList("ownerdrw.cpp", 0));
     GenerateSample("PngVC", "pngdemo", dir + wxString("/samples/png"), wxStringList("pngdemo.cpp", "pngdemo.h", 0));
     GenerateSample("PrintingVC", "printing", dir + wxString("/samples/printing"), wxStringList("printing.cpp", "printing.h", 0));
     GenerateSample("ProplistVC", "test", dir + wxString("/samples/proplist"), wxStringList("test.cpp", "test.h", 0));
+    GenerateSample("PropsizeVC", "propsize", dir + wxString("/samples/propsize"), wxStringList("propsize.cpp", 0));
     GenerateSample("RegtestVC", "regtest", dir + wxString("/samples/regtest"), wxStringList("regtest.cpp", 0));
     GenerateSample("ResourceVC", "resource", dir + wxString("/samples/resource"), wxStringList("resource.cpp", "resource.h", 0));
     GenerateSample("RichEditVC", "wxLayout", dir + wxString("/samples/richedit"), wxStringList("wxLayout.cpp",
         "kbList.cpp", "wxllist.cpp", "wxlparser.cpp", "wxlwindow.cpp", 0));
     GenerateSample("SashtestVC", "sashtest", dir + wxString("/samples/sashtest"), wxStringList("sashtest.cpp", "sashtest.h", 0));
     GenerateSample("ScrollVC", "scroll", dir + wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
     GenerateSample("RegtestVC", "regtest", dir + wxString("/samples/regtest"), wxStringList("regtest.cpp", 0));
     GenerateSample("ResourceVC", "resource", dir + wxString("/samples/resource"), wxStringList("resource.cpp", "resource.h", 0));
     GenerateSample("RichEditVC", "wxLayout", dir + wxString("/samples/richedit"), wxStringList("wxLayout.cpp",
         "kbList.cpp", "wxllist.cpp", "wxlparser.cpp", "wxlwindow.cpp", 0));
     GenerateSample("SashtestVC", "sashtest", dir + wxString("/samples/sashtest"), wxStringList("sashtest.cpp", "sashtest.h", 0));
     GenerateSample("ScrollVC", "scroll", dir + wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
+    GenerateSample("ScrollsubVC", "scrollsub", dir + wxString("/samples/scrollsub"), wxStringList("scrollsub.cpp", 0));
     GenerateSample("SplitterVC", "test", dir + wxString("/samples/splitter"), wxStringList("test.cpp", 0));
     GenerateSample("TabVC", "test", dir + wxString("/samples/tab"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("TaskbarVC", "tbtest", dir + wxString("/samples/taskbar"), wxStringList("tbtest.cpp", "tbtest.h", 0));
     GenerateSample("TextVC", "text", dir + wxString("/samples/text"), wxStringList("text.cpp", 0));
     GenerateSample("ThreadVC", "test", dir + wxString("/samples/thread"), wxStringList("test.cpp", 0));
     GenerateSample("SplitterVC", "test", dir + wxString("/samples/splitter"), wxStringList("test.cpp", 0));
     GenerateSample("TabVC", "test", dir + wxString("/samples/tab"), wxStringList("test.cpp", "test.h", 0));
     GenerateSample("TaskbarVC", "tbtest", dir + wxString("/samples/taskbar"), wxStringList("tbtest.cpp", "tbtest.h", 0));
     GenerateSample("TextVC", "text", dir + wxString("/samples/text"), wxStringList("text.cpp", 0));
     GenerateSample("ThreadVC", "test", dir + wxString("/samples/thread"), wxStringList("test.cpp", 0));
-    GenerateSample("ToolbarVC", "test", dir + wxString("/samples/toolbar"), wxStringList("test.cpp", "test.h", 0));
+    GenerateSample("ToolbarVC", "toolbar", dir + wxString("/samples/toolbar"), wxStringList("toolbar.cpp", 0));
     GenerateSample("TreectrlVC", "treetest", dir + wxString("/samples/treectrl"), wxStringList("treetest.cpp", "treetest.h", 0));
     GenerateSample("TypetestVC", "typetest", dir + wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0));
     GenerateSample("ValidateVC", "validate", dir + wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0));
     GenerateSample("TreectrlVC", "treetest", dir + wxString("/samples/treectrl"), wxStringList("treetest.cpp", "treetest.h", 0));
     GenerateSample("TypetestVC", "typetest", dir + wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0));
     GenerateSample("ValidateVC", "validate", dir + wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0));
-    GenerateSample("ClientVC", "client", dir + wxString("/samples/wxsocket"), wxStringList("client.cpp", 0));
-    GenerateSample("ServerVC", "server", dir + wxString("/samples/wxsocket"), wxStringList("server.cpp", 0));
-    GenerateSample("PoemVC", "wxpoem", dir + wxString("/samples/wxpoem"), wxStringList("wxpoem.cpp", "wxpoem.h", 0));
-    GenerateSample("ClientVC", "client", dir + wxString("/samples/dde"), wxStringList("client.cpp", "client.h", "ddesetup.h", 0));
-    GenerateSample("ServerVC", "server", dir + wxString("/samples/dde"), wxStringList("server.cpp", "server.h", "ddesetup.h", 0));
+    GenerateSample("ClientVC", "client", dir + wxString("/samples/sockets"), wxStringList("client.cpp", 0));
+    GenerateSample("ServerVC", "server", dir + wxString("/samples/sockets"), wxStringList("server.cpp", 0));
+    GenerateSample("ClientVC", "client", dir + wxString("/samples/ipc"), wxStringList("client.cpp", "client.h", "ddesetup.h", 0));
+    GenerateSample("ServerVC", "server", dir + wxString("/samples/ipc"), wxStringList("server.cpp", "server.h", "ddesetup.h", 0));
     GenerateSample("CaretVC", "caret", dir + wxString("/samples/caret"), wxStringList("caret.cpp", 0));
     GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
     GenerateSample("ScrollVC", "scroll", dir + wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
     GenerateSample("CaretVC", "caret", dir + wxString("/samples/caret"), wxStringList("caret.cpp", 0));
     GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
     GenerateSample("ScrollVC", "scroll", dir + wxString("/samples/scroll"), wxStringList("scroll.cpp", 0));
+    GenerateSample("WizardVC", "wiztest", dir + wxString("/samples/wizard"), wxStringList("wiztest.cpp", 0));
+    GenerateSample("RotateVC", "rotate", dir + wxString("/samples/rotate"), wxStringList("rotate.cpp", 0));
+    GenerateSample("ExecVC", "exec", dir + wxString("/samples/exec"), wxStringList("exec.cpp", 0));
+    GenerateSample("FontVC", "font", dir + wxString("/samples/font"), wxStringList("font.cpp", 0));
+    GenerateSample("MenuVC", "menu", dir + wxString("/samples/menu"), wxStringList("menu.cpp", 0));
+    GenerateSample("TreelayVC", "test", dir + wxString("/samples/treelay"), wxStringList("test.cpp", "test.h", 0));
+    GenerateSample("DragimagVC", "test", dir + wxString("/samples/dragimag"), wxStringList("test.cpp", "test.h", 0));
+
+    //// Demos
+
+    GenerateSample("BombsVC", "bombs", dir + wxString("/demos/bombs"),
+        wxStringList("bombs.cpp", "bombs1.cpp", "game.cpp", "bombs.h", "game.h", 0));
+
+    GenerateSample("FortyVC", "forty", dir + wxString("/demos/forty"),
+       wxStringList("forty.cpp", "canvas.cpp", "card.cpp", "game.cpp", "pile.cpp", "playerdg.cpp", "scoredg.cpp", "scorefil.cpp",
+       "canvas.h", "forty.h", "card.h", "game.h", "pile.h", "playerdg.h", "scoredg.h", "scorefil.h",
+       0));
+
+    GenerateSample("FractalVC", "fractal", dir + wxString("/demos/fractal"), wxStringList("fractal.cpp", 0));
+
+    GenerateSample("LifeVC", "life", dir + wxString("/demos/life"),
+        wxStringList("life.cpp", "game.cpp", "dialogs.cpp", "life.h", "game.h", "dialogs.h", 0));
+
+    GenerateSample("PoemVC", "wxpoem", dir + wxString("/demos/poem"), wxStringList("wxpoem.cpp", "wxpoem.h", 0));
+
+    GenerateSample("DbbrowseVC", "dbbrowse", dir + wxString("/demos/dbbrowse"),
+       wxStringList("dbbrowse.cpp", "browsedb.cpp", "dbgrid.cpp", "dbtree.cpp", "dlguser.cpp", "doc.cpp",
+        "pgmctrl.cpp", "tabpgwin.cpp",
+        "dbbrowse.h", "browsedb.h", "dbgrid.h", "dbtree.h", "dlguser.h", "doc.h", "pgmctrl.h", "std.h", "tabpgwin.h",
+        0));
 
     //// Utilities
 
 
     //// Utilities
 
@@ -279,8 +337,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../src/tiff/Release", 0));
 
     project.SetProjectName("DialogEdVC");
     project.SetTargetName("dialoged");
 
     project.SetProjectName("DialogEdVC");
     project.SetTargetName("dialoged");
@@ -301,8 +359,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../src/tiff/Release", 0));
 
     project.SetProjectName("Tex2RTFVC");
     project.SetTargetName("tex2rtf");
 
     project.SetProjectName("Tex2RTFVC");
     project.SetTargetName("tex2rtf");
@@ -318,12 +376,12 @@ void MyApp::GenerateSamples(const wxString& dir)
         wxMessageBox(msg);
     }
 
         wxMessageBox(msg);
     }
 
-    // Tex2RTF
+    // HelpGen
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../src/tiff/Release", 0));
 
     project.SetProjectName("HelpGenVC");
     project.SetTargetName("helpgen");
 
     project.SetProjectName("HelpGenVC");
     project.SetTargetName("helpgen");
@@ -340,37 +398,55 @@ void MyApp::GenerateSamples(const wxString& dir)
         wxMessageBox(msg);
     }
 
         wxMessageBox(msg);
     }
 
-    // wxTreeLayout sample
+    // ProjGen
+    project.SetIncludeDirs(wxStringList("../../include", 0));
+    project.SetResourceIncludeDirs(wxStringList("../../include", 0));
+    project.SetLibDirs(wxStringList("../../lib", 0));
+    project.SetDebugLibDirs(wxStringList("../../src/Debug", "../../src/jpeg/Debug", "../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../src/Release", "../../src/jpeg/Release", "../../src/tiff/Release", 0));
 
 
-    project.SetIncludeDirs(wxStringList("../../../include", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetProjectName("ProjGenVC");
+    project.SetTargetName("makeproj");
+    project.SetProjectPath(dir + wxString("/utils/projgen"));
+    project.SetSourceFiles(wxStringList("makeproj.cpp", "makeproj.h", 0));
 
 
-    project.SetProjectName("TreeSampleVC");
-    project.SetTargetName("test");
-    project.SetProjectPath(dir + wxString("/utils/wxtree/src"));
-    project.SetSourceFiles(wxStringList("test.cpp", "wxtree.cpp", "test.h", "wxtree.h", 0));
+    if (!project.GenerateVCProject())
+    {
+        wxString msg("Could not generate ProjGen project");
+        wxMessageBox(msg);
+    }
+
+    // hhp2cached
+    project.SetIncludeDirs(wxStringList("../../include", 0));
+    project.SetResourceIncludeDirs(wxStringList("../../include", 0));
+    project.SetLibDirs(wxStringList("../../lib", 0));
+    project.SetDebugLibDirs(wxStringList("../../src/Debug", "../../src/jpeg/Debug", "../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../src/Release", "../../src/jpeg/Release", "../../src/tiff/Release", 0));
+
+    project.SetProjectName("hhp2cachedVC");
+    project.SetTargetName("hhp2cached");
+    project.SetProjectPath(dir + wxString("/utils/hhp2cached"));
+    project.SetSourceFiles(wxStringList("hhp2cached.cpp", 0));
 
     if (!project.GenerateVCProject())
     {
 
     if (!project.GenerateVCProject())
     {
-        wxString msg("Could not generate wxTreeLayout project");
+        wxString msg("Could not generate hhp2cached project");
         wxMessageBox(msg);
     }
 
         wxMessageBox(msg);
     }
 
-    // OGLEdit
+    // OGLEdit. We have to do it the long way because we need to add the extra ogl.lib.
+
+    project.SetIncludeDirs(wxStringList("../../../../include", "../../../include", 0));
+    project.SetResourceIncludeDirs(wxStringList("../../../../include", "../../../include", 0));
+    project.SetLibDirs(wxStringList("../../../../lib", "../../../lib", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../../src/ogl/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../../src/ogl/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/Release", 0));
 
 
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", 0));
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("OGLEditVC");
     project.SetTargetName("ogledit");
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("OGLEditVC");
     project.SetTargetName("ogledit");
-    project.SetProjectPath(dir + wxString("/utils/ogl/samples/ogledit"));
+    project.SetProjectPath(dir + wxString("/contrib/samples/ogl/ogledit"));
     project.SetSourceFiles(wxStringList("ogledit.cpp", "doc.cpp", "palette.cpp", "view.cpp",
         "doc.h", "ogledit.h", "palette.h", "view.h",
         0));
     project.SetSourceFiles(wxStringList("ogledit.cpp", "doc.cpp", "palette.cpp", "view.cpp",
         "doc.h", "ogledit.h", "palette.h", "view.h",
         0));
@@ -383,16 +459,17 @@ void MyApp::GenerateSamples(const wxString& dir)
 
     // OGL Studio
 
 
     // OGL Studio
 
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", 0));
+    project.SetIncludeDirs(wxStringList("../../../../include", "../../../include", 0));
+    project.SetResourceIncludeDirs(wxStringList("../../../../include", "../../../include", 0));
+    project.SetLibDirs(wxStringList("../../../../lib", "../../../lib", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../../src/ogl/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../../src/ogl/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/Release", 0));
+
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("StudioVC");
     project.SetTargetName("studio");
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("StudioVC");
     project.SetTargetName("studio");
-    project.SetProjectPath(dir + wxString("/utils/ogl/samples/studio"));
+    project.SetProjectPath(dir + wxString("/contrib/samples/ogl/studio"));
     project.SetSourceFiles(wxStringList("studio.cpp", "cspalette.cpp", "dialogs.cpp", "view.cpp",
         "doc.cpp", "mainfrm.cpp", "project.cpp", "shapes.cpp", "symbols.cpp", "csprint.cpp",
         "studio.h", "cspalette.h", "dialogs.h", "view.h",
     project.SetSourceFiles(wxStringList("studio.cpp", "cspalette.cpp", "dialogs.cpp", "view.cpp",
         "doc.cpp", "mainfrm.cpp", "project.cpp", "shapes.cpp", "symbols.cpp", "csprint.cpp",
         "studio.h", "cspalette.h", "dialogs.h", "view.h",
@@ -404,71 +481,6 @@ void MyApp::GenerateSamples(const wxString& dir)
         wxString msg("Could not generate OGL Studio project");
         wxMessageBox(msg);
     }
         wxString msg("Could not generate OGL Studio project");
         wxMessageBox(msg);
     }
-
-    // GLCanvas cube sample
-
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
-    project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
-
-    project.SetProjectName("CubeVC");
-    project.SetTargetName("cube");
-    project.SetProjectPath(dir + wxString("/utils/glcanvas/samples/cube"));
-    project.SetSourceFiles(wxStringList("cube.cpp", "cube.h",
-        0));
-
-    if (!project.GenerateVCProject())
-    {
-        wxString msg("Could not generate GLCanvas Cube project");
-        wxMessageBox(msg);
-    }
-
-    // GLCanvas isosurf sample
-
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
-    project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
-
-    project.SetProjectName("IsoSurfVC");
-    project.SetTargetName("isosurf");
-    project.SetProjectPath(dir + wxString("/utils/glcanvas/samples/isosurf"));
-    project.SetSourceFiles(wxStringList("isosurf.cpp", "isosurf.h",
-        0));
-
-    if (!project.GenerateVCProject())
-    {
-        wxString msg("Could not generate GLCanvas IsoSurf project");
-        wxMessageBox(msg);
-    }
-
-    // GLCanvas penguin sample
-
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
-    project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
-
-    project.SetProjectName("PenguinVC");
-    project.SetTargetName("penguin");
-    project.SetProjectPath(dir + wxString("/utils/glcanvas/samples/penguin"));
-    project.SetSourceFiles(wxStringList("penguin.cpp", "penguin.h",
-        "lw.cpp", "lw.h",
-        "trackball.c", "trackball.h",
-        0));
-
-    if (!project.GenerateVCProject())
-    {
-        wxString msg("Could not generate GLCanvas Penguin project");
-        wxMessageBox(msg);
-    }
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -523,9 +535,9 @@ void MyFrame::OnGenerate(wxCommandEvent& WXUNUSED(event))
 }
 
 bool MyFrame::GenerateSample(const wxString& projectName, const wxString& targetName,
 }
 
 bool MyFrame::GenerateSample(const wxString& projectName, const wxString& targetName,
-    const wxString& path, const wxStringList& sourceFiles)
+    const wxString& path, const wxStringList& sourceFiles, const wxString& relativeRootPath)
 {
 {
-    return wxGetApp().GenerateSample(projectName, targetName, path, sourceFiles);
+    return wxGetApp().GenerateSample(projectName, targetName, path, sourceFiles, relativeRootPath);
 }
 
 /*
 }
 
 /*
@@ -619,8 +631,8 @@ bool wxProject::GenerateVCProject()
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
-    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 /nologo /subsystem:windows /machine:I386\n";
-    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 wxvc.lib ";
+    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 /nologo /subsystem:windows /machine:I386\n";
+    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 wxvc.lib jpeg.lib tiff.lib ";
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
@@ -628,7 +640,7 @@ bool wxProject::GenerateVCProject()
         stream << lib << " ";
     }
 
         stream << lib << " ";
     }
 
-    stream << "/nologo /subsystem:windows /machine:I386 /nodefaultlib:\"libc.lib\" /nodefaultlib:\"libci.lib\" /out:\"Release/" << m_targetName << ".exe\"";
+    stream << "/nologo /subsystem:windows /machine:I386 /nodefaultlib:\"libc.lib,libci.lib,msvcrtd.lib\" /out:\"Release/" << m_targetName << ".exe\"";
 
     n = m_releaseLibDirs.Number();
     for (i = 0; i < n; i++)
 
     n = m_releaseLibDirs.Number();
     for (i = 0; i < n; i++)
@@ -679,8 +691,8 @@ bool wxProject::GenerateVCProject()
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
-    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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
-    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 wxvc.lib ";
+    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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
+    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 wxvc.lib jpeg.lib tiff.lib ";
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
@@ -740,8 +752,8 @@ bool wxProject::GenerateVCProject()
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
-    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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
-    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 wxvc.lib ";
+    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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\n";
+    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 wxvc.lib ";
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
@@ -803,8 +815,8 @@ bool wxProject::GenerateVCProject()
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
     stream << "# ADD BASE BSC32 /nologo\n";
     stream << "# ADD BSC32 /nologo\n";
     stream << "LINK32=link.exe\n";
-    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 /nologo /subsystem:windows /machine:I386\n";
-    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 wxvc.lib ";
+    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 /nologo /subsystem:windows /machine:I386\n";
+    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 wxvc.lib ";
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
     n = m_extraLibs.Number();
     for (i = 0; i < n; i++)
     {
@@ -948,7 +960,7 @@ MyDialog::MyDialog(const wxString& title, const wxPoint& pos, const wxSize& size
 
 void MyDialog::OnQuit(wxCommandEvent& event)
 {
 
 void MyDialog::OnQuit(wxCommandEvent& event)
 {
-    this->Destroy();
+    this->EndModal(wxID_OK);
 }
 
 void MyDialog::OnAbout(wxCommandEvent& event)
 }
 
 void MyDialog::OnAbout(wxCommandEvent& event)