fixed windows installer; updated download path for java installer

This commit is contained in:
Michael Peter Christen committed 2026-01-01 23:58:10 +01:00
1 parent c5801d3215
commit 3ecb0b459e
7 files changed
+762 -363

No files matched your search

+19
View File
@@ -87,6 +87,25 @@ Stop YaCy on the console with
./stopYACY.sh
```
### Build the Windows installer
Windows installers are built with NSIS and require the release payload produced by Ant.
Install NSIS (`makensis`) and then run:
```
ant distWinInstaller
```
This runs the full build, stages files into `RELEASE/MAIN`, and produces the installer
in `RELEASE/` as `yacy_v<version>_*.exe`.
If you want it in two steps, you can run:
```
ant copyMain4Dist
makensis RELEASE/WINDOWS/build.nsi
```
### Run YaCy using Docker
The Official YaCy Image is `yacy/yacy_search_server:latest`. It is hosted on Dockerhub at [https://hub.docker.com/r/yacy/yacy_search_server](https://hub.docker.com/r/yacy/yacy_search_server)
+680 -332
View File
File diff suppressed because it is too large. Load diff
+10 -3
View File
@@ -49,6 +49,10 @@
<property name="release_main" location="${release}/MAIN"/>
<property name="release_windows" location="${release}/WINDOWS"/>
<property name="release_mac" location="${release}/MAC"/>
<property name="root_abs" location="."/>
<property name="release_abs" location="${release}"/>
<property name="release_main_abs" location="${release_main}"/>
<property name="release_windows_abs" location="${release_windows}"/>
<property name="defaults" location="defaults"/>
<property name="RDFaParser" location="RDFaParser"/>
@@ -136,6 +140,10 @@
<property name="stdReleaseStub" value="yacy_v${releaseVersion}_${repository.revision.date}${repository.revision.time}_${repository.revision.hash}"/>
<property name="stdReleaseFile" value="${stdReleaseStub}.tar.gz"/>
<filter token="REPL_RELEASESTUB" value="${stdReleaseStub}"/>
<filter token="REPL_ROOT_ABS" value="${root_abs}"/>
<filter token="REPL_RELEASE_ABS" value="${release_abs}"/>
<filter token="REPL_RELEASE_MAIN_ABS" value="${release_main_abs}"/>
<filter token="REPL_RELEASE_WINDOWS_ABS" value="${release_windows_abs}"/>
<!-- apply replacments -->
<copy file="${defaults}/yacyBuild.properties.template" tofile="${defaults}/yacyBuild.properties" overwrite="true" filtering="true" />
@@ -375,7 +383,7 @@
</tarfileset>
</tar>
<delete dir="${release_main}"/>
<delete dir="${release_main}" failonerror="false"/>
<delete dir="${release_windows}" failonerror="false" />
<delete dir="${release}/SPECS" failonerror="false" />
</target>
@@ -528,13 +536,12 @@
<copy file="build.nsi" tofile="${release_windows}/build.nsi" overwrite="true" filtering="true" />
<exec executable="makensis">
<arg value="-V2" />
<arg value="-NOCD" />
<arg value="${release_windows}/build.nsi" />
</exec>
<move file="${release_windows}/${stdReleaseStub}.exe"
tofile="${release}/${stdReleaseStub}.exe" />
<delete dir="${release_main}"/>
<delete dir="${release_main}" failonerror="false"/>
<delete dir="${release_windows}" failonerror="false" />
</target>
+26 -4
View File
@@ -721,6 +721,18 @@ public final class yacy {
// case for the application path if started normally with a jre command
File applicationRoot = new File(System.getProperty("user.dir").replace('\\', '/'));
File dataRoot = applicationRoot;
final String dataRootOverrideProp = System.getProperty("yacy.data");
final String dataRootOverrideEnv = System.getenv("YACY_DATA");
final String dataRootOverride = (dataRootOverrideProp != null && !dataRootOverrideProp.isEmpty())
? dataRootOverrideProp
: dataRootOverrideEnv;
if (dataRootOverride != null && !dataRootOverride.isEmpty()) {
dataRoot = new File(dataRootOverride);
if(!dataRoot.isAbsolute()) {
/* data root folder provided as a path relative to the user home folder */
dataRoot = new File(System.getProperty("user.home").replace('\\', '/'), dataRootOverride);
}
}
//System.out.println("args.length=" + args.length);
//System.out.print("args=["); for (int i = 0; i < args.length; i++) System.out.print(args[i] + ", "); System.out.println("]");
if ((args.length >= 1) && (args[0].toLowerCase(Locale.ROOT).equals("-startup") || args[0].equals("-start"))) {
@@ -747,12 +759,22 @@ public final class yacy {
startup(dataRoot, applicationRoot, startupMemFree, startupMemTotal, true);
} else if ((args.length >= 1) && ((args[0].toLowerCase(Locale.ROOT).equals("-shutdown")) || (args[0].equals("-stop")))) {
// normal shutdown of yacy
if (args.length == 2) applicationRoot= new File(args[1]);
shutdown(applicationRoot);
if (args.length == 2) {
dataRoot = new File(args[1]);
if(!dataRoot.isAbsolute()) {
dataRoot = new File(System.getProperty("user.home").replace('\\', '/'), args[1]);
}
}
shutdown(dataRoot);
} else if ((args.length >= 1) && (args[0].toLowerCase(Locale.ROOT).equals("-update"))) {
// aut-update yacy
if (args.length == 2) applicationRoot= new File(args[1]);
update(applicationRoot);
if (args.length == 2) {
dataRoot = new File(args[1]);
if(!dataRoot.isAbsolute()) {
dataRoot = new File(System.getProperty("user.home").replace('\\', '/'), args[1]);
}
}
update(dataRoot);
} else if ((args.length >= 1) && (args[0].toLowerCase(Locale.ROOT).equals("-version"))) {
// show yacy version
System.out.println(copyright);
+11 -10
View File
@@ -2,8 +2,10 @@
title YaCy
REM setting startup type for proper restart
if not exist DATA md DATA
echo . >DATA\yacy.noconsole
if "%YACY_DATA%"=="" set "YACY_DATA=%LOCALAPPDATA%\YaCy"
set "YACY_DATA_DIR=%YACY_DATA%\DATA"
if not exist "%YACY_DATA_DIR%" md "%YACY_DATA_DIR%"
echo . >"%YACY_DATA_DIR%\yacy.noconsole"
Rem Setting the classpath
Set CLASSPATH=lib\yacycore.jar
@@ -14,8 +16,8 @@ set jms=
set javacmd=-Xmx600m
set priolvl=10
set priority=/BELOWNORMAL
if exist DATA\SETTINGS\httpProxy.conf GoTo :RENAMEINDEX
if exist DATA\SETTINGS\yacy.conf GoTo :GETSTARTOPTS
if exist "%YACY_DATA_DIR%\SETTINGS\httpProxy.conf" GoTo :RENAMEINDEX
if exist "%YACY_DATA_DIR%\SETTINGS\yacy.conf" GoTo :GETSTARTOPTS
:STARTJAVA
set javacmd=%javacmd% -Djava.awt.headless=true -Dsolr.directoryFactory=solr.MMapDirectoryFactory -Dfile.encoding=UTF-8
@@ -35,7 +37,7 @@ Rem commandline parameter added for -config option, like -config "port=8090" "ad
Rem special parameter "adminAccount=admin:password" calculates and sets new admin-pwd
Rem any parameter in yacy.conf can me modified this way (make sure to use correct upper/lower case)
start %priority% java %javacmd% -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9
start %priority% java %javacmd% -Dyacy.data="%YACY_DATA%" -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9
Echo You can close the console safely now.
@@ -43,18 +45,17 @@ GoTo :END
Rem PUBLIC is now freeworld (r4575)
:RENAMEINDEX
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do (
for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\httpProxy.conf") do (
if "%%i"=="network.unit.name" set networkname=%%j
)
if not defined networkname set networkname=PUBLIC
cd DATA\INDEX
pushd "%YACY_DATA_DIR%\INDEX"
ren PUBLIC %networkname%
cd ..
cd ..
popd
Rem This target is used to read java runtime parameters out of the yacy config file
:GETSTARTOPTS
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\yacy.conf) do (
for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\yacy.conf") do (
if "%%i"=="javastart_Xmx" set jmx=%%j
if "%%i"=="javastart_priority" set priolvl=%%j
)
+14 -12
View File
@@ -1,7 +1,10 @@
@Echo Off
title YaCy
if exist DATA\yacy.noconsole del DATA\yacy.noconsole
if "%YACY_DATA%"=="" set "YACY_DATA=%LOCALAPPDATA%\YaCy"
set "YACY_DATA_DIR=%YACY_DATA%\DATA"
if not exist "%YACY_DATA_DIR%" md "%YACY_DATA_DIR%"
if exist "%YACY_DATA_DIR%\yacy.noconsole" del "%YACY_DATA_DIR%\yacy.noconsole"
Rem Generating the proper classpath unsing loops and labels
Set CLASSPATH=lib/yacycore.jar
@@ -13,8 +16,8 @@ set javacmd=-Xmx600m
set priolvl=10
set priority=/BELOWNORMAL
set port=8090
if exist DATA\SETTINGS\httpProxy.conf GoTo :RENAMEINDEX
if exist DATA\SETTINGS\yacy.conf GoTo :GETSTARTOPTS
if exist "%YACY_DATA_DIR%\SETTINGS\httpProxy.conf" GoTo :RENAMEINDEX
if exist "%YACY_DATA_DIR%\SETTINGS\yacy.conf" GoTo :GETSTARTOPTS
:STARTJAVA
set javacmd=%javacmd% -XX:-UseGCOverheadLimit -Djava.awt.headless=true -Dfile.encoding=UTF-8
@@ -27,7 +30,7 @@ Echo Priority:%priority%
Echo ****************** YaCy Web Crawler/Indexer ^& Search Engine ******************
Echo **** (C) by Michael Peter Christen, usage granted under the GPL Version 2 ****
Echo **** USE AT YOUR OWN RISK! Project home and releases: https://yacy.net/ ****
Echo ** LOG of YaCy: DATA/LOG/yacy00.log (and yacy^<xx^>.log) **
Echo ** LOG of YaCy: %YACY_DATA_DIR%/LOG/yacy00.log (and yacy^<xx^>.log) **
Echo ** STOP YaCy: execute stopYACY.bat and wait some seconds **
Echo ** GET HELP for YaCy: join our community at https://community.searchlab.eu **
Echo *******************************************************************************
@@ -39,26 +42,25 @@ Rem commandline parameter added for -config option, like -config "port=8090" "ad
Rem special parameter "adminAccount=admin:password" calculates and sets new admin-pwd
Rem any parameter in yacy.conf can me modified this way (make sure to use correct upper/lower case)
start "YaCy" %priority% /B /WAIT java %javacmd% -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9
start "YaCy" %priority% /B /WAIT java %javacmd% -Dyacy.data="%YACY_DATA%" -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9
if not exist DATA\yacy.restart GoTo :END
del DATA\yacy.restart
if not exist "%YACY_DATA_DIR%\yacy.restart" GoTo :END
del "%YACY_DATA_DIR%\yacy.restart"
GoTo :GETSTARTOPTS
Rem PUBLIC is now freeworld (r4575)
:RENAMEINDEX
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do (
for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\httpProxy.conf") do (
if "%%i"=="network.unit.name" set networkname=%%j
)
if not defined networkname set networkname=PUBLIC
cd DATA\INDEX
pushd "%YACY_DATA_DIR%\INDEX"
ren PUBLIC %networkname%
cd ..
cd ..
popd
Rem This target is used to read java runtime parameters out of the yacy config file
:GETSTARTOPTS
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\yacy.conf) do (
for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\yacy.conf") do (
if "%%i"=="javastart_Xmx" set jmx=%%j
if "%%i"=="port" set port=%%j
if "%%i"=="javastart_priority" set priolvl=%%j
+2 -2
View File
@@ -6,5 +6,5 @@ Set CLASSPATH=lib\yacycore.jar
Rem Stopping yacy
Echo Generated Classpath:%CLASSPATH%
java -classpath %CLASSPATH% net.yacy.yacy -shutdown
if "%YACY_DATA%"=="" set "YACY_DATA=%LOCALAPPDATA%\YaCy"
java -Dyacy.data="%YACY_DATA%" -classpath %CLASSPATH% net.yacy.yacy -shutdown "%YACY_DATA%"