Cleaning and some optimizations
This commit is contained in:
@@ -413,11 +413,19 @@ if (Test-Path $libResDir) {
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# 7. Package Standalone Executable JAR
|
||||
# 7. Package Standalone JARs
|
||||
# ------------------------------------------------------------------------------
|
||||
Write-LogInfo "Packaging standalone lib3270j library JAR..."
|
||||
$libManifestFile = Join-Path $BuildDir "LIB_MANIFEST.MF"
|
||||
$libManifestText = "Manifest-Version: 1.0`r`nImplementation-Title: lib3270j`r`nImplementation-Version: 1.2.4`r`nCreated-By: j3270 setup.ps1`r`n`r`n"
|
||||
[System.IO.File]::WriteAllText($libManifestFile, $libManifestText)
|
||||
|
||||
$libJarFile = Join-Path $BuildDir "lib3270j.jar"
|
||||
& $detectedJdk.Jar cvfm $libJarFile $libManifestFile -C $LibBuildDir . | Out-Null
|
||||
|
||||
Write-LogInfo "Packaging standalone executable JAR..."
|
||||
$manifestFile = Join-Path $BuildDir "MANIFEST.MF"
|
||||
$manifestText = "Manifest-Version: 1.0`r`nMain-Class: haus.nightmare.j3270.J3270App`r`nImplementation-Title: j3270`r`nImplementation-Version: 0.1.0`r`nCreated-By: j3270 setup.ps1`r`n`r`n"
|
||||
$manifestText = "Manifest-Version: 1.0`r`nMain-Class: haus.nightmare.j3270.J3270App`r`nImplementation-Title: j3270`r`nImplementation-Version: 1.2.4`r`nCreated-By: j3270 setup.ps1`r`n`r`n"
|
||||
[System.IO.File]::WriteAllText($manifestFile, $manifestText)
|
||||
|
||||
$jarFile = Join-Path $BuildDir "j3270.jar"
|
||||
@@ -428,10 +436,13 @@ if (-not (Test-Path $jarFile)) {
|
||||
exit 1
|
||||
}
|
||||
|
||||
$libJarItem = Get-Item $libJarFile
|
||||
$libJarSizeKB = [math]::Round($libJarItem.Length / 1KB, 1)
|
||||
$jarItem = Get-Item $jarFile
|
||||
$jarSizeKB = [math]::Round($jarItem.Length / 1KB, 1)
|
||||
|
||||
Write-Host "`n=== Build Successful ===`n" -ForegroundColor Green
|
||||
Write-LogSuccess "Library JAR created: $libJarFile (${libJarSizeKB} KB)"
|
||||
Write-LogSuccess "Executable JAR created: $jarFile (${jarSizeKB} KB)"
|
||||
|
||||
Write-Host @"
|
||||
|
||||
Reference in New Issue
Block a user