Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Project/Install/embARC.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ SetCompressor /FINAL /SOLID lzma
!define MUI_ABORTWARNING
!define MUI_ICON "..\..\icons\embARC.ico"

; Uninstaller signing
!ifdef EXPORT_UNINST
!uninstfinalize 'copy /Y "%1" "../../Release/${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"'
!endif

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
Expand Down Expand Up @@ -100,7 +105,11 @@ Section "SectionPrincipale" SEC01
SectionEnd

Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
!if /FileExists "..\..\Release\${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"
File "/oname=$INSTDIR\uninst.exe" "..\..\Release\${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"
!else
WriteUninstaller "$INSTDIR\uninst.exe"
!endif
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\embARC.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,20 @@ $ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path
$version = (Get-Content (Join-Path $release_directory "..\Project\version.txt") -Raw).Trim()

#-----------------------------------------------------------------------
# Cleanup
$artifact = Join-Path $release_directory "embARC_CLI_${version}_Windows_x64.zip"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

Push-Location (Split-Path $release_directory -Parent)
& ./gradlew.bat --no-daemon clean
Pop-Location
$release_directory = $PSScriptRoot
$version = (Get-Content "${release_directory}\..\Project\version.txt" -Raw).Trim()

#-----------------------------------------------------------------------
# Build
Push-Location (Split-Path $release_directory -Parent)
Push-Location -Path "${release_directory}\.."
(Get-Content build.gradle) -replace 'com\.portalmedia\.embarc\.gui\.Launcher', 'com.portalmedia.embarc.cli.Main' | Set-Content build.gradle
& ./gradlew.bat --no-daemon build
Pop-Location

#-----------------------------------------------------------------------
# Package .exe
Push-Location (Split-Path $release_directory -Parent)

# Generate excutable
$distDir = "build/distributions/windows"
New-Item -ItemType Directory -Path $distDir -Force

& jpackage --win-console `
jpackage --win-console `
--type app-image `
--name embARC `
--input build/libs `
Expand All @@ -49,18 +35,4 @@ Push-Location (Split-Path $release_directory -Parent)
# Remove ReadOnly flag from the generated executable
$executable = Get-Item 'build\distributions\windows\embARC\embARC.exe'
$executable.Attributes -= 'ReadOnly'

& signtool sign `
/fd sha256 `
/tr http://timestamp.acs.microsoft.com `
/td sha256 `
/d embARC `
/du http://mediaarea.net `
build\distributions\windows\embARC\embARC.exe
Pop-Location

#-----------------------------------------------------------------------
# Package cli
Push-Location (Join-Path (Split-Path $release_directory -Parent) 'build\distributions\windows\embARC')
& 7za.exe a -r -tzip ..\..\..\..\Release\embARC_CLI_${version}_Windows_x64.zip *
Pop-Location
36 changes: 36 additions & 0 deletions Release/Build_GUI_Windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license that can
## be found in the License.html file in the root of the source tree.
##

$ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = $PSScriptRoot
$version = (Get-Content "${release_directory}\..\Project\version.txt" -Raw).Trim()

#-----------------------------------------------------------------------
# Build
Push-Location -Path "${release_directory}\.."
& ./gradlew.bat --no-daemon build

# Generate excutable
$distDir = "build/distributions/windows"
New-Item -ItemType Directory -Path $distDir -Force

jpackage --type app-image `
--name embARC `
--input build/libs `
--main-jar "embARC-${version}.jar" `
--main-class com.portalmedia.embarc.gui.Launcher `
--dest $distDir `
--vendor "Library of Congress" `
--description "embARC - metadata embedded for archival content" `
--icon "icons/embARC.ico"

# Remove ReadOnly flag from the generated executable
$executable = Get-Item 'build\distributions\windows\embARC\embARC.exe'
$executable.Attributes -= 'ReadOnly'
Pop-Location
25 changes: 25 additions & 0 deletions Release/Release_CLI_Windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license that can
## be found in the License.html file in the root of the source tree.
##

$ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = $PSScriptRoot
$version = (Get-Content "${release_directory}\..\Project\version.txt" -Raw).Trim()

#-----------------------------------------------------------------------
# Cleanup
$artifact = "${release_directory}\embARC_CLI_${version}_Windows_x64.zip"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

#-----------------------------------------------------------------------
# Package CLI
Push-Location -Path "${release_directory}\..\build\distributions\windows\embARC"
& 7za.exe a -r -tzip "${release_directory}\embARC_CLI_${version}_Windows_x64.zip" *
Pop-Location
36 changes: 36 additions & 0 deletions Release/Release_GUI_Windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license that can
## be found in the License.html file in the root of the source tree.
##

$ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = $PSScriptRoot
$version = (Get-Content "${release_directory}\..\Project\version.txt" -Raw).Trim()

#-----------------------------------------------------------------------
# Cleanup
$artifact = "${release_directory}\embARC_GUI_${version}_Windows_x64.zip"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

$artifact = "${release_directory}\embARC_GUI_${version}_Windows_x64.exe"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

#-----------------------------------------------------------------------
# Package GUI
Push-Location -Path "${release_directory}\..\build\distributions\windows\embARC"
& 7za.exe a -r -tzip "${release_directory}\embARC_GUI_${version}_Windows_x64.zip" *
Pop-Location

#-----------------------------------------------------------------------
# Package installer
Push-Location -Path "${release_directory}\..\Project\Install"
makensis.exe embARC.nsi
Pop-Location
83 changes: 0 additions & 83 deletions Release/Release_GUI_Windows_x64.ps1

This file was deleted.