pb mise-à-jour du jar

This commit is contained in:
AdecWatt 2019-04-15 17:45:06 +02:00
parent ff8ce44fa3
commit 04927ed4c0
4 changed files with 133 additions and 75 deletions

View File

@ -13,6 +13,7 @@
Logiciel de plan de feu Logiciel de plan de feu
</description> </description>
<property name="webRef" location="/home/DMZ/adecwattWeb/data/adecwatt/v3"/>
<property name="work" location="ws"/> <property name="work" location="ws"/>
<property name="data" location="data"/> <property name="data" location="data"/>
<property name="config" location="data/config"/> <property name="config" location="data/config"/>
@ -39,6 +40,7 @@
<mkdir dir="${work}"/> <mkdir dir="${work}"/>
<mkdir dir="${data}"/> <mkdir dir="${data}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
<mkdir dir="${build.distrib}"/>
<mkdir dir="${config}"/> <mkdir dir="${config}"/>
<mkdir dir="${src}"/> <mkdir dir="${src}"/>
<mkdir dir="${java.src}"/> <mkdir dir="${java.src}"/>
@ -253,6 +255,14 @@
<!-- <include name="data/texts/help-fr/**/*.html"/> --> <!-- <include name="data/texts/help-fr/**/*.html"/> -->
</fileset> </fileset>
</jar> </jar>
<copy todir="${webRef}/soft" preservelastmodified="true">
<fileset dir="${build.jar}">
<include name="AdecWatt.jar"/>
<include name="Misc.jar"/>
<include name="JMapViewer.jar"/>
<include name="pdfbox.jar"/>
</fileset>
</copy>
</target> </target>
<!-- ======================================== --> <!-- ======================================== -->
@ -280,6 +290,16 @@
</jar> </jar>
</target> </target>
<!-- ======================================== -->
<target name="runUpdatedAdecWattJar" depends="updatedAdecWattJar" description="execute jar" >
<java classname="adecWatt.control.LaunchUpdatedAdecWatt" fork="true" dir="${work}">
<classpath>
<pathelement location="${build.jar}/UpdatedAdecWatt.jar"/>
<pathelement path="${java.class.path}:${misc.class}:${osm.class}:${pdf.class}"/>
</classpath>
</java>
</target>
<!-- ======================================== --> <!-- ======================================== -->
<target name="srcZip" depends="cleanConfig,updatedAdecWattJar,adecWattJar" description="create distribution" > <target name="srcZip" depends="cleanConfig,updatedAdecWattJar,adecWattJar" description="create distribution" >
<zip destfile="${build.distrib}/${TODAY_FR}-SCR-AdecWatt.zip"> <zip destfile="${build.distrib}/${TODAY_FR}-SCR-AdecWatt.zip">
@ -314,18 +334,16 @@
<zipfileset dir="." prefix="adecWatt/"> <zipfileset dir="." prefix="adecWatt/">
<include name="data/config/AdecWatt.xml"/> <include name="data/config/AdecWatt.xml"/>
</zipfileset> </zipfileset>
<zipfileset dir="${webRef}/soft" prefix="adecWatt/soft"> <zipfileset dir="soft" prefix="adecWatt/soft">
<include name="UpdatedAdecWatt.jar"/> <include name="UpdatedAdecWatt.jar"/>
<include name="AdecWatt.jar"/> <include name="AdecWatt.jar"/>
<include name="Misc.jar"/> <include name="Misc.jar"/>
<include name="JMapViewer.jar"/> <include name="JMapViewer.jar"/>
<include name="pdfbox.jar"/>
<include name="timestamp"/>
</zipfileset> </zipfileset>
<zipfileset dir="${work}" prefix="adecWatt/" filemode="755"> <zipfileset dir="${work}" prefix="adecWatt/" filemode="755">
<include name="launch-adecWatt.sh"/> <include name="launch-adecWatt.sh"/>
</zipfileset> </zipfileset>
<zipfileset dir="${webRef}/data" prefix="adecWatt/data/server" filemode="755"> <zipfileset dir="data" prefix="adecWatt/data/server" filemode="755">
<include name="furniture/000-0052.lpt"/> <include name="furniture/000-0052.lpt"/>
</zipfileset> </zipfileset>
</zip> </zip>

View File

