Commit 77e60cf4 authored by Tobias Wich's avatar Tobias Wich
Browse files

Merge branch 'java11' of github.com:ecsec/open-ecard into java11

parents e3156212 b36ac635
......@@ -17,9 +17,15 @@
<properties>
<maven.compiler.release>11</maven.compiler.release>
<app.name>Open eCard</app.name>
<app.identifier>Open-eCard-App</app.identifier>
<app.name>Open eCard App</app.name>
<app.vendor>ecsec GmbH</app.vendor>
<app.maintainer>tobias.wich@ecsec.de</app.maintainer>
<app.url>https://openecard.org</app.url>
<app.description>Client side implementation of the eCard-API-Framework (BSI TR-03112)</app.description>
<package.identifier>open-ecard-app</package.identifier>
<package.deps>pcscd</package.deps>
</properties>
......@@ -49,12 +55,35 @@
</activation>
<build>
<plugins>
<!-- Resource plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filtering-resources</id>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/linux/resources</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources/linux</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.agilhard.maven.plugins</groupId>
<artifactId>jlink-jpackager-maven-plugin</artifactId>
<configuration>
<name>${package.identifier}</name>
<icon>${project.basedir}/src/main/resources/linux/Open-eCard-App.png</icon>
<resourceDir>${project.basedir}/src/main/resources/linux</resourceDir>
<resourceDir>${project.basedir}/target/linux/resources</resourceDir>
<type>deb</type>
</configuration>
</plugin>
......@@ -83,7 +112,7 @@
<configuration>
<resources>
<resource>
<directory>src/main/resources/windows/filtering</directory>
<directory>${project.basedir}/src/main/resources/windows/filtering</directory>
<filtering>true</filtering>
</resource>
</resources>
......@@ -96,6 +125,7 @@
<groupId>net.agilhard.maven.plugins</groupId>
<artifactId>jlink-jpackager-maven-plugin</artifactId>
<configuration>
<name>${app.identifier}</name>
<icon>${project.basedir}/src/main/resources/windows/Open-eCard-App.ico</icon>
<type>msi</type>
</configuration>
......@@ -137,6 +167,7 @@
<groupId>net.agilhard.maven.plugins</groupId>
<artifactId>jlink-jpackager-maven-plugin</artifactId>
<configuration>
<name>${app.identifier}</name>
<icon>${project.basedir}/src/main/resources/mac-os/Open-eCard-App.icns</icon>
<resourceDir>${project.basedir}/src/main/resources/mac-os</resourceDir>
<type>dmg</type>
......@@ -228,7 +259,6 @@
<configuration>
<!-- Jpackage arguments -->
<!-- Don't use spaces in application name, because of problems with install scripts ... -->
<name>open-ecard</name>
<identifier>org.openecard.richclient</identifier>
<appVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</appVersion>
<module>org.openecard.richclient/org.openecard.richclient.RichClient</module>
......@@ -253,18 +283,18 @@
</arguments>
<!-- Application package metadata -->
<vendor>${app.vendor}</vendor>
<description>Client side implementation of the eCard-API-Framework (BSI TR-03112)</description>
<description>${app.description}</description>
<licenseFile>${project.basedir}/src/main/resources/licenses/LICENSE.GPL</licenseFile>
<copyright>2019 ecsec GmbH</copyright>
<linuxOptions>
<bundleName>open-ecard</bundleName>
<debMaintainer>tobias.wich@ecsec.de</debMaintainer>
<bundleName>${package.identifier}</bundleName>
<debMaintainer>${app.maintainer}</debMaintainer>
<rpmLicenseType>GPL v3</rpmLicenseType>
<menuGroup>Network;</menuGroup>
<packageDeps>pcscd</packageDeps>
<packageDeps>${package.deps}</packageDeps>
</linuxOptions>
<macOptions>
<bundleName>${openecard.app.name}</bundleName>
<bundleName>${app.identifier}</bundleName>
<bundleIdentifier>org.openecard.richclient</bundleIdentifier>
</macOptions>
<windowsOptions>
......
Package: ${package.identifier}
Version: ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
Section: utils
Maintainer: ${app.vendor} <${app.maintainer}>
Priority: optional
Architecture: amd64
Provides: ${package.identifier}
Conflicts: Open-eCard-App
Description: ${app.description}
Depends: ${package.deps}
[Desktop Entry]
Name=${package.identifier}
Comment=Open eCard App
Exec=/opt/${package.identifier}/bin/${package.identifier}
Icon=/opt/${package.identifier}/bin/${package.identifier}.png
Terminal=false
Type=Application
Categories=Network;
[Desktop Entry]
Name=open-ecard
Comment=Open eCard
Exec=/opt/open-ecard/bin/open-ecard
Icon=/opt/open-ecard/bin/open-ecard.png
Terminal=false
Type=Application
Categories=Network;
......@@ -2,7 +2,10 @@
#define appVersion "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
#define publisher "${app.vendor}"
#define appURL "${app.url}"
#define appExeName "open-ecard.exe"
#define appSupportURL "https://dev.openecard.org/projects/open-ecard/boards"
#define appExeName "Open-eCard-App.exe"
#define appIdentifier "${app.identifier}"
#define dirName "Open-eCard-App"
[Setup]
AppId={{CB11CB66-71B5-42C1-8076-15F1FEDCC22A}}
......@@ -10,9 +13,8 @@ AppName={#appName}
AppVersion={#appVersion}
AppPublisher={#publisher}
AppPublisherURL={#appURL}
AppSupportURL={#appURL}
AppUpdatesURL={#appURL}
DefaultDirName={autopf}\{#appName}
AppSupportURL={#appSupportURL}
DefaultDirName={autopf}\{#dirName}
DisableStartupPrompt=Yes
DisableDirPage=No
DisableProgramGroupPage=Yes
......@@ -21,16 +23,16 @@ DisableFinishedPage=No
DisableWelcomePage=No
DefaultGroupName={#appName}{#appVersion}
LicenseFile=${project.basedir}\src\main\resources\windows\license.txt
PrivilegesRequiredOverridesAllowed=dialog
PrivilegesRequired=admin
OutputDir=${project.basedir}\target\jpackager-out
OutputBaseFilename={#appName}{#appVersion}
OutputBaseFilename={#appIdentifier}-{#appVersion}
SetupIconFile=${project.basedir}\src\main\resources\windows\Open-eCard-App.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
WizardSmallImageFile=${project.basedir}\src\main\resources\windows\Open-eCard-App-setup-icon.bmp
UninstallDisplayIcon=${project.basedir}\src\main\resources\windows\Open-eCard-App.ico
UninstallDisplayIcon={app}\Open-eCard-App.ico
UninstallDisplayName={#appName}
WizardImageStretch=No
......@@ -48,8 +50,8 @@ Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "${project.basedir}\target\jpackager-build\images\win-msi.image\open-ecard\open-ecard.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "${project.basedir}\target\jpackager-build\images\win-msi.image\open-ecard\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "${project.basedir}\target\jpackager-build\images\win-msi.image\{#dirName}\{#appExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "${project.basedir}\target\jpackager-build\images\win-msi.image\{#dirName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
......@@ -58,3 +60,66 @@ Name: "{autodesktop}\{#appName}"; Filename: "{app}\{#appExeName}"; Tasks: deskto
[Run]
Filename: "{app}\{#appExeName}"; Description: "{cm:LaunchProgram,{#StringChange(appName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""taskkill /im {#appExeName} /f /t"
Filename: "{app}\{#appExeName} "; Parameters: "-uninstall -svcName Open-eCard-App -stopOnUninstall"; Check: returnFalse()
[Registry]
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Open-eCard-App"; ValueData: """{app}\{#appExeName}"""; Flags: uninsdeletevalue
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\services\SCardSvr"; ValueType: dword; ValueName: "Start"; ValueData: "2"; Flags: uninsdeletekeyifempty
[Code]
function returnFalse(): Boolean;
begin
Result := False;
end;
//
// Uninstall previous versions
//
function GetUninstallString(): String;
var
uninstallPath: String;
uninstallStr: String;
begin
uninstallPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{{CB11CB66-71B5-42C1-8076-15F1FEDCC22A}}_is1');
uninstallStr := '';
// Also possible to use QuietUninstallString
if not RegQueryStringValue(HKLM, uninstallPath, 'UninstallString', uninstallStr) then
RegQueryStringValue(HKCU, uninstallPath, 'UninstallString', uninstallStr);
Result := uninstallStr;
end;
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
function UninstallOldVersion(): Integer;
var
uninstallStr: String;
resultCode: Integer;
begin
Result := 0;
uninstallStr := GetUninstallString();
if uninstallStr <> '' then begin
uninstallStr := RemoveQuotes(uninstallStr);
if Exec(uninstallStr, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, resultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UninstallOldVersion();
end;
end;
end;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment