|
14 | 14 | <Configuration>Release</Configuration> |
15 | 15 | <Solution>$(MSBuildProjectDirectory)/src/1Script.sln</Solution> |
16 | 16 |
|
| 17 | + <ActiveFramework>net8.0</ActiveFramework> |
| 18 | + |
17 | 19 | </PropertyGroup> |
18 | 20 |
|
19 | 21 | <ItemGroup> |
|
30 | 32 | <ItemGroup> |
31 | 33 | <PublishProjects Include="oscript"> |
32 | 34 | <ProjectFile>oscript.csproj</ProjectFile> |
33 | | - <Framework>net6.0</Framework> |
| 35 | + <Framework>$(ActiveFramework)</Framework> |
34 | 36 | </PublishProjects> |
35 | 37 | <PublishProjects Include="TestApp"> |
36 | 38 | <ProjectFile>TestApp.csproj</ProjectFile> |
37 | | - <Framework>net6.0-windows</Framework> |
| 39 | + <Framework>$(ActiveFramework)-windows</Framework> |
38 | 40 | </PublishProjects> |
39 | 41 | </ItemGroup> |
40 | 42 |
|
|
106 | 108 | </ItemGroup> |
107 | 109 |
|
108 | 110 | <Exec Command="dotnet publish "src/oscript/oscript.csproj" -r %(RuntimeID.Identity) --self-contained -c $(Configuration) -o "$(ArtifactsRoot)/%(RuntimeID.Identity)/bin"" UseUtf8Encoding="Always"/> |
109 | | - <Exec Command="dotnet publish "src/TestApp/TestApp.csproj" -f net6.0-windows -c $(Configuration) -p:Platform=%(PlatformItem.MSBuildName) -p:UseAppHost=true -o "$(ArtifactsRoot)/win-%(PlatformItem.Identity)/bin"" UseUtf8Encoding="Always"/> |
| 111 | + <Exec Command="dotnet publish "src/TestApp/TestApp.csproj" -f $(ActiveFramework)-windows -c $(Configuration) -p:Platform=%(PlatformItem.MSBuildName) -p:UseAppHost=true -o "$(ArtifactsRoot)/win-%(PlatformItem.Identity)/bin"" UseUtf8Encoding="Always"/> |
110 | 112 |
|
111 | 113 | <PropertyGroup> |
112 | 114 | <CppBinPrefix>$(MSBuildProjectDirectory)/src/ScriptEngine.NativeApi/bin/$(Configuration)</CppBinPrefix> |
|
162 | 164 | </Target> |
163 | 165 |
|
164 | 166 | <Target Name="BuildWithCpp" DependsOnTargets="CleanAll;MakeCPP;MakeFDD;MakeSCD;BuildDebugger"> |
165 | | - <CallTarget Targets="CleanIntermediates"/> |
166 | 167 | </Target> |
167 | 168 |
|
168 | 169 | <Target Name="BuildWithoutCpp" DependsOnTargets="CleanAll;MakeFDD;MakeSCD;BuildDebugger"> |
169 | | - <CallTarget Targets="CleanIntermediates"/> |
170 | 170 | </Target> |
171 | 171 |
|
172 | 172 | <!-- Используется для поиска первого собранного oscript.exe --> |
|
225 | 225 |
|
226 | 226 | </Target> |
227 | 227 |
|
228 | | - <Target Name="ComposeDistributionFolders"> |
| 228 | + <Target Name="ComposeDistributionFolders" DependsOnTargets="CleanIntermediates"> |
229 | 229 | <ItemGroup> |
230 | 230 | <TargetDir Include="fdd-x64"/> |
231 | 231 | <TargetDir Include="fdd-x86"/> |
|
261 | 261 | <Delete Files="@(TempFiles)"/> |
262 | 262 | </Target> |
263 | 263 |
|
264 | | - <Target Name="PrepareDistributionFiles" DependsOnTargets="CleanAll;BuildAll;GatherLibrary;ComposeDistributionFolders"/> |
| 264 | + <Target Name="PrepareDistributionFiles" DependsOnTargets="CleanAll;BuildAll;GatherLibrary;BuildDocumentation;ComposeDistributionFolders"/> |
265 | 265 |
|
266 | 266 | <Target Name="Test"> |
267 | 267 | <CallTarget Targets="UnitTests;ScriptedTests" /> |
|
373 | 373 | Command="dotnet nuget push %(NugetAbleProject.Identity) -k $(NugetToken) -s https://api.nuget.org/v3/index.json" UseUtf8Encoding="Always"/> |
374 | 374 |
|
375 | 375 | </Target> |
| 376 | + |
| 377 | + <Target Name="BuildDocumenter"> |
| 378 | + <Exec Command="dotnet publish "$(MSBuildProjectDirectory)/src/OneScriptDocumenter/OneScriptDocumenter.csproj" -c Release -o "$(ArtifactsRoot)/tools/documenter"" UseUtf8Encoding="Always"/> |
| 379 | + </Target> |
| 380 | + |
| 381 | + <Target Name="BuildDocumentation" DependsOnTargets="MakeSCD;BuildDocumenter"> |
| 382 | + <PropertyGroup> |
| 383 | + <DocInputDir>$(ArtifactsRoot)/win-x64/bin</DocInputDir> |
| 384 | + <DocsRoot>$(ArtifactsRoot)/docs</DocsRoot> |
| 385 | + <DocumenterToolDir>$(ArtifactsRoot)/tools/documenter</DocumenterToolDir> |
| 386 | + </PropertyGroup> |
| 387 | + <ItemGroup> |
| 388 | + <DocAssemblies Include="$(DocInputDir)/ScriptEngine.HostedScript.dll"/> |
| 389 | + <DocAssemblies Include="$(DocInputDir)/ScriptEngine.dll"/> |
| 390 | + <DocAssemblies Include="$(DocInputDir)/OneScript.StandardLibrary.dll"/> |
| 391 | + <DocAssemblies Include="$(DocInputDir)/OneScript.Web.Server.dll"/> |
| 392 | + <DocAssemblies Include="$(DocInputDir)/oscript.dll"/> |
| 393 | + </ItemGroup> |
| 394 | + |
| 395 | + <Error Condition="'@(DocAssemblies)' == ''" Text="No input assemblies found in $(DocInputDir) for documentation generation" /> |
| 396 | + |
| 397 | + <MakeDir Directories="$(DocsRoot)"/> |
| 398 | + <MakeDir Directories="$(DocsRoot)/markdown"/> |
| 399 | + <MakeDir Directories="$(DocsRoot)/json"/> |
| 400 | + <Exec Command="dotnet "$(DocumenterToolDir)/OneScriptDocumenter.dll" @(DocAssemblies->'%(FullPath)', ' ') -t "$(MSBuildProjectDirectory)/src/OneScriptDocumenter/default_toc.json" -m "$(DocsRoot)/markdown" -j "$(DocsRoot)/json/syntax-helper.json"" UseUtf8Encoding="Always"/> |
| 401 | + |
| 402 | + <RemoveDir Directories="$(DocumenterToolDir)" Condition="Exists($(DocumenterToolDir))"/> |
| 403 | + |
| 404 | + </Target> |
376 | 405 |
|
| 406 | + |
377 | 407 | </Project> |
0 commit comments