@@ -8,34 +8,20 @@ $ErrorActionPreference = "Stop"
88
99# -----------------------------------------------------------------------
1010# Setup
11- $release_directory = Split-Path - Parent $MyInvocation.MyCommand.Path
12- $version = (Get-Content (Join-Path $release_directory " ..\Project\version.txt" ) - Raw).Trim()
13-
14- # -----------------------------------------------------------------------
15- # Cleanup
16- $artifact = Join-Path $release_directory " embARC_CLI_${version} _Windows_x64.zip"
17- if (Test-Path $artifact ) {
18- Remove-Item $artifact - Force
19- }
20-
21- Push-Location (Split-Path $release_directory - Parent)
22- & ./ gradlew.bat -- no- daemon clean
23- Pop-Location
11+ $release_directory = $PSScriptRoot
12+ $version = (Get-Content " ${release_directory} \..\Project\version.txt" - Raw).Trim()
2413
2514# -----------------------------------------------------------------------
2615# Build
27- Push-Location ( Split -Path $ release_directory - Parent)
16+ Push-Location - Path " ${ release_directory} \.. "
2817 (Get-Content build.gradle) -replace ' com\.portalmedia\.embarc\.gui\.Launcher' , ' com.portalmedia.embarc.cli.Main' | Set-Content build.gradle
2918 & ./ gradlew.bat -- no- daemon build
30- Pop-Location
31-
32- # -----------------------------------------------------------------------
33- # Package .exe
34- Push-Location (Split-Path $release_directory - Parent)
19+
20+ # Generate excutable
3521 $distDir = " build/distributions/windows"
3622 New-Item - ItemType Directory - Path $distDir - Force
3723
38- & jpackage -- win- console `
24+ jpackage -- win- console `
3925 -- type app- image `
4026 -- name embARC `
4127 -- input build/ libs `
@@ -49,18 +35,4 @@ Push-Location (Split-Path $release_directory -Parent)
4935 # Remove ReadOnly flag from the generated executable
5036 $executable = Get-Item ' build\distributions\windows\embARC\embARC.exe'
5137 $executable.Attributes -= ' ReadOnly'
52-
53- & signtool sign `
54- / fd sha256 `
55- / tr http:// timestamp.acs.microsoft.com `
56- / td sha256 `
57- / d embARC `
58- / du http:// mediaarea.net `
59- build\distributions\windows\embARC\embARC.exe
60- Pop-Location
61-
62- # -----------------------------------------------------------------------
63- # Package cli
64- Push-Location (Join-Path (Split-Path $release_directory - Parent) ' build\distributions\windows\embARC' )
65- & 7za.exe a - r - tzip ..\..\..\..\Release\embARC_CLI_${version} _Windows_x64.zip *
6638Pop-Location
0 commit comments