Permalink
Browse files

newlines

  • Loading branch information...
304NotModified committed Oct 26, 2016
1 parent 54fb817 commit bd558cf6de2bf7832e88add7856dfe524546c5e8
Showing with 193 additions and 193 deletions.
  1. +175 −175 Build/Build.proj
  2. +18 −18 Build/VisualStyleManifest.xml
View
@@ -1,176 +1,176 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <UsingTask
- TaskName="GetFirstDirectory"
- TaskFactory="CodeTaskFactory"
- AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
- <ParameterGroup>
- <SearchDirectory ParameterType="System.String" Required="true" />
- <FirstChildDirectoryName ParameterType="System.String" Output="true" />
- </ParameterGroup>
- <Task>
- <Using Namespace="System" />
- <Using Namespace="System.IO" />
- <Using Namespace="System.Linq" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- if (!Directory.Exists(SearchDirectory)) {
- Log.LogError("Directory '{0}' does not exist.", SearchDirectory);
- return false;
- }
-
- var dirInfo = new DirectoryInfo(SearchDirectory);
- var firstChild = dirInfo.EnumerateDirectories().FirstOrDefault();
- if (firstChild != null) {
- FirstChildDirectoryName = firstChild.Name;
- return true;
- }
- else {
- Log.LogError("Didn't find any child directory under '{0}'.", SearchDirectory);
- return false;
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
-
- <Choose>
- <When Condition="'$(Password)'==''">
- <PropertyGroup>
- <CertificateFileName>buildcertificate.pfx</CertificateFileName>
- <CertificatePassword>nugety</CertificatePassword>
- </PropertyGroup>
- </When>
- <Otherwise>
- <PropertyGroup>
- <CertificateFileName>PackageExplorer_TemporaryKey.pfx</CertificateFileName>
- <CertificatePassword>$(Password)</CertificatePassword>
- </PropertyGroup>
- </Otherwise>
- </Choose>
-
- <PropertyGroup>
- <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
- <DeploymentUrl>https://npe.codeplex.com/releases/clickonce/</DeploymentUrl>
- <ApplicationName>NuGetPackageExplorer</ApplicationName>
- <PackageExplorerRoot>$(MSBuildProjectDirectory)\..</PackageExplorerRoot>
- <ManifestFilePath>$(MSBuildProjectDirectory)\VisualStyleManifest.xml</ManifestFilePath>
- <ManifestToolPath>$(ProgramFiles)\Microsoft SDKs\Windows\v7.1A\bin\mt.exe</ManifestToolPath>
- <MageToolPath>$(ProgramFiles)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\mage.exe</MageToolPath>
- <CertificateFilePath>$(PackageExplorerRoot)\$(CertificateFileName)</CertificateFilePath>
- <PublisherName>NuGet Package Explorer</PublisherName>
- <DropDirectory>$(PackageExplorerRoot)\bin</DropDirectory>
- <DeployDirectory>$(DropDirectory)\deploy</DeployDirectory>
- <PublishedDirectory>$(PackageExplorerRoot)\PackageExplorer\bin\$(Configuration)\app.publish</PublishedDirectory>
- <LocalExecutableDirectory>$(PackageExplorerRoot)\PackageExplorer\bin\$(Configuration)</LocalExecutableDirectory>
- <DeploymentManifestFileName>$(ApplicationName).application</DeploymentManifestFileName>
- <ExeFileName>$(ApplicationName).exe</ExeFileName>
- <AppManifestFileName>$(ExeFileName).manifest</AppManifestFileName>
- <ZipExe>$(PackageExplorerRoot)\Tools\7za920\7za.exe</ZipExe>
- <DeployZipFileName>$(ApplicationName).zip</DeployZipFileName>
- <LocalExecutableZipFileName>NpeLocalExecutable.zip</LocalExecutableZipFileName>
- <PackagesFolder>$(PackageExplorerRoot)\Packages</PackagesFolder>
- <NuGetExeToolPath>$(PackageExplorerRoot)\NuGet.exe</NuGetExeToolPath>
- </PropertyGroup>
-
- <Target Name="Go" DependsOnTargets="CheckTools; BuildAndPublish; ReportFxCopResults; CreateDropDirectories; CopyOutputsToDropDirectories; AddVisualStyleManifestToDeployment; BuildPackages; BuildLocalExecutableZip">
- </Target>
-
- <Target Name="CheckTools">
- <Error
- Condition="!Exists('$(ManifestToolPath)')"
- Text="Could not find the resource tool at $(ManifestToolPath). Cannot proceed." />
-
- <Error
- Condition="!Exists('$(MageToolPath)')"
- Text="Could not find the resource tool at $(MageToolPath). Cannot proceed." />
- </Target>
-
- <Target Name="BuildAndPublish">
- <RemoveDir Directories="$(PublishedDirectory)" Condition="Exists('$(PublishedDirectory)')" ContinueOnError="True" />
- <MSBuild Projects="$(PackageExplorerRoot)\NuGetPackageExplorer.sln" Targets="Publish" />
- </Target>
-
- <Target Name="ReportFxCopResults">
- <ItemGroup>
- <FxCopOutputItems Include="$(PackageExplorerRoot)\**\*.dll.CodeAnalysisLog.xml" />
- </ItemGroup>
- <Message Text="%(FxCopOutputItems.Identity)" />
- </Target>
-
- <Target Name="CreateDropDirectories">
- <Message Text="Making the output directories for the compiled output at '$(DropDirectory)'." />
- <RemoveDir Directories="$(DropDirectory)" Condition="Exists('$(DropDirectory)')" ContinueOnError="True" />
- <MakeDir Directories="$(DropDirectory)" Condition="!Exists('$(DropDirectory)')" />
-
- <RemoveDir Directories="$(DeployDirectory)" Condition="Exists('$(DeployDirectory)')" ContinueOnError="True" />
- <MakeDir Directories="$(DeployDirectory)" Condition="!Exists('$(DeployDirectory)')" />
- </Target>
-
- <Target Name="CopyOutputsToDropDirectories">
- <CreateItem Include="$(PublishedDirectory)\**\*.*">
- <Output TaskParameter="Include" ItemName="PublishedFiles" />
- </CreateItem>
-
- <Copy SourceFiles="@(PublishedFiles)" DestinationFiles="@(PublishedFiles->'$(DeployDirectory)\%(RecursiveDir)%(FileName)%(Extension)')" />
- </Target>
-
- <Target Name="AddVisualStyleManifestToDeployment">
- <!-- Rename .deploy files dropping the extension. Required by mage.exe -->
- <CreateItem Include="$(DeployDirectory)\**\*.deploy">
- <Output TaskParameter="Include" ItemName="DeployedFiles" />
- </CreateItem>
-
- <Copy SourceFiles="@(DeployedFiles)" DestinationFiles="@(DeployedFiles->'$(DeployDirectory)\%(RecursiveDir)%(FileName)')">
- <Output TaskParameter="CopiedFiles" ItemName="DeployFilesWithoutDeployExtension" />
- </Copy>
- <Delete Files="@(DeployedFiles)" />
-
- <GetFirstDirectory SearchDirectory="$(DeployDirectory)\Application Files">
- <Output TaskParameter="FirstChildDirectoryName" PropertyName="FirstChildDirectoryName" />
- </GetFirstDirectory>
-
- <CreateProperty Value="Application Files\$(FirstChildDirectoryName)">
- <Output TaskParameter="Value" PropertyName="ManifestCodeBase" />
- </CreateProperty>
-
- <CreateProperty Value="$(DeployDirectory)\$(ManifestCodeBase)">
- <Output TaskParameter="Value" PropertyName="AppManifestDirectory" />
- </CreateProperty>
-
- <!-- run mt.exe -->
- <Exec
- Command="&quot;$(ManifestToolPath)&quot; -nologo -manifest &quot;$(ManifestFilePath)&quot; -outputresource:$(ExeFileName);#1"
- WorkingDirectory="$(AppManifestDirectory)" />
-
- <!-- sign app manifest with mage.exe -->
- <Exec
- Command="&quot;$(MageToolPath)&quot; -u &quot;$(AppManifestFileName)&quot; -cf &quot;$(CertificateFilePath)&quot; -tr FullTrust -password &quot;$(CertificatePassword)&quot;"
- WorkingDirectory="$(AppManifestDirectory)" />
-
- <!-- Add the .deploy extension back -->
- <Copy SourceFiles="@(DeployFilesWithoutDeployExtension)" DestinationFiles="@(DeployFilesWithoutDeployExtension->'%(FullPath).deploy')" />
- <Delete Files="@(DeployFilesWithoutDeployExtension)" />
-
- <!-- sign deployment manifest with mage.exe -->
- <Exec
- Command="&quot;$(MageToolPath)&quot; -u &quot;$(DeploymentManifestFileName)&quot; -appc &quot;$(ManifestCodeBase)\$(AppManifestFileName)&quot; -appm &quot;$(AppManifestDirectory)\$(AppManifestFileName)&quot; -cf &quot;$(CertificateFilePath)&quot; -pub &quot;$(PublisherName)&quot; -pu &quot;$(DeploymentUrl)$(DeploymentManifestFileName)&quot; -password &quot;$(CertificatePassword)&quot;"
- WorkingDirectory="$(DeployDirectory)" />
-
- <!-- zip the whole thing -->
- <Exec
- Command="&quot;$(ZipExe)&quot; a &quot;$(DropDirectory)\$(DeployZipFileName)&quot;"
- WorkingDirectory="$(DeployDirectory)" />
-
- </Target>
-
- <Target Name="BuildPackages">
- <Exec
- Command="&quot;$(NuGetExeToolPath)&quot; pack &quot;$(PackagesFolder)\NuGetPackageExplorer.Types.nuspec&quot; -OutputDirectory &quot;$(DropDirectory)&quot;"
- WorkingDirectory="$(PackagesFolder)" />
- </Target>
-
- <Target Name="BuildLocalExecutableZip">
- <Exec Command="&quot;$(ZipExe)&quot; a &quot;$(DropDirectory)\$(LocalExecutableZipFileName)&quot; &quot;NuGetPackageExplorer.exe&quot; &quot;*.dll&quot; &quot;NuGetPackageExplorer.exe.config&quot;" WorkingDirectory="$(LocalExecutableDirectory)" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <UsingTask
+ TaskName="GetFirstDirectory"
+ TaskFactory="CodeTaskFactory"
+ AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
+ <ParameterGroup>
+ <SearchDirectory ParameterType="System.String" Required="true" />
+ <FirstChildDirectoryName ParameterType="System.String" Output="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Linq" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ if (!Directory.Exists(SearchDirectory)) {
+ Log.LogError("Directory '{0}' does not exist.", SearchDirectory);
+ return false;
+ }
+
+ var dirInfo = new DirectoryInfo(SearchDirectory);
+ var firstChild = dirInfo.EnumerateDirectories().FirstOrDefault();
+ if (firstChild != null) {
+ FirstChildDirectoryName = firstChild.Name;
+ return true;
+ }
+ else {
+ Log.LogError("Didn't find any child directory under '{0}'.", SearchDirectory);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <Choose>
+ <When Condition="'$(Password)'==''">
+ <PropertyGroup>
+ <CertificateFileName>buildcertificate.pfx</CertificateFileName>
+ <CertificatePassword>nugety</CertificatePassword>
+ </PropertyGroup>
+ </When>
+ <Otherwise>
+ <PropertyGroup>
+ <CertificateFileName>PackageExplorer_TemporaryKey.pfx</CertificateFileName>
+ <CertificatePassword>$(Password)</CertificatePassword>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+ <PropertyGroup>
+ <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
+ <DeploymentUrl>https://npe.codeplex.com/releases/clickonce/</DeploymentUrl>
+ <ApplicationName>NuGetPackageExplorer</ApplicationName>
+ <PackageExplorerRoot>$(MSBuildProjectDirectory)\..</PackageExplorerRoot>
+ <ManifestFilePath>$(MSBuildProjectDirectory)\VisualStyleManifest.xml</ManifestFilePath>
+ <ManifestToolPath>$(ProgramFiles)\Microsoft SDKs\Windows\v7.1A\bin\mt.exe</ManifestToolPath>
+ <MageToolPath>$(ProgramFiles)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\mage.exe</MageToolPath>
+ <CertificateFilePath>$(PackageExplorerRoot)\$(CertificateFileName)</CertificateFilePath>
+ <PublisherName>NuGet Package Explorer</PublisherName>
+ <DropDirectory>$(PackageExplorerRoot)\bin</DropDirectory>
+ <DeployDirectory>$(DropDirectory)\deploy</DeployDirectory>
+ <PublishedDirectory>$(PackageExplorerRoot)\PackageExplorer\bin\$(Configuration)\app.publish</PublishedDirectory>
+ <LocalExecutableDirectory>$(PackageExplorerRoot)\PackageExplorer\bin\$(Configuration)</LocalExecutableDirectory>
+ <DeploymentManifestFileName>$(ApplicationName).application</DeploymentManifestFileName>
+ <ExeFileName>$(ApplicationName).exe</ExeFileName>
+ <AppManifestFileName>$(ExeFileName).manifest</AppManifestFileName>
+ <ZipExe>$(PackageExplorerRoot)\Tools\7za920\7za.exe</ZipExe>
+ <DeployZipFileName>$(ApplicationName).zip</DeployZipFileName>
+ <LocalExecutableZipFileName>NpeLocalExecutable.zip</LocalExecutableZipFileName>
+ <PackagesFolder>$(PackageExplorerRoot)\Packages</PackagesFolder>
+ <NuGetExeToolPath>$(PackageExplorerRoot)\NuGet.exe</NuGetExeToolPath>
+ </PropertyGroup>
+
+ <Target Name="Go" DependsOnTargets="CheckTools; BuildAndPublish; ReportFxCopResults; CreateDropDirectories; CopyOutputsToDropDirectories; AddVisualStyleManifestToDeployment; BuildPackages; BuildLocalExecutableZip">
+ </Target>
+
+ <Target Name="CheckTools">
+ <Error
+ Condition="!Exists('$(ManifestToolPath)')"
+ Text="Could not find the resource tool at $(ManifestToolPath). Cannot proceed." />
+
+ <Error
+ Condition="!Exists('$(MageToolPath)')"
+ Text="Could not find the resource tool at $(MageToolPath). Cannot proceed." />
+ </Target>
+
+ <Target Name="BuildAndPublish">
+ <RemoveDir Directories="$(PublishedDirectory)" Condition="Exists('$(PublishedDirectory)')" ContinueOnError="True" />
+ <MSBuild Projects="$(PackageExplorerRoot)\NuGetPackageExplorer.sln" Targets="Publish" />
+ </Target>
+
+ <Target Name="ReportFxCopResults">
+ <ItemGroup>
+ <FxCopOutputItems Include="$(PackageExplorerRoot)\**\*.dll.CodeAnalysisLog.xml" />
+ </ItemGroup>
+ <Message Text="%(FxCopOutputItems.Identity)" />
+ </Target>
+
+ <Target Name="CreateDropDirectories">
+ <Message Text="Making the output directories for the compiled output at '$(DropDirectory)'." />
+ <RemoveDir Directories="$(DropDirectory)" Condition="Exists('$(DropDirectory)')" ContinueOnError="True" />
+ <MakeDir Directories="$(DropDirectory)" Condition="!Exists('$(DropDirectory)')" />
+
+ <RemoveDir Directories="$(DeployDirectory)" Condition="Exists('$(DeployDirectory)')" ContinueOnError="True" />
+ <MakeDir Directories="$(DeployDirectory)" Condition="!Exists('$(DeployDirectory)')" />
+ </Target>
+
+ <Target Name="CopyOutputsToDropDirectories">
+ <CreateItem Include="$(PublishedDirectory)\**\*.*">
+ <Output TaskParameter="Include" ItemName="PublishedFiles" />
+ </CreateItem>
+
+ <Copy SourceFiles="@(PublishedFiles)" DestinationFiles="@(PublishedFiles->'$(DeployDirectory)\%(RecursiveDir)%(FileName)%(Extension)')" />
+ </Target>
+
+ <Target Name="AddVisualStyleManifestToDeployment">
+ <!-- Rename .deploy files dropping the extension. Required by mage.exe -->
+ <CreateItem Include="$(DeployDirectory)\**\*.deploy">
+ <Output TaskParameter="Include" ItemName="DeployedFiles" />
+ </CreateItem>
+
+ <Copy SourceFiles="@(DeployedFiles)" DestinationFiles="@(DeployedFiles->'$(DeployDirectory)\%(RecursiveDir)%(FileName)')">
+ <Output TaskParameter="CopiedFiles" ItemName="DeployFilesWithoutDeployExtension" />
+ </Copy>
+ <Delete Files="@(DeployedFiles)" />
+
+ <GetFirstDirectory SearchDirectory="$(DeployDirectory)\Application Files">
+ <Output TaskParameter="FirstChildDirectoryName" PropertyName="FirstChildDirectoryName" />
+ </GetFirstDirectory>
+
+ <CreateProperty Value="Application Files\$(FirstChildDirectoryName)">
+ <Output TaskParameter="Value" PropertyName="ManifestCodeBase" />
+ </CreateProperty>
+
+ <CreateProperty Value="$(DeployDirectory)\$(ManifestCodeBase)">
+ <Output TaskParameter="Value" PropertyName="AppManifestDirectory" />
+ </CreateProperty>
+
+ <!-- run mt.exe -->
+ <Exec
+ Command="&quot;$(ManifestToolPath)&quot; -nologo -manifest &quot;$(ManifestFilePath)&quot; -outputresource:$(ExeFileName);#1"
+ WorkingDirectory="$(AppManifestDirectory)" />
+
+ <!-- sign app manifest with mage.exe -->
+ <Exec
+ Command="&quot;$(MageToolPath)&quot; -u &quot;$(AppManifestFileName)&quot; -cf &quot;$(CertificateFilePath)&quot; -tr FullTrust -password &quot;$(CertificatePassword)&quot;"
+ WorkingDirectory="$(AppManifestDirectory)" />
+
+ <!-- Add the .deploy extension back -->
+ <Copy SourceFiles="@(DeployFilesWithoutDeployExtension)" DestinationFiles="@(DeployFilesWithoutDeployExtension->'%(FullPath).deploy')" />
+ <Delete Files="@(DeployFilesWithoutDeployExtension)" />
+
+ <!-- sign deployment manifest with mage.exe -->
+ <Exec
+ Command="&quot;$(MageToolPath)&quot; -u &quot;$(DeploymentManifestFileName)&quot; -appc &quot;$(ManifestCodeBase)\$(AppManifestFileName)&quot; -appm &quot;$(AppManifestDirectory)\$(AppManifestFileName)&quot; -cf &quot;$(CertificateFilePath)&quot; -pub &quot;$(PublisherName)&quot; -pu &quot;$(DeploymentUrl)$(DeploymentManifestFileName)&quot; -password &quot;$(CertificatePassword)&quot;"
+ WorkingDirectory="$(DeployDirectory)" />
+
+ <!-- zip the whole thing -->
+ <Exec
+ Command="&quot;$(ZipExe)&quot; a &quot;$(DropDirectory)\$(DeployZipFileName)&quot;"
+ WorkingDirectory="$(DeployDirectory)" />
+
+ </Target>
+
+ <Target Name="BuildPackages">
+ <Exec
+ Command="&quot;$(NuGetExeToolPath)&quot; pack &quot;$(PackagesFolder)\NuGetPackageExplorer.Types.nuspec&quot; -OutputDirectory &quot;$(DropDirectory)&quot;"
+ WorkingDirectory="$(PackagesFolder)" />
+ </Target>
+
+ <Target Name="BuildLocalExecutableZip">
+ <Exec Command="&quot;$(ZipExe)&quot; a &quot;$(DropDirectory)\$(LocalExecutableZipFileName)&quot; &quot;NuGetPackageExplorer.exe&quot; &quot;*.dll&quot; &quot;NuGetPackageExplorer.exe.config&quot;" WorkingDirectory="$(LocalExecutableDirectory)" />
+ </Target>
</Project>
Oops, something went wrong.

0 comments on commit bd558cf

Please sign in to comment.