Example #1
0
        /** Get the path to UAT depending on what UE4 version we are aiming for */
        static string GetUATPath(UE4InstallInfo Install)
        {
            string TemplateUATPath = @"{0}/Engine/Build/BatchFiles/RunUAT.{1}";

            return(string.Format(TemplateUATPath,
                                 Install.InstallLocation,
                                 Platform.IsWindows() ? "bat" : "sh"));
        }
Example #2
0
        static void CompressPlugin(UE4InstallInfo Install, string PluginDirectory, string PluginVersion)
        {
            Filesystem.SafeCreateDirectory("tmp");
            Filesystem.DirectoryCopy(PluginDirectory, "tmp/modio", true);

            ZipFile.CreateFromDirectory("tmp/modio", string.Format("PluginStaging_ALL/modio-{0}-{1}.zip",
                                                                   PluginVersion,
                                                                   Install.GetCleanAppName())
                                        );

            Directory.Delete("tmp", true);
            // We have no need of the plugin directory after this
            Directory.Delete(PluginDirectory, true);
        }
Example #3
0
 /// <summary>
 /// Platform specific code depending on what platform we currently are running
 /// </summary>
 static void PlatformSetup(UE4InstallInfo Install)
 {
     // @todo: Next instance we need to check for the platform, make a platform object that we can use to
     // move the platform specific code in a specific object
     // On windows, we compile linux so need to ensure that the environment is properly setup
     if (Platform.IsWindows())
     {
         // Ensure that we are using the correct clang version for each engine install
         Environment.SetEnvironmentVariable("LINUX_MULTIARCH_ROOT", Install.Metadata.ClangInstallPath, EnvironmentVariableTarget.Process);
     }
     // On OS X, we require different Xcode-versions to compile all versions. Switch X-code version depending
     // on the current UE4 version
     if (Platform.IsMacOS())
     {
         Filesystem.SafeDeleteDirectory("/Applications/Xcode.app", true);
         Filesystem.CreateSymbolicLink(Install.Metadata.XCodeInstallPath, "/Applications/Xcode.app");
     }
 }
Example #4
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);
        }
Example #5
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);
        }