-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.Chromely.csproj
82 lines (69 loc) · 3.66 KB
/
Test.Chromely.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
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<!-- <RuntimeIdentifier>linux-x64</RuntimeIdentifier>-->
<!-- <RuntimeIdentifier>osx-x64</RuntimeIdentifier>-->
<Platforms>x64</Platforms>
<AssemblyName>Chromely_Angular</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StartupObject />
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Chromely" Version="5.1.88" />
<PackageReference Include="Serilog.Extensions.Logging.File" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Frontend\dist\**" />
<Compile Remove="Frontend\node_modules\**" />
<Compile Remove="Logs\**" />
<Content Remove="Frontend\dist\**" />
<EmbeddedResource Remove="Frontend\dist\**" />
<EmbeddedResource Remove="Frontend\node_modules\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Frontend\dist\**" />
<None Remove="Frontend\node_modules\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<Folder Include="CefResources\" />
</ItemGroup>
<Target Name="DependsOn" DependsOnTargets="ValidateChromelyApp">
<Message Text="Target : DependsOn" />
</Target>
<Target Name="ValidateChromelyApp" BeforeTargets="Build">
<Message Importance="High" Text="Checking if Node.js is installed.." />
<Exec Command="node --version" ContinueOnError="false">
<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 Condition="'$(ErrorCode)' == '0'" Importance="High" Text="Node.js is installed!" />
<Message Importance="High" Text="Checking if node_modules exists.." />
<Message Importance="High" Text="Running npm install, node_modules not found! (this could take a while)" Condition="!Exists('$(ProjectDir)Frontend\node_modules')" />
<Exec Command="npm install --silent" Condition="!Exists('$(ProjectDir)Frontend\node_modules')" WorkingDirectory="Frontend" ContinueOnError="false" />
</Target>
<Target Name="BuildChromelyApp" BeforeTargets="Build">
<Message Importance="High" Text="Building Angular App.." />
<Exec Command="npm run build" WorkingDirectory="Frontend" ContinueOnError="false" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
<Target Name="DebugChromelyApp" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Message Importance="High" Text="Copying Angular App to debug folder.." />
<Exec Command="xcopy $(ProjectDir)Frontend\dist\ $(TargetDir)dist\ /i /s /r /y /c" />
</Target>
<Target Name="PostPublish" AfterTargets="Publish" Condition=" '$(Configuration)' == 'Release' ">
<Message Importance="High" Text="Copying Angular App to release folder.." />
<Exec Command="xcopy $(ProjectDir)Frontend\dist $(TargetDir)publish\dist\ /i /s /r /y /c" />
<Message Importance="High" Text="Copying CEF Resources to release folder.." />
<Exec Command="xcopy $(ProjectDir)CefResources\ $(TargetDir)publish\ /i /s /r /y /c" />
</Target>
</Project>