Exemple #1
0
        /// <summary>
        ///     DownloadAndBuild method downloads selected libLAS version and builds it for selected parameters (i.e. x64
        ///     and Visual Studio 13)
        /// </summary>
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Checking Dependencies...");

                DependencyChecker.CheckCommanDependency();

                message("Checking Dependencies done!");

                message("Downloading libLAS...");

                string libLASDownloadURL = LibLASInfo.GetDownloadURL(libLASVersion);
                string libLASZIPFilename = LibLASInfo.GetLibLASZipFileName(libLASVersion);

                DownloadHelper.DownloadFileFromURL(libLASDownloadURL, destinationFolder + libLASZIPFilename);

                message("Start to unzip libLAS...");

                // Unzip libLAS
                SevenZip.Decompress(destinationFolder + "/" + libLASZIPFilename, destinationFolder);

                if (libLASVersion == eLibLASVersion.LibLAS1_8_0)
                {
                    SevenZip.Decompress(destinationFolder + "/" + "libLAS-1.8.0.tar", destinationFolder);
                }

                message("libLAS has been unzipped!");

                message("Start to build libLAS...");

                runCMake(destinationFolder);
                runMSBuild(destinationFolder, " /property:Configuration=Release");

                message("libLAS successfully built!");

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, libLASZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, libLASZIPFilename));
                }

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #2
0
        /// <summary>
        ///     DownloadAndBuild method downloads selected VTK version and builds it for selected parameters (i.e. x64
        ///     and Visual Studio 13)
        /// </summary>
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Checking Dependencies...");

                DependencyChecker.CheckCommanDependency();

                message("Checking Dependencies done!");

                message("Downloading VTK...");

                string vtkDownloadURL = VTKInfo.GetDownloadURL(vtkVersion);
                string vtkZIPFilename = VTKInfo.GetVTKZipFileName(vtkVersion);

                DownloadHelper.DownloadFileFromURL(vtkDownloadURL, destinationFolder + vtkZIPFilename);

                message("Start to unzip VTK...");

                // Unzip VTK
                SevenZip.Decompress(destinationFolder + "/" + vtkZIPFilename, destinationFolder);

                message("VTK has been unzipped!");

                message("Building VTK...");

                runCMake(destinationFolder);
                runMSBuild(destinationFolder, " /property:Configuration=" + Folder.ReleaseFolderName);

                message("VTK successfully built!");

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, vtkZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, vtkZIPFilename));
                }

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #3
0
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Downloading Eigen...");


                string downloadURL      = EigenInfo.GetDownloadURL(version);
                string eigenZIPFilename = EigenInfo.GetZipFileName(version);

                DownloadHelper.DownloadFileFromURL(downloadURL, destinationFolder + eigenZIPFilename);

                message("Start to unzip...");

                // Unzip Boost
                SevenZip.Decompress(destinationFolder + eigenZIPFilename, destinationFolder);

                message("file has been unzipped!");

                string strVersion = EigenInfo.TransformVersionToString(version);

                Directory.Move(FindEigenDirectory(destinationFolder), destinationFolder + "/Eigen_" + strVersion);

                message("start building...");

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, eigenZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, eigenZIPFilename));
                }

                message("Eigen successfully built!");


                OnFinished();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #4
