//////////////////////////////////////////////////////////////////////////////// // // Psychlops project wizard // //////////////////////////////////////////////////////////////////////////////// function BeginWizard() { local intro_msg = _T("Welcome to the new Psychlops project wizard!\n\n" + "This wizard will guide you to create a new project\n" + "using Psychlops.\n\n" + "When you 're ready to proceed, please click \"Next\"..."); Wizard.AddInfoPage(_T("PsychlopsIntro"), intro_msg); Wizard.AddProjectPathPage(); Wizard.AddCompilerPage(_T(""), _T("gcc;msvc8;msvc10"), true, true); } // return the files this project contains function GetFilesDir() { local result = _T("PsychlopsGL/files"); return result; } // setup the already created project function SetupProject(project) { if (PLATFORM == PLATFORM_MSW) { project.AddIncludeDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\Headers")); project.AddLibDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\Lib")); project.AddLibDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\Lib\\extension")); project.AddIncludeDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\cv\\include")); // add link libraries if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc"))) { project.AddLibDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\cv\\lib\\mingw4")); project.AddLinkLib(_T("libpsychlopswin32gcc4.a")); project.AddLinkLib(_T("libpng_mingw.a")); project.AddLinkLib(_T("libfftw3.a")); project.AddLinkLib(_T("libopencv_calib3d249.dll.a")); project.AddLinkLib(_T("libopencv_contrib249.dll.a")); project.AddLinkLib(_T("libopencv_core249.dll.a")); project.AddLinkLib(_T("libopencv_features2d249.dll.a")); project.AddLinkLib(_T("libopencv_flann249.dll.a")); project.AddLinkLib(_T("libopencv_gpu249.dll.a")); project.AddLinkLib(_T("libopencv_highgui249.dll.a")); project.AddLinkLib(_T("libopencv_imgproc249.dll.a")); project.AddLinkLib(_T("libopencv_legacy249.dll.a")); project.AddLinkLib(_T("libopencv_ml249.dll.a")); project.AddLinkLib(_T("libopencv_nonfree249.dll.a")); project.AddLinkLib(_T("libopencv_objdetect249.dll.a")); project.AddLinkLib(_T("libopencv_ocl249.dll.a")); project.AddLinkLib(_T("libopencv_photo249.dll.a")); project.AddLinkLib(_T("libopencv_stitching249.dll.a")); project.AddLinkLib(_T("libopencv_superres249.dll.a")); project.AddLinkLib(_T("libopencv_video249.dll.a")); project.AddLinkLib(_T("libopencv_videostab249.dll.a")); } project.AddLinkLib(_T("kernel32")); project.AddLinkLib(_T("opengl32")); project.AddLinkLib(_T("glu32")); project.AddLinkLib(_T("gdi32")); project.AddLinkLib(_T("advapi32")); project.AddLinkLib(_T("user32")); project.AddLinkLib(_T("comdlg32")); if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("msvc8"))) { project.AddLinkLib(_T("psychlopswin32vc9.lib")); } if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("msvc10"))) { project.AddLibDir(_T("%SystemDrive%\\Library\\Frameworks\\Psychlops2.framework\\cv\\lib\\vc10")); project.AddLinkLib(_T("psychlopswin32vc10.lib")); project.AddLinkLib(_T("opencv_calib3d249.lib")); project.AddLinkLib(_T("opencv_contrib249.lib")); project.AddLinkLib(_T("opencv_core249.lib")); project.AddLinkLib(_T("opencv_features2d249.lib")); project.AddLinkLib(_T("opencv_flann249.lib")); project.AddLinkLib(_T("opencv_gpu249.lib")); project.AddLinkLib(_T("opencv_highgui249.lib")); project.AddLinkLib(_T("opencv_imgproc249.lib")); project.AddLinkLib(_T("opencv_legacy249.lib")); project.AddLinkLib(_T("opencv_ml249.lib")); project.AddLinkLib(_T("opencv_nonfree249.lib")); project.AddLinkLib(_T("opencv_objdetect249.lib")); project.AddLinkLib(_T("opencv_ocl249.lib")); project.AddLinkLib(_T("opencv_photo249.lib")); project.AddLinkLib(_T("opencv_stitching249.lib")); project.AddLinkLib(_T("opencv_superres249.lib")); project.AddLinkLib(_T("opencv_video249.lib")); project.AddLinkLib(_T("opencv_videostab249.lib")); } if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("msvc*"))) { project.AddLinkLib(_T("libpng_vc9.lib")); project.AddLinkLib(_T("libfftw3_vc9.lib")); project.AddCompilerOption(_T("/GR")); project.AddCompilerOption(_T("/EHs")); project.AddCompilerOption(_T("/GA")); } } else { // add link libraries project.AddLinkLib(_T("GL")); project.AddLinkLib(_T("X11")); } // enable compiler warnings (project-wide) //WarningsOn(project, Wizard.GetCompilerID()); // Debug local target = project.GetBuildTarget(Wizard.GetDebugName()); if (!IsNull(target)) { if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("gcc"))) target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging else if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("msvc*"))) target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging else target.SetTargetType(ttExecutable); // For others, keep it GUI target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE); // enable generation of debugging symbols for target // DebugSymbolsOn(target, Wizard.GetCompilerID()); } // Release target = project.GetBuildTarget(Wizard.GetReleaseName()); if (!IsNull(target)) { target.SetTargetType(ttExecutable); // ttExecutable: no console target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE); // enable optimizations for target OptimizationsOn(target, Wizard.GetCompilerID()); } return true; }