move game detection into toolkit for reuse
This commit is contained in:
parent
1a8c7345c3
commit
2cf2b6706f
|
@ -68,6 +68,14 @@ Or only create it in release builds with this:
|
||||||
<EnableModZip Condition="$(Configuration) != 'Release'">False</EnableModZip>
|
<EnableModZip Condition="$(Configuration) != 'Release'">False</EnableModZip>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Debug game
|
||||||
|
The package automatically configures Visual Studio to launch/debug the game when you launch/debug
|
||||||
|
the project. To disable that, add this above the first `</PropertyGroup>` in your `.csproj`:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<EnableGameDebugging>False</EnableGameDebugging>
|
||||||
|
```
|
||||||
|
|
||||||
### Game path
|
### Game path
|
||||||
The package usually detects where your game is installed automatically. If it can't find your game
|
The package usually detects where your game is installed automatically. If it can't find your game
|
||||||
or you have multiple installs, you can specify the path yourself. There's two ways to do that:
|
or you have multiple installs, you can specify the path yourself. There's two ways to do that:
|
||||||
|
@ -148,6 +156,7 @@ You can use the package in non-mod projects too (e.g. unit tests or framework DL
|
||||||
disable deploying the mod and creating a release zip:
|
disable deploying the mod and creating a release zip:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
<EnableGameDebugging>False</EnableGameDebugging>
|
||||||
<EnableModDeploy>False</EnableModDeploy>
|
<EnableModDeploy>False</EnableModDeploy>
|
||||||
<EnableModZip>False</EnableModZip>
|
<EnableModZip>False</EnableModZip>
|
||||||
```
|
```
|
||||||
|
@ -235,6 +244,7 @@ _[Game path](#game-path)_ above.
|
||||||
* platform target is now set to x86 automatically to avoid mismatching platform target warnings;
|
* platform target is now set to x86 automatically to avoid mismatching platform target warnings;
|
||||||
* added GAC to assembly search paths to fix references to XNA Framework.
|
* added GAC to assembly search paths to fix references to XNA Framework.
|
||||||
* Builds now include `.pdb` files by default, to enable line numbers in error stack traces.
|
* Builds now include `.pdb` files by default, to enable line numbers in error stack traces.
|
||||||
|
* You can now optionally disable game debugging config.
|
||||||
* Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
* Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
||||||
* Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
* Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
||||||
* Dropped support for older versions of SMAPI and Visual Studio.
|
* Dropped support for older versions of SMAPI and Visual Studio.
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath>
|
<ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath>
|
||||||
<EnableModDeploy Condition="'$(EnableModDeploy)' == ''">True</EnableModDeploy>
|
<EnableModDeploy Condition="'$(EnableModDeploy)' == ''">True</EnableModDeploy>
|
||||||
<EnableModZip Condition="'$(EnableModZip)' == ''">True</EnableModZip>
|
<EnableModZip Condition="'$(EnableModZip)' == ''">True</EnableModZip>
|
||||||
|
<EnableGameDebugging Condition="$(EnableGameDebugging) == ''">True</EnableGameDebugging>
|
||||||
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == ''">False</CopyModReferencesToBuildOutput>
|
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == ''">False</CopyModReferencesToBuildOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -129,7 +130,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- launch game for debugging -->
|
<!-- launch game for debugging -->
|
||||||
<PropertyGroup>
|
<PropertyGroup Condition="$(EnableGameDebugging) == 'True'">
|
||||||
<StartAction>Program</StartAction>
|
<StartAction>Program</StartAction>
|
||||||
<StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
|
<StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
|
||||||
<StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
|
<StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
- platform target is now set to x86 automatically to avoid mismatching platform target warnings;
|
- platform target is now set to x86 automatically to avoid mismatching platform target warnings;
|
||||||
- added GAC to assembly search paths to fix references to XNA Framework.
|
- added GAC to assembly search paths to fix references to XNA Framework.
|
||||||
- Builds now include `.pdb` files by default, to enable line numbers in error stack traces.
|
- Builds now include `.pdb` files by default, to enable line numbers in error stack traces.
|
||||||
|
- You can now optionally disable game debugging config.
|
||||||
- Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
- Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
||||||
- Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
- Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
||||||
- Dropped support for older versions of SMAPI and Visual Studio.
|
- Dropped support for older versions of SMAPI and Visual Studio.
|
||||||
|
|
Loading…
Reference in New Issue