Beispiel #1
0
        /// <summary>
        /// Finds and caches all installed UE4 version that's installed from the Epic Games Launcher
        /// </summary>
        /// <returns></returns>
        static public UE4Installs GetInstalledLauncherVersions()
        {
            if (InstalledVersions == null)
            {
                // On windows, this path is to where to know what installed engine versions are installed
                string Path = GetApplicationSettingsDir() + "/Epic/UnrealEngineLauncher/LauncherInstalled.dat";
                if (!File.Exists(Path))
                {
                    throw new System.ApplicationException("Can't find installed launcher file, please install at least on UE4 engine before running this script");
                }

                InstalledVersions = JsonConvert.DeserializeObject <UE4Installs>(File.ReadAllText(Path));
            }

            return(InstalledVersions);
        }
Beispiel #2
0
        /// <summary>
        /// Get all of our required UE4 version (that we want to support on the marketplace) and populate them with the metadata from our config file
        /// </summary>
        /// <returns></returns>
        static public UE4Installs GetRequiredVersionList()
        {
            if (RequiredUE4Versions == null)
            {
                RequiredUE4Versions = new UE4Installs();
                foreach (InstallMetadata RequiredInstall in UE4.GetRequiredUE4Installs())
                {
                    UE4InstallInfo Installation = GetInstalledLauncherVersions().InstallationList.Find(InstalledVersion => InstalledVersion.AppName == "UE_" + RequiredInstall.Version);
                    if (Installation == null)
                    {
                        throw new System.ApplicationException("You don't have the required version " + RequiredInstall.Version + " of UE4 installed");
                    }

                    Installation.Metadata = RequiredInstall;
                    RequiredUE4Versions.InstallationList.Add(Installation);
                }
            }

            return(RequiredUE4Versions);
        }