@ -1,76 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties> <properties>
<comment>This file is automaticaly generated by AdecWatt application at 3:42 PM on Jun 20, 2018.</comment> <comment>This file is automaticaly generated by AdecWatt application at 5:39 PM on Apr 15, 2019.</comment>
<entry key=""></entry>
<entry key="PlacementPlace">North</entry>
<entry key="CheckPeriod">Day</entry>
<entry key="TestedServerChecked">false</entry>
<entry key="SearchOrder">5</entry>
<entry key="FileOrder">0</entry>
<entry key="RoleStageManager">false</entry>
<entry key="HelpOrder">4</entry>
<entry key="PlacementChecked">true</entry>
<entry key="LastCheck">20180620</entry>
<entry key="EditOrder">1</entry>
<entry key="ManualChecked">false</entry>
<entry key="DownloaddataChecked">true</entry> <entry key="DownloaddataChecked">true</entry>
<entry key="Downloadhelp-br_FR_galloChecked">false</entry> <entry key="RoleFurnitureManager">true</entry>
<entry key="PlacementUndocked">false</entry> <entry key="Uploadhelp-en_USChecked">false</entry>
<entry key="LocalRemovesoftChecked">false</entry> <entry key="HelpOrder">4</entry>
<entry key="EditPlace">North</entry> <entry key="Uploadhelp-br_FR_bretonChecked">false</entry>
<entry key="Downloadhelp-br_FR_bretonChecked">true</entry>
<entry key="HelpChecked">true</entry>
<entry key="FrameLocation">[x=166,y=26]</entry>
<entry key="SliderPlace">North</entry>
<entry key="JConsoleLocation">[x=0,y=26]</entry>
<entry key="ManualLocation">[x=0,y=26]</entry>
<entry key="Login"></entry>
<entry key="Variant"></entry>
<entry key="PlacementOrder">3</entry>
<entry key="DownloadsoftChecked">false</entry>
<entry key="dumpDir">data/log/</entry> <entry key="dumpDir">data/log/</entry>
<entry key="LicenceLocation">[x=0,y=26]</entry> <entry key="RoleStageManager">true</entry>
<entry key="Downloadhelp-en_USChecked">true</entry> <entry key="EditChecked">true</entry>
<entry key="Country">FR</entry> <entry key="RoleArchitect">true</entry>
<entry key="LocalRemovedataChecked">true</entry>
<entry key="FileChecked">true</entry>
<entry key="AboutChecked">false</entry>
<entry key="AdecWattIcon">data/images/adecWatt.png</entry>
<entry key="LocalRemovehelp-br_FR_bretonChecked">true</entry>
<entry key="SliderChecked">true</entry>
<entry key="SearchUndocked">false</entry>
<entry key="LastExport">/home/felix/perso/adecWatt56/data/export/CendresLampionsChapelleBleue.lpz</entry>
<entry key="HelpPlace">North</entry>
<entry key="InSegmentGlue">false</entry>
<entry key="LocalServerChecked">false</entry>
<entry key="EditUndocked">false</entry>
<entry key="HttpServerChecked">false</entry>
<entry key="Downloadhelp-fr_FRChecked">true</entry>
<entry key="HelpUndocked">false</entry>
<entry key="Language">fr</entry>
<entry key="SliderOrder">2</entry>
<entry key="LocalRemovehelp-fr_FRChecked">true</entry>
<entry key="LocalRemovehelp-br_FR_galloChecked">false</entry>
<entry key="FileUndocked">false</entry>
<entry key="HandleGlue">true</entry>
<entry key="Downloadhelp-es_ESChecked">true</entry>
<entry key="LicenceChecked">false</entry>
<entry key="LocalRemovehelp-imagesChecked">true</entry>
<entry key="JConsoleChecked">false</entry>
<entry key="RoleArchitect">false</entry>
<entry key="SearchChecked">true</entry>
<entry key="LocalRemovehelp-es_ESChecked">true</entry>
<entry key="BoundGlue">true</entry> <entry key="BoundGlue">true</entry>
<entry key="LocalRemovehelp-en_USChecked">true</entry> <entry key="InSegmentGlue">false</entry>
<entry key="LastExport">/home/felix/perso/adecWatt56/data/export/CendresLampionsChapelleBleue.lpz</entry>
<entry key="RemoteRemovehelp-es_ESChecked">false</entry>
<entry key="HelpPlace">North</entry>
<entry key="UploadsoftChecked">true</entry>
<entry key="GridGlue">true</entry>
<entry key="FileOrder">0</entry>
<entry key="UserId">0</entry>
<entry key="RemoteRemovesoftChecked">true</entry>
<entry key="LocalServerChecked">false</entry>
<entry key="EditOrder">1</entry>
<entry key="HelpChecked">true</entry>
<entry key="ProxyPort">3128</entry>
<entry key="TestedServerChecked">false</entry>
<entry key="Country">FR</entry>
<entry key="SearchOrder">5</entry>
<entry key="FilePlace">North</entry> <entry key="FilePlace">North</entry>
<entry key="AboutLocation">[x=0,y=26]</entry> <entry key="AboutLocation">[x=0,y=26]</entry>
<entry key="SearchPlace">North</entry> <entry key="SearchUndocked">false</entry>
<entry key="GridGlue">true</entry> <entry key="FileChecked">true</entry>
<entry key="RoleFurnitureManager">false</entry> <entry key="FrameLocation">[x=738,y=247]</entry>
<entry key="UserId">1</entry> <entry key="EditPlace">North</entry>
<entry key="EditChecked">true</entry> <entry key="Uploadhelp-fr_FRChecked">false</entry>
<entry key="CheckPeriod">Day</entry>
<entry key="AboutChecked">false</entry>
<entry key="LicenceLocation">[x=0,y=26]</entry>
<entry key="JConsoleLocation">[x=0,y=26]</entry>
<entry key="PlacementChecked">true</entry>
<entry key="SliderUndocked">false</entry> <entry key="SliderUndocked">false</entry>
<entry key="Downloadhelp-imagesChecked">true</entry> <entry key="SliderOrder">2</entry>
<entry key="ProxyPort">3128</entry> <entry key="SearchPlace">North</entry>
<entry key="UploaddataChecked">false</entry>
<entry key="SearchChecked">true</entry>
<entry key="Uploadhelp-es_ESChecked">false</entry>
<entry key="JConsoleChecked">false</entry>
<entry key="Variant"/>
<entry key="RemoteRemovedataChecked">false</entry>
<entry key="DownloadsoftChecked">true</entry>
<entry key="SliderChecked">true</entry>
<entry key="AdecWattIcon">data/images/adecWatt.png</entry>
<entry key="RemoteRemovehelp-en_USChecked">false</entry>
<entry key="Language">fr</entry>
<entry key="FileUndocked">false</entry>
<entry key="SliderPlace">North</entry>
<entry key="Uploadhelp-imagesChecked">false</entry>
<entry key="Login">webmestre</entry>
<entry key="HelpUndocked">false</entry>
<entry key="ManualChecked">false</entry>
<entry key="RemoteRemovehelp-br_FR_galloChecked">false</entry>
<entry key="LastCheck">20190415</entry>
<entry key="RemoteRemovehelp-br_FR_bretonChecked">false</entry>
<entry key="HttpServerChecked">false</entry>
<entry key="LicenceChecked">false</entry>
<entry key="HandleGlue">true</entry>
<entry key="PlacementOrder">3</entry>
<entry key="RemoteRemovehelp-imagesChecked">false</entry>
<entry key="Uploadhelp-br_FR_galloChecked">false</entry>
<entry key="EditUndocked">false</entry>
<entry key="ManualLocation">[x=0,y=26]</entry>
<entry key="PlacementUndocked">false</entry>
<entry key="RemoteRemovehelp-fr_FRChecked">false</entry>
<entry key="PlacementPlace">North</entry>
<entry key=""/>
</properties> </properties>

