DocumentServer/build/projects/build.proj

141 lines
9.3 KiB
Plaintext
Raw Normal View History

2015-06-25 08:27:08 +00:00
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Opensource">
<PropertyGroup>
<TargetOs>Linux</TargetOs>
<InputDir>..\..</InputDir>
<OutputDir>..\..\deploy</OutputDir>
<ActiveX>\ActiveX</ActiveX>
<AppData>\App_Data</AppData>
<Bin>\Bin</Bin>
<Deploy>\deploy</Deploy>
<DocService>\DocService</DocService>
<DocServiceUncompiled>$(DocService).uncompiled</DocServiceUncompiled>
<FileConverterService>\FileConverterService</FileConverterService>
<License>\License</License>
<NodeJsProjects>\NodeJsProjects</NodeJsProjects>
<OfficeWeb>\OfficeWeb</OfficeWeb>
<Redist>\Redist</Redist>
<ServerComponents>\ServerComponents</ServerComponents>
<SpellCheckerService>\SpellCheckerService</SpellCheckerService>
<CoAuthoringService>\CoAuthoringService</CoAuthoringService>
<ThirdParty>\ThirdParty</ThirdParty>
<Tools>\Tools</Tools>
<Logs>\Logs</Logs>
<SkipBuildSdk>false</SkipBuildSdk>
<Schema>\Schema</Schema>
</PropertyGroup>
<Target Name="Common">
<CallTarget Targets="CleanupOutputDir" />
<CallTarget Targets="CopyFileConverterService" />
<CallTarget Targets="CopyActiveXFiles" />
<CallTarget Targets="CopyToolsFiles" />
<CallTarget Targets="CopyLicenseFiles" />
<CallTarget Targets="CopySchemaFiles" />
<CallTarget Targets="MakeLogsDir" />
<CallTarget Targets="DeploySpellCheckerService" />
<CallTarget Targets="DeployCoAuthoringService" />
</Target>
<Target Name="Opensource">
<CallTarget Targets="Common" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ProjectDir=$(InputDir)$(OfficeWeb)\sdk\build\opensource" Targets="BuildProject" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ProjectDir=$(InputDir)$(OfficeWeb)\build" Targets="BuildProject" />
<CallTarget Targets="DeployDocService" />
</Target>
<Target Name="Commercial">
<CallTarget Targets="Common" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ProjectDir=$(InputDir)$(OfficeWeb)\sdk\build\deploy" Targets="BuildProject" Condition=" '$(SkipBuildSdk)'!='true' " />
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ProjectDir=$(InputDir)$(OfficeWeb)\build" Targets="BuildProject" />
<CallTarget Targets="DeployDocService" />
</Target>
<Target Name="Internal">
<CallTarget Targets="Commercial" />
</Target>
<Target Name="CleanupOutputDir">
<RemoveDir Directories="$(OutputDir)" ContinueOnError="false" />
</Target>
<Target Name="DeployDocService">
<ItemGroup>
<DocServiceFiles Include="$(InputDir)$(DocService)\**" />
<ServerComponentsFiles Include="&#xD; $(InputDir)$(ServerComponents)$(Bin)\FileConverterUtils2.dll;" />
<ConfigFiles Include="&#xD; $(InputDir)$(ServerComponents)$(Bin)\Settings.config;&#xD; $(InputDir)$(ServerComponents)$(Bin)\ConnectionStrings.config;" />
<OfficeWebFiles Include="$(InputDir)$(OfficeWeb)\deploy\**" />
<ThirdPartyFiles Include="$(InputDir)$(ThirdParty)$(Bin)\**" />
</ItemGroup>
<RemoveDir Directories="$(InputDir)$(DocServiceUncompiled)" ContinueOnError="false" />
<Copy SourceFiles="@(DocServiceFiles)" DestinationFiles="@(DocServiceFiles-&gt;'$(InputDir)$(DocServiceUncompiled)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ServerComponentsFiles)" DestinationFiles="@(ServerComponentsFiles-&gt;'$(InputDir)$(DocServiceUncompiled)$(Bin)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ConfigFiles)" DestinationFiles="@(ConfigFiles-&gt;'$(InputDir)$(DocServiceUncompiled)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ThirdPartyFiles)" DestinationFiles="@(ThirdPartyFiles-&gt;'$(InputDir)$(DocServiceUncompiled)$(Bin)\%(RecursiveDir)%(Filename)%(Extension)')" />
<AspNetCompiler VirtualPath="/" PhysicalPath="$(InputDir)$(DocServiceUncompiled)" TargetPath="$(OutputDir)$(DocService)" Force="true" />
<Copy SourceFiles="@(OfficeWebFiles)" DestinationFiles="@(OfficeWebFiles-&gt;'$(OutputDir)$(DocService)$(OfficeWeb)\%(RecursiveDir)%(Filename)%(Extension)')" />
<MakeDir Directories="$(OutputDir)$(DocService)$(AppData)" Condition="$(TargetOs) == 'Windows'" />
</Target>
<Target Name="CopyFileConverterService">
<ItemGroup>
<FileConverterServiceExecutableFiles Include="$(InputDir)$(ServerComponents)$(Bin)\**;" />
<PresentationThemesFiles Include="$(InputDir)$(OfficeWeb)\sdk\PowerPoint\themes\**;" Exclude="$(InputDir)$(OfficeWeb)\sdk\PowerPoint\themes\**\*.js;" />
<ThirdPartyFiles Include="$(InputDir)$(ThirdParty)$(Bin)\**" />
</ItemGroup>
<Copy SourceFiles="@(FileConverterServiceExecutableFiles)" DestinationFiles="@(FileConverterServiceExecutableFiles-&gt;'$(OutputDir)$(FileConverterService)$(Bin)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ThirdPartyFiles)" DestinationFiles="@(ThirdPartyFiles-&gt;'$(OutputDir)$(FileConverterService)$(Bin)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(PresentationThemesFiles)" DestinationFiles="@(PresentationThemesFiles-&gt;'$(OutputDir)$(FileConverterService)\presentationthemes\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyActiveXFiles">
<ItemGroup>
<ActiveXFiles Include="$(InputDir)$(ActiveX)$(Redist)\**;" />
</ItemGroup>
<Copy SourceFiles="@(ActiveXFiles)" DestinationFiles="@(ActiveXFiles-&gt;'$(OutputDir)$(ActiveX)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyToolsFiles">
<ItemGroup>
<ToolsFiles Include="$(InputDir)$(Tools)$(Bin)\**;" />
<ToolsFiles Include="$(InputDir)$(ThirdParty)$(Bin)\log4net.dll;" Condition="$(TargetOs) == 'Windows'" />
</ItemGroup>
<Copy SourceFiles="@(ToolsFiles)" DestinationFiles="@(ToolsFiles-&gt;'$(OutputDir)$(Tools)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="DeploySpellCheckerService">
<ItemGroup>
<NodeJsCommonFiles Include="&#xD; $(InputDir)$(NodeJsProjects)\Common\**;" />
<SpellCheckerServiceFiles Include="$(InputDir)$(NodeJsProjects)\SpellChecker\**;" Exclude="$(InputDir)$(NodeJsProjects)\SpellChecker\nodehun\**;" />
<NodehunFiles Include="&#xD; $(InputDir)$(NodeJsProjects)\SpellChecker\nodehun\**;" />
</ItemGroup>
<Copy SourceFiles="@(NodeJsCommonFiles)" DestinationFiles="@(NodeJsCommonFiles-&gt;'$(OutputDir)$(SpellCheckerService)\Common\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SpellCheckerServiceFiles)" DestinationFiles="@(SpellCheckerServiceFiles-&gt;'$(OutputDir)$(SpellCheckerService)\SpellChecker\%(RecursiveDir)%(Filename)%(Extension)')" />
<Exec Command="npm install" WorkingDirectory="$(OutputDir)$(SpellCheckerService)\SpellChecker" />
<Exec Command="npm install" WorkingDirectory="$(OutputDir)$(SpellCheckerService)\Common" />
<Copy SourceFiles="@(NodehunFiles)" DestinationFiles="@(NodehunFiles-&gt;'$(OutputDir)$(SpellCheckerService)\SpellChecker\node_modules\nodehun\%(RecursiveDir)%(Filename)%(Extension)')" />
<Exec Command="node-gyp rebuild" WorkingDirectory="$(OutputDir)$(SpellCheckerService)\SpellChecker\node_modules\nodehun" />
<RemoveDir Directories="&#xD; $(OutputDir)$(SpellCheckerService)\SpellChecker\node_modules\nodehun\src\hunspell\;" />
</Target>
<Target Name="CopyLicenseFiles">
<ItemGroup>
<LicenseFiles Include="$(InputDir)\*.txt;" />
<ThirdPartyLicenseFiles Include="$(InputDir)$(ThirdParty)$(License)\**;" />
</ItemGroup>
<Copy SourceFiles="@(LicenseFiles)" DestinationFiles="@(LicenseFiles-&gt;'$(OutputDir)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ThirdPartyLicenseFiles)" DestinationFiles="@(ThirdPartyLicenseFiles-&gt;'$(OutputDir)$(ThirdParty)$(License)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopySchemaFiles">
<ItemGroup>
<SchemaFiles Include="$(InputDir)$(Schema)\**;" />
</ItemGroup>
<Copy SourceFiles="@(SchemaFiles)" DestinationFiles="@(SchemaFiles-&gt;'$(OutputDir)$(Schema)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="MakeLogsDir">
<MakeDir Directories="$(OutputDir)$(Logs)" Condition="$(TargetOs) == 'Windows'" />
</Target>
<Target Name="DeployCoAuthoringService">
<ItemGroup>
<NodeJsCommonFiles Include="&#xD; $(InputDir)$(NodeJsProjects)\Common\**;" />
<CoAuthoringServiceFiles Include="&#xD; $(InputDir)$(NodeJsProjects)\CoAuthoring\**;" />
</ItemGroup>
<Copy SourceFiles="@(NodeJsCommonFiles)" DestinationFiles="@(NodeJsCommonFiles-&gt;'$(OutputDir)$(CoAuthoringService)\Common\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(CoAuthoringServiceFiles)" DestinationFiles="@(CoAuthoringServiceFiles-&gt;'$(OutputDir)$(CoAuthoringService)\CoAuthoring\%(RecursiveDir)%(Filename)%(Extension)')" />
<Exec Command="npm install" WorkingDirectory="$(OutputDir)$(CoAuthoringService)\CoAuthoring" />
<Exec Command="npm install" WorkingDirectory="$(OutputDir)$(CoAuthoringService)\Common" />
</Target>
<Target Name="BuildProject">
<Exec Command="npm install" WorkingDirectory="$(ProjectDir)" />
<Exec Command="grunt --no-color" WorkingDirectory="$(ProjectDir)" IgnoreExitCode="true" />
</Target>
</Project>