Compare commits
5 Commits
cb259689de
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
88dd4ef1ca | ||
|
cb7e8d110c | ||
|
bca1181b8b | ||
|
847ffcd207 | ||
|
bb39b6d3ea |
13
README.md
13
README.md
@ -21,3 +21,16 @@ git config user.name "Your Name"
|
|||||||
|
|
||||||
[ADEC 56](http://adec56.org/spip/index.php)
|
[ADEC 56](http://adec56.org/spip/index.php)
|
||||||
|
|
||||||
|
## Remote commands
|
||||||
|
|
||||||
|
* getRoles
|
||||||
|
* zipList path
|
||||||
|
* zipGets path
|
||||||
|
* zipPuts zip
|
||||||
|
* zipRemove path
|
||||||
|
|
||||||
|
## Test
|
||||||
|
|
||||||
|
https://adecwatt.parlenet.org/lib/plugins/adecwatt/adecWattBD.php?version=v3&action=getRoles
|
||||||
|
https://adecwatt.parlenet.org/lib/plugins/adecwatt/adecWattBD.php?version=v3&action=zipList&name=data
|
||||||
|
|
||||||
|
@ -104,6 +104,14 @@
|
|||||||
</fileset>
|
</fileset>
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
|
|
||||||
|
<replaceregexp byline="true">
|
||||||
|
<regexp pattern="(.*entry key=".*Location">)[^]]*(.*)"/>
|
||||||
|
<substitution expression="\1[x=50,y=50\2"/>
|
||||||
|
<fileset dir="data/config">
|
||||||
|
<include name="*.xml"/>
|
||||||
|
</fileset>
|
||||||
|
</replaceregexp>
|
||||||
|
|
||||||
<replaceregexp byline="true">
|
<replaceregexp byline="true">
|
||||||
<regexp pattern="(.*entry key="Download.*Checked">)false(.*)"/>
|
<regexp pattern="(.*entry key="Download.*Checked">)false(.*)"/>
|
||||||
<substitution expression="\1true\2"/>
|
<substitution expression="\1true\2"/>
|
||||||
@ -287,6 +295,12 @@
|
|||||||
<include name="misc/**/*.class"/>
|
<include name="misc/**/*.class"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</jar>
|
</jar>
|
||||||
|
<copy todir="${webRef}/soft" preservelastmodified="true">
|
||||||
|
<fileset dir="${build.jar}">
|
||||||
|
<include name="UpdatedAdecWatt.jar"/>
|
||||||
|
<include name="Misc.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ======================================== -->
|
<!-- ======================================== -->
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?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 2:43 PM on Oct 21, 2020.</comment>
|
<comment>This file is automaticaly generated by AdecWatt application at 3:16 PM on Jan 26, 2022.</comment>
|
||||||
|
|
||||||
<entry key="GridGlue">true</entry>
|
<entry key="GridGlue">true</entry>
|
||||||
<entry key="HelpOrder">4</entry>
|
<entry key="HelpOrder">4</entry>
|
||||||
@ -9,21 +9,21 @@
|
|||||||
<entry key="EditChecked">true</entry>
|
<entry key="EditChecked">true</entry>
|
||||||
|
|
||||||
|
|
||||||
<entry key="SliderPlace">North</entry>
|
|
||||||
|
|
||||||
|
<entry key="SliderPlace">North</entry>
|
||||||
|
|
||||||
<entry key="EditPlace">North</entry>
|
<entry key="EditPlace">North</entry>
|
||||||
<entry key="SearchPlace">North</entry>
|
<entry key="SearchPlace">North</entry>
|
||||||
<entry key="AboutChecked">false</entry>
|
<entry key="AboutChecked">false</entry>
|
||||||
|
|
||||||
<entry key="FilePlace">North</entry>
|
<entry key="FilePlace">North</entry>
|
||||||
<entry key="LicenceLocation">[x=0,y=28]</entry>
|
<entry key="LicenceLocation">[x=50,y=50]</entry>
|
||||||
<entry key="LastCheck">20201021</entry>
|
<entry key="LastCheck">20220126</entry>
|
||||||
<entry key="SliderChecked">true</entry>
|
<entry key="SliderChecked">true</entry>
|
||||||
<entry key="FrameLocation">[x=0,y=28]</entry>
|
<entry key="FrameLocation">[x=50,y=50]</entry>
|
||||||
<entry key="SearchChecked">true</entry>
|
<entry key="SearchChecked">true</entry>
|
||||||
|
|
||||||
<entry key="AboutLocation">[x=0,y=28]</entry>
|
<entry key="AboutLocation">[x=50,y=50]</entry>
|
||||||
<entry key="SliderUndocked">false</entry>
|
<entry key="SliderUndocked">false</entry>
|
||||||
<entry key="Login"/>
|
<entry key="Login"/>
|
||||||
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<entry key="DownloadsoftChecked">true</entry>
|
<entry key="DownloadsoftChecked">true</entry>
|
||||||
<entry key="DownloaddataChecked">true</entry>
|
<entry key="DownloaddataChecked">true</entry>
|
||||||
<entry key="ManualLocation">[x=0,y=28]</entry>
|
<entry key="ManualLocation">[x=50,y=50]</entry>
|
||||||
<entry key="HandleGlue">true</entry>
|
<entry key="HandleGlue">true</entry>
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +53,7 @@
|
|||||||
<entry key="ManualChecked">false</entry>
|
<entry key="ManualChecked">false</entry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<entry key="EditOrder">1</entry>
|
<entry key="EditOrder">1</entry>
|
||||||
|
|
||||||
<entry key="Variant"/>
|
<entry key="Variant"/>
|
||||||
@ -60,14 +61,13 @@
|
|||||||
<entry key="SearchOrder">5</entry>
|
<entry key="SearchOrder">5</entry>
|
||||||
<entry key="LicenceChecked">false</entry>
|
<entry key="LicenceChecked">false</entry>
|
||||||
|
|
||||||
|
|
||||||
<entry key="PlacementPlace">North</entry>
|
<entry key="PlacementPlace">North</entry>
|
||||||
<entry key="LastExport">/home/felix/CendresLampionsChapelleBleue.lpz</entry>
|
<entry key="LastExport">/home/felix/perso/adecWatt56/data/export/CendresLampionsChapelleBleue.lpz</entry>
|
||||||
<entry key="FileOrder">0</entry>
|
<entry key="FileOrder">0</entry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<entry key="BoundGlue">true</entry>
|
<entry key="BoundGlue">true</entry>
|
||||||
|
|
||||||
|
|
||||||
<entry key="CheckPeriod">Day</entry>
|
<entry key="CheckPeriod">Day</entry>
|
||||||
|
|
||||||
|
|
||||||
|
BIN
soft/Misc.jar
BIN
soft/Misc.jar
Binary file not shown.
@ -18,8 +18,10 @@ public class LaunchAdecWatt {
|
|||||||
// ========================================
|
// ========================================
|
||||||
static public void main (String[] args) {
|
static public void main (String[] args) {
|
||||||
try {
|
try {
|
||||||
|
System.err.println ("Config...");
|
||||||
Config.setPWD (LaunchAdecWatt.class);
|
Config.setPWD (LaunchAdecWatt.class);
|
||||||
Config.load ("AdecWatt");
|
Config.load ("AdecWatt");
|
||||||
|
System.err.println ("Bundle...");
|
||||||
Bundle.load ("Help");
|
Bundle.load ("Help");
|
||||||
Bundle.load ("ToolBar");
|
Bundle.load ("ToolBar");
|
||||||
Bundle.load ("Proxy");
|
Bundle.load ("Proxy");
|
||||||
@ -29,8 +31,6 @@ public class LaunchAdecWatt {
|
|||||||
Bundle.load ("AdecWatt");
|
Bundle.load ("AdecWatt");
|
||||||
Bundle.load (JProp.AdecWattUser);
|
Bundle.load (JProp.AdecWattUser);
|
||||||
|
|
||||||
updateShell ();
|
|
||||||
|
|
||||||
final AdecWatt adecWatt = new AdecWatt ();
|
final AdecWatt adecWatt = new AdecWatt ();
|
||||||
SwingUtilities.invokeLater (new Runnable () {
|
SwingUtilities.invokeLater (new Runnable () {
|
||||||
public void run () {
|
public void run () {
|
||||||
@ -42,36 +42,37 @@ public class LaunchAdecWatt {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
File softDir = new File (Config.getPWD ().getParentFile (), "soft");
|
File softDir = new File (Config.getPWD ().getParentFile (), "soft");
|
||||||
File jar = new File (softDir, "UpdatedAdecWatt.jar");
|
File jar = new File (softDir, "UpdatedAdecWatt.jar");
|
||||||
|
System.err.println ("RemoteUpdate...");
|
||||||
RemoteUpdate.launch (jar);
|
RemoteUpdate.launch (jar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateShell () {
|
// public static void updateShell () {
|
||||||
try {
|
// try {
|
||||||
File dir = Config.getPWD ().getParentFile ();
|
// File dir = Config.getPWD ().getParentFile ();
|
||||||
File oldLaunch = new File (dir, "launch-lightPlot.sh");
|
// File oldLaunch = new File (dir, "launch-lightPlot.sh");
|
||||||
File softDir = new File (dir, "soft");
|
// File softDir = new File (dir, "soft");
|
||||||
File newJar = new File (softDir, "AdecWatt.jar");
|
// File newJar = new File (softDir, "AdecWatt.jar");
|
||||||
File oldJar = new File (softDir, "LightPlot.jar");
|
// File oldJar = new File (softDir, "LightPlot.jar");
|
||||||
if (newJar.length () < 1024)
|
// if (newJar.length () < 1024)
|
||||||
return;
|
// return;
|
||||||
if (oldLaunch.length () > 70) {
|
// if (oldLaunch.length () > 70) {
|
||||||
PrintWriter pw = new PrintWriter (oldLaunch);
|
// PrintWriter pw = new PrintWriter (oldLaunch);
|
||||||
pw.println ("#!/bin/bash");
|
// pw.println ("#!/bin/bash");
|
||||||
pw.println ("cd `dirname \"$0\"`");
|
// pw.println ("cd `dirname \"$0\"`");
|
||||||
pw.println ("java -jar soft/AdecWatt.jar");
|
// pw.println ("java -jar soft/AdecWatt.jar");
|
||||||
pw.flush ();
|
// pw.flush ();
|
||||||
pw.close ();
|
// pw.close ();
|
||||||
JOptionPane.showMessageDialog (null,
|
// JOptionPane.showMessageDialog (null,
|
||||||
"Votre logiciel a \u00E9t\u00E9 mis \u00E0 jour.\n"+
|
// "Votre logiciel a \u00E9t\u00E9 mis \u00E0 jour.\n"+
|
||||||
"Vous devez relancer l'application\n", "Information", JOptionPane.ERROR_MESSAGE);
|
// "Vous devez relancer l'application\n", "Information", JOptionPane.ERROR_MESSAGE);
|
||||||
System.exit (0);
|
// System.exit (0);
|
||||||
}
|
// }
|
||||||
if (oldJar.exists ())
|
// if (oldJar.exists ())
|
||||||
oldJar.delete ();
|
// oldJar.delete ();
|
||||||
} catch (FileNotFoundException e) {
|
// } catch (FileNotFoundException e) {
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ public class LaunchUpdatedAdecWatt {
|
|||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
static public void main (String[] args) {
|
static public void main (String[] args) {
|
||||||
|
System.err.println ("LaunchUpdatedAdecWatt...");
|
||||||
Config.setPWD (LaunchUpdatedAdecWatt.class);
|
Config.setPWD (LaunchUpdatedAdecWatt.class);
|
||||||
File dir = Config.getPWD ().getParentFile ();
|
File dir = Config.getPWD ().getParentFile ();
|
||||||
RemoteUpdate.renameNewFile (dir);
|
RemoteUpdate.renameNewFile (dir);
|
||||||
|
@ -77,7 +77,11 @@ public class AdecWatt extends StateNotifier {
|
|||||||
iconDB.reload ();
|
iconDB.reload ();
|
||||||
imageDB.reload ();
|
imageDB.reload ();
|
||||||
permanentDB.reload ();
|
permanentDB.reload ();
|
||||||
|
(new Thread () {
|
||||||
|
public void run () {
|
||||||
inseeDB = InseeDB.readDocument (Config.getDataUrl ("data", "server", "Insee.xml"));
|
inseeDB = InseeDB.readDocument (Config.getDataUrl ("data", "server", "Insee.xml"));
|
||||||
|
}
|
||||||
|
}).start ();
|
||||||
broadcastUpdate (BroadcastUnitRoots);
|
broadcastUpdate (BroadcastUnitRoots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +114,7 @@ public class PermanentDB {
|
|||||||
try {
|
try {
|
||||||
if (file.length () == 0)
|
if (file.length () == 0)
|
||||||
continue;
|
continue;
|
||||||
|
Log.writeLog ("PermanentDB", "load "+srcDir+"/"+file.getName ());
|
||||||
FileInputStream fileInputStream = new FileInputStream (file);
|
FileInputStream fileInputStream = new FileInputStream (file);
|
||||||
Unit<?> unit = Unit.getInstanceFromStream (adecWatt, fileInputStream, file,
|
Unit<?> unit = Unit.getInstanceFromStream (adecWatt, fileInputStream, file,
|
||||||
serverToken.equals (srcDir) ? UnitLocation.Server : UnitLocation.Local);
|
serverToken.equals (srcDir) ? UnitLocation.Server : UnitLocation.Local);
|
||||||
|
Loading…
Reference in New Issue
Block a user