Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
update deploy improvements for windows - ready for release now :-)
lotusf284386b63b1
diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.javaindex bcbe3d565..fbdf11854 100644--- a/htroot/ConfigUpdate_p.java+++ b/htroot/ConfigUpdate_p.java@@ -149,7 +149,10 @@ public class ConfigUpdate_p {downloadedreleases.add(release);} catch (RuntimeException e) {// not a valid release- new File(sb.releasePath, downloaded[j]).deleteOnExit(); // can be also a restart- or deploy-file+ // can be also a restart- or deploy-file+ File invalid = new File(sb.releasePath, downloaded[j]);+ if (!invalid.getName().contains(".bat")) // Windows doesn't like deleted scripts+ invalid.deleteOnExit();}}dflt = (downloadedreleases.size() == 0) ? null : downloadedreleases.last();diff --git a/source/de/anomic/server/serverSystem.java b/source/de/anomic/server/serverSystem.javaindex 2447761f7..bf32c3e26 100644--- a/source/de/anomic/server/serverSystem.java+++ b/source/de/anomic/server/serverSystem.java@@ -348,7 +348,7 @@ public final class serverSystem {String script = null;if(isWindows){starterFileExtension = ".starter.bat";- // TODO: use /K to debug, /C for release+ // use /K to debug, /C for releasescript = "start /MIN CMD /C " + scriptFile.getAbsolutePath().replaceAll(" ", "\\ ");} else { // unix/linuxstarterFileExtension = ".starter.sh";diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.javaindex fbbdd09e5..95f034259 100644--- a/source/de/anomic/yacy/yacyVersion.java+++ b/source/de/anomic/yacy/yacyVersion.java@@ -373,7 +373,7 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<yaString apphome = sb.getRootPath().toString();if (serverSystem.isWindows) {- File startType = new File(sb.getRootPath(), "DATA/yacy.noconsole");+ File startType = new File(sb.getRootPath(), "DATA/yacy.noconsole".replace("/", File.separator));String starterFile = "startYACY.bat";if (startType.exists()) starterFile = "startYACY_noconsole.bat"; // startType noconsole@@ -451,8 +451,10 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<yaString script = null;String scriptFileName = null;if(serverSystem.isWindows){+ File startType = new File(sb.getRootPath(), "DATA/yacy.noconsole".replace("/", File.separator));+ String starterFile = "startYACY.bat";+ if (startType.exists()) starterFile = "startYACY_noconsole.bat"; // startType noconsolescript =- // TODO: does YaCy delete this file after 2nd update-shutdown? "Die Batchdatei kann nicht gefunden werden.""@echo off" + serverCore.LF_STRING +"title YaCy updater" + serverCore.LF_STRING +"echo YACY UPDATER" + serverCore.LF_STRING +@@ -462,7 +464,6 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya":WAIT" + serverCore.LF_STRING +"ping -n 2 127.0.0.1 >nul" + serverCore.LF_STRING +"IF exist ..\\yacy.running goto WAIT" + serverCore.LF_STRING +- // Error: "Die Batchdatei kann nicht gefunden werden.""IF not exist yacy goto NODATA" + serverCore.LF_STRING +"cd yacy" + serverCore.LF_STRING +@@ -481,7 +482,7 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya":END" + serverCore.LF_STRING +"cd " + apphome + serverCore.LF_STRING +- "start /MIN CMD /C startYACY.bat" + serverCore.LF_STRING;+ "start /MIN CMD /C " + starterFile + serverCore.LF_STRING;scriptFileName = "update.bat";} else { // unix/linuxscript =