Пример #1
0
        /** Basically a main with parsed options */
        static void RunWithOptions(Options Opts)
        {
            SetupClean();

            foreach (UE4InstallInfo Install in UE4.GetRequiredVersionList().InstallationList)
            {
                PlatformSetup(Install);

                string DestinationDirectory = BuildPluginForInstall(Install);
                CleanupInstallDirectory(DestinationDirectory);
                AddConfigFiles(DestinationDirectory);
                CompressPlugin(Install, DestinationDirectory, Opts.UE4PluginVersion);
            }

            StaticResult = 0;
        }
Пример #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);
        }
Пример #3
0
        /** Build the plugin for a specific UE4 install */
        static string BuildPluginForInstall(UE4InstallInfo Install)
        {
            string InstallDirectory = String.Format(@"{0}/PluginStaging_ALL/modio_UE4_{1}",
                                                    Directory.GetCurrentDirectory(),
                                                    Install.AppName);

            string BuildTemplate = @"BuildPlugin -Plugin={0}/../modio.uplugin -TargetPlatforms={1} -Package={2} -Rocket";

            if (!Process.RunCommand(GetUATPath(Install),
                                    String.Format(BuildTemplate,
                                                  Directory.GetCurrentDirectory(),
                                                  UE4.GetPlatformBuildString(),
                                                  InstallDirectory),
                                    Install.AppName
                                    )
                )
            {
                throw new System.ApplicationException("Failed to build the plugin for installation " + Install.AppName + " of UE4");
            }

            return(InstallDirectory);
        }