X2CommunityCore / X2ModBuildCommon

An improved XCOM 2 mod build system
MIT License
5 stars 5 forks source link

Improve script change detection, avoid unnecessary deletions #24

Closed robojumper closed 3 years ago

robojumper commented 3 years ago

Fixes #16, Fixes #20

Also fixes #22 while I'm at it.

robojumper commented 3 years ago

I'm not sure what the explicit deletions of the compiled project were for, but since all Robocopy invocations use /MIR (mirror), this shouldn't cause extraneous files. This is required to get acceptable warm build times for lwotc, which has 3.5GB of content files for a total of 7GB unnecessary copies.

Xymanek commented 3 years ago

I'm not sure what the explicit deletions of the compiled project were for

https://github.com/WOTCStrategyOverhaul/CovertInfiltration/issues/440. Pretty sure I also replicated the issue with the latest "version" of the build script, which is why I added the deletion of the "deployed" folder

robojumper commented 3 years ago

Ah great, that would be https://github.com/WOTCStrategyOverhaul/CovertInfiltration/blob/master@{2020-02-4}/.scripts/build.ps1, which didn't use Robocopy and instead just Copy-Item.

I tested removing one item from the project with this and it seemed to work fine.

Xymanek commented 3 years ago

Well, if it correctly gets rid of the now-deleted files, then I don't mind the underlying implementation 😄