X2CommunityCore / X2ModBuildCommon

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

Support classes in subfolders #4

Open Xymanek opened 3 years ago

Xymanek commented 3 years ago

Should be simple to just flatten the Classes folder

robojumper commented 3 years ago

Needs to be opt-in. Also simply flattening the Classes folder regresses path rewriting, since error messages are unaware of rewriting.

I solved that problem here: https://github.com/EndOfTheCycleMod/EndOfTheCycle/blob/38377378db9c73480fc9133c0cb53d3c7d5d0bdd/.scripts/build.ps1#L68-L80

Xymanek commented 3 years ago

Regarding path rewriting: it doesn't work in modbuddy anyway (at least the build script implementation that CI uses/d)

image

Also, looking at your implementation of build_common.ps1 it doesn't seem to handle the IncludeSrc() functionality for path rewriting either (correct me if I'm wrong)

Xymanek commented 3 years ago

Update: path rewriting was fixed in the new .targets - the issue was that the path passed to the powershell script was ending in ..\ instead of the actual target folder