Closed bartico6 closed 6 years ago
I think that this is now safe to merge - the only time the changes kick in is when there are no cmdline arguments, and then it must've been compiled through msbuild or VS so env.config will always exist. I genuinely doubt there's any further issues to run into. Please let me know when and if this is merged, as, again, I will have to update TShock with a PR as well.
Is this tested on Mono & Windows?
I assume the AppVeyor builds/execs run on mono and it is tested on Windows on my local machine
I assume the AppVeyor builds/execs run on mono
Bad assumption. AppVeyor builds on Windows machines. Travis builds on Linux/Mono.
Then it is not tested on Mono and it wont be in the next few hours as it is 5:25AM for me. I'll do it tomorrow.
The toolchains should be close to the same now that .NET core is a thing, but they're not at that point yet.
quake@ubuntu-vm-quake:~/git/TerrariaAPI-Server-1/TShock.Modifications.Bootstrapper/bin/Release$ mono TShock.Modifications.Bootstrapper.exe
TShock Mintaka Bootstrapper, Open Terraria API v2.0
Folder set to: Release
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
Patching OTAPI, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null.
Running 4 modifications.
-> Adding RemoteClient.ClientUUID...
-> Adding ItemID.Sets.Explosives...
-> Enforcing OTAPI to load right platform...
-> Adding server side character support...
Saving modifications for merge...
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
Packing source and modification assemblies.
INFO: IL Repack - Version 2.0.13
INFO: ------------- IL Repack Arguments -------------
/out:/tmp/tmp29fc3482.tmp.dll /tmp/tmp2be46229.tmp.dll /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.ClientUUID/bin/Release/TShock.Modifications.ClientUUID.dll /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.Explosives/bin/Release/TShock.Modifications.Explosives.dll /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.Platform/bin/Release/TShock.Modifications.Platform.dll /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.SSC/bin/Release/TShock.Modifications.SSC.dll
-----------------------------------------------
INFO: Adding assembly for merge: /tmp/tmp2be46229.tmp.dll
INFO: Adding assembly for merge: /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.ClientUUID/bin/Release/TShock.Modifications.ClientUUID.dll
INFO: Adding assembly for merge: /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.Explosives/bin/Release/TShock.Modifications.Explosives.dll
INFO: Adding assembly for merge: /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.Platform/bin/Release/TShock.Modifications.Platform.dll
INFO: Adding assembly for merge: /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.SSC/bin/Release/TShock.Modifications.SSC.dll
INFO: Processing references
INFO: Processing types
INFO: Merging <Module>
INFO: Merging <Module>
INFO: Merging <Module>
INFO: Merging <Module>
INFO: Merging <Module>
INFO: Processing exported types
INFO: Processing resources
WARN: [System.Runtime.CompilerServices.CompilationRelaxationsAttribute] attribute wasn't merged because of inconsistency across merged assemblies
INFO: Fixing references
WARN: Did not write source server data to output assembly. Source server data is only writeable on Windows
INFO: Writing output assembly to disk
INFO: Copying permissions from /tmp/tmp2be46229.tmp.dll
INFO: Finished in 00:00:08.4652573
Cleaning up assembly.
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
* NuGet resolution failed on Newtonsoft.Json
* Found Newtonsoft.Json locally
Patching complete. Output: /home/quake/git/TerrariaAPI-Server-1/TShock.Modifications.Bootstrapper/bin/Release/Output/OTAPI.dll
quake@ubuntu-vm-quake:~/git/TerrariaAPI-Server-1/TShock.Modifications.Bootstrapper/bin/Release$
built & run successfully on mono + xbuild. I think it can be merged now. The failures with nuget were because I in fact did not have nuget 2.12 installed and I manually used the .exe to restore packages. The patching and detection of config work fine, though.
Oversight from my previous PR. Sincere apologies for missing it while testing.
The patcher now outputs the configuration name to env.config pre-build, and then reads it at runtime to determine which folder the modifications should be searched for inside of. This one was tested and works correctly.
There will be a TShock submodule update right after this is merged, so please accept that as well 👍