mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
packaging rimtool for windows
This commit is contained in:
parent
19d3bdd1ac
commit
59e2ac65e7
5
.github/workflows/hirs_package_linux.yml
vendored
5
.github/workflows/hirs_package_linux.yml
vendored
@ -66,4 +66,9 @@ jobs:
|
||||
name: JAR_Files
|
||||
path: artifacts/jars/
|
||||
if-no-files-found: error
|
||||
- name: ZIP_Files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: tools/tcg_rim_tool/build/distributions/*.zip
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
|
||||
# Create a shortcut to start the RIM shell
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut("$Home\Desktop\HIRS_tools.lnk")
|
||||
$Shortcut.TargetPath = "$PWD\hirsshell.ps1"
|
||||
$Shortcut.WorkingDirectory = "$PWD"
|
||||
$Shortcut.Save()
|
11
package/win/tcg-rim-tool/eventLog.ps1
Normal file
11
package/win/tcg-rim-tool/eventLog.ps1
Normal file
@ -0,0 +1,11 @@
|
||||
# Script to run the tcg_rim_tool in java
|
||||
|
||||
$JavaParams = @{
|
||||
FilePath = 'java'
|
||||
ArgumentList = @(
|
||||
'-jar "{0}"' -f "$PWD\tcg_eventlog_tool-2.1.3.jar"
|
||||
"$args"
|
||||
)
|
||||
}
|
||||
|
||||
Start-Process @JavaParams -NoNewWindow -Wait
|
15
package/win/tcg-rim-tool/hirsshell.ps1
Normal file
15
package/win/tcg-rim-tool/hirsshell.ps1
Normal file
@ -0,0 +1,15 @@
|
||||
# Script to start a new shell with a rim alias
|
||||
$StartInfo = new-object System.Diagnostics.ProcessStartInfo
|
||||
$StartInfo.FileName = "$pshome\powershell.exe"
|
||||
$StartInfo.Arguments = "-NoExit -Command
|
||||
`$Host.UI.RawUI.WindowTitle=`'TCG RIM TOOL`';
|
||||
Set-Alias elt '$PWD\eventlog.ps1';
|
||||
Set-Alias rim '$PWD\rim.ps1';
|
||||
# function rim { java -jar 'tcg_rim_tool-2.1.0.jar' $args; };
|
||||
echo 'The TCG RIM TOOL is intended for testing TCG Defined PC Client Reference Integrity Manifests (RIMs)';
|
||||
echo 'for usage type: rim -h';
|
||||
echo 'for eventlog usage type: elt -h'
|
||||
Set-Location -Path $PWD;
|
||||
function prompt {'HIRS > '};"
|
||||
[System.Diagnostics.Process]::Start($StartInfo)
|
||||
|
11
package/win/tcg-rim-tool/rim.ps1
Normal file
11
package/win/tcg-rim-tool/rim.ps1
Normal file
@ -0,0 +1,11 @@
|
||||
# Script to run the tcg_rim_tool in java
|
||||
|
||||
$JavaParams = @{
|
||||
FilePath = 'java'
|
||||
ArgumentList = @(
|
||||
'-jar "{0}"' -f "$PWD\tcg_rim_tool-2.1.0.jar"
|
||||
"$args"
|
||||
)
|
||||
}
|
||||
|
||||
Start-Process @JavaParams -NoNewWindow -Wait
|
@ -131,3 +131,37 @@ buildRpm {
|
||||
buildDeb {
|
||||
arch = 'amd64'
|
||||
}
|
||||
|
||||
task buildZip(type: Zip){
|
||||
dependsOn jar
|
||||
from(tasks.jar.archiveFile){
|
||||
into '/'
|
||||
}
|
||||
from('README.md') {
|
||||
into '/'
|
||||
}
|
||||
from('./build/resources/test/rim_fields.json'){
|
||||
into '/'
|
||||
}
|
||||
from('../../package/win/tcg_rim_tool/rim.ps1'){
|
||||
into '/'
|
||||
}
|
||||
from('../../package/win/tcg_rim_tool/hirsshell.ps1'){
|
||||
into '/'
|
||||
}
|
||||
from('../../package/win/tcg_rim_tool/eventLog.ps1'){
|
||||
into '/'
|
||||
}
|
||||
from('../../package/win/tcg_rim_tool/create_hirstools_desktop_shortcut.ps1'){
|
||||
into '/'
|
||||
}
|
||||
|
||||
// arch = 'win'
|
||||
// project_subproject-release version_data-git commit hash-arch.extension
|
||||
archiveBaseName.set(project.name + '-' + jarVersion)
|
||||
archiveExtension.set('zip')
|
||||
destinationDirectory.set(file("$buildDir/distributions"))
|
||||
}
|
||||
|
||||
buildZip.dependsOn jar
|
||||
//build.dependsOn buildZip
|
Loading…
Reference in New Issue
Block a user