]> 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 51e16013ddac5249c7a6eda342fd679097d76ad3..88f2c6fa30eba17f121ab3ecb2c458b7d7eab6f6 100644 (file)
@@ -158,6 +158,8 @@ bool MyApp::OnInit()
     MyDialog* dialog = new MyDialog("VC++ MakeProject");
     dialog->ShowModal();
 
+    delete dialog;
+
     return FALSE;
 }
 
@@ -181,6 +183,7 @@ bool MyApp::GenerateSample(const wxString& projectName, const wxString& targetNa
     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);
@@ -226,6 +229,14 @@ void MyApp::GenerateSamples(const wxString& dir)
     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
     GenerateSample("AboutVC", "about", dir + wxString("/samples/html/about"), wxStringList("about.cpp", 0),
         "../../..");
@@ -263,12 +274,14 @@ void MyApp::GenerateSamples(const wxString& dir)
     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("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));
@@ -278,15 +291,20 @@ void MyApp::GenerateSamples(const wxString& dir)
     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/socket"), wxStringList("client.cpp", 0));
-    GenerateSample("ServerVC", "server", dir + wxString("/samples/socket"), wxStringList("server.cpp", 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("WizardVC", "wizard", dir + wxString("/samples/wizard"), wxStringList("wiztest.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
 
@@ -416,38 +434,19 @@ void MyApp::GenerateSamples(const wxString& dir)
         wxMessageBox(msg);
     }
 
-    // wxTreeLayout sample
-
-    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));
+    // OGLEdit. We have to do it the long way because we need to add the extra ogl.lib.
 
-    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 wxTreeLayout project");
-        wxMessageBox(msg);
-    }
-
-    // OGLEdit
-
-    project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
-    project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
-    project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/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("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));
@@ -460,16 +459,17 @@ void MyApp::GenerateSamples(const wxString& dir)
 
     // 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", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/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.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",
@@ -481,72 +481,6 @@ void MyApp::GenerateSamples(const wxString& dir)
         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", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/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", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/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", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../src/tiff/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);
-    }
 }
 
 // ----------------------------------------------------------------------------
@@ -1026,7 +960,7 @@ MyDialog::MyDialog(const wxString& title, const wxPoint& pos, const wxSize& size
 
 void MyDialog::OnQuit(wxCommandEvent& event)
 {
-    this->Destroy();
+    this->EndModal(wxID_OK);
 }
 
 void MyDialog::OnAbout(wxCommandEvent& event)