summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/StardewModdingAPI.csproj
blob: ae454a35ce8b558d68b82c2859d4ac41fdfac06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectGuid>{F1A573B0-F436-472C-AE29-0B91EA6B9F8F}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>StardewModdingAPI</RootNamespace>
    <AssemblyName>StardewModdingAPI</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <TargetFrameworkProfile />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <PlatformTarget>x86</PlatformTarget>
    <Prefer32Bit>false</Prefer32Bit>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <UseVSHostingProcess>true</UseVSHostingProcess>
    <Optimize>false</Optimize>
    <OutputPath>$(SolutionDir)\..\bin\Debug\SMAPI</OutputPath>
    <DocumentationFile>$(SolutionDir)\..\bin\Debug\SMAPI\StardewModdingAPI.xml</DocumentationFile>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <PlatformTarget>x86</PlatformTarget>
    <Prefer32Bit>false</Prefer32Bit>
    <OutputPath>$(SolutionDir)\..\bin\Release\SMAPI</OutputPath>
    <DocumentationFile>$(SolutionDir)\..\bin\Debug\SMAPI\StardewModdingAPI.xml</DocumentationFile>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
    <DebugType>pdbonly</DebugType>
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationIcon>icon.ico</ApplicationIcon>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Mono.Cecil.Mdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Mono.Cecil.Pdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Pdb.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Management" Condition="$(OS) == 'Windows_NT'" />
    <Reference Include="System.Numerics">
      <Private>True</Private>
    </Reference>
    <Reference Include="System.Runtime.Caching">
      <Private>True</Private>
    </Reference>
    <Reference Include="System.Windows.Forms" Condition="$(OS) == 'Windows_NT'" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\GlobalAssemblyInfo.cs">
      <Link>Properties\GlobalAssemblyInfo.cs</Link>
    </Compile>
    <Compile Include="Command.cs" />
    <Compile Include="ContentSource.cs" />
    <Compile Include="Events\ContentEvents.cs" />
    <Compile Include="Events\EventArgsValueChanged.cs" />
    <Compile Include="Framework\Exceptions\SContentLoadException.cs" />
    <Compile Include="Framework\Command.cs" />
    <Compile Include="Config.cs" />
    <Compile Include="Constants.cs" />
    <Compile Include="Events\ControlEvents.cs" />
    <Compile Include="Events\EventArgsCommand.cs" />
    <Compile Include="Events\EventArgsClickableMenuChanged.cs" />
    <Compile Include="Events\EventArgsClickableMenuClosed.cs" />
    <Compile Include="Events\EventArgsControllerButtonPressed.cs" />
    <Compile Include="Events\EventArgsControllerButtonReleased.cs" />
    <Compile Include="Events\EventArgsControllerTriggerPressed.cs" />
    <Compile Include="Events\EventArgsControllerTriggerReleased.cs" />
    <Compile Include="Events\EventArgsCurrentLocationChanged.cs" />
    <Compile Include="Events\EventArgsFarmerChanged.cs" />
    <Compile Include="Events\EventArgsGameLocationsChanged.cs" />
    <Compile Include="Events\EventArgsIntChanged.cs" />
    <Compile Include="Events\EventArgsInventoryChanged.cs" />
    <Compile Include="Events\EventArgsKeyboardStateChanged.cs" />
    <Compile Include="Events\EventArgsKeyPressed.cs" />
    <Compile Include="Events\EventArgsLevelUp.cs" />
    <Compile Include="Events\EventArgsLoadedGameChanged.cs" />
    <Compile Include="Events\EventArgsLocationObjectsChanged.cs" />
    <Compile Include="Events\EventArgsMineLevelChanged.cs" />
    <Compile Include="Events\EventArgsMouseStateChanged.cs" />
    <Compile Include="Events\EventArgsNewDay.cs" />
    <Compile Include="Events\EventArgsStringChanged.cs" />
    <Compile Include="Events\GameEvents.cs" />
    <Compile Include="Events\GraphicsEvents.cs" />
    <Compile Include="Framework\Countdown.cs" />
    <Compile Include="Framework\IModMetadata.cs" />
    <Compile Include="Framework\ModLoading\InvalidModStateException.cs" />
    <Compile Include="Framework\ModLoading\ModDependencyStatus.cs" />
    <Compile Include="Framework\ModLoading\ModMetadataStatus.cs" />
    <Compile Include="Framework\ModLoading\ModResolver.cs" />
    <Compile Include="Framework\ModLoading\AssemblyDefinitionResolver.cs" />
    <Compile Include="Framework\ModLoading\AssemblyParseResult.cs" />
    <Compile Include="Framework\CommandManager.cs" />
    <Compile Include="Framework\ContentHelper.cs" />
    <Compile Include="Framework\Content\ContentEventData.cs" />
    <Compile Include="Framework\Content\ContentEventHelper.cs" />
    <Compile Include="Framework\Content\ContentEventHelperForDictionary.cs" />
    <Compile Include="Framework\Content\ContentEventHelperForImage.cs" />
    <Compile Include="Context.cs" />
    <Compile Include="Framework\Logging\ConsoleInterceptionManager.cs" />
    <Compile Include="Framework\Logging\InterceptingTextWriter.cs" />
    <Compile Include="Framework\CommandHelper.cs" />
    <Compile Include="Framework\Models\ManifestDependency.cs" />
    <Compile Include="Framework\Models\ModCompatibilityType.cs" />
    <Compile Include="Framework\Models\SConfig.cs" />
    <Compile Include="Framework\ModLoading\ModMetadata.cs" />
    <Compile Include="Framework\Reflection\PrivateProperty.cs" />
    <Compile Include="Framework\RequestExitDelegate.cs" />
    <Compile Include="Framework\SContentManager.cs" />
    <Compile Include="Framework\Serialisation\JsonHelper.cs" />
    <Compile Include="Framework\Serialisation\SelectiveStringEnumConverter.cs" />
    <Compile Include="Framework\Serialisation\ManifestFieldConverter.cs" />
    <Compile Include="Framework\TranslationHelper.cs" />
    <Compile Include="ICommandHelper.cs" />
    <Compile Include="IContentEventData.cs" />
    <Compile Include="IContentEventHelper.cs" />
    <Compile Include="IContentEventHelperForDictionary.cs" />
    <Compile Include="IContentEventHelperForImage.cs" />
    <Compile Include="IContentHelper.cs" />
    <Compile Include="IManifestDependency.cs" />
    <Compile Include="IModRegistry.cs" />
    <Compile Include="Events\LocationEvents.cs" />
    <Compile Include="Events\MenuEvents.cs" />
    <Compile Include="Events\MineEvents.cs" />
    <Compile Include="Events\PlayerEvents.cs" />
    <Compile Include="Events\SaveEvents.cs" />
    <Compile Include="Events\TimeEvents.cs" />
    <Compile Include="Framework\DeprecationLevel.cs" />
    <Compile Include="Framework\DeprecationManager.cs" />
    <Compile Include="Framework\InternalExtensions.cs" />
    <Compile Include="Framework\Models\ModCompatibility.cs" />
    <Compile Include="Framework\ModLoading\AssemblyLoader.cs" />
    <Compile Include="Framework\Reflection\CacheEntry.cs" />
    <Compile Include="Framework\Reflection\PrivateField.cs" />
    <Compile Include="Framework\Reflection\PrivateMethod.cs" />
    <Compile Include="Framework\Reflection\ReflectionHelper.cs" />
    <Compile Include="IManifest.cs" />
    <Compile Include="IMod.cs" />
    <Compile Include="IModHelper.cs" />
    <Compile Include="Framework\Logging\LogFileManager.cs" />
    <Compile Include="IPrivateProperty.cs" />
    <Compile Include="ISemanticVersion.cs" />
    <Compile Include="ITranslationHelper.cs" />
    <Compile Include="LogLevel.cs" />
    <Compile Include="Framework\ModRegistry.cs" />
    <Compile Include="Framework\UpdateHelper.cs" />
    <Compile Include="Framework\Models\GitRelease.cs" />
    <Compile Include="IMonitor.cs" />
    <Compile Include="Events\ChangeType.cs" />
    <Compile Include="Events\ItemStackChange.cs" />
    <Compile Include="Log.cs" />
    <Compile Include="Framework\Monitor.cs" />
    <Compile Include="Framework\Models\Manifest.cs" />
    <Compile Include="Mod.cs" />
    <Compile Include="Framework\ModHelper.cs" />
    <Compile Include="PatchMode.cs" />
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Framework\SGame.cs" />
    <Compile Include="IPrivateField.cs" />
    <Compile Include="IPrivateMethod.cs" />
    <Compile Include="IReflectionHelper.cs" />
    <Compile Include="SemanticVersion.cs" />
    <Compile Include="Translation.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="App.config">
      <SubType>Designer</SubType>
    </None>
    <None Include="packages.config">
      <SubType>Designer</SubType>
    </None>
    <Content Include="StardewModdingAPI.config.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <None Include="unix-launcher.sh">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Content Include="icon.ico" />
    <Content Include="steam_appid.txt">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <BootstrapperPackage Include=".NETFramework,Version=v4.5">
      <Visible>False</Visible>
      <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\StardewModdingAPI.AssemblyRewriters\StardewModdingAPI.AssemblyRewriters.csproj">
      <Project>{10db0676-9fc1-4771-a2c8-e2519f091e49}</Project>
      <Name>StardewModdingAPI.AssemblyRewriters</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(SolutionDir)\crossplatform.targets" />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <PropertyGroup>
    <PostBuildEvent>
    </PostBuildEvent>
  </PropertyGroup>
  <!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
  <Target Name="BeforeBuild">
    <Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." />
  </Target>

  <!-- copy files into game directory and enable debugging (only in debug mode) -->
  <Target Name="AfterBuild" Condition="$(Configuration) == 'Debug'">
    <Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\$(TargetName).config.json" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)" />
    <Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)" />
  </Target>

  <!-- launch SMAPI on debug -->
  <PropertyGroup Condition="$(Configuration) == 'Debug'">
    <StartAction>Program</StartAction>
    <StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
    <StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
  </PropertyGroup>
  
  <!-- Somehow this makes Visual Studio for Mac recognise the previous section. -->
  <!-- Nobody knows why. -->
  <PropertyGroup Condition="'$(RunConfiguration)' == 'Default'" />
</Project>