From 426f73041de57fbeeefedd4817d1c7db8527b631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Llorens?= Date: Thu, 3 Nov 2016 12:17:17 +0100 Subject: [PATCH] no message --- package/{windows => resources}/modpath.iss | 0 package/windows/DPF Manager.iss | 90 +++++ pom.xml | 311 +++++++++++++++--- .../shell/core/util/VersionUtil.java | 3 +- 4 files changed, 361 insertions(+), 43 deletions(-) rename package/{windows => resources}/modpath.iss (100%) create mode 100644 package/windows/DPF Manager.iss diff --git a/package/windows/modpath.iss b/package/resources/modpath.iss similarity index 100% rename from package/windows/modpath.iss rename to package/resources/modpath.iss diff --git a/package/windows/DPF Manager.iss b/package/windows/DPF Manager.iss new file mode 100644 index 00000000..b96d1645 --- /dev/null +++ b/package/windows/DPF Manager.iss @@ -0,0 +1,90 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{0D5B5F16-9992-49DC-AD65-D66FE249CE67} +AppName=DPF Manager +AppVersion=3.0 +AppVerName=DPF Manager {#SetupSetting("AppVersion")} +AppPublisher=DPF Manager +AppComments=DPF Manager +AppCopyright=Copyright (C) 2015-2016 +AppPublisherURL=http://dpfmanager.org/ +AppSupportURL=http://dpfmanager.org/ +AppUpdatesURL=http://dpfmanager.org/ +UsePreviousAppDir=no +;DefaultDirName={localappdata}\DPF Manager +DefaultDirName={pf}\DPF Manager +DefaultGroupName=DPF Manager +OutputBaseFilename=DPF Manager-{#SetupSetting("AppVersion")} +Compression=lzma +SolidCompression=yes +PrivilegesRequired=admin +SetupIconFile=DPF Manager\DPF Manager.ico +UninstallDisplayIcon={app}\DPF Manager.ico +UninstallDisplayName=DPF Manager +ArchitecturesInstallIn64BitMode=x64 +ChangesEnvironment=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: modifypath; Description: "Add application directory to your system path" + +[Files] +Source: "DPF Manager\DPF Manager.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "DPF Manager\app\dpf-manager-console.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "DPF Manager\*"; DestDir: "{app}"; Excludes: "*.exe,resources"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "DPF Manager\app\resources\*"; DestDir: "{app}"; Excludes: "*.dpf,*.iss"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "DPF Manager\app\resources\*.dpf"; DestDir: "{%HOMEPATH}\DPF Manager"; Flags: ignoreversion + +[Icons] +Name: "{group}\DPF Manager"; Filename: "{app}\DPF Manager.exe" +Name: "{commondesktop}\DPF Manager"; Filename: "{app}\DPF Manager.exe"; Tasks: desktopicon + +[Run] +Filename: "{app}\DPF Manager.exe"; Description: "{cm:LaunchProgram,DPFManager}"; Flags: nowait postinstall skipifsilent + +[UninstallDelete] +Type: dirifempty; Name: "{pf}\DPF Manager" + +[Code] +const + ModPathName = 'modifypath'; + ModPathType = 'user'; + +Procedure customUninstall(); +var + mRes : integer; +begin + // Ask for delete DPF Manager folder + mRes := MsgBox('Do you want to remove also the reports and configuration files?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) + // Line breaks with with ' #13#13 ' + if mRes = IDYES then begin + // Delete config files + DeleteFile('{%HOMEPATH}\DPF Manager\*.dpf'); + // Delete data folder + DelTree('{%HOMEPATH}\DPF Manager\data', True, True, True); + // Delete reports directory recursively + DelTree('{%HOMEPATH}\DPF Manager\reports', True, True, True); + // Delete DPF Manager user folder only if empty + RemoveDir('{%HOMEPATH}\DPF Manager'); + end; +end; + +function ModPathDir(): TArrayOfString; +begin + setArrayLength(Result, 1) + Result[0] := ExpandConstant('{app}'); +end; +// Fixed for javapackager +#include "DPF Manager\app\resources\modpath.iss" + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fd302c02..6818c8a0 100644 --- a/pom.xml +++ b/pom.xml @@ -464,17 +464,66 @@ + - + + windows Windows + + !installers + + + + DPF Manager + + + + com.zenjava + javafx-maven-plugin + 8.7.0 + + ${gui.class} + true + ${project.build.directory}/jfx/app + ${project.name}-jfx.jar + ${project.name} + ALL + true + true + ${project.name} + + + + create-jfxjar + package + + build-jar + + + + + + + + + + + windows-installers + + + Windows + + + installers + DPF Manager @@ -486,7 +535,7 @@ javafx-maven-plugin 8.4.0 - ${main.class} + ${gui.class} true ${project.build.directory}/jfx/app ${project.name}-jfx.jar @@ -507,27 +556,21 @@ - + com.akathist.maven.plugins.launch4j launch4j-maven-plugin - 1.7.12 + 1.7.7 - l4j-clui package - - launch4j - + launch4j console - ${project.basedir}/package/windows/${project.name}.ico - - ${project.name}-jfx.jar - - ${project.build.directory}/jfx/app/dpf-manager-console.exe - + ${project.basedir}/package/windows/${project.name}.ico + app/${project.name}-jfx.jar + ${project.build.directory}/jfx/app/dpf-manager-console.exe true . @@ -536,48 +579,46 @@ anything - 1.8.0_60 + 1.8.0 - + + + + + + maven-resources-plugin + 2.7 + - l4j-gui + copy-resources package - launch4j + copy-resources - gui - ${project.basedir}/package/windows/${project.name}.ico - - ${project.name}-jfx.jar - ${project.build.directory}/jfx/app/DPF Manager.exe - - true - . - - ${gui.class} - false - anything - - - 1.8.0_60 - + ${project.build.directory}/jfx/app/resources + + + package/resources + false + + + org.codehaus.mojo exec-maven-plugin 1.4.0 - read-version - process-classes + compile java @@ -589,7 +630,7 @@ - + package-exe package @@ -597,10 +638,69 @@ exec - cmd + javapackager + + -deploy + -native + exe + -embedjnlp + -v + -appclass + ${gui.class} + + -name + ${project.name} + -title + ${project.name} + -vendor + ${project.name} + + -srcdir + ${project.build.directory}/jfx/app + + -outdir + ${project.build.directory}/jfx/native + -outfile + ${project.name} + + -Bruntime= + + + + + + package-exe-java + package + + exec + + + javapackager - /C - build-windows.bat + -deploy + -native + exe + -embedjnlp + -v + -appclass + ${gui.class} + + -name + ${project.name} + -title + ${project.name} + -vendor + ${project.name} + + -srcdir + ${project.build.directory}/jfx/app + + -outdir + ${project.build.directory}/jfx/java + -outfile + ${project.name} + + -Bruntime=C:\Program Files\Zulu\zulu-8\jre @@ -611,13 +711,16 @@ - + not-win-deploy !Windows + + !installers + DPF Manager @@ -693,6 +796,132 @@ + + + not-win-deploy + + + !Windows + + + installers + + + + DPF Manager + + + + + org.codehaus.mojo + exec-maven-plugin + 1.4.0 + + + read-version + process-classes + + java + + + ${version.util.class} + + ${project.version} + ${project.basedir} + + + + + + + + + com.zenjava + javafx-maven-plugin + 8.7.0 + + + create-jfxjar + package + + build-jar + + + ${main.class} + true + ${project.build.directory}/jfx/app + ${project.build.finalName}-jfx.jar + + ${project.basedir} + ${project.build.finalName} + ${project.build.directory}/jfx/native + ALL + ${project.version} + true + true + ${project.name} + ${project.basedir}/package/resources + + + + + create-native + package + + build-native + + + ${main.class} + true + ${project.build.directory}/jfx/app + ${project.build.finalName}-jfx.jar + + ${project.basedir} + ${project.build.finalName} + ${project.build.directory}/jfx/native + ALL + ${project.version} + true + true + ${project.name} + ${project.basedir}/package/resources + + + + + + + + create-native-java + package + + build-native + + + ${main.class} + true + ${project.build.directory}/jfx/app + ${project.build.finalName}-jfx.jar + + ${project.basedir} + ${project.build.finalName} + ${project.build.directory}/jfx/java + ALL + ${project.version} + true + true + ${project.name} + ${project.basedir}/package/resources + + + + + + + + + + release-sign-artifacts diff --git a/src/main/java/dpfmanager/shell/core/util/VersionUtil.java b/src/main/java/dpfmanager/shell/core/util/VersionUtil.java index 786707bb..c1a241d1 100644 --- a/src/main/java/dpfmanager/shell/core/util/VersionUtil.java +++ b/src/main/java/dpfmanager/shell/core/util/VersionUtil.java @@ -37,11 +37,10 @@ public static void main(String[] args) { String version = args[0]; String baseDir = args[1]; - String issPath = baseDir + "/build-windows.iss"; + String issPath = baseDir + "/package/windows/DPF Manager.iss"; String rpmPath = baseDir + "/package/linux/DPFManager.old.spec"; String propOutput = baseDir + "/target/classes/version.properties"; - // Windows iss try { // Windows iss File issFile = new File(issPath);