-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
RePlays.csproj
197 lines (170 loc) · 8.64 KB
/
RePlays.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Globals">
<WebView2UseWinRT>False</WebView2UseWinRT>
<Configurations>Debug;Release;ReleaseWithSymbols</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFramework>net8.0</TargetFramework>
<UseWindowsForms>false</UseWindowsForms>
</PropertyGroup>
<PropertyGroup>
<OBSVersion>30.1.1</OBSVersion>
<OBSBuildPath>$(MSBuildProjectDirectory)\obs-studio-build\obs-studio-$(OBSVersion)\build\rundir\Release\bin\64bit</OBSBuildPath>
</PropertyGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
<SpaRoot>ClientApp\</SpaRoot>
<ApplicationIcon>Resources\logo.ico</ApplicationIcon>
<RepositoryUrl>https://github.com/lulzsun/RePlays</RepositoryUrl>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup>
<SelfContained>true</SelfContained>
<PublishTrimmed>false</PublishTrimmed>
<!--
<TrimMode>full</TrimMode>
<_SuppressWinFormsTrimError>true</_SuppressWinFormsTrimError>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
-->
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
<PropertyGroup>
<AnalysisMode>Recommended</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>
<PropertyGroup>
<NugetTools>$(PkgNuGet_CommandLine)\tools</NugetTools>
<SquirrelTools>$(PkgClowd_Squirrel)\tools</SquirrelTools>
<Version>1.0.0</Version>
<NuspecFile>RePlays.nuspec</NuspecFile>
<Nullable>annotations</Nullable>
<StartupObject>RePlays.Program</StartupObject>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithSymbols|AnyCPU'">
<Optimize>True</Optimize>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" />
<None Remove="$(SpaRoot)**" />
<None Remove="ClientApp\build\**" />
<None Remove="obs-studio-build\**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Classes\Recorders\LibObs\LICENSE" />
<None Remove="Classes\Recorders\PlaysLTC\LICENSE" />
<None Remove="ClientApp\build\**" />
<Compile Remove="ClientApp\build\**" />
<Compile Remove="obs-studio-build\**" />
<EmbeddedResource Remove="ClientApp\build\**" />
<EmbeddedResource Remove="obs-studio-build\**" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\logo.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Clowd.Squirrel" Version="2.11.1" />
<PackageReference Include="JsonPath.Net" Version="1.0.0" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.9" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.2.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2420.47" />
<PackageReference Include="NuGet.CommandLine" Version="6.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SharpHook" Version="5.3.1" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm ci" />
</Target>
<Target Name="DebugCopyLibObs" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And '$(OS)' == 'Windows_NT' And !Exists('$(MSBuildProjectDirectory)\bin\Debug\net8.0-windows\win-x64\obs.dll') ">
<Error Condition="!Exists('$(OBSBuildPath)\obs.dll')" Text="Could not copy 'obs.dll' from '$(OBSBuildPath)'. Run `build-libobs.cmd` to build." />
<ItemGroup>
<LIBOBSDEBUG Include="$(OBSBuildPath)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(LIBOBSDEBUG)" DestinationFolder="$(MSBuildProjectDirectory)\bin\Debug\net8.0-windows\win-x64\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm ci" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles1 Include="$(SpaRoot)build\**" />
<ResolvedFileToPublish Include="@(DistFiles1->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles1.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
<!-- Include resources in the publish output -->
<ItemGroup>
<DistFiles4 Include="$(MSBuildProjectDirectory)\Resources\**" />
<ResolvedFileToPublish Include="@(DistFiles4->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>Resources\%(RecursiveDir)%(Filename)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
<!-- Include libobs in the publish output -->
<ItemGroup>
<DistFiles5 Include="$(OBSBuildPath)\**" />
<ResolvedFileToPublish Include="@(DistFiles5->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(RecursiveDir)%(Filename)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
<!-- Include a copy of the app's license -->
<ItemGroup>
<_license Include="$(MSBuildProjectDirectory)\LICENSE" />
</ItemGroup>
<Copy SourceFiles="@(_license)" DestinationFolder="$(PublishDir)" />
</Target>
<Target Name="Package" AfterTargets="Publish" Condition=" '$(Configuration)' == 'Release' ">
<!-- Prepare Squirrel package -->
<XmlPeek XmlInputPath="$(NuspecFile)" Query="/package/metadata/id/text()">
<Output TaskParameter="Result" ItemName="ID" />
</XmlPeek>
<Exec Command="$(NugetTools)\NuGet.exe pack $(NuspecFile) -Version $(Version) -Properties Configuration=Release -OutputDirectory $(MSBuildProjectDirectory)\bin\Deployment\GeneratedNugets" />
<Exec Command="$(SquirrelTools)\Squirrel.exe releasify --package=$(MSBuildProjectDirectory)\bin\Deployment\GeneratedNugets\@(ID).$(Version).nupkg --releaseDir=$(MSBuildProjectDirectory)\bin\Deployment\Releases --framework net8" />
</Target>
<ItemGroup>
<EditorConfigFiles Remove="$(MSBuildProjectDirectory)\.editorconfig" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildProjectDirectory)\.editorconfig" />
</ItemGroup>
</Project>