예제 #1
0
        /// <summary>
        /// Creates a full platform name, if missing. PlatformName [OS.Major Os.Minor Arch]
        /// Must match
        /// ...\Engine\Source\Programs\CrashReporter\CrashReportClient\Private\CrashDescription.cpp FCrashContext.FCrashContext
        ///</summary>
        public void SetPlatformFullName()
        {
            if (string.IsNullOrEmpty(PlatformFullName))
            {
                // Create a new one.
                string LocalPlatformName = "";
                if (BaseDir != "")
                {
                    string[] FolderComponents = BaseDir.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
                    if (FolderComponents.Length != 0)
                    {
                        LocalPlatformName = FolderComponents[FolderComponents.Length - 1];
                    }
                }
                else
                {
                    LocalPlatformName = PlatformNameIni;
                }

                if (!string.IsNullOrEmpty(Misc_OSVersionMajor))
                {
                    PlatformFullName = string.Format("{0} [{1} {2} {3}]",
                                                     LocalPlatformName,
                                                     Misc_OSVersionMajor,
                                                     string.IsNullOrEmpty(Misc_OSVersionMinor) ? "" : Misc_OSVersionMinor,
                                                     Misc_Is64bitOperatingSystem ? "64b" : "32b");
                }
            }
        }