Commit 80e0a4be authored by Patrik Dufresne's avatar Patrik Dufresne

Merge branch 'develop/patrik/gitlab-cicd' into 'master'

gitlab cicd

See merge request !10
parents db6472f8 18e3ec14
Pipeline #577 passed with stages
in 8 minutes and 19 seconds
image: maven:3-jdk-8
variables:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
-Dorg.slf4j.simpleLogger.showDateTime=true
-Djava.awt.headless=true
-Dmaven.repo.local=.m2/repository"
# Cache downloaded dependencies and plugins between builds.
cache:
paths:
- .m2/repository
stages:
- test
- build
- deploy
# Install requirements to build.
before_script:
# Get version
- export REVISION="$(curl http://git.patrikdufresne.com/pdsl/maven-scm-version/raw/master/version.sh | bash -)"
- echo "REVISION=$REVISION"
# Setup ssh
- eval $(ssh-agent -s)
- echo "$KALO_WWWDATA_PRIVATEKEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
test:
stage: test
script:
- apt-get update && apt-get -qq install icoutils nsis cron gettext
- mvn -B -Drevision=${REVISION} clean verify
sonar:
stage: test
allow_failure: true
script:
- apt-get update && apt-get -qq install icoutils nsis cron gettext
- mvn -B -Drevision=${REVISION} -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN clean verify sonar:sonar
build_exe:
stage: build
script:
- apt-get update && apt-get -qq install icoutils nsis cron gettext
# Setup authenticode
- apt-get update && apt-get -qq install libssl-dev libcurl4-gnutls-dev autoconf osslsigncode
- echo "$AUTHENTICODE_CERT" | tr -d '\r' > /tmp/authenticode-certs.pem
- echo "$AUTHENTICODE_KEY" | tr -d '\r' > /tmp/authenticode.pem
- mvn -B -Drevision=${REVISION} -DskipTests -Dsign.certs.path=/tmp/authenticode-certs.pem -Dsign.key.path=/tmp/authenticode.pem -Dsign.passphrase=$AUTHENTICODE_PASSPHRASE clean install
artifacts:
paths:
- com.patrikdufresne.planimod-installation-package/target/planimod-*-install.exe
deploy:
stage: deploy
script:
# Publish to kalo
- scp -o StrictHostKeyChecking=no com.patrikdufresne.planimod-installation-package/target/planimod-*-install.exe www-data@kalo.patrikdufresne.com:/var/www/patrikdufresne/archive/planimod/
promote:
stage: deploy
only:
- tags
when: manual
script:
- ssh -o StrictHostKeyChecking=no www-data@kalo.patrikdufresne.com ln -fs /var/www/patrikdufresne/archive/planimod/planimod-*-install.exe /var/www/patrikdufresne/archive/planimod/planimod-latest-install.exe
Add Manifest To Exe
===================
ref.: http://blogs.msdn.com/b/ukisvdev/archive/2009/09/23/adding-a-windows-7-application-manifest-to-your-application.aspx
1. On Windows 7, Install Windows SDK
2. Using "mt" command line tool, extract the manifest from eclipse.exe
mt -inputresource:myapp.exe;#1 -out:myapp.manifest
3. Add the manifest back to planimod.exe
mt -manifest myapp.manifest -outputresource:myapp.exe;#1
; Version 1.0.0
!ifndef JRE_DECLARES
!define JRE_DECLARES
!include "WordFunc.nsh"
!macro CUSTOM_PAGE_JREINFO
Page custom CUSTOM_PAGE_JREINFO
!macroend
!ifndef JRE_VERSION
!error "JRE_VERSION must be defined"
!endif
!ifndef JRE_URL
!error "JRE_URL must be defined"
!endif
!ifndef JRE_URL_64
!error "JRE_URL_64 must be defined"
!endif
;--------------------------------
;Language Strings
!macro JREINFO_LANGUAGE
LangString JRE_NOT_FOUND_TITLE ${LANG_ENGLISH} "JRE Installation or Update Required"
LangString JRE_NOT_FOUND_TITLE ${LANG_FRENCH} "Installation ou mise jour requise de JRE"
LangString JRE_NOT_FOUND_SUBTITLE ${LANG_ENGLISH} "This application requires Java ${JRE_VERSION} or higher."
LangString JRE_NOT_FOUND_SUBTITLE ${LANG_FRENCH} "Cette application ncessite Java ${JRE_VERSION} ou suprieur."
LangString JRE_NOT_FOUND_LABEL ${LANG_ENGLISH} "This application requires installation of the JRE. This will be downloaded and installed as part of the installation."
LangString JRE_NOT_FOUND_LABEL ${LANG_FRENCH} "Cette application ncessite l'installation de Java Runtime Environment (JRE). Il sera tlcharg et install lors de cette installation."
LangString JRE_NOT_FOUND ${LANG_ENGLISH} "No JRE Found"
LangString JRE_NOT_FOUND ${LANG_FRENCH} "Aucun JRE trouv"
LangString JRE_OLD_FOUND ${LANG_ENGLISH} "Old JRE found"
LangString JRE_OLD_FOUND ${LANG_FRENCH} "Veille version de JRE trouv"
LangString JRE_FOUND ${LANG_ENGLISH} "JRE found"
LangString JRE_FOUND ${LANG_FRENCH} "JRE trouv"
LangString JRE_LAUNCH_SETUP ${LANG_ENGLISH} "Launching JRE setup"
LangString JRE_LAUNCH_SETUP ${LANG_FRENCH} "Lancement de l'installation de JRE"
LangString JRE_SETUP_COMPLETE ${LANG_ENGLISH} "JRE Setup finished"
LangString JRE_SETUP_COMPLETE ${LANG_FRENCH} "Installation de JRE termine"
LangString JRE_DOWNLOAD ${LANG_ENGLISH} "About to download JRE from "
LangString JRE_DOWNLOAD ${LANG_FRENCH} "Tlchargement de JRE partir de "
LangString JRE_DETECT_VERSION ${LANG_ENGLISH} "Detecting JRE Version"
LangString JRE_DETECT_VERSION ${LANG_FRENCH} "Dtection de la version de JRE"
!macroend
;--------------------------------
; Custom panel
Function CUSTOM_PAGE_JREINFO
push $0
push $1
push $2
; Check if JRE is detected
Push "${JRE_VERSION}"
Call DetectJRE
Pop $0
Pop $1
StrCmp $0 "OK" exit
nsDialogs::create /NOUNLOAD 1018
pop $1
StrCmp $0 "0" NoFound
StrCmp $0 "-1" FoundOld
NoFound:
FoundOld:
!insertmacro MUI_HEADER_TEXT $(JRE_NOT_FOUND_TITLE) $(JRE_NOT_FOUND_SUBTITLE)
${NSD_CreateLabel} 0 0 100% 100% $(JRE_NOT_FOUND_LABEL)
pop $1
goto ShowDialog
ShowDialog:
nsDialogs::Show
exit:
pop $2
pop $1
pop $0
FunctionEnd
;--------------------------------
; Checks to ensure that the installed version of the JRE (if any) is at least that of
; the JRE_VERSION variable. The JRE will be downloaded and installed if necessary
; The full path of java.exe will be returned on the stack
Function DownloadAndInstallJREIfNecessary
Push $0
Push $1
DetailPrint $(JRE_DETECT_VERSION)
Push "${JRE_VERSION}"
Call DetectJRE
Pop $0 ; Get return value from stack
Pop $1 ; get JRE path (or error message)
DetailPrint "JRE Version detection complete... $1"
strcmp $0 "OK" End downloadJRE
downloadJRE:
${If} ${RunningX64}
DetailPrint "$(JRE_DOWNLOAD) ${JRE_URL_64}"
Inetc::get "${JRE_URL_64}" "$TEMP\jre_Setup.exe" /END
${Else}
DetailPrint "$(JRE_DOWNLOAD) ${JRE_URL}"
Inetc::get "${JRE_URL}" "$TEMP\jre_Setup.exe" /END
${EndIf}
Pop $0 # return value = exit code, "OK" if OK
DetailPrint "Download result = $0"
strcmp $0 "OK" downloadsuccessful
MessageBox MB_OK "There was a problem downloading required component - Error: $0"
abort
downloadsuccessful:
DetailPrint $(JRE_LAUNCH_SETUP)
ExecWait '"$TEMP\jre_setup.exe" /s REBOOT=Disable AUTO_UPDATE=0 /L \"$TEMP\jre_setup.log\"' $0
goto jreSetupfinished
jreSetupFinished:
DetailPrint $(JRE_SETUP_COMPLETE)
Delete "$TEMP\jre_setup.exe"
StrCmp $0 "0" InstallVerif 0
Push "The JRE setup has been abnormally interrupted - return code $0"
Goto ExitInstallJRE
InstallVerif:
DetailPrint "Checking the JRE Setup's outcome"
Push "${JRE_VERSION}"
Call DetectJRE
Pop $0 ; DetectJRE's return value
Pop $1 ; JRE home (or error message if compatible JRE could not be found)
StrCmp $0 "OK" 0 JavaVerStillWrong
Goto JREPathStorage
JavaVerStillWrong:
Push "Unable to find JRE with version above ${JRE_VERSION}, even though the JRE setup was successful$\n$\n$1"
Goto ExitInstallJRE
JREPathStorage:
push $0 ; => rv, r1, r0
exch 2 ; => r0, r1, rv
exch ; => r1, r0, rv
Goto End
ExitInstallJRE:
Pop $1
MessageBox MB_OK "Unable to install Java - Setup will be aborted$\n$\n$1"
Pop $1 ; Restore $1
Pop $0 ; Restore $0
Abort
End:
Pop $1 ; Restore $1
Pop $0 ; Restore $0
FunctionEnd
;--------------------------------
; DetectJRE
; Inputs: Minimum JRE version requested on stack (this value will be overwritten)
; Outputs: Returns two values on the stack:
; First value (rv0): 0 - JRE not found. -1 - JRE found but too old. OK - JRE found and meets version criteria
; Second value (rv1): Problem description. Otherwise - Path to the java runtime (javaw.exe will be at .\bin\java.exe relative to this path)
Function DetectJRE
Exch $0 ; Get version requested
; Now the previous value of $0 is on the stack, and the asked for version of JDK is in $0
Push $1 ; $1 = Java version string (ie 1.5.0)
Push $2 ; $2 = Javahome
Push $3 ; $3 = holds the version comparison result
; stack is now: r3, r2, r1, r0
; first, check for an installed JRE
ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
StrCmp $1 "" DetectTry2
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "JavaHome"
StrCmp $2 "" DetectTry2
Goto GetJRE
DetectTry2:
; next, check for an installed JDK
ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
StrCmp $1 "" NoFound
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
StrCmp $2 "" NoFound
GetJRE:
; ok, we found a JRE, let's compare it's version and make sure it is new enough
; $0 = version requested. $1 = version found. $2 = javaHome
IfFileExists "$2\bin\java.exe" 0 NoFound
${VersionCompare} $0 $1 $3 ; $3 now contains the result of the comparison
DetailPrint "Comparing version $0 to $1 results in $3"
intcmp $3 1 FoundOld
goto FoundNew
NoFound:
; No JRE found
strcpy $0 "0"
strcpy $1 $(JRE_NOT_FOUND)
Goto DetectJREEnd
FoundOld:
; An old JRE was found
strcpy $0 "-1"
strcpy $1 $(JRE_OLD_FOUND)
Goto DetectJREEnd
FoundNew:
; A suitable JRE was found
strcpy $0 "OK"
strcpy $1 $2
Goto DetectJREEnd
DetectJREEnd:
; at this stage, $0 contains rv0, $1 contains rv1
; now, straighten the stack out and recover original values for r0, r1, r2 and r3
; there are two return values: rv0 = -1, 0, OK and rv1 = JRE path or problem description
; stack looks like this:
; r3,r2,r1,r0
Pop $3 ; => r2,r1,r0
Pop $2 ; => r1,r0
Push $0 ; => rv0, r1, r0
Exch 2 ; => r0, r1, rv0
Push $1 ; => rv1, r0, r1, rv0
Exch 2 ; => r1, r0, rv1, rv0
Pop $1 ; => r0, rv1, rv0
Pop $0 ; => rv1, rv0
Exch ; => rv0, rv1
FunctionEnd
!endif ; // JRE_DECLARES
\ No newline at end of file
!define AppName "planimod"
!define ShortName "planimod"
!define Vendor "Patrik Dufresne Service Logiciel"
!define Vendor "Patrik Dufresne Service Logiciel inc."
!define LicenseFile "LICENSE.txt"
!ifndef IS_64
!define AppExeFile "bin\planimod.exe"
!else
!define AppExeFile "bin\planimod64.exe"
!endif
!include "MUI.nsh"
!include "Sections.nsh"
!define AppExeFile ""
;--------------------------------
;Includes
!addplugindir "${FWPLUGINDIR}"
!include "MUI2.nsh"
!include "Sections.nsh"
!include "x64.nsh"
SetCompressor bzip2
; Include Java Install
!addincludedir ${includedir}
!addplugindir ${plugindir}
!define JRE_VERSION "1.8"
!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=98426"
!define JRE_URL_64 "http://javadl.sun.com/webapps/download/AutoDL?BundleId=98428"
!include "JREDyna_Inetc.nsh"
;--------------------------------
;Configuration
;General
Name "${AppName}"
VIProductVersion "${AppVersion}"
VIAddVersionKey "ProductName" "${AppName}"
VIAddVersionKey "CompanyName" "${Vendor}"
VIAddVersionKey "LegalCopyright" "(c) ${Vendor}"
VIAddVersionKey "FileDescription" "${AppName} ${AppVersion} Installer"
VIAddVersionKey "FileVersion" "${AppVersion}"
OutFile "setup.exe"
;Folder selection page
!ifndef IS_64
InstallDir "$PROGRAMFILES\${SHORTNAME}"
!else
InstallDir "$PROGRAMFILES64\${SHORTNAME}"
!endif
InstallDir "$PROGRAMFILES64\${ShortName}"
; Define icon
!define MUI_ICON "planimod.ico"
!define MUI_UNICON "planimod.ico"
;Get install folder from registry if available
InstallDirRegKey HKLM "SOFTWARE\${Vendor}\${ShortName}" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
; Installation types
;InstType "full" ; Uncomment if you want Installation types
......@@ -40,7 +54,10 @@ SetCompressor bzip2
; License page
!insertmacro MUI_PAGE_LICENSE "${LicenseFile}"
; Java download page
!insertmacro CUSTOM_PAGE_JREINFO
!insertmacro MUI_PAGE_INSTFILES
!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "Installation complete"
!define MUI_PAGE_HEADER_TEXT "Installing"
......@@ -77,10 +94,7 @@ SetCompressor bzip2
;--------------------------------
;Reserve Files
;Only useful for BZIP2 compression
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
;--------------------------------
;Installer Sections
......@@ -93,6 +107,7 @@ Section "Installation of ${AppName}" SecAppFiles
; If you add more sections be sure to add them here as well
; Add files
SetOutPath $INSTDIR
SetOverwrite on
File /r ".\"
;Store install folder
......@@ -104,7 +119,8 @@ Section "Installation of ${AppName}" SecAppFiles
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ShortName}" "NoRepair" "1"
; Add application to firewall authorized list
nsisFirewall::AddAuthorizedApplication "$INSTDIR\${AppExeFile}" "${AppName}"
nsisFirewall::AddAuthorizedApplication "$INSTDIR\bin\planimod64.exe" "${AppName}"
nsisFirewall::AddAuthorizedApplication "$INSTDIR\bin\planimod.exe" "${AppName}"
Pop $0
;Create uninstaller
......@@ -117,7 +133,13 @@ Section "Start menu shortcuts" SecCreateShortcut
; Can be unselected
SectionIn 1
CreateDirectory "$SMPROGRAMS\${AppName}"
CreateShortCut "$SMPROGRAMS\${AppName}\${AppName}.lnk" "$INSTDIR\${AppExeFile}" "" "$INSTDIR\${AppExeFile}" 0
${If} ${RunningX64}
CreateShortCut "$DESKTOP\${AppName}.lnk" "$INSTDIR\bin\planimod64.exe" "" "$INSTDIR\planimod.ico" 0
CreateShortCut "$SMPROGRAMS\${AppName}\${AppName}.lnk" "$INSTDIR\bin\planimod64.exe" "" "$INSTDIR\planimod.ico" 0
${Else}
CreateShortCut "$DESKTOP\${AppName}.lnk" "$INSTDIR\bin\planimod.exe" "" "$INSTDIR\planimod.ico" 0
CreateShortCut "$SMPROGRAMS\${AppName}\${AppName}.lnk" "$INSTDIR\bin\planimod.exe" "" "$INSTDIR\planimod.ico" 0
${EndIf}
SectionEnd
;--------------------------------
......@@ -132,6 +154,8 @@ SectionEnd
Function .onInit
Call SetupSections
; When running 64bits, read and write to 64bits registry.
SetRegView 64
FunctionEnd
Function myPreInstfiles
......@@ -162,7 +186,8 @@ Section "Uninstall"
Delete "$SMPROGRAMS\${AppName}\*.*"
; Remove application from the firewall authorized list
nsisFirewall::RemoveAuthorizedApplication "$INSTDIR\${AppExeFile}" "${AppName}"
nsisFirewall::RemoveAuthorizedApplication "$INSTDIR\bin\planimod64.exe" "${AppName}"
nsisFirewall::RemoveAuthorizedApplication "$INSTDIR\bin\planimod.exe" "${AppName}"
Pop $0
; remove files
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.patrikdufresne.planimod</groupId>
<artifactId>com.patrikdufresne.planimod-parent</artifactId>
<version>0.2.32-SNAPSHOT</version>
<groupId>com.patrikdufresne</groupId>
<artifactId>planimod-parent</artifactId>
<version>${revision}</version>
</parent>
<artifactId>com.patrikdufresne.planimod</artifactId>
<name>Planimod :: Application</name>
<artifactId>planimod</artifactId>
<name>Planimod UI</name>
<profiles>
<profile>
<id>linux_x86_64</id>
......@@ -20,7 +22,6 @@
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
<version>4.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
......@@ -37,7 +38,6 @@
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>4.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
......@@ -78,12 +78,12 @@
<dependency>
<groupId>com.patrikdufresne.managers</groupId>
<artifactId>com.patrikdufresne.managers.jface</artifactId>
<version>1.18</version>
<version>1.21</version>
</dependency>
<dependency>
<groupId>com.patrikdufresne.managers</groupId>
<artifactId>com.patrikdufresne.managers.databinding</artifactId>
<version>1.18</version>
<version>1.21</version>
</dependency>
<dependency>
<groupId>com.patrikdufresne.printing</groupId>
......@@ -105,11 +105,16 @@
<artifactId>com.patrikdufresne.ilp.glpk</artifactId>
<version>0.12</version>
</dependency>
<dependency>
<groupId>com.googlecode.gettext-commons</groupId>
<artifactId>gettext-commons</artifactId>
<version>0.9.8</version>
</dependency>
<dependency>
<groupId>com.googlecode.gettext-commons</groupId>
<artifactId>gettext-commons</artifactId>
<version>0.9.8</version>
</dependency>
<dependency>
<groupId>com.patrikdufresne</groupId>
<artifactId>planimod-icons</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<!-- Include the .properties file located in /src/main/java -->
......@@ -125,18 +130,18 @@
</resource>
</resources>
<plugins>
<!-- Write version in Manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Write version in Manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Formatting -->
<plugin>
<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
......@@ -171,30 +176,38 @@
<header>src/main/build-tools/license-header.txt</header>
</configuration>
</plugin>
<!-- Localized -->
<!-- This plugin required to install "gettext". -->
<!-- sudo apt-get install gettext -->
<plugin>
<groupId>com.googlecode.gettext-commons</groupId>
<artifactId>gettext-maven-plugin</artifactId>
<version>1.2.4</version>
<executions>
<execution>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
<configuration>
<poDirectory>${basedir}/src/main/po</poDirectory>
<!-- Generate translation for _() -->
<keywords>-k_</keywords>
<!-- Package and filename of the generated class or properties
files -->
<targetBundle>com.patrikdufresne.planimod.messages</targetBundle>
<outputFormat>properties</outputFormat>
</configuration>
</plugin>
<!-- Localized -->
<!-- This plugin required to install "gettext". -->
<!-- sudo apt-get install gettext -->
<plugin>
<groupId>com.googlecode.gettext-commons</groupId>
<artifactId>gettext-maven-plugin</artifactId>
<version>1.2.4</version>
<executions>
<execution>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
<configuration>
<poDirectory>${basedir}/src/main/po</poDirectory>
<!-- Generate translation for _() -->
<keywords>-k_</keywords>
<!-- Package and filename of the generated class or properties files -->
<targetBundle>com.patrikdufresne.planimod.messages</targetBundle>
<outputFormat>properties</outputFormat>
</configuration>
</plugin>
<!-- Need the following to overcome a bug with surefire and java8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx512m</argLine>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -129,10 +129,10 @@ public class Resources {
*/
private static void initializeDefaultImages() {
ImageRegistry ir = JFaceResources.getImageRegistry();
ir.put(APP_ICON_16, ImageDescriptor.createFromFile(Resources.class, "app-icon-16.png"));
ir.put(APP_ICON_22, ImageDescriptor.createFromFile(Resources.class, "app-icon-22.png"));
ir.put(APP_ICON_48, ImageDescriptor.createFromFile(Resources.class, "app-icon-48.png"));
ir.put(APP_ICON_128, ImageDescriptor.createFromFile(Resources.class, "app-icon-128.png"));
ir.put(APP_ICON_16, ImageDescriptor.createFromFile(Resources.class, "planimod_16.png"));
ir.put(APP_ICON_22, ImageDescriptor.createFromFile(Resources.class, "planimod_22.png"));
ir.put(APP_ICON_48, ImageDescriptor.createFromFile(Resources.class, "planimod_48.png"));
ir.put(APP_ICON_128, ImageDescriptor.createFromFile(Resources.class, "planimod_128.png"));
ir.put(ICON_CREATE_TASKS_16, ImageDescriptor.createFromFile(Resources.class, "insert-object-16.png"));
ir.put(ICON_DUPLICATE_16, ImageDescriptor.createFromFile(Resources.class, "edit-copy-16.png"));
ir.put(ICON_DUPLICATE_48, ImageDescriptor.createFromFile(Resources.class, "edit-copy-48.png"));
......
......@@ -193,9 +193,8 @@ public class QualificationPrintFactory extends PlanimodPrintFactory {
// Get Positions
List<Position> positions = new ArrayList<Position>(data.listPositions());
Collections.sort(
positions,
this.orientation == SWT.HORIZONTAL ? Collections.reverseOrder(PositionComparators.byClassifiedName()) : PositionComparators.byClassifiedName());
Collections.sort(positions, this.orientation == SWT.HORIZONTAL ? Collections.reverseOrder(PositionComparators.byClassifiedName()) : PositionComparators
.byClassifiedName());
// Create Grid holding the qualifications
GridPrint grid = new GridPrint();
......@@ -421,11 +420,9 @@ public class QualificationPrintFactory extends PlanimodPrintFactory {
protected Print createMiddleFooterPrint(PageNumber pageNumber) {
StyledTextPrint text = new StyledTextPrint();
text.setStyle(new TextStyle().font(FontDataUtil.SMALL));
text
.append(_("X : Formé pour le poste"))
.newline()
.append(" X ", new TextStyle().background(new RGB(0, 0, 0)).foreground(new RGB(255, 255, 255)).font(FontDataUtil.SMALL))
.append(_(": Détient le poste"