0
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Downloading OpenSceneGraph...");

                string downloadURL = OpenSceneGraphInfo.GetDownloadURL(version);
                string ZIPFilename = OpenSceneGraphInfo.GetZipFileName(version);

                DownloadHelper.DownloadFileFromURL(downloadURL, destinationFolder + ZIPFilename);

                message("Start to unzip boost...");

                // Unzip Boost
                SevenZip.Decompress(destinationFolder + "/" + ZIPFilename, destinationFolder);

                message("OpenSceneGraph has been unzipped!");
                message("start building OpenSceneGraph...");

                // Build OpenSceneGraph
                runCMake(destinationFolder);

                // now build release mode
                runMSBuild(destinationFolder, " /property:Configuration=Release");

                runMSBuild(destinationFolder);

                // remove downloaded file
                System.IO.File.Delete(destinationFolder + ZIPFilename);

                message("OpenSceneGraph successfully built!");

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #5
0
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Downloading OpenCV...");

                string boostDownloadURL = OpenCVInfo.GetDownloadURL(boostVersion);
                string boostZIPFilename = OpenCVInfo.GetZipFileName(boostVersion);

                DownloadHelper.DownloadFileFromURL(boostDownloadURL, destinationFolder + boostZIPFilename);

                message("Start to unzip boost...");

                // Unzip Boost
                SevenZip.Decompress(destinationFolder + "/" + boostZIPFilename, destinationFolder);

                message("boost has been unzipped!");
                message("start building boost...");

                // Build boost


                // remove downloaded file
                System.IO.File.Delete(destinationFolder + boostZIPFilename);

                message("boost successfully built!");


                OnFinished();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #6
