|
29 | 29 |
|
30 | 30 | <Message Importance="high" Text="====================== Build demo..."/> |
31 | 31 | <CallTarget Targets="BuildDemo"/> |
32 | | - |
| 32 | + |
33 | 33 | <Message Importance="high" Text="====================== Build libraries..."/> |
34 | 34 | <CallTarget Targets="BuildLibrary"/> |
35 | | - |
| 35 | + |
36 | 36 | <Message Importance="high" Text="====================== Get current version..."/> |
37 | 37 | <GetAssemblyIdentity AssemblyFiles="$(OutputBinRoot)\NET20\HtmlRenderer.dll"> |
38 | 38 | <Output TaskParameter="Assemblies" ItemName="AsmInfo" /> |
39 | 39 | </GetAssemblyIdentity> |
40 | | - |
| 40 | + |
41 | 41 | <Message Importance="high" Text="====================== Build demo..."/> |
42 | | - <CallTarget Targets="BuildDemo"/> |
| 42 | + <CallTarget Targets="BuildDemo" /> |
43 | 43 |
|
44 | 44 | <Message Importance="high" Text="====================== Copy source..."/> |
45 | 45 | <CallTarget Targets="CopySource"/> |
|
56 | 56 | <Error Condition="!Exists('$(OutputBinRoot)\NET40\HtmlRenderer.dll')" Text="Validation failed (.NET 4.0)!" /> |
57 | 57 | <Error Condition="!Exists('$(OutputBinRoot)\NET45\HtmlRenderer.dll')" Text="Validation failed (.NET 4.5)!" /> |
58 | 58 | <Error Condition="!Exists('$(OutputSourceRoot)\HtmlRenderer.sln')" Text="Validation failed (Source)!" /> |
59 | | - <Error Condition="!Exists('$(OutputRoot)\HtmlRendererDemo.exe')" Text="Validation failed (Demo)!" /> |
60 | | - <Error Condition="!Exists('$(OutputRoot)\HtmlRenderer.dll')" Text="Validation failed (Demo)!" /> |
61 | | - <Error Condition="!Exists('$(OutputRoot)\HtmlRenderer.dll')" Text="Validation failed (Demo)!" /> |
| 59 | + <Error Condition="!Exists('$(OutputRoot)\HtmlRendererDemo.WinForms.exe')" Text="Validation failed (Demo)!" /> |
62 | 60 | <Error Condition="!Exists('$(OutputRoot)\HtmlRenderer %(AsmInfo.Version).zip')" Text="Validation failed (zip)!" /> |
63 | 61 |
|
64 | 62 | <Message Importance="high" Text="====================== SUCCESS!"/> |
|
90 | 88 | </CreateProperty> |
91 | 89 | </Target> |
92 | 90 |
|
93 | | - <!--Build the demo application and delete the pdbs--> |
| 91 | + <!--Build the demo application, merge to single exe and delete the rest of the files--> |
94 | 92 | <Target Name="BuildDemo"> |
95 | 93 | <MSBuild Properties="$(BuildProperties);$(DemoBuildOutputPath);$(BuildWarn)" UseResultsCache="true" Targets="Rebuild" Projects="$(DemoRoot)\HtmlRenderer.Demo.csproj" /> |
| 94 | + |
| 95 | + <GetAssemblyIdentity AssemblyFiles="$(OutputRoot)\HtmlRenderer.dll"> |
| 96 | + <Output TaskParameter="Assemblies" ItemName="AsmInfo" /> |
| 97 | + </GetAssemblyIdentity> |
| 98 | + |
| 99 | + <Exec Command="ILMerge.exe $(OutputRoot)\HtmlRendererDemo.exe $(OutputRoot)\HtmlRenderer.dll /out:$(OutputRoot)\HtmlRendererDemo.WinForms.exe /ver:%(AsmInfo.Version)" /> |
| 100 | + |
96 | 101 | <ItemGroup> |
97 | | - <files Include="$(OutputRoot)\*.*" Exclude="$(OutputRoot)\*.exe;$(OutputRoot)\*.dll;"/> |
| 102 | + <files Include="$(OutputRoot)\*.*" Exclude="$(OutputRoot)\HtmlRendererDemo.WinForms.exe"/> |
98 | 103 | </ItemGroup> |
99 | 104 | <Delete Files="@(files)"/> |
| 105 | + |
100 | 106 | </Target> |
101 | 107 |
|
102 | 108 | <!--Copy all the source and remove the bin and obj folders--> |
|
0 commit comments