packaging rimtool for windows

This commit is contained in:
SuperPotato27 2024-07-15 15:05:31 -04:00
parent 19d3bdd1ac
commit 59e2ac65e7
6 changed files with 83 additions and 0 deletions

View File

@ -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

View File

@ -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()

View 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

View 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)

View 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

View File

@ -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