rysnc replacement with cp and tar. (og. More aggressive pattern copy + rsync replacement.)#987
rysnc replacement with cp and tar. (og. More aggressive pattern copy + rsync replacement.)#987PortalG wants to merge 4 commits intosmartcmd:mainfrom
Conversation
… with more aggressive patterns.
|
The DLCs where placed in Windows64Media because they are modified version of the xbox one DLCs, with 720p support and SkinHDWin and SkinWin instead of SkinHDDurango, sounds are in high res while xbox one ver is still the original, durangomedia is not used anymore since 2 or 3 days ago, thats why you cant see DLCs duplicated in Nightly Builds |
|
Oh, CMake was never modified, I guess that's why you get duplicates when compiling with CMake |
|
Can you merge in upstream to resolve the merge conflicts? Its possible some of this has been done now |
# Conflicts: # CMakeLists.txt
|
I just replaced rsync with tar and cp because the config is based more on including certain files/directories rather than excluding, defeating the purpose of having have aggressive "exclusion" patterns. I was initially going to avoid an inclusion config because it would be a pain to modify if the project were to ever go through a restructure, but at this point in development, it's probably fine. |
EDIT: This PR no longer focuses on exclusion patterns because the copy config is now inclusion based. Read comments for more info.
Description
There are three issues with the current copy configuration that have been bothering me:
tarandcputilities in Unix should've been used from the start rather than rsync. (kudos to @izzint)Windows64Mediais no longer necessary and causes duplicates, as other PRs have manually pushed all extra DLCs and other media into the folder instead.This PR aims to fix the three inconveniences above.
Changes
tarandcpimplementation from consider replacing rsync with cp and tar in CMakeLists.txt #558.DurangoMediatoWindows64Media, preventing duplicate DLCs and unnecessary file changes.Previous Behavior
Robocopy and rsync would copy too many unused assets, take a long time to complete, and cause two different DLCs to be present. (note: all examples below are on an old drive to measure multithreaded performance better)
Root Cause
These issues weren't originally accounted for as my original PR was just to make sure that I and others could have a reliable, automated asset copy system. However, now the project is reaching a point were it should be more production ready. When making a software build, including assets that are unused adds unnecessary bloat and mess. It is always a good idea to strive towards clean builds as much as possible. Having two of the same DLC pop up twice is irritating for the user as well, and can be frustrating.
New Behavior
Robocopy and the new
cpandtarutilities have better exclusion patterns and ignores (hopefully) every unnecessary file, prevents DLCs and other files from being copied twice, and keeps asset copies fast and clean:Fix Implementation
After tinkering with the
CMakeLists.txtfile for a bit, I figured out more files and directories that aren't needed for the game to function on top of the original exclusions:.xuiand.inlsource code files..cdproject files..resxand.loclanguage files. (I don't actually know why these aren't used, but the game had no trouble displaying any text so I assume they are just leftovers).libflies. (this one should have been obvious, but evidently I missed it in my first PR).swffiles because everything is already compressed in theMedia.arcfiles, so it's pointless..msscmpfiles because the format is currently being abandoned for.oggfiles..wavfiles that are, for some reason, present but go completely unused.MediaOrbis.arc,MediaDurango.arc, along all the PlayStation ones.sce_sysandTROPDIRdirectories because they are data folders for PlayStation only.Graphics,DummyTexturePack, andGameConfigdirectories.ReadMe.txtandNetwork Implementation Notes.txtfiles.Along with using
cpandtarinstead of rsync, I also made sure that/Windows64/GameHDDis always present to prevent unexpected crashes when trying to save the game.AI Use Disclosure
All code written by me and @izzint, no AI was used.
Related Issues
I am only including @izzint's code in this PR because I have been waiting for 3 days for their pull request to get merged and it still hasn't. It would be pointless and a nuisance to force @izzint to adapt to these new changes rather than just building on top of her changes. All credit goes to her for the
cpandtarimplementation. Good find!One final note, I would advise you test this on your own machine to make sure you it works before merging. I am honestly surprised with how much elimination I got away with, so I wouldn't be surprised if I missed something important.