Пример #1
0
        private static void RunCMakeRelease(BuildConfig config, string path, StreamWriter log)
        {
            return; // Skip this experimental feature

            #if !UNITY_EDITOR_WIN
            log.WriteLine("Automatic CMake release building is not yet implemented. Please make sure you build a release" +
                          "version of the library manually.");
            return;
            #endif

            log.WriteLine("Pre-Build: " + config.name);
            var cppProjectRoot =
                Application.dataPath.Remove(Application.dataPath.LastIndexOf("/Assets"), "/Assets".Length)
                + "/Interface/";

            var cmakeProcess = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    #if UNITY_EDITOR_WIN
                    FileName  = "cmd.exe",
                    Arguments = "/C cmake -S . -B cmake-build-release & cmake --build cmake-build-release --target __libigl-interface --config Release",
                    #else
                    FileName  = "cmake -S . -B cmake-build-release & cmake --build cmake-build-release --target __libigl-interface --config Release",
                    Arguments = ""
                    #endif
                    UseShellExecute        = true,
                    RedirectStandardOutput = false,
                    CreateNoWindow         = false,
                    WorkingDirectory       = cppProjectRoot
                }
            };

            cmakeProcess.Start();
            log.WriteLine(cmakeProcess.StartInfo.FileName + " " + cmakeProcess.StartInfo.Arguments);
            cmakeProcess.WaitForExit();
            log.WriteLine("Cmake finished with exit code: " + cmakeProcess.ExitCode);
        }
Пример #2
0
 /// <returns>e.g. win64/myApp.exe</returns>
 public static string GetBuildName(this BuildPipeline pipeline, BuildConfig config)
 {
     return(config.name + "/" + pipeline.appName + "-" + Application.version + config.fileExt);
 }