mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-29 01:08:59 +00:00
Merge pull request #617 from nsacyber/v2_packaging-changes-dotnet
Updated HIRS_Provisioner.NET package options
This commit is contained in:
commit
3bd7c3cc89
Binary file not shown.
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.1.32421.90
|
VisualStudioVersion = 17.1.32421.90
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "hirs", "hirs\hirs.csproj", "{300FF15E-1E10-4586-843D-D652BA40DEE5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "hirs", "hirs\HIRS_Provisioner.NET.csproj", "{300FF15E-1E10-4586-843D-D652BA40DEE5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E61D6E28-B993-436D-AA88-165857AAEEC0}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E61D6E28-B993-436D-AA88-165857AAEEC0}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
@ -5,21 +5,24 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Move SourceFiles="$(OUTDIR)publish\$(AssemblyName)" DestinationFiles="$(OUTDIR)publish\tpm_aca_provision" />
|
<Move SourceFiles="$(OUTDIR)publish\$(AssemblyName)" DestinationFiles="$(OUTDIR)publish\tpm_aca_provision" />
|
||||||
<Message Text="Renamed linux binary file." Importance="high" />
|
<Message Text="Renamed linux binary file." Importance="high" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Prefix>/usr/share/hirs</Prefix>
|
||||||
|
<PostInstallScript>/usr/bin/chmod 644 /usr/share/hirs/appsettings.json; /usr/bin/ln -s /usr/share/hirs/tpm_aca_provision /usr/bin/tpm_aca_provision</PostInstallScript>
|
||||||
|
<PostRemoveScript>rm -f /usr/bin/tpm_aca_provision; rm -rf /usr/share/hirs</PostRemoveScript>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Message Text="Set installed directory prefix to $(PREFIX)." Importance="high" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="RenameBeforePublishWindows" BeforeTargets="SetWixPath" Condition="$(RuntimeIdentifier.Contains('win'))">
|
<Target Name="RenameBeforePublishWindows" BeforeTargets="SetWixPath" Condition="$(RuntimeIdentifier.Contains('win'))">
|
||||||
<Move SourceFiles="$(OUTDIR)publish\$(AssemblyName).exe" DestinationFiles="$(OUTDIR)publish\tpm_aca_provision.exe" />
|
<Move SourceFiles="$(OUTDIR)publish\$(AssemblyName).exe" DestinationFiles="$(OUTDIR)publish\tpm_aca_provision.exe" />
|
||||||
<Message Text="Renamed exe binary file." Importance="high" />
|
<Message Text="Renamed exe binary file." Importance="high" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
|
||||||
<PostInstallScript>"/bin/sh -c \"chmod 664 /usr/share/hirs/appsettings.json\""</PostInstallScript>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Target Name="SetWixPath" BeforeTargets="Msi">
|
<Target Name="SetWixPath" BeforeTargets="Msi">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProductSourceFilePath>$(MSBuildThisFileDirectory)\Resources\Product.wxs</ProductSourceFilePath>
|
<ProductSourceFilePath>$(MSBuildThisFileDirectory)\Resources\Product.wxs</ProductSourceFilePath>
|
||||||
<WixInstallPath>$(NuGetPackageRoot)wix\3.11.2\tools\</WixInstallPath>
|
<WixInstallPath>$(NuGetPackageRoot)wix\3.11.2\tools\</WixInstallPath>
|
||||||
<Heat>$(WixInstallPath)heat.exe</Heat>
|
<Heat>$(WixInstallPath)heat.exe</Heat>
|
||||||
<Candle>$(WixInstallPath)candle.exe</Candle>
|
<Candle>$(WixInstallPath)candle.exe</Candle>
|
||||||
<Light>$(WixInstallPath)light.exe</Light>
|
<Light>$(WixInstallPath)light.exe</Light>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="DeletePDB" AfterTargets="RenameBeforePublishLinux;RenameBeforePublishWindows">
|
<Target Name="DeletePDB" AfterTargets="RenameBeforePublishLinux;RenameBeforePublishWindows">
|
||||||
@ -37,26 +40,5 @@
|
|||||||
SourceFiles="@(PaccorScriptsDll)"
|
SourceFiles="@(PaccorScriptsDll)"
|
||||||
DestinationFolder="$(PublishDir)plugins"
|
DestinationFolder="$(PublishDir)plugins"
|
||||||
/>
|
/>
|
||||||
<ItemGroup>
|
|
||||||
<PaccorScriptsLinux Include="$(PublishDir)scripts\*"/>
|
|
||||||
<PaccorScriptsWindows Include="$(PublishDir)scripts\windows\*"/>
|
|
||||||
</ItemGroup>
|
|
||||||
<Move
|
|
||||||
SourceFiles="@(PaccorScriptsLinux)"
|
|
||||||
DestinationFolder="$(PublishDir)plugins/scripts"
|
|
||||||
/>
|
|
||||||
<Move
|
|
||||||
SourceFiles="@(PaccorScriptsWindows)"
|
|
||||||
DestinationFolder="$(PublishDir)plugins/scripts/windows"
|
|
||||||
/>
|
|
||||||
<RemoveDir Directories="$(PublishDir)scripts" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="plugins\**\*.*">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
|
|
||||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
@ -8,7 +8,9 @@
|
|||||||
<PublishSingleFile>true</PublishSingleFile>
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
<PackageVersion>2.2.0</PackageVersion>
|
||||||
|
<Release></Release>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
@ -32,7 +34,7 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="paccor.HardwareManifestPlugin" Version="1.0.0" />
|
<PackageReference Include="paccor.HardwareManifestPlugin" Version="1.0.0" />
|
||||||
<PackageReference Include="paccor.HardwareManifestPluginManager" Version="1.0.0" />
|
<PackageReference Include="paccor.HardwareManifestPluginManager" Version="1.0.0" />
|
||||||
<PackageReference Include="paccor.paccor_scripts" Version="1.0.0" />
|
<PackageReference Include="paccor.paccor_scripts" Version="1.0.1" />
|
||||||
<PackageReference Include="Packaging.Targets" Version="0.1.220">
|
<PackageReference Include="Packaging.Targets" Version="0.1.220">
|
||||||
<PrivateAssets>all</PrivateAssets> <!-- These assets will be consumed but won't flow to the parent project -->
|
<PrivateAssets>all</PrivateAssets> <!-- These assets will be consumed but won't flow to the parent project -->
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
@ -79,4 +81,22 @@
|
|||||||
<Exec Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'" Command="for /f %%i in ('dir /s /b $(FOLDER_PROTO)\*.proto') do ( $(protoc) -I=$(FOLDER_PROTO) --csharp_out=$(FOLDER_OUT) %%i )" />
|
<Exec Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'" Command="for /f %%i in ('dir /s /b $(FOLDER_PROTO)\*.proto') do ( $(protoc) -I=$(FOLDER_PROTO) --csharp_out=$(FOLDER_OUT) %%i )" />
|
||||||
<Exec Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'" Command="for file in `ls -1R $(FOLDER_PROTO)/*.proto` ; do $(protoc) -I=$(FOLDER_PROTO) --csharp_out=$(FOLDER_OUT) $file; done " />
|
<Exec Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'" Command="for file in `ls -1R $(FOLDER_PROTO)/*.proto` ; do $(protoc) -I=$(FOLDER_PROTO) --csharp_out=$(FOLDER_OUT) $file; done " />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Import Project="$(NuGetPackageRoot)paccor.paccor_scripts/1.0.1/contentFiles/any/net6.0/resources/paccor.paccor_scripts.targets" Condition="Exists('$(NuGetPackageRoot)paccor.paccor_scripts/1.0.1/contentFiles/any/net6.0/resources/paccor.paccor_scripts.targets')" />
|
||||||
|
<Target Name="ImportPaccorScripts" BeforeTargets="PreBuildEvent">
|
||||||
|
<ItemGroup>
|
||||||
|
<PaccorScriptsLinux Include="$(dotnet_paccor_scripts_directory)/*" />
|
||||||
|
<PaccorScriptsWindows Include="$(dotnet_paccor_scripts_windows_directory)/*" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Message Text="Adding files to plugins/scripts: @(PaccorScriptsLinux)" Importance="high" />
|
||||||
|
<Message Text="Adding files to plugins/scripts/windows: @(PaccorScriptsWindows)" Importance="high" />
|
||||||
|
<Copy SourceFiles="@(PaccorScriptsLinux)" DestinationFolder="$(ProjectDir)/plugins/scripts/" />
|
||||||
|
<Copy SourceFiles="@(PaccorScriptsWindows)" DestinationFolder="$(ProjectDir)/plugins/scripts/windows/" />
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="plugins\**\*.*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
@ -30,7 +30,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\hirs\hirs.csproj" />
|
<ProjectReference Include="..\hirs\HIRS_Provisioner.NET.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ProjectExtensions><VisualStudio><UserProperties resources_4settings_3test_4appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
<ProjectExtensions><VisualStudio><UserProperties resources_4settings_3test_4appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||||
|
Loading…
Reference in New Issue
Block a user