#rb Sebastian.Nordgren
#rnx
#jira UE-152958
#preflight 629717b72c618ddc669143d7
- Instead of just building the UnrealVirtualizationTool we will now check to see if there is a precompiled version we can use.
-- If the user has rebuilt the editor locally, then we will ignore any precompiled version of UnrealVirtualizationTool and rebuild that aswell incase there are code changes that it needs to pick up.
- To tell if an exe is locally built or a precompiled binary we check for a .version OR .target file (this can vary depending how a program is set up) then look for the JSON property 'IsPromotedBuild ' which when none zero means that the binary is probably prebuilt.
-- This isn't very robust and I am not happy with it, but we don't seem to have an official way to determine a precompiled binary. When we do get an offical way to do it I will update the command.
[CL 20448604 by paul chipchase in ue5-main branch]
#rb Sebastian.Nordgren
#jira UE-154011
#rnx
#preflight 6294a6eb380652524ebcc4a7
- If we use uppercase %C in P4V to pass the changelist number then we will get a list of all changelists that the user has selected rather than launching the command once per changelist which is what happens when the lower case %c is used
-- Due to the use of UBT, we can run into problems if the user tries to submit multiple changelists and they are processed in different processes. Even if we fixed the command to only run UBT one process at a time, running many versions of the submit tool will create many more perforce connections which we'd like to avoid, so having all of the changelists run through one instance is still prefered.
- Processing a changelist has been moved to a new method, ::ProcessChangelist which is pretty much the same code as we had in ::Execute.
-- Rather than connecting to perforce for each changelist, this code has been kept in ::Execute and is only run once, the connection is then passed to ::ProcessChangelist.
- Logging has been improved to show when the tool is exiting, either from failure or success. The p4v terminal does not do a good job informating the user when the process has finished running so hopefully this will help.
- A small extension to ILogger has been added, ::NewLine which writes an empty line to the logger.
- This was the simplest way to add support to multiple changelists. We process each one by itself until we run out of changelists or we reach an error. However it is likely that packages in multiple changelists would be in the same project or at least use the same engine installation, so we could remove some overhead by parsing all changelists, gathering the packages, virtualizating those packages then submitting the changelists afterwards.
-- This would be a great approach for the average user as they will likely be submitting relatively small changelists (< 100 files) but would be a terrible approach if the entire project was being virtualized where the total number of packages being submitting could be in the 100k-million range. So we'd probably want a "process changelists separatly" mode even if we did make the optimized version.
-- Looking into adding a combined changelist mode will be added as an optimization task.
- Added a new preprocessor define 'UE_DEBUG_DISABLE_SUBMITS' that when enabled will cause the command to only pretend to submit the target changelist(s) this is intended for use in development to avoid submitting changelists over and over when testing the non-submission portion of the command.
-- Note that it is defined inside of a DEBUG check, so even if it is accidently submitted enabled, it will not be published.
[CL 20429873 by paul chipchase in ue5-main branch]
#rb trivial
#rnx
#preflight 628ccca9fc217779d4361cb5
- The native code changes we are trying to match from CL 20346906, fix a problem when parsing a package path containing more than one content directory.
- The method now takes an ILogger so that we can record problems found.
- Even though we don't use the .uplugin file, we now match the native code and look for it first, rather than looking for the /plugins/ directory immediately. This should reduce any differences between the two code paths.
[CL 20346914 by paul chipchase in ue5-main branch]
#rb Sebastian.Nordgren
#rnx
#preflight 628c85f58673efbf3c0a5e3f
- Added checks when parsing xml to make sure that expected nodes/lists were found and are not null.
- Response was assigned as null, but nothing was checking for this. The initial value has been changed to an empty string which wioll invoke the user cancelling the operation as the default behaviour.
- StreamReader.ReadToEnd is a blocking call in an async method. Replaced with await StreamReader.ReadToEndAsync.
[CL 20346208 by paul chipchase in ue5-main branch]
- Split up the binaries between platform since there are #if's due to WinForms
#rb trivial
#preflight skip
[CL 20247967 by Josh Adams in ue5-main branch]
- Will compile on Mac and Linux now
- Mac replaced the WinForms functionality with AppleScript
- Linux will compile be have reduced functionality
- Fixed up paths for p4v settings and dotnet location
- Added binaries and installer scripts for all 3 platforms - won't need UGS to install, will copy to user-library location (may need some adustment on Linux, will address after)
#rb will.damon
#preflight skip
[CL 20244727 by Josh Adams in ue5-main branch]
#rb Sebastian.Nordgren
#rnx
#jira UE-151464
#preflight 627a4c60fc07e0a9b4eefda9
### No files
- When submitting a change list with no workspace files (either empty changelist or only shelved files) our internal C# api does not return any errors.
- To get around this for now ::FindPackagesInChangelist can be changed to return null if we detect that there are no files to submit.
- I am following up with the original author to try and find out if the submit behavior in our API is intended or not.
### Shelved files
- Attempting to submit a valid changelist that has shelved files will eventually fail when we try to finally submit the changelist.
- This means that the tool will check all of the packages for virtualization first, before eventually failing on the submit.
- Most users will alt tab out of p4v during the submit and we cannot do anything fancy with the error reporting (like make the task bar icon flash etc) so might not notice that the submit failed for some time.
- So it makes sense for us to check for shelved files, before we kick off the virtualization process and if the changelist does have shelved files we can error out and the user should see it before they alt tab away.
[CL 20120836 by paul chipchase in ue5-main branch]
#rb trivial
#rnx
#preflight 627a14806a20515edc79c799
- Only display the p4 submit error messages, doo not include the perforce generic code as it can be confusing to the end user.
- If a submit fails, print a line to the log once the virtualization tags have been removed from the original changelist description. Previously the last message the user would see ended in "..." which implied that the process was still running.
[CL 20119794 by paul chipchase in ue5-main branch]
#rb Per.Larsson
#jira UE-143675
#rnx
#preflight 6274f6118b2af58d6e5e44a1
- The c# p4 api seems to have problems when calling p4 where, with no valid files so make sure that we early out before calling that.
- Only run the virtualization process if we have package files, no point trying to virtualize anything else.
-- If the changelist does not contain any packages then we just submit the change list, we don't need to stamp it or display logging info about how 0 packages are in 0 projects etc.
- Moved the code that submits the changelist to it's own method.
[CL 20073750 by paul chipchase in ue5-main branch]