Ejemplo n.º 1
0
        public static void UploadSymbolsInPath(string authToken, string symbolPath, string includeFilter, string excludeFilter, bool waitForExit)
        {
            CrashReporting.UploadPlatformConfig uploadPlatformConfig = CrashReporting.GetUploadPlatformConfig();
            string arguments = string.Format("-symbolPath \"{0}\" -log \"{1}\" -filter \"{2}\" -excludeFilter \"{3}\"", new object[]
            {
                symbolPath,
                uploadPlatformConfig.LogFilePath,
                includeFilter,
                excludeFilter
            });
            ProcessStartInfo processStartInfo = new ProcessStartInfo
            {
                Arguments        = arguments,
                CreateNoWindow   = true,
                FileName         = uploadPlatformConfig.UsymtoolPath,
                WorkingDirectory = Directory.GetParent(Application.dataPath).FullName,
                UseShellExecute  = false
            };

            processStartInfo.EnvironmentVariables.Add("USYM_UPLOAD_AUTH_TOKEN", authToken);
            processStartInfo.EnvironmentVariables.Add("USYM_UPLOAD_URL_SOURCE", CrashReporting.SignedUrlSourceUrl);
            processStartInfo.EnvironmentVariables.Add("LZMA_PATH", uploadPlatformConfig.LzmaPath);
            Process process = new Process();

            process.StartInfo = processStartInfo;
            process.Start();
            if (waitForExit)
            {
                process.WaitForExit();
            }
        }
Ejemplo n.º 2
0
 private static CrashReporting.UploadPlatformConfig GetUploadPlatformConfig()
 {
     CrashReporting.UploadPlatformConfig uploadPlatformConfig = new CrashReporting.UploadPlatformConfig();
     if (Application.platform == RuntimePlatform.WindowsEditor)
     {
         uploadPlatformConfig.UsymtoolPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "usymtool.exe"
         });
         uploadPlatformConfig.LzmaPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "lzma.exe"
         });
         uploadPlatformConfig.LogFilePath = Paths.Combine(new string[]
         {
             Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
             "Unity",
             "Editor",
             "symbol_upload.log"
         });
     }
     else if (Application.platform == RuntimePlatform.OSXEditor)
     {
         uploadPlatformConfig.UsymtoolPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "macosx",
             "usymtool"
         });
         uploadPlatformConfig.LzmaPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "lzma"
         });
         uploadPlatformConfig.LogFilePath = Paths.Combine(new string[]
         {
             Environment.GetEnvironmentVariable("HOME"),
             "Library",
             "Logs",
             "Unity",
             "symbol_upload.log"
         });
     }
     else if (Application.platform == RuntimePlatform.LinuxEditor)
     {
         uploadPlatformConfig.UsymtoolPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "usymtool"
         });
         uploadPlatformConfig.LzmaPath = Paths.Combine(new string[]
         {
             EditorApplication.applicationContentsPath,
             "Tools",
             "lzma-linux32"
         });
         uploadPlatformConfig.LogFilePath = Paths.Combine(new string[]
         {
             Environment.GetEnvironmentVariable("HOME"),
             ".config",
             "unity3d",
             "symbol_upload.log"
         });
     }
     return(uploadPlatformConfig);
 }