public void DownloadAndBuildOpenCascade() { try { string destinationFolder = GlobalVariables.destinationFolder + @"OpenCascade\"; eCompiler compiler = eCompiler.VS2010; openCASCADEBuildProcessDescripton bbpd = new openCASCADEBuildProcessDescripton(); bbpd.version = eOpenCASCADEVersion.OpenCASCADE_2_4_3; bbpd.compilerType = compiler; bbpd.coreCount = 4; bbpd.destinationFolder = destinationFolder; OpenCASCADEBuildProcess buildProcess = new OpenCASCADEBuildProcess(bbpd); //boostBuildProcess.Message += new MessageEventHandler(boostBuildProcess_Message); //boostBuildProcess.StandardOutputMessage += new StandardOutputMessageEventHandler(boostBuildProcess_StandardOutputMessage); //boostBuildProcess.StandardErrorMessage += new StandardErrorMessageEventHandler(boostBuildProcess_StandardErrorMessage); //boostBuildProcess.Finished += new FinishedEventHandler(boostBuildProcess_Finished); //Thread workerThread = new Thread(boostBuildProcess.DownloadAndBuildBoost_x64); //workerThread.Start(); buildProcess.DownloadAndBuild(); } catch (System.Exception ex) { Assert.True(false); } }
/// <summary> /// VTKBuildProcess constructor /// </summary> /// <param name="llbpd"> /// VTKBuildProcessDescripton describes VTK build parameters /// </param> public VTKBuildProcess(VTKBuildProcessDescripton vtkbpd) { destinationFolder = vtkbpd.destinationFolder; compilerType = vtkbpd.compilerType; vtkVersion = vtkbpd.vtkVersion; platform = vtkbpd.platform; }
/// <summary> /// FlannBuildProcess constructor /// </summary> /// <param name="llbpd"> /// FlannBuildProcessDescripton describes Flann build parameters /// </param> public FlannBuildProcess(FlannBuildProcessDescripton flannbpd) { destinationFolder = flannbpd.destinationFolder; compilerType = flannbpd.compilerType; flannVersion = flannbpd.flannVersion; platform = flannbpd.platform; }
public void SaveCompiler(eCompiler _compiler, bool _reimport = true) { string _path = GetSavePath(_compiler); List <string> _definesList = GetDefinesList(_compiler); // Write defines if (_definesList.Count == 0) { if (FileOperations.Exists(_path)) { FileOperations.Delete(_path); FileOperations.Delete(_path + ".meta"); } AssetDatabase.Refresh(); return; } StringBuilder _stringBuilder = new StringBuilder(); _stringBuilder.Append(kDefinePrefix); _stringBuilder.Append(string.Join(";", _definesList.ToArray())); using (StreamWriter _writer = new StreamWriter(_path, false)) _writer.Write(_stringBuilder.ToString()); // Reimport if (_reimport) { ReimportToForceCompile(); } }
/// <summary> /// PCLBuildProcess constructor /// </summary> /// <param name="llbpd"> /// PCLBuildProcessDescripton describes PCL build parameters /// </param> public PCLBuildProcess(PCLBuildProcessDescripton pclbpd) { destinationFolder = pclbpd.destinationFolder; compilerType = pclbpd.compilerType; pclVersion = pclbpd.pclVersion; platform = pclbpd.platform; }
public void DownloadAndBuildBoost1_52_0_VS2010_x64() { try { string destinationFolder = GlobalVariables.destinationFolder + @"DownloadAndBuildBoost1_52_0_VS2010_x64\"; eCompiler compiler = eCompiler.VS2010; boostBuildProcessDescripton bbpd = new boostBuildProcessDescripton(); bbpd.boostVersion = eBoostVersion.Boost1_52_0; bbpd.compilerType = compiler; bbpd.coreCount = 4; bbpd.destinationFolder = destinationFolder; BoostBuildProcess boostBuildProcess = new BoostBuildProcess(bbpd); //boostBuildProcess.Message += new MessageEventHandler(boostBuildProcess_Message); //boostBuildProcess.StandardOutputMessage += new StandardOutputMessageEventHandler(boostBuildProcess_StandardOutputMessage); //boostBuildProcess.StandardErrorMessage += new StandardErrorMessageEventHandler(boostBuildProcess_StandardErrorMessage); //boostBuildProcess.Finished += new FinishedEventHandler(boostBuildProcess_Finished); //Thread workerThread = new Thread(boostBuildProcess.DownloadAndBuildBoost_x64); //workerThread.Start(); boostBuildProcess.DownloadAndBuild(); } catch (System.Exception ex) { Assert.True(false); } }
/// <summary> /// LibLASBuildProcess constructor /// </summary> /// <param name="llbpd"> /// LibLASBuildProcessDescripton describes libLAS build parameters /// </param> public LibLASBuildProcess(LibLASBuildProcessDescripton llbpd) { destinationFolder = llbpd.destinationFolder; compilerType = llbpd.compilerType; libLASVersion = llbpd.libLASVersion; libLASSupportedBoostVersion = llbpd.libLASSupportedBoostVersion; platform = llbpd.platform; }
public void AddNewDefineSymbol(eCompiler _compiler, string _newDefineSymbol) { List <string> _definesList = GetDefinesList(_compiler); if (!_definesList.Contains(_newDefineSymbol)) { _definesList.Add(_newDefineSymbol); } }
public void SetAllCompilerDefines(eCompiler _compiler) { List <string> _definesList = GetDefinesList(_compiler); // Set new defines list CSharpDefinesList = new List <string>(_definesList); BooDefinesList = new List <string>(_definesList); UnityScriptDefinesList = new List <string>(_definesList); EditorDefinesList = new List <string>(_definesList); }
public QtBuildProcess(qtBuildProcessDescripton qbpd) { destinationFolder = qbpd.destinationFolder; compilerType = qbpd.compilerType; qtVersion = qbpd.qtVersion; platform = qbpd.platform; withLibraries = qbpd.withLibraries; qtCommandLineArguments = qbpd.qtCommandLineArguments; downloadThirdPartyLibraryEveryTime = qbpd.downloadThirdPartyLibraryEveryTime; }
/// <summary> /// Determines the file path of a certain compiler. /// </summary> /// <param name="compiler">The compiler for which the file system location should be determined.</param> /// <returns>Path to compiler.</returns> static public string GetCompilerPath(eCompiler compiler) { switch (compiler) { case eCompiler.VS2010: { if (Directory.Exists(PreferencesManager.Instance.VS2010Location)) { return(PreferencesManager.Instance.VS2010Location); } } break; case eCompiler.VS2012: { if (Directory.Exists(PreferencesManager.Instance.VS2012Location)) { return(PreferencesManager.Instance.VS2012Location); } } break; case eCompiler.VS2013: { if (Directory.Exists(PreferencesManager.Instance.VS2013Location)) { return(PreferencesManager.Instance.VS2013Location); } } break; case eCompiler.VS2015: { if (Directory.Exists(PreferencesManager.Instance.VS2015Location)) { return(PreferencesManager.Instance.VS2015Location); } } break; default: break; } throw new Exception("Could not local compiler path."); }
/// <summary> /// Checks if a certain compiler is present /// </summary> /// <param name="compiler">A specific compiler.</param> /// <returns>True if compiler is avialable, otherwise false.</returns> public static bool IsPresent(eCompiler compiler) { switch (compiler) { case eCompiler.VS2010: if (Directory.Exists(PreferencesManager.Instance.VS2010Location)) { return(true); } break; case eCompiler.VS2012: if (Directory.Exists(PreferencesManager.Instance.VS2012Location)) { return(true); } break; case eCompiler.VS2013: if (Directory.Exists(PreferencesManager.Instance.VS2013Location)) { return(true); } break; case eCompiler.VS2015: if (Directory.Exists(PreferencesManager.Instance.VS2015Location)) { return(true); } break; case eCompiler.VS2019: if (Directory.Exists(PreferencesManager.Instance.VS2019Location)) { return(true); } break; default: break; } return(false); }
private void configureQT4() { eCompiler compiler = compilerType; Process p = new Process(); ProcessStartInfo info = CreateVisualStudioCommandPromptProcessStartInfo(compilerType, platform); info.RedirectStandardInput = true; info.UseShellExecute = false; info.RedirectStandardOutput = true; info.RedirectStandardError = true; info.CreateNoWindow = true; p.StartInfo = info; p.Start(); string extractFolderName = QtInfo.GetQtInfo(qtVersion).ExtractFolderName; using (StreamWriter sw = p.StandardInput) { if (sw.BaseStream.CanWrite) { sw.WriteLine("cd /D " + destinationFolder + extractFolderName); if (compiler == eCompiler.VS2010 || qtVersion == eQtVersion.Qt4_8_3)// Qt 4.8.3 does not know platform msvc2012 { sw.WriteLine("configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010" + qtCommandLineArguments + withLibraries); } else { sw.WriteLine("configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2012" + qtCommandLineArguments + withLibraries); } sw.WriteLine("y"); } } readStandardOutput(p); readStandardError(p); p.WaitForExit(); p.Close(); }
public List <string> GetDefinesList(eCompiler _compiler) { switch (_compiler) { case eCompiler.BOO: return(BooDefinesList); case eCompiler.CSHARP: return(CSharpDefinesList); case eCompiler.EDITOR: return(EditorDefinesList); case eCompiler.UNITY_SCRIPT: return(UnityScriptDefinesList); } return(null); }
private string GetSavePath(eCompiler _compiler) { switch (_compiler) { case eCompiler.BOO: return(kBooFilePath); case eCompiler.CSHARP: return(kCSharpFilePath); case eCompiler.EDITOR: return(kEditorFilePath); case eCompiler.UNITY_SCRIPT: return(kUnityScriptFilePath); } return(null); }
public ProcessStartInfo CreateVisualStudioCommandPromptProcessStartInfo(eCompiler compilerType, ePlatform platformType) { ProcessStartInfo info = null; string compilerPath = Compiler.GetCompilerPath(compilerType); if (platformType == ePlatform.x64) { info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + compilerPath + @"\VC\vcvarsall.bat"" amd64"); } else if (platformType == ePlatform.x86) { info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + compilerPath + @"\VC\vcvarsall.bat"" x86"); } else { throw new Exception("Unknown Platform type."); } return(info); }
public void RemoveDefineSymbol(eCompiler _compiler, string _defineSymbol) { GetDefinesList(_compiler).Remove(_defineSymbol); }
public void SetAllCompilerDefines (eCompiler _compiler) { List<string> _definesList = GetDefinesList(_compiler); // Set new defines list CSharpDefinesList = new List<string>(_definesList); BooDefinesList = new List<string>(_definesList); UnityScriptDefinesList = new List<string>(_definesList); EditorDefinesList = new List<string>(_definesList); }
public void RemoveDefineSymbol (eCompiler _compiler, string _defineSymbol) { GetDefinesList(_compiler).Remove(_defineSymbol); }
public void AddNewDefineSymbol (eCompiler _compiler, string _newDefineSymbol) { List<string> _definesList = GetDefinesList(_compiler); if (!_definesList.Contains(_newDefineSymbol)) _definesList.Add(_newDefineSymbol); }
private string GetSavePath (eCompiler _compiler) { switch (_compiler) { case eCompiler.BOO: return kBooFilePath; case eCompiler.CSHARP: return kCSharpFilePath; case eCompiler.EDITOR: return kEditorFilePath; case eCompiler.UNITY_SCRIPT: return kUnityScriptFilePath; } return null; }
public List<string> GetDefinesList (eCompiler _compiler) { switch (_compiler) { case eCompiler.BOO: return BooDefinesList; case eCompiler.CSHARP: return CSharpDefinesList; case eCompiler.EDITOR: return EditorDefinesList; case eCompiler.UNITY_SCRIPT: return UnityScriptDefinesList; } return null; }
public void SaveCompiler (eCompiler _compiler, bool _reimport = true) { string _path = GetSavePath(_compiler); List<string> _definesList = GetDefinesList(_compiler); // Write defines if (_definesList.Count == 0) { if (FileOperations.Exists(_path)) { FileOperations.Delete(_path); FileOperations.Delete(_path + ".meta"); } AssetDatabase.Refresh(); return; } StringBuilder _stringBuilder = new StringBuilder(); _stringBuilder.Append(kDefinePrefix); _stringBuilder.Append(string.Join(";", _definesList.ToArray())); using (StreamWriter _writer = new StreamWriter(_path, false)) _writer.Write(_stringBuilder.ToString()); // Reimport if (_reimport) ReimportToForceCompile(); }