|
11 | 11 | <ApplicationManifest>app.manifest</ApplicationManifest> |
12 | 12 | </PropertyGroup> |
13 | 13 |
|
| 14 | + <PropertyGroup> |
| 15 | + <WatchdogProject>..\Everywhere.Watchdog\Everywhere.Watchdog.csproj</WatchdogProject> |
| 16 | + <WatchdogOutDir>$(MSBuildThisFileDirectory)$(WatchdogProject)\..\bin\$(Configuration)\net9.0\win-x64\publish\</WatchdogOutDir> |
| 17 | + <WatchdogExecutable>$(WatchdogOutDir)Everywhere.Watchdog.exe</WatchdogExecutable> |
| 18 | + </PropertyGroup> |
| 19 | + |
14 | 20 | <ItemGroup> |
15 | 21 | <PackageReference Include="Avalonia.Desktop"/> |
16 | 22 | <PackageReference Include="HotAvalonia" PrivateAssets="All"/> |
17 | 23 | <PackageReference Include="Microsoft.PowerShell.SDK"/> |
18 | 24 | <PackageReference Include="Microsoft.Windows.CsWin32"/> |
19 | 25 | <PackageReference Include="FlaUI.UIA3"/> |
20 | | - <PackageReference Include="SkiaSharp" /> |
21 | | - <PackageReference Include="SkiaSharp.NativeAssets.Win32" /> |
| 26 | + <PackageReference Include="SkiaSharp"/> |
| 27 | + <PackageReference Include="SkiaSharp.NativeAssets.Win32"/> |
22 | 28 | <PackageReference Include="Vortice.Direct3D11"/> |
23 | 29 | <PackageReference Include="Vortice.DirectComposition"/> |
24 | 30 | </ItemGroup> |
|
31 | 37 | <None Include="..\..\img\Everywhere.ico"> |
32 | 38 | <Link>Everywhere.ico</Link> |
33 | 39 | </None> |
| 40 | + <Content Include="$(WatchdogExecutable)"> |
| 41 | + <Link>Everywhere.Watchdog.exe</Link> |
| 42 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 43 | + <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> |
| 44 | + </Content> |
34 | 45 | </ItemGroup> |
35 | 46 |
|
36 | | - <Target Name="PreBuild" BeforeTargets="PreBuildEvent"> |
37 | | - <Exec Command="dotnet publish -c $(Configuration) -r win-x64 ..\Everywhere.Watchdog\Everywhere.Watchdog.csproj -o ..\Everywhere.Watchdog\bin\$(Configuration)\publish --no-restore"/> |
38 | | - <Exec Command="xcopy /Y /I ..\Everywhere.Watchdog\bin\$(Configuration)\publish\Everywhere.Watchdog.exe $(OutDir)"/> |
| 47 | + <Target Name="BuildWatchdog" BeforeTargets="BeforeBuild" Inputs="$(WatchdogProject)" Outputs="$(WatchdogExecutable)"> |
| 48 | + <Message Text="Watchdog executable is out-of-date. Building..." Importance="high"/> |
| 49 | + <Exec Command="dotnet restore "$(WatchdogProject)" -r win-x64"/> |
| 50 | + <Exec Command="dotnet publish "$(WatchdogProject)" -c $(Configuration) -r win-x64 --self-contained -o "$(WatchdogOutDir)" --no-restore"/> |
39 | 51 | </Target> |
40 | 52 | </Project> |
0 commit comments