Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit 4654248

Browse files
committed
Add afterbuild command
1 parent 8ef79cc commit 4654248

5 files changed

Lines changed: 19 additions & 22 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,5 @@ FodyWeavers.xsd
400400
# JetBrains Rider
401401
*.sln.iml
402402

403-
# End of https://www.toptal.com/developers/gitignore/api/csharp
403+
# End of https://www.toptal.com/developers/gitignore/api/csharp
404+
ModloaderProps.props

ModLoader.sln

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModLoader", "ModLoader\ModL
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
1110
Release|Any CPU = Release|Any CPU
1211
EndGlobalSection
1312
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{A947DC7D-08BE-4D3A-8D81-D94DD376ECB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{A947DC7D-08BE-4D3A-8D81-D94DD376ECB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
1613
{A947DC7D-08BE-4D3A-8D81-D94DD376ECB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
1714
{A947DC7D-08BE-4D3A-8D81-D94DD376ECB8}.Release|Any CPU.Build.0 = Release|Any CPU
1815
EndGlobalSection

ModLoader/Loader.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,6 @@ private void detectIndividualDlls()
384384
}
385385
}
386386

387-
/// <summary>
388-
///
389-
/// </summary>
390-
public void test()
391-
{
392-
393-
}
394-
395387
/// <summary>
396388
/// This is the mod loader entry point, this is the method that is executed after being injected into the game.
397389
/// </summary>

ModLoader/ModLoader.csproj

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="15.0"
3+
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
34
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<Import Project=".\ModloaderProps.props" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
68
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -15,15 +17,6 @@
1517
<NuGetPackageImportStamp>
1618
</NuGetPackageImportStamp>
1719
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19-
<DebugSymbols>true</DebugSymbols>
20-
<DebugType>full</DebugType>
21-
<Optimize>false</Optimize>
22-
<OutputPath>bin\Debug\</OutputPath>
23-
<DefineConstants>DEBUG;TRACE</DefineConstants>
24-
<ErrorReport>prompt</ErrorReport>
25-
<WarningLevel>4</WarningLevel>
26-
</PropertyGroup>
2720
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2821
<DebugType>pdbonly</DebugType>
2922
<Optimize>true</Optimize>
@@ -44,6 +37,7 @@
4437
</Reference>
4538
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
4639
<SpecificVersion>False</SpecificVersion>
40+
<Private>False</Private>
4741
<HintPath>..\Dependencies\Newtonsoft.Json.dll</HintPath>
4842
</Reference>
4943
<Reference Include="System" />
@@ -118,4 +112,11 @@
118112
<None Include="packages.config" />
119113
</ItemGroup>
120114
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
115+
116+
<!-- After build copy dll file into managed folder and start the game -->
117+
<Target Name="AfterBuild">
118+
<Copy SourceFiles="bin\Release\ModLoader.dll" DestinationFolder="$(ManagedFolder)" ContinueOnError="true" />
119+
<Exec Command="start steam://rungameid/1718870"/>
120+
</Target>
121+
121122
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ManagedFolder>C:\Program Files\Steam\steamapps\common\Spaceflight Simulator\Spaceflight Simulator Game\Spaceflight Simulator_Data\Managed</ManagedFolder>
5+
</PropertyGroup>
6+
</Project>

0 commit comments

Comments
 (0)