0
        /// <summary>
        ///     DownloadAndBuild method downloads selected Flann version and builds it for selected parameters (i.e. x64
        ///     and Visual Studio 13)
        /// </summary>
        public void DownloadAndBuild()
        {
            try
            {
                // TODO: Ankit - Customize Message box with BlueGo UX
                string fVersion = FlannInfo.TransformFlannVersionToString(flannVersion);
                //prompt for dependencies
                MessageBox.Show("Information:Flann " + fVersion + " requires Python 2.x & Numpy as dependencies to build successfully!");

                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Checking Dependencies...");

                DependencyChecker.CheckCommanDependency();

                string python2FullPath = Executable.GetPython2ExePath();

                if (String.IsNullOrEmpty(python2FullPath))
                {
                    throw new Exception(PythonAndNumpyNotInstalledMessage);
                }

                message("Checking Dependencies done!");

                message("Downloading Flann...");

                string FlannDownloadURL = FlannInfo.GetDownloadURL(flannVersion);
                string FlannZIPFilename = FlannInfo.GetFlannZipFileName(flannVersion);

                DownloadHelper.DownloadFileFromURL(FlannDownloadURL, destinationFolder + FlannZIPFilename);

                message("Start to unzip Flann...");

                // Unzip Flann
                SevenZip.Decompress(destinationFolder + "/" + FlannZIPFilename, destinationFolder);

                message("Flann has been unzipped!");

                //patch the serialization.h for building successfully with x64
                if (platform == ePlatform.x64)
                {
                    patchForX64Platform();
                }

                message("Building Flann...");

                runCMake(destinationFolder, python2FullPath);
                runMSBuild(destinationFolder, " /property:Configuration=" + Folder.ReleaseFolderName);

                message("Flann successfully built!");

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, FlannZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, FlannZIPFilename));
                }

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #7
0
        /// <summary>
        ///     DownloadAndBuild method downloads selected PCL version and builds it for selected parameters (i.e. x64
        ///     and Visual Studio 13)
        /// </summary>
        public void DownloadAndBuild()
        {
            try
            {
                // TODO: Ankit - Customize Message box with BlueGo UX
                // prompt for dependencies
                if (MessageBox.Show(PCLWaring, "Warning", MessageBoxButtons.OKCancel) != DialogResult.OK)
                {
                    OnFinished();
                    return;
                }

                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("Checking Dependencies...");

                DependencyChecker.CheckCommanDependency();

                python2ExeFullPath = Executable.GetPython2ExePath();

                if (String.IsNullOrEmpty(python2ExeFullPath))
                {
                    throw new Exception(PythonAndNumpyNotInstalledMessage);
                }

                message("Checking Dependencies done!");

                message("Downloading PCL...");

                string pclDownloadURL = PCLInfo.GetDownloadURL(pclVersion);
                string pclZIPFilename = PCLInfo.GetPCLZipFileName(pclVersion);
                pclFolderName = PCLInfo.GetPCLInfo(pclVersion).ExtractFolderName;

                DownloadHelper.DownloadFileFromURL(pclDownloadURL, destinationFolder + pclZIPFilename);

                message("Start to unzip PCL...");

                // unzip pcl
                SevenZip.Decompress(destinationFolder + "/" + pclZIPFilename, destinationFolder);

                message("PCL has been unzipped!");

                if (Directory.Exists(destinationFolder + "/pcl-" + pclFolderName))
                {
                    Directory.Move(destinationFolder + "/pcl-" + pclFolderName, destinationFolder + pclFolderName);
                }
                else if (Directory.Exists(destinationFolder + pclFolderName) && (ePCLVersion.FromSourceGIT == pclVersion))
                {
                    Directory.Move(destinationFolder + pclFolderName, destinationFolder + "/" + PCLFromSourceGITFolderName);
                    pclFolderName = PCLFromSourceGITFolderName;
                }

                message("start to build pcl...");

                runCMake(destinationFolder);
                runMSBuild(destinationFolder, " /property:Configuration=" + Folder.ReleaseFolderName);

                message("PCL successfully built!");

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, pclZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, pclZIPFilename));
                }

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #8
0
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                message("downloading QT");

                string QtDownloadURL = QtInfo.GetDownloadURL(qtVersion);
                string QtZipFilename = QtInfo.GetZipFileName(qtVersion);

                if (!File.Exists(destinationFolder + QtZipFilename) || downloadThirdPartyLibraryEveryTime)
                {
                    // Download Qt
                    DownloadHelper.DownloadFileFromURL(QtDownloadURL, destinationFolder + QtZipFilename);

                    message("extracting QT");
                }

                // Extract Qt
                SevenZip.Decompress(destinationFolder + QtZipFilename, destinationFolder);

                // patch qt
                if (compilerType == eCompiler.VS2012 && qtVersion == eQtVersion.Qt4_8_3)
                {
                    // patch Qt 4.8.3
                    message("patching Qt 4.8.3");

                    System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
                    string baseDir         = System.IO.Path.GetDirectoryName(a.Location);
                    string qmakeConfigPath = baseDir + @"\qt4.8.3vs2012patch\qmake.conf";

                    if (!File.Exists(qmakeConfigPath))
                    {
                        throw new Exception("File " + qmakeConfigPath + " does not exist");
                    }

                    File.Copy(
                        qmakeConfigPath,
                        destinationFolder + @"qt-everywhere-opensource-src-4.8.3\mkspecs\win32-msvc2010\qmake.conf", true);

                    File.Copy(
                        @"qt4.8.3vs2012patch\HashSet.h",
                        destinationFolder + @"qt-everywhere-opensource-src-4.8.3\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h", true);
                }

                // patch qt
                if (compilerType == eCompiler.VS2012 && qtVersion == eQtVersion.Qt4_8_4)
                {
                    // patch Qt 4.8.4
                    message("patching Qt 4.8.4");

                    System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
                    string baseDir         = System.IO.Path.GetDirectoryName(a.Location);
                    string qmakeConfigPath = baseDir + @"\qt4.8.3vs2012patch\qmake.conf";

                    if (!File.Exists(qmakeConfigPath))
                    {
                        throw new Exception("File " + qmakeConfigPath + " does not exist");
                    }

                    File.Copy(
                        qmakeConfigPath,
                        destinationFolder + @"qt-everywhere-opensource-src-4.8.4\mkspecs\win32-msvc2010\qmake.conf", true);

                    File.Copy(
                        @"qt4.8.3vs2012patch\HashSet.h",
                        destinationFolder + @"qt-everywhere-opensource-src-4.8.4\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h", true);
                }

                message("configure qt");

                if (qtVersion == eQtVersion.Qt4_8_3 ||
                    qtVersion == eQtVersion.Qt4_8_4)
                {
                    configureQT4();
                }
                else
                {
                    configureQT5();
                }

                message("building qt");

                buildQT();

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, QtZipFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, QtZipFilename));
                }

                message("Finished buidling qt  - - - DONE");

                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #9
