diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..bea650672c945752d9db6c503e9c865b2f9d9081 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,68 @@ +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 diff --git a/com.patrikdufresne.planimod-installation-package/README b/com.patrikdufresne.planimod-installation-package/README deleted file mode 100644 index a4c487f3b6d32205a9ddbf2bd936c6dac68c72b6..0000000000000000000000000000000000000000 --- a/com.patrikdufresne.planimod-installation-package/README +++ /dev/null @@ -1,12 +0,0 @@ -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 - diff --git a/com.patrikdufresne.planimod-installation-package/pom.xml b/com.patrikdufresne.planimod-installation-package/pom.xml index 28e1251b8c157d8620580d4dd9b9d70b9b820429..f41df7cbd680f03b338fced64e8014226f513c84 100644 --- a/com.patrikdufresne.planimod-installation-package/pom.xml +++ b/com.patrikdufresne.planimod-installation-package/pom.xml @@ -1,14 +1,16 @@ - + 4.0.0 - com.patrikdufresne.planimod-parent - com.patrikdufresne.planimod - 0.2.32-SNAPSHOT + com.patrikdufresne + planimod-parent + ${revision} - com.patrikdufresne.planimod-installation-package + planimod-installation-package pom - Planimod :: Installation package + Planimod Windows Installation package patrikdufresne.com maven @@ -63,7 +65,6 @@ org.eclipse.swt org.eclipse.swt.win32.win32.x86 - 4.2.1 ${project.build.directory}/package/lib/win/x86 @@ -80,52 +81,36 @@ org.eclipse.swt org.eclipse.swt.win32.win32.x86_64 - 4.2.1 ${project.build.directory}/package/lib/win/x86_64 + - copy-swt-linux-x86 + unpack-icons generate-resources - copy + unpack - org.eclipse.swt - org.eclipse.swt.gtk.linux.x86 - 4.2.1 + com.patrikdufresne + planimod-icons + ${project.version} - ${project.build.directory}/package/lib/linux/x86 - - - - copy-swt-linux-x86-64 - generate-resources - - copy - - - - - org.eclipse.swt - org.eclipse.swt.gtk.linux.x86_64 - 4.2.1 - - - ${project.build.directory}/package/lib/linux/x86_64 + ${project.build.directory}/generated-resources/icons - + org.apache.maven.plugins maven-resources-plugin + copy-root-resources @@ -144,6 +129,24 @@ false + + + copy-icons-resources + generate-resources + + copy-resources + + + + + false + ${project.build.directory}/generated-resources/icons/com/planimod/ui/theme + + + ${project.build.directory}/package + false + + @@ -168,43 +171,102 @@ maven-antrun-plugin 1.7 - - - package-win-x86 - package - - - - - - - - - - - - - - - run - - - + - package-win-x86-64 + package-win package + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - + + + - + + + + + @@ -212,14 +274,32 @@ + + + ant-contrib + ant-contrib + 1.0b3 + + + ant + ant + + + + + org.apache.ant + ant-nodeps + 1.8.1 + + - com.patrikdufresne.planimod - com.patrikdufresne.planimod - ${project.parent.version} + com.patrikdufresne + planimod + ${project.version} diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/include/JREDyna_Inetc.nsh b/com.patrikdufresne.planimod-installation-package/src/main/nsis/include/JREDyna_Inetc.nsh new file mode 100644 index 0000000000000000000000000000000000000000..78962940ab69468dc1022f9cf3f9da232173a471 --- /dev/null +++ b/com.patrikdufresne.planimod-installation-package/src/main/nsis/include/JREDyna_Inetc.nsh @@ -0,0 +1,257 @@ +; 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 nécessite Java ${JRE_VERSION} ou supérieur." + 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 nécessite l'installation de Java Runtime Environment (JRE). Il sera téléchargé 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 terminée" + LangString JRE_DOWNLOAD ${LANG_ENGLISH} "About to download JRE from " + LangString JRE_DOWNLOAD ${LANG_FRENCH} "Téléchargement de JRE à partir de " + LangString JRE_DETECT_VERSION ${LANG_ENGLISH} "Detecting JRE Version" + LangString JRE_DETECT_VERSION ${LANG_FRENCH} "Détection 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 diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/Inetc.zip b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/Inetc.zip new file mode 100644 index 0000000000000000000000000000000000000000..075e28f12d4cde9df9acbb2fcd3a4eec6ef47f3f Binary files /dev/null and b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/Inetc.zip differ diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc.dll b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc.dll new file mode 100644 index 0000000000000000000000000000000000000000..cca1550d58a25b25dafeae38cdec508103bdef29 Binary files /dev/null and b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc.dll differ diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc64.dll b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc64.dll new file mode 100644 index 0000000000000000000000000000000000000000..80bc01670919b98f74123e38a45f9c657cb4721d Binary files /dev/null and b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/inetc64.dll differ diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/License.txt b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/License.txt similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/License.txt rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/License.txt diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/ReadMe.txt b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/ReadMe.txt similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/ReadMe.txt rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/ReadMe.txt diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/Sample.nsi b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/Sample.nsi similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/Sample.nsi rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/Sample.nsi diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/exdll.h b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/exdll.h similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/exdll.h rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/exdll.h diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/netfw.tlb b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/netfw.tlb similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/netfw.tlb rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/netfw.tlb diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.cpp b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.cpp similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.cpp rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.cpp diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.dsp b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.dsp similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.dsp rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.dsp diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.dsw b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.dsw similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/nsisFirewall/nsisFirewall.dsw rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall-src/nsisFirewall.dsw diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/bin/nsisFirewall.dll b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall.dll similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/bin/nsisFirewall.dll rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewall.dll diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/bin/nsisFirewallW.dll b/com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewallW.dll similarity index 100% rename from com.patrikdufresne.planimod-installation-package/src/main/nsis/nsisFirewall/bin/nsisFirewallW.dll rename to com.patrikdufresne.planimod-installation-package/src/main/nsis/plugin/nsisFirewallW.dll diff --git a/com.patrikdufresne.planimod-installation-package/src/main/nsis/setup.nsi b/com.patrikdufresne.planimod-installation-package/src/main/nsis/setup.nsi index 401e85b7ec1c26b0467ddaaa34fc7516326b68a5..97a44411c3bf5ff570892fdbea7b86963f40bf3c 100644 --- a/com.patrikdufresne.planimod-installation-package/src/main/nsis/setup.nsi +++ b/com.patrikdufresne.planimod-installation-package/src/main/nsis/setup.nsi @@ -1,37 +1,51 @@ !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 diff --git a/com.patrikdufresne.planimod-installation-package/src/main/root/bin/planimod.ico b/com.patrikdufresne.planimod-installation-package/src/main/root/bin/planimod.ico deleted file mode 100644 index 8d53c6858cd8732346ad9aabc4a807f2f9e3b3f0..0000000000000000000000000000000000000000 Binary files a/com.patrikdufresne.planimod-installation-package/src/main/root/bin/planimod.ico and /dev/null differ diff --git a/com.patrikdufresne.planimod-installation-package/src/resources/planimod-app-icon.svg b/com.patrikdufresne.planimod-installation-package/src/resources/planimod-app-icon.svg deleted file mode 100644 index ec90a17e98f3b343c7dc83e790d50d2a2c5fd6d7..0000000000000000000000000000000000000000 --- a/com.patrikdufresne.planimod-installation-package/src/resources/planimod-app-icon.svg +++ /dev/null @@ -1,8584 +0,0 @@ - - - - - Samba Server Configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Lapo Calamandrei, Jakub Steiner - - - - - Samba Server Configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - application - planimod-app-icon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/com.patrikdufresne.planimod/.gitignore b/com.patrikdufresne.planimod/.gitignore deleted file mode 100644 index 61d48f9d460760ccc3f346be3414106322475d95..0000000000000000000000000000000000000000 --- a/com.patrikdufresne.planimod/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/output.pdf diff --git a/com.patrikdufresne.planimod/pom.xml b/com.patrikdufresne.planimod/pom.xml index 4f59785e526033537b38898bc0ca0ce31626860f..2c8b34e7a96174da16def3a117b056fbf903407a 100644 --- a/com.patrikdufresne.planimod/pom.xml +++ b/com.patrikdufresne.planimod/pom.xml @@ -1,12 +1,14 @@ - + 4.0.0 - com.patrikdufresne.planimod - com.patrikdufresne.planimod-parent - 0.2.32-SNAPSHOT + com.patrikdufresne + planimod-parent + ${revision} - com.patrikdufresne.planimod - Planimod :: Application + planimod + Planimod UI linux_x86_64 @@ -20,7 +22,6 @@ org.eclipse.swt org.eclipse.swt.gtk.linux.x86_64 - 4.2.1 provided @@ -37,7 +38,6 @@ org.eclipse.swt org.eclipse.swt.win32.win32.x86_64 - 4.2.1 provided @@ -78,12 +78,12 @@ com.patrikdufresne.managers com.patrikdufresne.managers.jface - 1.18 + 1.21 com.patrikdufresne.managers com.patrikdufresne.managers.databinding - 1.18 + 1.21 com.patrikdufresne.printing @@ -105,11 +105,16 @@ com.patrikdufresne.ilp.glpk 0.12 - - com.googlecode.gettext-commons - gettext-commons - 0.9.8 - + + com.googlecode.gettext-commons + gettext-commons + 0.9.8 + + + com.patrikdufresne + planimod-icons + ${project.version} + @@ -125,18 +130,18 @@ - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - - - - + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + com.googlecode.maven-java-formatter-plugin @@ -171,30 +176,38 @@
src/main/build-tools/license-header.txt
- - - - - com.googlecode.gettext-commons - gettext-maven-plugin - 1.2.4 - - - - dist - - - - - ${basedir}/src/main/po - - -k_ - - com.patrikdufresne.planimod.messages - properties - - + + + + + com.googlecode.gettext-commons + gettext-maven-plugin + 1.2.4 + + + + dist + + + + + ${basedir}/src/main/po + + -k_ + + com.patrikdufresne.planimod.messages + properties + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xmx512m + false + +
\ No newline at end of file diff --git a/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/theme/Resources.java b/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/theme/Resources.java index 1e6c0c0089c2112ae4fe619859e81995b3ddef10..21bd6510d125ce2682689bd0b8ecb718f84f2ba9 100644 --- a/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/theme/Resources.java +++ b/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/theme/Resources.java @@ -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")); diff --git a/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/views/qualifs/QualificationPrintFactory.java b/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/views/qualifs/QualificationPrintFactory.java index 773ce3c63122aa431f7c1a79cc803661f7f04b83..9243415d02823ec3436996810b74f6646b77bbd0 100644 --- a/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/views/qualifs/QualificationPrintFactory.java +++ b/com.patrikdufresne.planimod/src/main/java/com/planimod/ui/views/qualifs/QualificationPrintFactory.java @@ -193,9 +193,8 @@ public class QualificationPrintFactory extends PlanimodPrintFactory { // Get Positions List positions = new ArrayList(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")); + 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")); return text; } diff --git a/planimod-icons/pom.xml b/planimod-icons/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6e9c51a9ab37f6cf2731ac848765e22d43cd7ff --- /dev/null +++ b/planimod-icons/pom.xml @@ -0,0 +1,123 @@ + + 4.0.0 + + com.patrikdufresne + planimod-parent + ${revision} + + planimod-icons + + ${project.build.directory}/generated-resources/batik + ${project.build.directory}/generated-resources/icotool + + + + + maven-antrun-plugin + 1.7 + + + create-icons + generate-resources + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + org.apache.xmlgraphics + batik-rasterizer + 1.7 + + + org.apache.xmlgraphics + batik-codec + 1.7 + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + add-source + generate-resources + + add-resource + + + + + ${batikDestDir} + com/planimod/ui/theme + + + ${icotoolDestDir} + com/planimod/ui/theme + + + + + + + + + diff --git a/planimod-icons/src/main/svg/planimod_128.svg b/planimod-icons/src/main/svg/planimod_128.svg new file mode 100644 index 0000000000000000000000000000000000000000..c70ee1e36f3a8c1852821e9fe54666c27a120463 --- /dev/null +++ b/planimod-icons/src/main/svg/planimod_128.svg @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index dc22fc77ad074b28baca6d653aebc572d8a33436..87d12b20a80764f18345a75a3ee3015777d12be9 100644 --- a/pom.xml +++ b/pom.xml @@ -1,24 +1,30 @@ - + 4.0.0 - com.patrikdufresne.planimod - com.patrikdufresne.planimod-parent - 0.2.32-SNAPSHOT + com.patrikdufresne + planimod-parent + ${revision} pom - Planimod :: Top + planimod + http://patrikdufresne.com/fr/planimod + planimod-icons com.patrikdufresne.planimod com.patrikdufresne.planimod-installation-package + 1.8 + 1.8 UTF-8 + 4.2.1 - + scm:git:http://git.patrikdufresne.com/pdsl/planimod.git - HEAD - + HEAD + @@ -26,53 +32,32 @@ http://nexus.patrikdufresne.com/content/groups/public/ - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - 1.6 - 1.6 - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.7 - - true - - - - - maven-release-plugin - 2.4.2 - - - org.apache.maven.scm - maven-scm-provider-gitexe - 1.8.1 - - - - - - http://patrikdufresne.com/planimod + + + + org.eclipse.swt + org.eclipse.swt.win32.win32.x86 + ${swt.version} + provided + + + org.eclipse.swt + org.eclipse.swt.win32.win32.x86_64 + ${swt.version} + provided + + + org.eclipse.swt + org.eclipse.swt.gtk.linux.x86 + ${swt.version} + provided + + + org.eclipse.swt + org.eclipse.swt.gtk.linux.x86_64 + ${swt.version} + provided + + + \ No newline at end of file