Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Patcher referencing /bin/Debug explicitly #153

Merged
merged 3 commits into from
Dec 11, 2017

Conversation

bartico6
Copy link
Member

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 👍

@bartico6
Copy link
Member Author

bartico6 commented Dec 11, 2017

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.

@QuiCM
Copy link
Member

QuiCM commented Dec 11, 2017

Is this tested on Mono & Windows?

@bartico6
Copy link
Member Author

I assume the AppVeyor builds/execs run on mono and it is tested on Windows on my local machine

@hakusaro
Copy link
Member

I assume the AppVeyor builds/execs run on mono

Bad assumption. AppVeyor builds on Windows machines. Travis builds on Linux/Mono.

@bartico6
Copy link
Member Author

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.

@hakusaro
Copy link
Member

The toolchains should be close to the same now that .NET core is a thing, but they're not at that point yet.

@bartico6
Copy link
Member Author

bartico6 commented Dec 11, 2017

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.

@QuiCM QuiCM merged commit faa3b95 into Pryaxis:general-devel Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants