Removed unnecessary extra layer in resource folder structure.
|
|
@ -72,7 +72,7 @@ task copyRecources(type: Copy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
project.subprojects.each { subProject ->
|
project.subprojects.each { subProject ->
|
||||||
from "${subProject.projectDir}/resource"
|
from "${subProject.projectDir}/resources"
|
||||||
}
|
}
|
||||||
|
|
||||||
into("${buildDir}/resources")
|
into("${buildDir}/resources")
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
|
@ -32,13 +32,13 @@ public class HalContext {
|
||||||
static {
|
static {
|
||||||
if (FileUtil.find("build/resources/") != null)
|
if (FileUtil.find("build/resources/") != null)
|
||||||
RESOURCE_ROOT = "build/resources";
|
RESOURCE_ROOT = "build/resources";
|
||||||
else if (FileUtil.find("resource/resource/") != null)
|
else if (FileUtil.find("resources/") != null)
|
||||||
RESOURCE_ROOT = "resource";
|
RESOURCE_ROOT = "resources";
|
||||||
else
|
else
|
||||||
RESOURCE_ROOT = ".";
|
RESOURCE_ROOT = ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String RESOURCE_WEB_ROOT = HalContext.RESOURCE_ROOT + "/resource/web";
|
public static final String RESOURCE_WEB_ROOT = HalContext.RESOURCE_ROOT + "/web";
|
||||||
|
|
||||||
private static final String CONF_FILE = "hal.conf";
|
private static final String CONF_FILE = "hal.conf";
|
||||||
static final String DB_FILE = "hal.db";
|
static final String DB_FILE = "hal.db";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public class HalCoreDatabaseUpgrader extends HalDatabaseUpgrader {
|
||||||
private static final Logger logger = LogUtil.getLogger();
|
private static final Logger logger = LogUtil.getLogger();
|
||||||
|
|
||||||
private static final int REFERENCE_DB_VERSION = 17;
|
private static final int REFERENCE_DB_VERSION = 17;
|
||||||
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/resource/hal-core-reference.db";
|
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/hal-core-reference.db";
|
||||||
|
|
||||||
private static final int CLEAR_INTERNAL_AGGR_DATA_DB_VERSION = 11;
|
private static final int CLEAR_INTERNAL_AGGR_DATA_DB_VERSION = 11;
|
||||||
private static final int CLEAR_EXTERNAL_AGGR_DATA_DB_VERSION = 0;
|
private static final int CLEAR_EXTERNAL_AGGR_DATA_DB_VERSION = 0;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import zutil.log.LogUtil;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
||||||
public class SensorDataAggregationDaemonTest {
|
public class SensorDataAggregationDaemonTest {
|
||||||
private static final String DEFAULT_DB_FILE = "resource/resource/hal-core-reference.db";
|
private static final String DEFAULT_DB_FILE = HalContext.RESOURCE_ROOT + "/hal-core-reference.db";
|
||||||
|
|
||||||
private static DBConnection db;
|
private static DBConnection db;
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ public class SensorDataAggregationDaemonTest {
|
||||||
db = new DBConnection(DBConnection.DBMS.SQLite, ":memory:");
|
db = new DBConnection(DBConnection.DBMS.SQLite, ":memory:");
|
||||||
HalContext.setDB(db);
|
HalContext.setDB(db);
|
||||||
|
|
||||||
//upgrade the database to latest version
|
//upgrade the database to the latest version
|
||||||
System.out.println("Upgrading in-memory database to latest version");
|
System.out.println("Upgrading in-memory database to latest version");
|
||||||
DBConnection referenceDB = new DBConnection(DBConnection.DBMS.SQLite, DEFAULT_DB_FILE);
|
DBConnection referenceDB = new DBConnection(DBConnection.DBMS.SQLite, DEFAULT_DB_FILE);
|
||||||
final DBUpgradeHandler handler = new DBUpgradeHandler(referenceDB);
|
final DBUpgradeHandler handler = new DBUpgradeHandler(referenceDB);
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
|
@ -8,7 +8,7 @@ import se.hal.intf.HalDatabaseUpgrader;
|
||||||
*/
|
*/
|
||||||
public class NVRDatabaseUpgrader extends HalDatabaseUpgrader {
|
public class NVRDatabaseUpgrader extends HalDatabaseUpgrader {
|
||||||
private static final int REFERENCE_DB_VERSION = 2;
|
private static final int REFERENCE_DB_VERSION = 2;
|
||||||
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/resource/hal-nvr-reference.db";
|
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/hal-nvr-reference.db";
|
||||||
|
|
||||||
|
|
||||||
public NVRDatabaseUpgrader() {
|
public NVRDatabaseUpgrader() {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import java.util.logging.Logger;
|
||||||
public class RTSPCameraRecorder implements Runnable {
|
public class RTSPCameraRecorder implements Runnable {
|
||||||
private static final Logger logger = LogUtil.getLogger();
|
private static final Logger logger = LogUtil.getLogger();
|
||||||
|
|
||||||
private static final File FFMPEG_BINARY_PATH = FileUtil.find(HalContext.RESOURCE_ROOT + "/resource/bin/");
|
private static final File FFMPEG_BINARY_PATH = FileUtil.find(HalContext.RESOURCE_ROOT + "/bin/");
|
||||||
|
|
||||||
private RTSPCameraConfig camera;
|
private RTSPCameraConfig camera;
|
||||||
private String storagePath;
|
private String storagePath;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import zutil.parser.Templator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class PCHeatMapWebPage extends HalWebPage {
|
public class PCHeatMapWebPage extends HalWebPage {
|
||||||
private static final String TEMPLATE = HalContext.RESOURCE_ROOT + "/resource/web/pc_heatmap.tmpl";
|
private static final String TEMPLATE = HalContext.RESOURCE_ROOT + "/web/pc_heatmap.tmpl";
|
||||||
|
|
||||||
|
|
||||||
public PCHeatMapWebPage() {
|
public PCHeatMapWebPage() {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import se.hal.intf.HalDatabaseUpgrader;
|
||||||
*/
|
*/
|
||||||
public class ZigbeeHalDatabaseUpgrader extends HalDatabaseUpgrader {
|
public class ZigbeeHalDatabaseUpgrader extends HalDatabaseUpgrader {
|
||||||
private static final int REFERENCE_DB_VERSION = 1;
|
private static final int REFERENCE_DB_VERSION = 1;
|
||||||
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/resource/hal-zigbee-reference.db";
|
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/hal-zigbee-reference.db";
|
||||||
|
|
||||||
|
|
||||||
public ZigbeeHalDatabaseUpgrader() {
|
public ZigbeeHalDatabaseUpgrader() {
|
||||||
|
|
|
||||||