Introduce integrated package manager
This commit introduces an integrated package manager into TShock for the purpose of fetching and installing plugins and their dependencies from NuGet repositories. This makes getting new plugins easier for users, as well as simplifiying more advanced deployment scenarios.
This commit is contained in:
parent
4e59087e7c
commit
be8e51959f
13 changed files with 849 additions and 8 deletions
1
TShockLauncher/.gitignore
vendored
Normal file
1
TShockLauncher/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/packages
|
||||
|
|
@ -22,11 +22,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* - to copy/move around TShockAPI.dll (the TShock plugin to TSAPI)
|
||||
* - to publish TShock releases.
|
||||
* - move dependencies to a ./bin folder
|
||||
*
|
||||
*
|
||||
* The assembly name of this launcher (TShock.exe) was decided on by a community poll.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
using TShockPluginManager;
|
||||
|
||||
if (args.Length > 0 && args[0].ToLower() == "plugins")
|
||||
{
|
||||
var items = args.ToList();
|
||||
items.RemoveAt(0);
|
||||
await NugetCLI.Main(items);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Start();
|
||||
}
|
||||
|
||||
Dictionary<string, Assembly> _cache = new Dictionary<string, Assembly>();
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\TerrariaServerAPI\TerrariaServerAPI\TerrariaServerAPI.csproj" ExcludeFromSingleFile="true" />
|
||||
<ProjectReference Include="..\TShockAPI\TShockAPI.csproj" ExcludeFromSingleFile="true" ReferenceOutputAssembly="false" /> <!-- allow api to rebuilt with this project, so ServerPlugins are refreshed -->
|
||||
<ProjectReference Include="..\TShockPluginManager\TShockPluginManager.csproj"/>
|
||||
<Reference Include="HttpServer" ExcludeFromSingleFile="true">
|
||||
<HintPath>..\prebuilts\HttpServer.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
@ -96,4 +97,4 @@
|
|||
</ItemGroup>
|
||||
<Move SourceFiles="@(MoveBinaries)" DestinationFolder="$(PublishDir)bin" ContinueOnError="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue