Merge branch 'ImproveBuild' of https://github.com/flcdrg/OpenLiveWriter into flcdrg-ImproveBuild

This commit is contained in:
Jon Galloway 2017-03-12 15:23:20 -07:00
commit 5fef3f2b5e
3 changed files with 24 additions and 6 deletions

View File

@ -348,11 +348,27 @@
<PropertyGroup>
<MasterXmlPath>$(MSBuildProjectDirectory)\..\..\..\intl\markets\Master.xml</MasterXmlPath>
<MasterXmlOutput>$(MSBuildProjectDirectory)\Marketization\Master.xml</MasterXmlOutput>
<MarketsXmlPath>$(MSBuildProjectDirectory)\Marketization\Markets.xml</MarketsXmlPath>
<MarketsSourceDataFolder>$(MSBuildProjectDirectory)\..\..\..\intl\markets</MarketsSourceDataFolder>
</PropertyGroup>
<Target Name="GenerateMarketXml" DependsOnTargets="ResolveProjectReferences" BeforeTargets="CoreCompile">
<MakeDir Directories="$(MSBuildProjectDirectory)\Marketization" />
<Copy SourceFiles="$(MasterXmlPath)" DestinationFiles="$(MasterXmlOutput)" />
<Exec Command="&quot;$(OutDir)MarketXmlGenerator.exe&quot; &quot;$(MSBuildProjectDirectory)\..\..\..\intl\markets&quot; &quot;$(MSBuildProjectDirectory)\Marketization\Markets.xml&quot;" />
<Target Name="GenerateMarketXmlDeps">
<ItemGroup>
<MarketsSourceFiles Include="$(MarketsSourceDataFolder)\**\*.xml" />
</ItemGroup>
</Target>
<Target Name="GenerateMarketXml" DependsOnTargets="ResolveProjectReferences;GenerateMarketXmlDeps;GenerateMarketXmlCopyMaster;GenerateMarketXmlImpl" BeforeTargets="CoreCompile">
</Target>
<Target Name="GenerateMarketXmlImpl" Inputs="@(MarketsSourceFiles)" Outputs="$(MarketsXmlPath)">
<Exec Command="&quot;$(OutDir)MarketXmlGenerator.exe&quot; &quot;$(MarketsSourceDataFolder)&quot; &quot;$(MarketsXmlPath)&quot;" />
</Target>
<Target Name="GenerateMarketXmlCopyMaster" Inputs="$(MasterXmlPath)" Outputs="$(MasterXmlOutput)">
<MakeDir Directories="$(MSBuildProjectDirectory)\Marketization" Condition="!Exists('$(MSBuildProjectDirectory)\Marketization')" />
<Copy SourceFiles="$(MasterXmlPath)" DestinationFiles="$(MasterXmlOutput)" />
</Target>
<Target Name="_CopyFilesMarkedCopyLocal" />
</Project>

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenLiveWriter.CoreServices", "OpenLiveWriter.CoreServices\OpenLiveWriter.CoreServices.csproj", "{9154B6B4-F2C3-4FB4-BE38-A26A6C9409EE}"
EndProject
@ -59,6 +59,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
..\..\build.cmd = ..\..\build.cmd
..\..\version.txt = ..\..\version.txt
..\..\writer.build.targets = ..\..\writer.build.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostBuild.CreateInstaller", "PostBuild.CreateInstaller\PostBuild.CreateInstaller.csproj", "{4E445FF3-7F7B-46D1-9424-682E146F1F09}"

View File

@ -28,7 +28,8 @@
<OlwBloggerClientSecret Condition="'$(OlwBloggerClientSecret)'==''">PASTE_YOUR_CLIENT_SECRET_HERE</OlwBloggerClientSecret>
</PropertyGroup>
<Target Name="GenerateBloggerClientSecrets" BeforeTargets="CoreCompile" Outputs="$(BloggerClientSecretsJson)">
<Target Name="GenerateBloggerClientSecrets" BeforeTargets="CoreCompile" Inputs="$(MSBuildThisFileFullPath)" Outputs="$(BloggerClientSecretsJson)">
<Message Text="$(BloggerClientSecretsJson)" Importance="high" />
<WriteLinesToFile File="$(BloggerClientSecretsJson)" Lines="{ &quot;installed&quot;: { &quot;client_id&quot;: &quot;$(OlwBloggerClientId)&quot;, &quot;client_secret&quot;: &quot;$(OlwBloggerClientSecret)&quot; } }" Overwrite="true" />
</Target>