Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
better solution to update shortcut
lotusfc79f013c4c9
diff --git a/addon/YaCy-Search.html b/addon/YaCy-Search.htmlnew file mode 100644index 000000000..fbfeb8a8d--- /dev/null+++ b/addon/YaCy-Search.html@@ -0,0 +1 @@+<meta http-equiv="refresh" content="0;url=http://localhost:8080/">\ No newline at end of filediff --git a/addon/YaCy-Search.url b/addon/YaCy-Search.urldeleted file mode 100644index 1e3b94082..000000000--- a/addon/YaCy-Search.url+++ /dev/null@@ -1,2 +0,0 @@-[InternetShortcut]-URL=http://localhost:8080/diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex a91cc3584..aa4f80911 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -143,8 +143,7 @@ public class ConfigBasic {prop.put("nextStep_sslSupport", theServerCore.withSSL() ? "1" : "0");// generate new shortcut (used for Windows)- //yacyAccessible.setNewPortLink(Integer.parseInt(port));- // TODO: Windows doesn't open new location even when new content is written to file (some cache seem to be active)+ yacyAccessible.setNewPortLink(Integer.parseInt(port));// force reconnection in 7 secondstheServerCore.reconnect(7000);diff --git a/source/de/anomic/yacy/yacyAccessible.java b/source/de/anomic/yacy/yacyAccessible.javaindex e566bd73d..afc7289ed 100644--- a/source/de/anomic/yacy/yacyAccessible.java+++ b/source/de/anomic/yacy/yacyAccessible.java@@ -58,18 +58,14 @@ public class yacyAccessible {public boolean IWasAccessed;/**- * updates Shortcut /addon/YaCy-Search.url+ * updates Shortcut /addon/YaCy-Search.html* @param newPort*/public static void setNewPortLink(int newPort){try {plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();- File shortcut = new File(sb.getRootPath() + "/addon/YaCy-Search.url".replace("/", File.separator));- // FIXME (doesn't work) try destroying some Windows cache- shortcut.delete();- String content =- "[InternetShortcut]" + serverCore.LF_STRING +- "URL=http://localhost:" + newPort + "/" + serverCore.LF_STRING;+ File shortcut = new File(sb.getRootPath() + "/addon/YaCy-Search.html".replace("/", File.separator));+ String content = "<meta http-equiv=\"refresh\" content=\"0;url=http://localhost:" + newPort + "/\">";serverFileUtils.copy(content.getBytes(), shortcut);} catch (Exception e) {return;diff --git a/yacy.nsi b/yacy.nsiindex d1f69da8b..0d8e3c02f 100755--- a/yacy.nsi+++ b/yacy.nsi@@ -201,7 +201,7 @@ Section "Shortcuts in the Start Menu"CreateShortCut "$SMPROGRAMS\YaCy\stop YaCy.lnk" "$INSTDIR\stopYACY.bat" "" "$INSTDIR\addon\YaCy.ico"CreateShortCut "$SMPROGRAMS\YaCy\Readme.lnk" "$INSTDIR\readme.txt"CreateShortCut "$SMPROGRAMS\YaCy\Uninstall.lnk" "$INSTDIR\Uninstall.exe"- CreateShortCut "$SMPROGRAMS\YaCy\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.url" "" "$INSTDIR\addon\YaCy.ico"+ CreateShortCut "$SMPROGRAMS\YaCy\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.html" "" "$INSTDIR\addon\YaCy.ico"SectionEnd#Section "YACY on the Desktop"@@ -216,12 +216,12 @@ Section "YaCy on the Desktop"SectionEndSection "Searchpage on the Desktop"- CreateShortCut "$DESKTOP\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.url" "" "$INSTDIR\addon\YaCy.ico"+ CreateShortCut "$DESKTOP\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.html" "" "$INSTDIR\addon\YaCy.ico"SectionEndSection "Searchpage in the Quicklaunch"SectionIn 1 2 3- CreateShortCut "$QUICKLAUNCH\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.url" "" "$INSTDIR\addon\YaCy.ico"+ CreateShortCut "$QUICKLAUNCH\YaCy-Search.lnk" "$INSTDIR\addon\YaCy-Search.html" "" "$INSTDIR\addon\YaCy.ico"SectionEndSection "YaCy in Startup"