mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
better solution to update shortcut
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4920 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
c0dfe49743
commit
fc79f013c4
1
addon/YaCy-Search.html
Normal file
1
addon/YaCy-Search.html
Normal file
|
@ -0,0 +1 @@
|
|||
<meta http-equiv="refresh" content="0;url=http://localhost:8080/">
|
|
@ -1,2 +0,0 @@
|
|||
[InternetShortcut]
|
||||
URL=http://localhost:8080/
|
|
@ -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 seconds
|
||||
theServerCore.reconnect(7000);
|
||||
|
|
|
@ -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;
|
||||
|
|
6
yacy.nsi
6
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"
|
|||
SectionEnd
|
||||
|
||||
Section "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"
|
||||
SectionEnd
|
||||
|
||||
Section "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"
|
||||
SectionEnd
|
||||
|
||||
Section "YaCy in Startup"
|
||||
|
|
Loading…
Reference in New Issue
Block a user