branch develop updated (410b9db -> 06037f2)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See http://git.codelutin.com/tutti.git from 410b9db refactor new 709bf74 utilisation d'alias dans les configurations (cela simplifie l'ecriture des scripts de lancement) new 2d95c75 ajout du module de lancement new c5e667d ajout du module de mise à jour new fe6e892 mise en place des nouveaux modules et du packaging new 70df547 nettoyage scripts new df7ada6 lors de la suppression d'une base, nettoyage aussi des pieces jointes associées new b1e3b89 be able to change distro url new c1a7d2f launcher does not have the same version (and even should not be part of main build) new 6c1600f at release time ask for version of each module new cdf020f suppression du module launcher (c'est un proet à part) new 84d4aaf amelioration de la definition de distrourl new 818d7b6 utilisation de tutti-launcher (mais pas inclut comme dépendance du module ui) new c4735b6 copie du launcher au bon endroit new 1b67b84 fix application directory new c6126b5 amelioration du code de mise à jour new 008931c do not use bin classifier on launcher + fix updater dependency scope new 7f0238d improve code new e80e9eb add report null module + fix assembly new aec898a fix report path new 9ea20f1 fix readme new 35cd499 Do not delete i18n component when updates tutti new e2a97c5 improve updater code new 06fc14d remove code new 02e8bf4 improve assembly files new 416435e use tutti-launcher 1.0 new 06037f2 merge 6376 to develop The 26 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 06037f2be6a1944baf87856b903058a4cf64ba58 Merge: 410b9db 416435e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 18:22:53 2015 +0100 merge 6376 to develop commit 416435ef854088c50585f8bb805b24d056e30d08 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:49:53 2015 +0100 use tutti-launcher 1.0 commit 02e8bf4f74ecceed42e9c018832494cbdc4af2e4 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:58 2015 +0100 improve assembly files commit 06fc14d17a5cd48f16a74fe553e872ec0a2fa8cb Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:31 2015 +0100 remove code commit e2a97c583e1b0d778deca578fc84b63596dc1b24 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:06 2015 +0100 improve updater code commit 35cd49942498ee8fdbd61dc33fdc802a02860c18 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:10:25 2015 +0100 Do not delete i18n component when updates tutti commit 9ea20f1e8b983a051ee3775714e8a2d31a10cc10 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 13:34:00 2015 +0100 fix readme commit aec898aa651fc14f379b42cf94fe3487c24341c2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 13:33:44 2015 +0100 fix report path commit e80e9eb2525cf314e423de84562c2b311386df85 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 12:17:26 2015 +0100 add report null module + fix assembly commit 7f0238dad854d4eb80843c7d0cf07c8f2f86eb33 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 12:17:02 2015 +0100 improve code commit 008931c31b70b1a2795e32a83179941b4365d6e4 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 11:48:48 2015 +0100 do not use bin classifier on launcher + fix updater dependency scope commit c6126b531306711070d0f5812fe4b7a9b5bb008e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 11:35:43 2015 +0100 amelioration du code de mise à jour commit 1b67b843efa202f7ffaf6fd4f4217c7d49442346 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 09:57:46 2015 +0100 fix application directory commit c4735b6eb39a3a8b3583b465a4507ed58c0b37f0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 17:09:10 2015 +0100 copie du launcher au bon endroit commit 818d7b6b36d4d64bf3f60006b433fc7906010f7c Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 16:21:20 2015 +0100 utilisation de tutti-launcher (mais pas inclut comme dépendance du module ui) commit 84d4aaf9f1ad027bbbb3c9f61726ac4a962cbb69 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 16:20:03 2015 +0100 amelioration de la definition de distrourl commit cdf020f1f31fd063d2266fbcf02fec7c63840ca9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 16:19:21 2015 +0100 suppression du module launcher (c'est un proet à part) commit 6c1600fdd74903e4cb0adfbf796a6f7ffde59d82 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 14:54:55 2015 +0100 at release time ask for version of each module commit c1a7d2f030dda697073b9385d7dc718bd795638b Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 14:40:17 2015 +0100 launcher does not have the same version (and even should not be part of main build) commit b1e3b896c565a9829eb819344d1b1ba132bda907 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 14:36:48 2015 +0100 be able to change distro url commit df7ada6b2d109d8acde4e5fbaa187c37b8b4affc Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 14:12:10 2015 +0100 lors de la suppression d'une base, nettoyage aussi des pieces jointes associées commit 70df5471167efefa58c423695a70f1a73335b6b0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 14:11:44 2015 +0100 nettoyage scripts commit fe6e892e3fdd24aaaca9268c97f4fbb028712e9c Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 13:45:20 2015 +0100 mise en place des nouveaux modules et du packaging commit c5e667d194ae4b7e54e4951d703eb329d912279b Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 13:39:42 2015 +0100 ajout du module de mise à jour commit 2d95c75698a260aa35e818b56796ff3b092116e6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 13:39:20 2015 +0100 ajout du module de lancement commit 709bf74105b48842dbff3374de10258163dcafb2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Jan 3 11:09:07 2015 +0100 utilisation d'alias dans les configurations (cela simplifie l'ecriture des scripts de lancement) Summary of changes: pom.xml | 22 ++ src/update/tutti-application.properties | 15 +- .../java/fr/ifremer/tutti/TuttiConfiguration.java | 6 + .../LICENSE.txt | 0 .../README.txt | 0 tutti-ui-swing-updater/pom.xml | 70 +++++ .../tutti/ui/swing/updater/DeleteHelper.java | 143 +++++++++ .../fr/ifremer/tutti/ui/swing/updater/Module.java | 34 ++ .../fr/ifremer/tutti/ui/swing/updater/Updater.java | 344 +++++++++++++++++++++ .../src/main/resources/update_runtime.bat | 31 ++ .../src/main/resources/update_runtime.sh | 36 +++ tutti-ui-swing/pom.xml | 76 +++++ .../{help.xml => full-linux-component.xml} | 43 +-- .../src/main/assembly/full-linux-i586.xml | 5 +- .../src/main/assembly/full-linux-x64.xml | 5 +- ...ull-component.xml => full-shared-component.xml} | 86 ++++-- .../src/main/assembly/full-windows-component.xml | 64 ++-- .../src/main/assembly/full-windows-i586.xml | 5 +- .../src/main/assembly/full-windows-x64.xml | 5 +- tutti-ui-swing/src/main/assembly/full/README.txt | 4 +- .../src/main/assembly/full/linux/tutti-sanity.sh | 10 + .../src/main/assembly/full/linux/tutti.sh | 10 + .../src/main/assembly/full/tutti-sanity.bat | 44 --- .../src/main/assembly/full/tutti-sanity.sh | 41 --- tutti-ui-swing/src/main/assembly/full/tutti.bat | 44 --- tutti-ui-swing/src/main/assembly/full/tutti.sh | 41 --- .../main/assembly/full/windows/tutti-sanity.bat | 3 + .../src/main/assembly/launcher/version.appup | 1 + tutti-ui-swing/src/main/assembly/min/launch.bat | 10 - tutti-ui-swing/src/main/assembly/min/launch.sh | 15 - .../min/launcher.properties} | 17 +- tutti-ui-swing/src/main/assembly/min/update.bat | 84 ----- tutti-ui-swing/src/main/assembly/min/update.sh | 74 ----- .../main/assembly/{full => }/report/version.appup | 0 tutti-ui-swing/src/main/assembly/standalone.xml | 6 +- .../ui/swing/TuttiApplicationUpdaterCallBack.java | 8 - 36 files changed, 929 insertions(+), 473 deletions(-) copy tutti-ichtyometer/README.txt => tutti-ui-swing-updater/LICENSE.txt (100%) copy {tutti-ichtyometer => tutti-ui-swing-updater}/README.txt (100%) create mode 100644 tutti-ui-swing-updater/pom.xml create mode 100644 tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/DeleteHelper.java create mode 100644 tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java create mode 100644 tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java create mode 100644 tutti-ui-swing-updater/src/main/resources/update_runtime.bat create mode 100644 tutti-ui-swing-updater/src/main/resources/update_runtime.sh copy tutti-ui-swing/src/main/assembly/{help.xml => full-linux-component.xml} (59%) rename tutti-ui-swing/src/main/assembly/{tutti-full-component.xml => full-shared-component.xml} (69%) copy tutti-ichtyometer/src/main/assembly/tools.xml => tutti-ui-swing/src/main/assembly/full-windows-component.xml (52%) create mode 100644 tutti-ui-swing/src/main/assembly/full/linux/tutti-sanity.sh create mode 100644 tutti-ui-swing/src/main/assembly/full/linux/tutti.sh delete mode 100644 tutti-ui-swing/src/main/assembly/full/tutti-sanity.bat delete mode 100644 tutti-ui-swing/src/main/assembly/full/tutti-sanity.sh delete mode 100644 tutti-ui-swing/src/main/assembly/full/tutti.bat delete mode 100644 tutti-ui-swing/src/main/assembly/full/tutti.sh create mode 100644 tutti-ui-swing/src/main/assembly/full/windows/tutti-sanity.bat create mode 100644 tutti-ui-swing/src/main/assembly/launcher/version.appup delete mode 100644 tutti-ui-swing/src/main/assembly/min/launch.bat delete mode 100755 tutti-ui-swing/src/main/assembly/min/launch.sh copy tutti-ui-swing/src/main/{filtered-resources/tutti.config => assembly/min/launcher.properties} (67%) delete mode 100644 tutti-ui-swing/src/main/assembly/min/update.bat delete mode 100644 tutti-ui-swing/src/main/assembly/min/update.sh rename tutti-ui-swing/src/main/assembly/{full => }/report/version.appup (100%) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit c4735b6eb39a3a8b3583b465a4507ed58c0b37f0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 22 17:09:10 2015 +0100 copie du launcher au bon endroit --- .../src/main/assembly/full-linux-component.xml | 26 +++++++++++++++++++++- .../src/main/assembly/full-windows-component.xml | 24 ++++++++++++++++++++ .../src/main/assembly/min/launcher.properties | 23 +++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/tutti-ui-swing/src/main/assembly/full-linux-component.xml b/tutti-ui-swing/src/main/assembly/full-linux-component.xml index 9039a7a..e32da6d 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-component.xml @@ -1,4 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Tutti :: UI + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2012 - 2015 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" @@ -18,7 +42,7 @@ <files> <file> <source>${project.build.directory}/tutti-launcher-${launcherVersion}.jar</source> - <outputDirectory>tutti</outputDirectory> + <outputDirectory/> <destName>launcher.jar</destName> </file> </files> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 8e228b8..5e84a9c 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -1,4 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Tutti :: UI + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2012 - 2015 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" diff --git a/tutti-ui-swing/src/main/assembly/min/launcher.properties b/tutti-ui-swing/src/main/assembly/min/launcher.properties index 9048ef8..d9b292b 100644 --- a/tutti-ui-swing/src/main/assembly/min/launcher.properties +++ b/tutti-ui-swing/src/main/assembly/min/launcher.properties @@ -1,3 +1,26 @@ +### +# #%L +# Tutti :: UI +# $Id:$ +# $HeadURL:$ +# %% +# Copyright (C) 2012 - 2015 Ifremer +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### JAR=tutti/${project.build.finalName}.${project.packaging} LOGFILE=data/tutti.log JAVA_OPTS="-XX:MaxPermSize=128M -XX:PermSize=64M -XX:MaxNewSize=32M -XX:NewSize=32M -Xms256m -Xmx1024m" -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 1b67b843efa202f7ffaf6fd4f4217c7d49442346 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 09:57:46 2015 +0100 fix application directory --- tutti-ui-swing/src/main/assembly/full-windows-component.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 5e84a9c..918f6fc 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -68,7 +68,7 @@ <!-- tutti component --> <fileSet> <directory>target</directory> - <outputDirectory>obsdeb</outputDirectory> + <outputDirectory>tutti</outputDirectory> <includes> <include>${project.build.finalName}.${project.packaging}</include> </includes> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit c6126b531306711070d0f5812fe4b7a9b5bb008e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 11:35:43 2015 +0100 amelioration du code de mise à jour --- .../fr/ifremer/tutti/ui/swing/updater/Module.java | 34 ++++ .../swing/updater/RecursiveDeleteFileVisitor.java | 61 ++++++ .../fr/ifremer/tutti/ui/swing/updater/Updater.java | 225 +++++++++++++-------- 3 files changed, 234 insertions(+), 86 deletions(-) diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java new file mode 100644 index 0000000..5ecd331 --- /dev/null +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java @@ -0,0 +1,34 @@ +package fr.ifremer.tutti.ui.swing.updater; + +/** +* Created on 1/26/15. +* +* @author Tony Chemit - chemit@codelutin.com +* @since 3.12 +*/ +public enum Module { + + launcher(true), + jre(true), + + application(false), + i18n(false), + help(false), + report(false), + ichtyometer(false); + + private final boolean runtimeUpdate; + + Module(boolean runtimeUpdate) { + this.runtimeUpdate = runtimeUpdate; + } + + public boolean isRuntimeUpdate() { + return runtimeUpdate; + } + + public String getModuleLoggerName() { + String moduleNameStr = String.format("[%s$10s]", name()); + return moduleNameStr; + } +} diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java new file mode 100644 index 0000000..ccc6f7a --- /dev/null +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java @@ -0,0 +1,61 @@ +package fr.ifremer.tutti.ui.swing.updater; + +import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.PathMatcher; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; + +/** + * Created on 1/26/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.12 + */ +public class RecursiveDeleteFileVisitor extends SimpleFileVisitor<Path> { + + public static RecursiveDeleteFileVisitor newVisitor() { + return new RecursiveDeleteFileVisitor(null); + } + + public static RecursiveDeleteFileVisitor newVisitor(Path baseDir, String glob) { + + PathMatcher matcher; + if (glob != null) { + matcher = baseDir.getFileSystem().getPathMatcher("glob:" + glob); + } else { + matcher = null; + } + return new RecursiveDeleteFileVisitor(matcher); + } + + private final PathMatcher matcher; + + protected RecursiveDeleteFileVisitor(PathMatcher matcher) { + this.matcher = matcher; + } + + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + + // If the file name matches the glob or if no matcher, delete the file + if (matcher == null || matcher.matches(file.getFileName())) { + Files.deleteIfExists(file); + } + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + + // if no matcher, delete the directory + if (matcher == null) { + Files.deleteIfExists(dir); + } + + return FileVisitResult.CONTINUE; + } + +} diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java index 54b05b4..a8904fd 100644 --- a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java @@ -5,44 +5,33 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.nio.charset.StandardCharsets; -import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.PathMatcher; import java.nio.file.Paths; -import java.nio.file.SimpleFileVisitor; import java.nio.file.StandardCopyOption; -import java.nio.file.attribute.BasicFileAttributes; +import java.nio.file.attribute.PosixFilePermission; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** - * @author Ludovic Pecquot <ludovic.pecquot@e-is.pro> + * @author Ludovic Pecquot (ludovic.pecquot@e-is.pro) + * @author tony Chemit (chemit@codelutin.com) + * @since 3.12 */ public class Updater { - public static final String APPLICATION_UPDATER_TITLE = "Allegro Campagne UI Updater"; + public static final String APPLICATION_UPDATER_TITLE = "Allegro Campaign UI Updater"; public static final String NEW_DIR = "NEW"; public static final String OLD_DIR = "OLD"; - public static final String JRE_DIR = "jre"; - public static final String LAUNCHER_DIR = "launcher"; - public static final String APPLICATION_DIR = "tutti"; - - public static final String I18N_DIR = "i18n"; - - public static final String HELP_DIR = "help"; - - public static final String REPORT_DIR = "report"; - - public static final String ICHTYOMETER_DIR = "report"; - public static final String UPDATE_RUNTIME_CMD = "update_runtime"; public static final String BATCH_WINDOWS_EXT = ".bat"; @@ -88,8 +77,22 @@ public class Updater { } + private Path getBackupDirectory() throws IOException { + + Path backupDirectory = baseDir.resolve(OLD_DIR); + if (!Files.isDirectory(backupDirectory)) { + Files.createDirectory(backupDirectory); + } + + return backupDirectory; + + } + + public int execute() { + System.out.println("updater started at " + new Date().toString()); + int exitCode; try { @@ -117,6 +120,8 @@ public class Updater { } + System.out.println("updater ended at " + new Date().toString()); + return exitCode; } @@ -131,10 +136,23 @@ public class Updater { boolean mustUpdateRuntime = false; - if (Files.isDirectory(baseDir.resolve(NEW_DIR).resolve(JRE_DIR)) - || Files.isDirectory(baseDir.resolve(NEW_DIR).resolve(LAUNCHER_DIR))) { + for (Module module : Module.values()) { + + if (module.isRuntimeUpdate()) { + + boolean updateFound = updateRuntimeModule(module); + + if (updateFound) { + mustUpdateRuntime = true; + } + + } + + } - // A new jre or/and a new launcher is available, so generate the script + if (mustUpdateRuntime) { + + // A runtime update is available, so generate the script URL resource = getClass().getResource("/" + scriptFilename); try (InputStream stream = resource.openStream()) { @@ -143,10 +161,11 @@ public class Updater { } + makeExecutable(runtimeUpdater); + String message = String.format("Runtime updates available.\nYou must execute '%s' manually to apply new runtime.", runtimeUpdater.getFileName()); System.out.println(message); JOptionPane.showMessageDialog(null, message); - mustUpdateRuntime = true; } @@ -156,49 +175,96 @@ public class Updater { protected void launchUpdate() throws IOException { - // Compute the date to create backup directories - Date now = new Date(); + for (Module module : Module.values()) { - System.out.println("updater started at " + now.toString()); + if (!module.isRuntimeUpdate()) { - updateModule(baseDir, APPLICATION_DIR); - updateModule(baseDir, I18N_DIR); - updateModule(baseDir, HELP_DIR); - updateModule(baseDir, REPORT_DIR); - updateModule(baseDir, ICHTYOMETER_DIR); + updateModule(module); + + } + } // Cleaning process cleanObsoleteFiles(); cleanPath(baseDir.resolve(NEW_DIR)); - System.out.println("updater ended at " + new Date().toString()); + } + + protected boolean updateRuntimeModule(Module module) throws IOException { + + boolean updateFound; + String moduleName = module.name(); + + String moduleNameStr = module.getModuleLoggerName(); + + Path moduleNewPath = baseDir.resolve(NEW_DIR).resolve(moduleName); + + if (Files.isDirectory(moduleNewPath)) { + + String newVersion = getVersion(moduleNewPath); + + System.out.println(String.format("%s New version detected %s", moduleNameStr, newVersion)); + + Path backupDirectory = getBackupDirectory(); + + // Remove older backup + System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory)); + cleanPath(backupDirectory, moduleName + "-*"); + + updateFound = true; + + } else { + + System.out.println(String.format("%s No update.", moduleNameStr)); + + updateFound = false; + } + + return updateFound; } - private void updateModule(Path basePath, String moduleName) throws IOException { + private void updateModule(Module module) throws IOException { + + String moduleName = module.name(); + + String moduleNameStr = module.getModuleLoggerName(); - // Update a single module. moduleName corresponds to the name of the directory inside the basePath - Path modulePath = basePath.resolve(moduleName); - Path moduleNewPath = basePath.resolve(NEW_DIR).resolve(moduleName); + // Update a single module. moduleName corresponds to the name of the directory inside the baseDir + Path moduleNewPath = baseDir.resolve(NEW_DIR).resolve(moduleName); if (Files.isDirectory(moduleNewPath)) { + String newVersion = getVersion(moduleNewPath); + System.out.println(String.format("%s New version detected %s", moduleNameStr, newVersion)); + + Path backupDirectory = getBackupDirectory(); + + // Remove older backup + System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory)); + cleanPath(backupDirectory, moduleName + "-*"); + // Backup existing module + Path modulePath = baseDir.resolve(moduleName); if (Files.isDirectory(modulePath)) { String oldVersion = getVersion(modulePath); - Path moduleOldPath = basePath.resolve(OLD_DIR).resolve(String.format("%s-%s-%s", moduleName, oldVersion, backupDate)); - System.out.println(String.format("backup %s %s to %s", moduleName, oldVersion, moduleOldPath.toString())); - if (!Files.isDirectory(basePath.resolve(OLD_DIR))) { - Files.createDirectory(basePath.resolve(OLD_DIR)); - } + Path moduleOldPath = backupDirectory.resolve(String.format("%s-%s-%s", moduleNameStr, oldVersion, backupDate)); + System.out.println(String.format("%s Backup old version %s to %s", moduleNameStr, oldVersion, moduleOldPath.toString())); + Files.move(modulePath, moduleOldPath); } // Installing new module - System.out.println(String.format("install %s %s", moduleName, newVersion)); + System.out.println(String.format("%s Install new version %s", moduleNameStr, newVersion)); Files.move(moduleNewPath, modulePath, StandardCopyOption.REPLACE_EXISTING); + + } else { + + System.out.println(String.format("%s No update.", moduleNameStr)); + } + } private String getVersion(Path path) throws IOException { @@ -214,30 +280,55 @@ public class Updater { private void cleanPath(Path path) throws IOException { if (Files.isDirectory(path)) { - Files.walkFileTree(path, new RecursiveDeleteFileVisitor()); + Files.walkFileTree(path, RecursiveDeleteFileVisitor.newVisitor()); } } private void cleanPath(Path path, String glob) throws IOException { if (Files.isDirectory(path)) { - Files.walkFileTree(path, new RecursiveDeleteFileVisitor(glob)); + Files.walkFileTree(path, RecursiveDeleteFileVisitor.newVisitor(baseDir, glob)); + } + } + + protected void makeExecutable(Path path) throws IOException { + + if (!windowsOS) { + + Set<PosixFilePermission> perms = new HashSet<>(); + //add owners permission + perms.add(PosixFilePermission.OWNER_READ); + perms.add(PosixFilePermission.OWNER_WRITE); + perms.add(PosixFilePermission.OWNER_EXECUTE); + //add group permissions + perms.add(PosixFilePermission.GROUP_READ); + perms.add(PosixFilePermission.GROUP_WRITE); + perms.add(PosixFilePermission.GROUP_EXECUTE); + //add others permissions + perms.add(PosixFilePermission.OTHERS_READ); + perms.add(PosixFilePermission.OTHERS_EXECUTE); + + Files.setPosixFilePermissions(path, perms); + } + } private void cleanObsoleteFiles() throws IOException { + Path applicationDirectoryPath = baseDir.resolve(Module.application.name()); + if (windowsOS) { // Delete obsolete batch files Files.deleteIfExists(baseDir.resolve("tutti.bat")); - Files.deleteIfExists(baseDir.resolve(APPLICATION_DIR).resolve("launch.bat")); + Files.deleteIfExists(applicationDirectoryPath.resolve("launch.bat")); // Delete non Windows files cleanPath(baseDir, "*" + BATCH_UNIX_EXT); } else { // Delete obsolete script files - Files.deleteIfExists(baseDir.resolve(APPLICATION_DIR).resolve("launch.sh")); + Files.deleteIfExists(applicationDirectoryPath.resolve("launch.sh")); // Delete Windows files cleanPath(baseDir, "*" + BATCH_WINDOWS_EXT); @@ -245,49 +336,11 @@ public class Updater { } // Delete embedded files - Files.deleteIfExists(baseDir.resolve(APPLICATION_DIR).resolve("tutti.exe")); - Files.deleteIfExists(baseDir.resolve(APPLICATION_DIR).resolve("tutti.sh")); - cleanPath(baseDir.resolve(APPLICATION_DIR).resolve("launcher")); + Files.deleteIfExists(applicationDirectoryPath.resolve("tutti.exe")); + Files.deleteIfExists(applicationDirectoryPath.resolve("tutti.sh")); + cleanPath(applicationDirectoryPath.resolve("launcher")); } - private class RecursiveDeleteFileVisitor extends SimpleFileVisitor<Path> { - - PathMatcher matcher; - - public RecursiveDeleteFileVisitor() { - // no matcher == delete all - } - - public RecursiveDeleteFileVisitor(String glob) { - super(); - - // Create a matcher according the glob parameter - matcher = baseDir.getFileSystem().getPathMatcher("glob:" + glob); - } - - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - - // If the file name matches the glob or if no matcher, delete the file - if (matcher == null || matcher.matches(file.getFileName())) { - Files.deleteIfExists(file); - } - return FileVisitResult.CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { - - // if no matcher, delete the directory - if (matcher == null) { - Files.deleteIfExists(dir); - } - - return FileVisitResult.CONTINUE; - } - - } - } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 008931c31b70b1a2795e32a83179941b4365d6e4 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 11:48:48 2015 +0100 do not use bin classifier on launcher + fix updater dependency scope --- tutti-ui-swing/pom.xml | 3 +-- tutti-ui-swing/src/main/assembly/full-windows-component.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tutti-ui-swing/pom.xml b/tutti-ui-swing/pom.xml index 9dff5a6..dc1588b 100644 --- a/tutti-ui-swing/pom.xml +++ b/tutti-ui-swing/pom.xml @@ -114,6 +114,7 @@ <groupId>${project.groupId}</groupId> <artifactId>tutti-ui-swing-updater</artifactId> <version>${project.version}</version> + <scope>runtime</scope> </dependency> <!-- Adagio --> @@ -719,7 +720,6 @@ <artifactId>tutti-launcher</artifactId> <version>${launcherVersion}</version> <type>exe</type> - <classifier>bin</classifier> </artifactItem> </artifactItems> </configuration> @@ -804,7 +804,6 @@ <artifactId>tutti-launcher</artifactId> <version>${launcherVersion}</version> <type>exe</type> - <classifier>bin</classifier> </artifactItem> </artifactItems> </configuration> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 918f6fc..8d56f8c 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -41,7 +41,7 @@ <files> <file> - <source>${project.build.directory}/tutti-launcher-${launcherVersion}-bin.exe</source> + <source>${project.build.directory}/tutti-launcher-${launcherVersion}.exe</source> <outputDirectory/> <destName>tutti.exe</destName> </file> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 7f0238dad854d4eb80843c7d0cf07c8f2f86eb33 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 12:17:02 2015 +0100 improve code --- .../java/fr/ifremer/tutti/ui/swing/updater/Module.java | 14 +++++++------- .../java/fr/ifremer/tutti/ui/swing/updater/Updater.java | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java index 5ecd331..8a45e7d 100644 --- a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Module.java @@ -11,24 +11,24 @@ public enum Module { launcher(true), jre(true), - application(false), + tutti(false), i18n(false), help(false), report(false), ichtyometer(false); - private final boolean runtimeUpdate; + private final boolean runtimeModule; - Module(boolean runtimeUpdate) { - this.runtimeUpdate = runtimeUpdate; + Module(boolean runtimeModule) { + this.runtimeModule = runtimeModule; } - public boolean isRuntimeUpdate() { - return runtimeUpdate; + public boolean isRuntimeModule() { + return runtimeModule; } public String getModuleLoggerName() { - String moduleNameStr = String.format("[%s$10s]", name()); + String moduleNameStr = String.format("[Module %1$-20s]", name()); return moduleNameStr; } } diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java index a8904fd..ba95d2f 100644 --- a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java @@ -138,7 +138,7 @@ public class Updater { for (Module module : Module.values()) { - if (module.isRuntimeUpdate()) { + if (module.isRuntimeModule()) { boolean updateFound = updateRuntimeModule(module); @@ -177,7 +177,7 @@ public class Updater { for (Module module : Module.values()) { - if (!module.isRuntimeUpdate()) { + if (!module.isRuntimeModule()) { updateModule(module); @@ -215,7 +215,11 @@ public class Updater { } else { - System.out.println(String.format("%s No update.", moduleNameStr)); + Path modulePath = baseDir.resolve(moduleName); + + String newVersion = getVersion(modulePath); + + System.out.println(String.format("%s No update (current version: %s)", moduleNameStr, newVersion)); updateFound = false; } @@ -261,7 +265,10 @@ public class Updater { } else { - System.out.println(String.format("%s No update.", moduleNameStr)); + Path modulePath = baseDir.resolve(moduleName); + String newVersion = getVersion(modulePath); + + System.out.println(String.format("%s No update (current version: %s).", moduleNameStr, newVersion)); } @@ -315,7 +322,7 @@ public class Updater { private void cleanObsoleteFiles() throws IOException { - Path applicationDirectoryPath = baseDir.resolve(Module.application.name()); + Path applicationDirectoryPath = baseDir.resolve(Module.tutti.name()); if (windowsOS) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit e80e9eb2525cf314e423de84562c2b311386df85 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 12:17:26 2015 +0100 add report null module + fix assembly --- tutti-ui-swing/src/main/assembly/full-linux-component.xml | 11 ++++++++++- tutti-ui-swing/src/main/assembly/full-windows-component.xml | 9 +++++++++ .../src/main/assembly/{full => }/report/version.appup | 0 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tutti-ui-swing/src/main/assembly/full-linux-component.xml b/tutti-ui-swing/src/main/assembly/full-linux-component.xml index e32da6d..c7544db 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-component.xml @@ -107,7 +107,7 @@ <excludes> <exclude>*.sh</exclude> <exclude>*.bat</exclude> - <exclude>obsdeb.config</exclude> + <exclude>tutti.config</exclude> </excludes> </fileSet> @@ -158,5 +158,14 @@ </includes> </fileSet> + <!-- REPORT component --> + <fileSet> + <directory>src/main/report</directory> + <outputDirectory>report</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + </fileSets> </component> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 8d56f8c..05ec490 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -157,5 +157,14 @@ </includes> </fileSet> + <!-- REPORT component --> + <fileSet> + <directory>src/main/report</directory> + <outputDirectory>report</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + </fileSets> </component> diff --git a/tutti-ui-swing/src/main/assembly/full/report/version.appup b/tutti-ui-swing/src/main/assembly/report/version.appup similarity index 100% rename from tutti-ui-swing/src/main/assembly/full/report/version.appup rename to tutti-ui-swing/src/main/assembly/report/version.appup -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit aec898aa651fc14f379b42cf94fe3487c24341c2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 13:33:44 2015 +0100 fix report path --- tutti-ui-swing/src/main/assembly/full-linux-component.xml | 4 ++-- tutti-ui-swing/src/main/assembly/full-windows-component.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tutti-ui-swing/src/main/assembly/full-linux-component.xml b/tutti-ui-swing/src/main/assembly/full-linux-component.xml index c7544db..f0fab70 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-component.xml @@ -55,7 +55,7 @@ <filtered>true</filtered> <fileMode>0755</fileMode> <includes> - <include>tutti.sh</include> + <include>*.sh</include> <include>README*</include> </includes> </fileSet> @@ -160,7 +160,7 @@ <!-- REPORT component --> <fileSet> - <directory>src/main/report</directory> + <directory>src/main/assembly/report</directory> <outputDirectory>report</outputDirectory> <includes> <include>**/*</include> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 05ec490..033fc4c 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -55,6 +55,7 @@ <filtered>true</filtered> <fileMode>0755</fileMode> <includes> + <include>*.bat</include> <include>README*</include> </includes> </fileSet> @@ -159,7 +160,7 @@ <!-- REPORT component --> <fileSet> - <directory>src/main/report</directory> + <directory>src/main/assembly/report</directory> <outputDirectory>report</outputDirectory> <includes> <include>**/*</include> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 9ea20f1e8b983a051ee3775714e8a2d31a10cc10 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 13:34:00 2015 +0100 fix readme --- tutti-ui-swing/src/main/assembly/full/README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutti-ui-swing/src/main/assembly/full/README.txt b/tutti-ui-swing/src/main/assembly/full/README.txt index ff473e4..0212ede 100644 --- a/tutti-ui-swing/src/main/assembly/full/README.txt +++ b/tutti-ui-swing/src/main/assembly/full/README.txt @@ -3,7 +3,7 @@ Pour démarrer Allegro Campagne Saisie # Sous windows -tutti.bat +tutti.exe # Sous Linux @@ -27,4 +27,4 @@ Consulter l'aide L'aide en ligne est consultable dans l'application ou bien sur le site -http://doc.codelutin.com/tutti/help/fr/index.html +http://tutti.codelutin.com/v/latest/help/fr/index.html -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 35cd49942498ee8fdbd61dc33fdc802a02860c18 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:10:25 2015 +0100 Do not delete i18n component when updates tutti --- .../ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java index 613b613..6ccef48 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java @@ -204,14 +204,6 @@ public class TuttiApplicationUpdaterCallBack implements ApplicationUpdaterCallba TuttiConfiguration config = context.getConfig(); - //FIXME-check this is necessary: i18n is no more generated ? - // must also remove i18n directory - File i18nDirectory = context.getConfig().getI18nDirectory(); - ApplicationIOUtil.forceDeleteOnExit( - i18nDirectory, - t("tutti.applicationUpdater.updateDone.deleteDirectory.i18n.error", i18nDirectory) - ); - // must remove db cache directory File cacheDirectory = config.getCacheDirectory(); ApplicationIOUtil.forceDeleteOnExit( -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit e2a97c583e1b0d778deca578fc84b63596dc1b24 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:06 2015 +0100 improve updater code --- .../tutti/ui/swing/updater/DeleteHelper.java | 143 +++++++++++++++++++++ .../fr/ifremer/tutti/ui/swing/updater/Updater.java | 61 ++++----- 2 files changed, 169 insertions(+), 35 deletions(-) diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/DeleteHelper.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/DeleteHelper.java new file mode 100644 index 0000000..8d7bc16 --- /dev/null +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/DeleteHelper.java @@ -0,0 +1,143 @@ +package fr.ifremer.tutti.ui.swing.updater; + +import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.PathMatcher; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; + +/** + * Created on 1/26/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.12 + */ +public class DeleteHelper { + + public static void deleteDirectories(Path path, String glob) throws IOException { + + PathMatcher matcher = path.getFileSystem().getPathMatcher("glob:" + glob); + if (Files.isDirectory(path)) { + + DeleteDirectories deleteDirectories = new DeleteDirectories(matcher); + Files.walkFileTree(path, deleteDirectories); + } + + } + + public static void deleteFiles(Path path, String glob) throws IOException { + if (Files.isDirectory(path)) { + + PathMatcher matcher = path.getFileSystem().getPathMatcher("glob:" + glob); + DeleteFiles deleteFiles = new DeleteFiles(matcher); + Files.walkFileTree(path, deleteFiles); + } + + } + + public static void deleteDirectory(Path path) throws IOException { + if (Files.isDirectory(path)) { + DeleteDirectory deleteDirectory = new DeleteDirectory(); + Files.walkFileTree(path, deleteDirectory); + } + } + + /** + * To delete the given directory. + */ + public static class DeleteDirectory extends SimpleFileVisitor<Path> { + + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + Files.deleteIfExists(file); + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + Files.deleteIfExists(dir); + return FileVisitResult.CONTINUE; + } + + } + + /** + * To delete all files that are matching the given matcher. + */ + public static class DeleteFiles extends SimpleFileVisitor<Path> { + + private final PathMatcher matcher; + + protected DeleteFiles(PathMatcher matcher) { + this.matcher = matcher; + } + + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + + // If the file name matches the glob or if no matcher, delete the file + if (matcher.matches(file.getFileName())) { + Files.deleteIfExists(file); + } + return FileVisitResult.CONTINUE; + } + + } + + /** + * To delete all directories which names are matching the given matcher. + */ + public static class DeleteDirectories extends SimpleFileVisitor<Path> { + + private final PathMatcher matcher; + + protected DeleteDirectories(PathMatcher matcher) { + this.matcher = matcher; + } + + private Path deleteDir; + + @Override + public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { + + if (deleteDir == null) { + if (matcher.matches(dir.getFileName())) { + System.out.println("Match directory name to delete: " + dir); + deleteDir = dir; + } + } + return FileVisitResult.CONTINUE; + + } + + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + + if (deleteDir != null) { + Files.deleteIfExists(file); + } + return FileVisitResult.CONTINUE; + + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + + if (deleteDir != null) { + + Files.deleteIfExists(dir); + + if (dir.equals(deleteDir)) { + deleteDir = null; + } + + } + + return FileVisitResult.CONTINUE; + + } + + } +} diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java index ba95d2f..f6d9089 100644 --- a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java +++ b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/Updater.java @@ -1,6 +1,7 @@ package fr.ifremer.tutti.ui.swing.updater; import javax.swing.JOptionPane; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; @@ -186,7 +187,7 @@ public class Updater { // Cleaning process cleanObsoleteFiles(); - cleanPath(baseDir.resolve(NEW_DIR)); + DeleteHelper.deleteDirectory(baseDir.resolve(NEW_DIR)); } @@ -195,8 +196,13 @@ public class Updater { boolean updateFound; String moduleName = module.name(); + Path modulePath = baseDir.resolve(moduleName); + String oldVersion = getVersion(modulePath); + String moduleNameStr = module.getModuleLoggerName(); + System.out.println(String.format("%s Current version: %s", moduleNameStr, oldVersion)); + Path moduleNewPath = baseDir.resolve(NEW_DIR).resolve(moduleName); if (Files.isDirectory(moduleNewPath)) { @@ -208,20 +214,16 @@ public class Updater { Path backupDirectory = getBackupDirectory(); // Remove older backup - System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory)); - cleanPath(backupDirectory, moduleName + "-*"); + System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory + File.separator + moduleName + "-*")); + DeleteHelper.deleteDirectories(backupDirectory, moduleName + "-*"); updateFound = true; } else { - Path modulePath = baseDir.resolve(moduleName); - - String newVersion = getVersion(modulePath); - - System.out.println(String.format("%s No update (current version: %s)", moduleNameStr, newVersion)); - + System.out.println(String.format("%s No update found", moduleNameStr)); updateFound = false; + } return updateFound; @@ -232,8 +234,13 @@ public class Updater { String moduleName = module.name(); + Path modulePath = baseDir.resolve(moduleName); + String oldVersion = getVersion(modulePath); + String moduleNameStr = module.getModuleLoggerName(); + System.out.println(String.format("%s Current version: %s", moduleNameStr, oldVersion)); + // Update a single module. moduleName corresponds to the name of the directory inside the baseDir Path moduleNewPath = baseDir.resolve(NEW_DIR).resolve(moduleName); @@ -246,17 +253,16 @@ public class Updater { Path backupDirectory = getBackupDirectory(); // Remove older backup - System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory)); - cleanPath(backupDirectory, moduleName + "-*"); + System.out.println(String.format("%s Clean backup directory %s", moduleNameStr, backupDirectory + File.separator + moduleName + "-*")); + DeleteHelper.deleteDirectories(backupDirectory, moduleName + "-*"); // Backup existing module - Path modulePath = baseDir.resolve(moduleName); if (Files.isDirectory(modulePath)) { - String oldVersion = getVersion(modulePath); - Path moduleOldPath = backupDirectory.resolve(String.format("%s-%s-%s", moduleNameStr, oldVersion, backupDate)); - System.out.println(String.format("%s Backup old version %s to %s", moduleNameStr, oldVersion, moduleOldPath.toString())); + Path moduleOldPath = backupDirectory.resolve(String.format("%s-%s-%s", moduleName, oldVersion, backupDate)); + System.out.println(String.format("%s Backup old version %s to %s", moduleNameStr, oldVersion, moduleOldPath.toString())); Files.move(modulePath, moduleOldPath); + } // Installing new module @@ -265,10 +271,7 @@ public class Updater { } else { - Path modulePath = baseDir.resolve(moduleName); - String newVersion = getVersion(modulePath); - - System.out.println(String.format("%s No update (current version: %s).", moduleNameStr, newVersion)); + System.out.println(String.format("%s No update found", moduleNameStr)); } @@ -285,18 +288,6 @@ public class Updater { return lines.get(0); } - private void cleanPath(Path path) throws IOException { - if (Files.isDirectory(path)) { - Files.walkFileTree(path, RecursiveDeleteFileVisitor.newVisitor()); - } - } - - private void cleanPath(Path path, String glob) throws IOException { - if (Files.isDirectory(path)) { - Files.walkFileTree(path, RecursiveDeleteFileVisitor.newVisitor(baseDir, glob)); - } - } - protected void makeExecutable(Path path) throws IOException { if (!windowsOS) { @@ -331,21 +322,21 @@ public class Updater { Files.deleteIfExists(applicationDirectoryPath.resolve("launch.bat")); // Delete non Windows files - cleanPath(baseDir, "*" + BATCH_UNIX_EXT); + DeleteHelper.deleteFiles(baseDir, "*" + BATCH_UNIX_EXT); } else { // Delete obsolete script files Files.deleteIfExists(applicationDirectoryPath.resolve("launch.sh")); // Delete Windows files - cleanPath(baseDir, "*" + BATCH_WINDOWS_EXT); - cleanPath(baseDir, "*.exe"); + DeleteHelper.deleteFiles(baseDir, "*" + BATCH_WINDOWS_EXT); + DeleteHelper.deleteFiles(baseDir, "*.exe"); } // Delete embedded files Files.deleteIfExists(applicationDirectoryPath.resolve("tutti.exe")); Files.deleteIfExists(applicationDirectoryPath.resolve("tutti.sh")); - cleanPath(applicationDirectoryPath.resolve("launcher")); + DeleteHelper.deleteDirectory(applicationDirectoryPath.resolve("launcher")); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 06fc14d17a5cd48f16a74fe553e872ec0a2fa8cb Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:31 2015 +0100 remove code --- .../swing/updater/RecursiveDeleteFileVisitor.java | 61 ---------------------- 1 file changed, 61 deletions(-) diff --git a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java b/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java deleted file mode 100644 index ccc6f7a..0000000 --- a/tutti-ui-swing-updater/src/main/java/fr/ifremer/tutti/ui/swing/updater/RecursiveDeleteFileVisitor.java +++ /dev/null @@ -1,61 +0,0 @@ -package fr.ifremer.tutti.ui.swing.updater; - -import java.io.IOException; -import java.nio.file.FileVisitResult; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.PathMatcher; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; - -/** - * Created on 1/26/15. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 3.12 - */ -public class RecursiveDeleteFileVisitor extends SimpleFileVisitor<Path> { - - public static RecursiveDeleteFileVisitor newVisitor() { - return new RecursiveDeleteFileVisitor(null); - } - - public static RecursiveDeleteFileVisitor newVisitor(Path baseDir, String glob) { - - PathMatcher matcher; - if (glob != null) { - matcher = baseDir.getFileSystem().getPathMatcher("glob:" + glob); - } else { - matcher = null; - } - return new RecursiveDeleteFileVisitor(matcher); - } - - private final PathMatcher matcher; - - protected RecursiveDeleteFileVisitor(PathMatcher matcher) { - this.matcher = matcher; - } - - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - - // If the file name matches the glob or if no matcher, delete the file - if (matcher == null || matcher.matches(file.getFileName())) { - Files.deleteIfExists(file); - } - return FileVisitResult.CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { - - // if no matcher, delete the directory - if (matcher == null) { - Files.deleteIfExists(dir); - } - - return FileVisitResult.CONTINUE; - } - -} -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 02e8bf4f74ecceed42e9c018832494cbdc4af2e4 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:11:58 2015 +0100 improve assembly files --- .../src/main/assembly/full-linux-component.xml | 120 +-------------------- .../src/main/assembly/full-linux-i586.xml | 5 +- .../src/main/assembly/full-linux-x64.xml | 5 +- ...nux-component.xml => full-shared-component.xml} | 64 ++++++----- .../src/main/assembly/full-windows-component.xml | 110 +------------------ .../src/main/assembly/full-windows-i586.xml | 5 +- .../src/main/assembly/full-windows-x64.xml | 5 +- .../main/assembly/full/{ => linux}/tutti-sanity.sh | 0 .../src/main/assembly/full/{ => linux}/tutti.sh | 0 .../assembly/full/{ => windows}/tutti-sanity.bat | 0 tutti-ui-swing/src/main/assembly/min/launch.bat | 7 -- tutti-ui-swing/src/main/assembly/min/launch.sh | 7 -- tutti-ui-swing/src/main/assembly/min/update.bat | 14 --- tutti-ui-swing/src/main/assembly/min/update.sh | 12 --- tutti-ui-swing/src/main/assembly/standalone.xml | 15 --- 15 files changed, 40 insertions(+), 329 deletions(-) diff --git a/tutti-ui-swing/src/main/assembly/full-linux-component.xml b/tutti-ui-swing/src/main/assembly/full-linux-component.xml index f0fab70..4aa4cdc 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-component.xml @@ -29,16 +29,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> - <dependencySets> - <dependencySet> - <outputDirectory>tutti</outputDirectory> - <outputFileNameMapping>updater.jar</outputFileNameMapping> - <includes> - <include>fr.ifremer.tutti:tutti-ui-swing-updater:jar:${project.version}</include> - </includes> - </dependencySet> - </dependencySets> - <files> <file> <source>${project.build.directory}/tutti-launcher-${launcherVersion}.jar</source> @@ -50,120 +40,12 @@ <fileSets> <fileSet> - <directory>src/main/assembly/full</directory> + <directory>src/main/assembly/full/linux</directory> <outputDirectory/> <filtered>true</filtered> <fileMode>0755</fileMode> <includes> <include>*.sh</include> - <include>README*</include> - </includes> - </fileSet> - - <fileSet> - <includes> - <include>LICENSE*</include> - </includes> - </fileSet> - - <!-- TUTTI component --> - <fileSet> - <directory>target</directory> - <outputDirectory>tutti</outputDirectory> - <includes> - <include>${project.build.finalName}.${project.packaging}</include> - </includes> - </fileSet> - - <fileSet> - <directory>target/lib</directory> - <outputDirectory>tutti/lib</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - <excludes> - <exclude>junit-*.jar</exclude> - <exclude>tutti-ui-swing-updater-*.jar</exclude> - </excludes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>tutti</outputDirectory> - <filtered>true</filtered> - <fileMode>0755</fileMode> - <includes> - <include>*.sh</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>tutti</outputDirectory> - <filtered>true</filtered> - <includes> - <include>*</include> - </includes> - <excludes> - <exclude>*.sh</exclude> - <exclude>*.bat</exclude> - <exclude>tutti.config</exclude> - </excludes> - </fileSet> - - <!-- Launcher component --> - <fileSet> - <directory>src/main/assembly/launcher</directory> - <outputDirectory>launcher</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <!-- I18N component --> - <fileSet> - <directory>target/classes/META-INF</directory> - <outputDirectory>i18n</outputDirectory> - <includes> - <include>tutti-i18n*.properties</include> - <include>tutti-i18n*.csv</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>i18n</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <!-- HELP component --> - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>help</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/help</directory> - <outputDirectory>help</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - <!-- REPORT component --> - <fileSet> - <directory>src/main/assembly/report</directory> - <outputDirectory>report</outputDirectory> - <includes> - <include>**/*</include> </includes> </fileSet> diff --git a/tutti-ui-swing/src/main/assembly/full-linux-i586.xml b/tutti-ui-swing/src/main/assembly/full-linux-i586.xml index 2cb2d4b..93aee64 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-i586.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-i586.xml @@ -32,9 +32,8 @@ </formats> <componentDescriptors> - <componentDescriptor> - src/main/assembly/full-linux-component.xml - </componentDescriptor> + <componentDescriptor>src/main/assembly/full-linux-component.xml</componentDescriptor> + <componentDescriptor>src/main/assembly/full-shared-component.xml</componentDescriptor> </componentDescriptors> <fileSets> diff --git a/tutti-ui-swing/src/main/assembly/full-linux-x64.xml b/tutti-ui-swing/src/main/assembly/full-linux-x64.xml index 7f12a20..466b7c7 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-x64.xml +++ b/tutti-ui-swing/src/main/assembly/full-linux-x64.xml @@ -32,9 +32,8 @@ </formats> <componentDescriptors> - <componentDescriptor> - src/main/assembly/full-linux-component.xml - </componentDescriptor> + <componentDescriptor>src/main/assembly/full-linux-component.xml</componentDescriptor> + <componentDescriptor>src/main/assembly/full-shared-component.xml</componentDescriptor> </componentDescriptors> <fileSets> diff --git a/tutti-ui-swing/src/main/assembly/full-linux-component.xml b/tutti-ui-swing/src/main/assembly/full-shared-component.xml similarity index 88% copy from tutti-ui-swing/src/main/assembly/full-linux-component.xml copy to tutti-ui-swing/src/main/assembly/full-shared-component.xml index f0fab70..2f620b1 100644 --- a/tutti-ui-swing/src/main/assembly/full-linux-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-shared-component.xml @@ -11,19 +11,18 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -37,33 +36,27 @@ <include>fr.ifremer.tutti:tutti-ui-swing-updater:jar:${project.version}</include> </includes> </dependencySet> - </dependencySets> - - <files> - <file> - <source>${project.build.directory}/tutti-launcher-${launcherVersion}.jar</source> - <outputDirectory/> - <destName>launcher.jar</destName> - </file> - </files> + </dependencySets> <fileSets> <fileSet> - <directory>src/main/assembly/full</directory> - <outputDirectory/> - <filtered>true</filtered> - <fileMode>0755</fileMode> <includes> - <include>*.sh</include> - <include>README*</include> + <include>LICENSE*</include> </includes> </fileSet> <fileSet> + <directory>src/main/assembly/full</directory> + <outputDirectory>tutti</outputDirectory> + <filtered>true</filtered> <includes> - <include>LICENSE*</include> + <include>*</include> </includes> + <excludes> + <exclude>linux</exclude> + <exclude>windows</exclude> + </excludes> </fileSet> <!-- TUTTI component --> @@ -91,24 +84,9 @@ <directory>src/main/assembly/min</directory> <outputDirectory>tutti</outputDirectory> <filtered>true</filtered> - <fileMode>0755</fileMode> - <includes> - <include>*.sh</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>tutti</outputDirectory> - <filtered>true</filtered> <includes> <include>*</include> </includes> - <excludes> - <exclude>*.sh</exclude> - <exclude>*.bat</exclude> - <exclude>tutti.config</exclude> - </excludes> </fileSet> <!-- Launcher component --> @@ -167,5 +145,23 @@ </includes> </fileSet> + <!-- Ichtyometer component --> + <fileSet> + <directory>src/main/ichtyometer</directory> + <outputDirectory>ichtyometer</outputDirectory> + <includes> + <include>*</include> + </includes> + </fileSet> + + <fileSet> + <directory>src/main/assembly/min</directory> + <outputDirectory>ichtyometer</outputDirectory> + <filtered>true</filtered> + <includes> + <include>version.appup</include> + </includes> + </fileSet> + </fileSets> </component> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-component.xml b/tutti-ui-swing/src/main/assembly/full-windows-component.xml index 033fc4c..4a13b5b 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-component.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-component.xml @@ -50,120 +50,12 @@ <fileSets> <fileSet> - <directory>src/main/assembly/full</directory> + <directory>src/main/assembly/full/windows</directory> <outputDirectory/> <filtered>true</filtered> <fileMode>0755</fileMode> <includes> <include>*.bat</include> - <include>README*</include> - </includes> - </fileSet> - - <fileSet> - <includes> - <include>LICENSE*</include> - </includes> - </fileSet> - - <!-- tutti component --> - <fileSet> - <directory>target</directory> - <outputDirectory>tutti</outputDirectory> - <includes> - <include>${project.build.finalName}.${project.packaging}</include> - </includes> - </fileSet> - - <fileSet> - <directory>target/lib</directory> - <outputDirectory>tutti/lib</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - <excludes> - <exclude>junit-*.jar</exclude> - <exclude>tutti-ui-swing-updater-*.jar</exclude> - </excludes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>tutti</outputDirectory> - <filtered>true</filtered> - <fileMode>0755</fileMode> - <includes> - <include>*.bat</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>tutti</outputDirectory> - <filtered>true</filtered> - <includes> - <include>*</include> - </includes> - <excludes> - <exclude>*.sh</exclude> - <exclude>*.bat</exclude> - <exclude>tutti.config</exclude> - </excludes> - </fileSet> - - <!-- Launcher component --> - <fileSet> - <directory>src/main/assembly/launcher</directory> - <outputDirectory>launcher</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <!-- I18N component --> - <fileSet> - <directory>target/classes/META-INF</directory> - <outputDirectory>i18n</outputDirectory> - <includes> - <include>tutti-i18n*.properties</include> - <include>tutti-i18n*.csv</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>i18n</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <!-- HELP component --> - <fileSet> - <directory>src/main/assembly/min</directory> - <outputDirectory>help</outputDirectory> - <filtered>true</filtered> - <includes> - <include>version.appup</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/help</directory> - <outputDirectory>help</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - <!-- REPORT component --> - <fileSet> - <directory>src/main/assembly/report</directory> - <outputDirectory>report</outputDirectory> - <includes> - <include>**/*</include> </includes> </fileSet> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-i586.xml b/tutti-ui-swing/src/main/assembly/full-windows-i586.xml index f3592db..67daeff 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-i586.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-i586.xml @@ -32,9 +32,8 @@ </formats> <componentDescriptors> - <componentDescriptor> - src/main/assembly/full-windows-component.xml - </componentDescriptor> + <componentDescriptor>src/main/assembly/full-windows-component.xml</componentDescriptor> + <componentDescriptor>src/main/assembly/full-shared-component.xml</componentDescriptor> </componentDescriptors> <fileSets> diff --git a/tutti-ui-swing/src/main/assembly/full-windows-x64.xml b/tutti-ui-swing/src/main/assembly/full-windows-x64.xml index 5ccdb55..b731055 100644 --- a/tutti-ui-swing/src/main/assembly/full-windows-x64.xml +++ b/tutti-ui-swing/src/main/assembly/full-windows-x64.xml @@ -32,9 +32,8 @@ </formats> <componentDescriptors> - <componentDescriptor> - src/main/assembly/full-windows-component.xml - </componentDescriptor> + <componentDescriptor>src/main/assembly/full-windows-component.xml</componentDescriptor> + <componentDescriptor>src/main/assembly/full-shared-component.xml</componentDescriptor> </componentDescriptors> <fileSets> diff --git a/tutti-ui-swing/src/main/assembly/full/tutti-sanity.sh b/tutti-ui-swing/src/main/assembly/full/linux/tutti-sanity.sh similarity index 100% rename from tutti-ui-swing/src/main/assembly/full/tutti-sanity.sh rename to tutti-ui-swing/src/main/assembly/full/linux/tutti-sanity.sh diff --git a/tutti-ui-swing/src/main/assembly/full/tutti.sh b/tutti-ui-swing/src/main/assembly/full/linux/tutti.sh similarity index 100% rename from tutti-ui-swing/src/main/assembly/full/tutti.sh rename to tutti-ui-swing/src/main/assembly/full/linux/tutti.sh diff --git a/tutti-ui-swing/src/main/assembly/full/tutti-sanity.bat b/tutti-ui-swing/src/main/assembly/full/windows/tutti-sanity.bat similarity index 100% rename from tutti-ui-swing/src/main/assembly/full/tutti-sanity.bat rename to tutti-ui-swing/src/main/assembly/full/windows/tutti-sanity.bat diff --git a/tutti-ui-swing/src/main/assembly/min/launch.bat b/tutti-ui-swing/src/main/assembly/min/launch.bat deleted file mode 100644 index fbdb84c..0000000 --- a/tutti-ui-swing/src/main/assembly/min/launch.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem move embedded launcher file to tutti root -verify on -move /Y tutti\launcher launcher -move /Y tutti\tutti.exe tutti.exe -start tutti.exe diff --git a/tutti-ui-swing/src/main/assembly/min/launch.sh b/tutti-ui-swing/src/main/assembly/min/launch.sh deleted file mode 100755 index be75bd5..0000000 --- a/tutti-ui-swing/src/main/assembly/min/launch.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo "Move embedded script file to tutti root" -mv -f tutti/launcher . -mv tutti/tutti.sh . -chmod +x tutti.sh -./tutti.sh diff --git a/tutti-ui-swing/src/main/assembly/min/update.bat b/tutti-ui-swing/src/main/assembly/min/update.bat deleted file mode 100644 index 7fbfba8..0000000 --- a/tutti-ui-swing/src/main/assembly/min/update.bat +++ /dev/null @@ -1,14 +0,0 @@ -@echo off - -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -echo ! ! -echo ! THE LAUNCH AND UPDATE PROCESSES HAVE BEEN CHANGED ! -echo ! PLEASE EXECUTE 'tutti.exe' ! -echo ! ! -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -echo ! ! -echo ! LES PROCESSUS DE DEMARRAGE ET MISE A JOUR ONT CHANGES ! -echo ! VEUILLEZ EXECUTER 'tutti.exe' ! -echo ! ! -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -pause \ No newline at end of file diff --git a/tutti-ui-swing/src/main/assembly/min/update.sh b/tutti-ui-swing/src/main/assembly/min/update.sh deleted file mode 100644 index 9adea09..0000000 --- a/tutti-ui-swing/src/main/assembly/min/update.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -echo ! ! -echo ! THE LAUNCH AND UPDATE PROCESSES HAVE BEEN CHANGED ! -echo ! PLEASE EXECUTE './tutti.sh' ! -echo ! ! -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -echo ! ! -echo ! LES PROCESSUS DE DEMARRAGE ET MISE A JOUR ONT CHANGES ! -echo ! VEUILLEZ EXECUTER './tutti.sh' ! -echo ! ! -echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \ No newline at end of file diff --git a/tutti-ui-swing/src/main/assembly/standalone.xml b/tutti-ui-swing/src/main/assembly/standalone.xml index efb16d7..4431d52 100644 --- a/tutti-ui-swing/src/main/assembly/standalone.xml +++ b/tutti-ui-swing/src/main/assembly/standalone.xml @@ -57,21 +57,6 @@ <filtered>true</filtered> <fileMode>0755</fileMode> <includes> - <include>launcher.properties</include> - <include>launch.sh</include> - <include>launch.bat</include> - <include>update.sh</include> - <include>update.bat</include> - <include>version.appup</include> - </includes> - </fileSet> - - <!--add embedded launcher directory (TODO :should be removed in further version)--> - <fileSet> - <directory>src/main/assembly/launcher</directory> - <outputDirectory>launcher</outputDirectory> - <filtered>true</filtered> - <includes> <include>*</include> </includes> </fileSet> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 416435ef854088c50585f8bb805b24d056e30d08 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 17:49:53 2015 +0100 use tutti-launcher 1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3bedd44..9f36e3b 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ <jreVersion>1.7.72</jreVersion> <!-- Last launcher version --> - <launcherVersion>1.0-SNAPSHOT</launcherVersion> + <launcherVersion>1.0</launcherVersion> <!-- Where are deployed software components --> <distroUrl>http://nexus.nuiton.org/nexus/content/repositories/other-releases</distroUrl> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 06037f2be6a1944baf87856b903058a4cf64ba58 Merge: 410b9db 416435e Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 26 18:22:53 2015 +0100 merge 6376 to develop pom.xml | 22 ++ src/update/tutti-application.properties | 15 +- .../java/fr/ifremer/tutti/TuttiConfiguration.java | 6 + tutti-ui-swing-updater/LICENSE.txt | 0 tutti-ui-swing-updater/README.txt | 0 tutti-ui-swing-updater/pom.xml | 70 +++++ .../tutti/ui/swing/updater/DeleteHelper.java | 143 +++++++++ .../fr/ifremer/tutti/ui/swing/updater/Module.java | 34 ++ .../fr/ifremer/tutti/ui/swing/updater/Updater.java | 344 +++++++++++++++++++++ .../src/main/resources/update_runtime.bat | 31 ++ .../src/main/resources/update_runtime.sh | 36 +++ tutti-ui-swing/pom.xml | 76 +++++ ...ull-linux-i586.xml => full-linux-component.xml} | 43 +-- .../src/main/assembly/full-linux-i586.xml | 5 +- .../src/main/assembly/full-linux-x64.xml | 5 +- ...ull-component.xml => full-shared-component.xml} | 86 ++++-- .../src/main/assembly/full-windows-component.xml | 63 ++++ .../src/main/assembly/full-windows-i586.xml | 5 +- .../src/main/assembly/full-windows-x64.xml | 5 +- tutti-ui-swing/src/main/assembly/full/README.txt | 4 +- .../src/main/assembly/full/linux/tutti-sanity.sh | 10 + .../src/main/assembly/full/linux/tutti.sh | 10 + .../src/main/assembly/full/tutti-sanity.bat | 44 --- .../src/main/assembly/full/tutti-sanity.sh | 41 --- tutti-ui-swing/src/main/assembly/full/tutti.bat | 44 --- tutti-ui-swing/src/main/assembly/full/tutti.sh | 41 --- .../main/assembly/full/windows/tutti-sanity.bat | 3 + .../src/main/assembly/launcher/version.appup | 1 + tutti-ui-swing/src/main/assembly/min/launch.bat | 10 - tutti-ui-swing/src/main/assembly/min/launch.sh | 15 - .../src/main/assembly/min/launcher.properties | 26 ++ tutti-ui-swing/src/main/assembly/min/update.bat | 84 ----- tutti-ui-swing/src/main/assembly/min/update.sh | 74 ----- .../main/assembly/{full => }/report/version.appup | 0 tutti-ui-swing/src/main/assembly/standalone.xml | 6 +- .../ui/swing/TuttiApplicationUpdaterCallBack.java | 8 - 36 files changed, 978 insertions(+), 432 deletions(-) diff --cc pom.xml index 2b72235,9f36e3b..fc632be --- a/pom.xml +++ b/pom.xml @@@ -156,7 -156,14 +157,13 @@@ <!-- Last JRE version to use --> <jreVersion>1.7.72</jreVersion> + <!-- Last launcher version --> + <launcherVersion>1.0</launcherVersion> + + <!-- Where are deployed software components --> + <distroUrl>http://nexus.nuiton.org/nexus/content/repositories/other-releases</distroUrl> + - <autoVersionSubmodules>false</autoVersionSubmodules> - + <xmlApisVersion>1.3.04</xmlApisVersion> </properties> <repositories> @@@ -873,6 -794,7 +886,7 @@@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> - <version>1.0</version> ++ <version>1.0-beta-4</version> <executions> <execution> <id>deploy tutti-application.properties</id> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm