xADDBx / OwlcatNuGetTemplates

.NET Package which contains templates to create mods for the various Games made by Owlcat including Warhammer 40,000: Roguetrader and Pathfinder: Wrath of the Righteous
MIT License
3 stars 4 forks source link

Attempt number 1 at doing a BPCore template? #10

Closed CasDragon closed 3 weeks ago

CasDragon commented 3 weeks ago

I have no idea how to test locally, because my brain is really smooth. Creating the PR because I literally won't remember later to ask you how if I don't PR now. May or may not work correctly already

CasDragon commented 3 weeks ago

Micro assisted my smooth brain with local testing, already found an issue, so converting to draft

CasDragon commented 3 weeks ago

Updated the README dotnet new --install Owlcat.Templates is apparently deprecated, replaced with dotnet new install Owlcat.Templates

CasDragon commented 3 weeks ago

The template appears to work, except for the issues I'm running into here. https://discord.com/channels/645948717400064030/791053285657542666/1251332530552967210 Micro says it shouldn't work, but if you follow the conversation, it's literally the same code as Summoner mod and CharacterOptionsPlus mod, so it should work

So the state of the template is... everything appears to work, creates the project correctly and references BPCore nuget, only thing that doesn't work is building the project. I have 0 knowledge on MSBuild, so unsure of whether or not I'll continue attempting to fix this

CasDragon commented 3 weeks ago

Tested it twice, with these changes (MSBuild ), it appears to work correctly, and will build a functioning empty mod that depends on BPCore

xADDBx commented 3 weeks ago
  1. Doesn't this still need the Unity Part of BPCore? That was actually the reason I never bothered, since I was too lazy to learn how that would need to look like.
  2. Sadly ZipDirectory task zips the whole directory; so instead of excluding all lib files we need to delete the unnecessary files between ILMerge and Deploy
CasDragon commented 3 weeks ago
  1. Nope, that's optional. Or at least, has been in my experience using BPCore
  2. I could have sworn I changed that? Will look again, maybe only did it to the test project
xADDBx commented 3 weeks ago
  1. I'll just ask Wolfie
  2. Deploy tasks has two steps; install locally and zip files. Install locally uses the files in the proprty. Zip Files zips everythin in the directory.
        <Copy SourceFiles="@(Files)" DestinationFiles="@(Files->'$(WrathInstallDir)\Mods\$(AssemblyName)\%(RecursiveDir)%(Filename)%(Extension)')" />
        <ZipDirectory SourceDirectory="$(MSBuildProjectDirectory)\$(OutputPath)" DestinationFile="$(MSBuildProjectDirectory)\$(OutputPath)\..\$(AssemblyName)-$(Version).zip" Overwrite="true" />
xADDBx commented 3 weeks ago

https://github.com/xADDBx/OwlcatNuGetTemplates/commit/ec9f60ad172c87cb2655c314ead47262c9555ff5

I basically took it as is; I adjusted ILRepack Pacakge version (using 2.* for matching major version; since SemVer any 3.x version could break the workflow because api change) and I changed the default display name