mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
V2.02.14b
Fix XML writer bug Add code to remove old garbage from log file folder
This commit is contained in:
parent
abca8f5ff7
commit
655310a270
@ -6,7 +6,7 @@
|
|||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/ojdk-21.0.1">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<groupId>org.pamguard</groupId>
|
<groupId>org.pamguard</groupId>
|
||||||
<artifactId>Pamguard</artifactId>
|
<artifactId>Pamguard</artifactId>
|
||||||
<name>Pamguard</name>
|
<name>Pamguard</name>
|
||||||
<version>2.02.14a</version>
|
<version>2.02.14b</version>
|
||||||
<description>Pamguard using Maven to control dependencies</description>
|
<description>Pamguard using Maven to control dependencies</description>
|
||||||
<url>www.pamguard.org</url>
|
<url>www.pamguard.org</url>
|
||||||
<organization>
|
<organization>
|
||||||
@ -137,6 +137,13 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
<configuration>
|
||||||
|
<reuseForks>false</reuseForks>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
@ -163,19 +170,25 @@
|
|||||||
<name>bedatadriven public repo</name>
|
<name>bedatadriven public repo</name>
|
||||||
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
|
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
<id>talan</id>
|
|
||||||
<name>talan</name>
|
|
||||||
<url>https://nexus.talanlabs.com/content/repositories/releases/</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>central</id>
|
<id>central</id>
|
||||||
<url>https://repo1.maven.org/maven2</url>
|
<url>https://repo1.maven.org/maven2</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
<version>5.11.3</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>junit-jupiter-params</artifactId>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -185,6 +198,17 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit</groupId>
|
||||||
|
<artifactId>junit-bom</artifactId>
|
||||||
|
<version>5.11.3</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>11</maven.compiler.target>
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
<maven.compiler.source>11</maven.compiler.source>
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.pamguard</groupId>
|
<groupId>org.pamguard</groupId>
|
||||||
<artifactId>Pamguard</artifactId>
|
<artifactId>Pamguard</artifactId>
|
||||||
<version>2.02.14a</version>
|
<version>2.02.14b</version>
|
||||||
<name>Pamguard</name>
|
<name>Pamguard</name>
|
||||||
<description>Pamguard using Maven to control dependencies</description>
|
<description>Pamguard using Maven to control dependencies</description>
|
||||||
<url>www.pamguard.org</url>
|
<url>www.pamguard.org</url>
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package PamController;
|
package PamController;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FilenameFilter;
|
||||||
|
|
||||||
|
import org.apache.commons.io.filefilter.FileFilterUtils;
|
||||||
|
|
||||||
import PamUtils.FileFunctions;
|
import PamUtils.FileFunctions;
|
||||||
|
|
||||||
@ -143,6 +146,57 @@ public class PamFolders {
|
|||||||
return homeFolder;
|
return homeFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete temporary files that get dumped in the homd folder, but not deleted properly
|
||||||
|
* if PAMGuard crashes. It's possible that some may be locked by the current, or other
|
||||||
|
* running processes, so don't worry too much if some can't delete.
|
||||||
|
* @param string file mask for deleteion
|
||||||
|
*/
|
||||||
|
public static boolean deleteTempFiles(String fileMask) {
|
||||||
|
return deleteTempFiles(getHomeFolder(), fileMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean deleteTempFiles(String root, String fileMask) {
|
||||||
|
File rootFolder = new File(root);
|
||||||
|
if (rootFolder.exists() == false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String[] files = null;
|
||||||
|
try {
|
||||||
|
files = rootFolder.list(new FilenameFilter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean accept(File dir, String name) {
|
||||||
|
if (name.endsWith(fileMask)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (files == null) return true;
|
||||||
|
int success = 0;
|
||||||
|
int fail = 0;
|
||||||
|
for (int i = 0; i < files.length; i ++) {
|
||||||
|
try {
|
||||||
|
File aFile = new File(root + File.separator + files[i]);
|
||||||
|
if (aFile.delete()) {
|
||||||
|
success++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fail++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
System.out.printf("Unable to delete temp file %s\n", files[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,12 @@ public class PamguardVersionInfo {
|
|||||||
* Version number, major version.minorversion.sub-release.
|
* Version number, major version.minorversion.sub-release.
|
||||||
* Note: can't go higher than sub-release 'f'
|
* Note: can't go higher than sub-release 'f'
|
||||||
*/
|
*/
|
||||||
static public final String version = "2.02.14a";
|
static public final String version = "2.02.14b";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release date
|
* Release date
|
||||||
*/
|
*/
|
||||||
static public final String date = " 28 October 2024";
|
static public final String date = " 20 November 2024";
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * Release type - Beta or Core
|
// * Release type - Beta or Core
|
||||||
|
@ -1091,7 +1091,6 @@ final public class PamModel implements PamSettings {
|
|||||||
// clear the current list
|
// clear the current list
|
||||||
pluginList.clear();
|
pluginList.clear();
|
||||||
daqList.clear();
|
daqList.clear();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If developing a new PAMPlugin in eclipse, the easiest way to do it is to make a new
|
* If developing a new PAMPlugin in eclipse, the easiest way to do it is to make a new
|
||||||
* Eclipse project for your plugin code. Within that project, copy this PamModel class
|
* Eclipse project for your plugin code. Within that project, copy this PamModel class
|
||||||
|
@ -82,6 +82,9 @@ public class NIDaqParams extends SoundCardParameters implements Serializable, Cl
|
|||||||
}
|
}
|
||||||
|
|
||||||
PamParameterSet ps = super.getParameterSet();
|
PamParameterSet ps = super.getParameterSet();
|
||||||
|
if (ps == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Field field = this.getClass().getDeclaredField("aiRange");
|
Field field = this.getClass().getDeclaredField("aiRange");
|
||||||
ps.put(new PrivatePamParameterData(this, field) {
|
ps.put(new PrivatePamParameterData(this, field) {
|
||||||
|
@ -42,6 +42,7 @@ import com.formdev.flatlaf.FlatLightLaf;
|
|||||||
|
|
||||||
import Acquisition.FolderInputSystem;
|
import Acquisition.FolderInputSystem;
|
||||||
import PamController.PamController;
|
import PamController.PamController;
|
||||||
|
import PamController.PamFolders;
|
||||||
import PamController.PamGUIManager;
|
import PamController.PamGUIManager;
|
||||||
import PamController.PamRunModeDialog;
|
import PamController.PamRunModeDialog;
|
||||||
import PamController.PamRunModeParams;
|
import PamController.PamRunModeParams;
|
||||||
@ -722,6 +723,12 @@ public class Pamguard {
|
|||||||
private static class FolderSizeMonitor implements Runnable {
|
private static class FolderSizeMonitor implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
PamFolders.deleteTempFiles(".x86_64.dll");
|
||||||
|
PamFolders.deleteTempFiles(".dll.lck");
|
||||||
|
PamFolders.deleteTempFiles(".tmp");
|
||||||
|
PamFolders.deleteTempFiles("-sqlitejdbc.dll");
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
long length = 0;
|
long length = 0;
|
||||||
File dir = new File(getSettingsFolder());
|
File dir = new File(getSettingsFolder());
|
||||||
|
@ -87,6 +87,9 @@ public class SimParameters extends SoundCardParameters implements Cloneable, Ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
PamParameterSet ps = super.getParameterSet();
|
PamParameterSet ps = super.getParameterSet();
|
||||||
|
if (ps == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Field field = this.getClass().getDeclaredField("simObjects");
|
Field field = this.getClass().getDeclaredField("simObjects");
|
||||||
ps.put(new PrivatePamParameterData(this, field) {
|
ps.put(new PrivatePamParameterData(this, field) {
|
||||||
|
Loading…
Reference in New Issue
Block a user