예제 #1
0
        private void RegenerateProjectFiles(FileSystemPath uprojectFilePath)
        {
            if (uprojectFilePath == null || uprojectFilePath.IsEmpty)
            {
                return;
            }
            // {UnrealEngineRoot}/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles {uprojectFilePath} -game -engine
            var engineRoot = UnrealEngineFolderFinder.FindUnrealEngineRoot(uprojectFilePath);
            var pathToUnrealBuildToolBin = UnrealEngineFolderFinder.GetAbsolutePathToUnrealBuildToolBin(engineRoot);
            var commandLine = new CommandLineBuilderJet()
                              .AppendSwitch("-ProjectFiles")
                              .AppendFileName(uprojectFilePath)
                              .AppendSwitch("-game")
                              .AppendSwitch("-engine");

            try
            {
                ErrorLevelException.ThrowIfNonZero(InvokeChildProcess.InvokeChildProcessIntoLogger(
                                                       pathToUnrealBuildToolBin,
                                                       commandLine,
                                                       LoggingLevel.INFO,
                                                       TimeSpan.FromMinutes(10),
                                                       InvokeChildProcess.TreatStderr.AsOutput,
                                                       pathToUnrealBuildToolBin.Directory
                                                       ));
            }
            catch (ErrorLevelException)
            {
                // TODO: handle properly
            }
        }
예제 #2
0
        private bool TryGetEnginePluginFromUproject(FileSystemPath uprojectPath, UnrealPluginInstallInfo installInfo)
        {
            if (!uprojectPath.ExistsFile)
            {
                return(false);
            }

            var unrealEngineRoot = UnrealEngineFolderFinder.FindUnrealEngineRoot(uprojectPath);

            if (unrealEngineRoot.IsEmpty)
            {
                return(false);
            }

            return(TryGetEnginePluginFromEngineRoot(installInfo, unrealEngineRoot));
        }