Binary file not shown.

View File

@ -9,8 +9,6 @@
// ================================================================================ // ================================================================================
package misc; package misc;
import java.applet.Applet;
import java.applet.AudioClip;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Container; import java.awt.Container;
@ -42,6 +40,14 @@ import java.util.Collection;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineEvent;
import javax.sound.sampled.LineListener;
import javax.sound.sampled.LineUnavailableException;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
@ -610,9 +616,41 @@ public class Util implements SwingConstants {
} }
// ======================================== // ========================================
static public final AudioClip loadAudio (String... names) { static public final AudioInputStream loadAudio (String... names) {
URL url = Config.getDataUrl (names); URL url = Config.getDataUrl (names);
return (url != null) ? Applet.newAudioClip (url) : null; try {
return AudioSystem.getAudioInputStream (url);
} catch (Exception e) {
return null;
}
}
static public final void play (AudioInputStream stream) {
if (stream == null)
return;
try {
AudioFormat format = stream.getFormat ();
DataLine.Info info = new DataLine.Info (Clip.class, format);
Clip clip = (Clip) AudioSystem.getLine (info);
clip.open (stream);
clip.addLineListener (new LineListener () {
public void update (LineEvent event) {
LineEvent.Type type = event.getType();
if (type == LineEvent.Type.START) {
// System.err.println ("Playback started.");
} else if (type == LineEvent.Type.STOP) {
// System.er.println ("Playback completed.");
clip.close ();
}
}
});
clip.start ();
} catch (LineUnavailableException e) {
Log.keepLastException ("Audio line for playing back is unavailable", e);
} catch (IOException e) {
Log.keepLastException ("Error playing the audio file", e);
}
} }
// ======================================== // ========================================