0
        public void DownloadAndBuild()
        {
            try
            {
                if (!Directory.Exists(destinationFolder))
                {
                    Directory.CreateDirectory(destinationFolder);
                }

                // Boost.IOStreams Zlib filters see http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010
                bool bBuildBoostIOStreams = false;
                if (bBuildBoostIOStreams)
                {
                    message("Downloading zlib127...");
                    DownloadHelper.DownloadFileFromURL(@"http://zlib.net/zlib127.zip", destinationFolder + "zlib127.zip");
                    message("Start to unzip zlib127...");
                    // Unzip zlib127
                    SevenZip.Decompress(destinationFolder + "/" + "zlib127.zip", destinationFolder);

                    string ZLIB_SOURCE  = destinationFolder + "zlib127";
                    string ZLIB_INCLUDE = destinationFolder + "zlib127";
                }

                message("Downloading boost...");

                string boostDownloadURL = BoostInfo.GetDownloadURL(boostVersion);
                string boostZIPFilename = BoostInfo.GetBoostZipFileName(boostVersion);
                if (boostVersion == eBoostVersion.FromSourceSVN)
                {
                    string boostFromSourceSVNFolderPath = Path.Combine(destinationFolder, BoostHelper.BoostFromSourceSVNFolderName);
                    DownloadHelper.CheckOutFromSourceSVN("svn", boostDownloadURL, boostFromSourceSVNFolderPath);
                }
                else
                {
                    DownloadHelper.DownloadFileFromURL(boostDownloadURL, destinationFolder + boostZIPFilename);

                    message("Start to unzip boost...");

                    if (boostVersion == eBoostVersion.Boost1_51_0)
                    {
                        FileInfo fi         = new FileInfo(destinationFolder + boostZIPFilename);
                        long     fileLength = fi.Length;

                        if (fileLength != 91365553)
                        {
                            MessageBox.Show("Invalid file size of " + boostZIPFilename + " Size in bytes should be 91365553");
                        }
                    }

                    // Unzip Boost
                    SevenZip.Decompress(destinationFolder + "/" + boostZIPFilename, destinationFolder);

                    message("boost has been unzipped!");
                }

                if (boostVersion == eBoostVersion.Boost1_54_0 || compilerType == eCompiler.VS2013)
                {
                    // patch boost!
                    // https://svn.boost.org/trac/boost/attachment/ticket/8750/vc12.patch
                }

                if (boostVersion == eBoostVersion.Boost1_58_0 && compilerType == eCompiler.VS2015)
                {
                    message("Patching boost 1.58.0 config file to support VS2015.");
                    // patch boost!
                    // http://stackoverflow.com/questions/30760889/c-c-unknown-compiler-version-while-compiling-boost-with-msvc-14-0-vs-2015/30959156#30959156
                    File.Copy(@"boost1.58.0patch\vc14_visualc.hpp", destinationFolder + @"\boost_1_58_0\boost\config\compiler\visualc.hpp", true);
                }

                message("start building boost...");

                // Build boost
                if (boostVersion == eBoostVersion.Boost1_51_0 || boostVersion == eBoostVersion.Boost1_44_0)
                {
                    buildBoost_1_51_0_x64(destinationFolder);
                }
                else
                {
                    bootstrapBoost_1_52_0_AndLaterVersion();
                    buildBoost_1_52_0_AndLaterVersion();
                }

                // remove downloaded file
                if (File.Exists(Path.Combine(destinationFolder, boostZIPFilename)))
                {
                    System.IO.File.Delete(Path.Combine(destinationFolder, boostZIPFilename));
                }

                message("boost successfully built!");


                OnFinished();
            }
            catch (Exception ex)
            {
                message(string.Empty);
                OnFailure();
                MessageBox.Show(ex.ToString());
            }
        }