diff --git a/Setup_1.940.bas b/Setup_1.940.bas new file mode 100644 index 000000000..91c7765d0 --- /dev/null +++ b/Setup_1.940.bas @@ -0,0 +1,21 @@ +Rem +Rem 2-1-2025 +Rem installer for yacy windows + +Shell "copy /b java17_0 + java17_1 + java17_2 java17.msi" +Print "Joining files" +_Delay 5 + +Shell "start /w java17.msi /norestart" +Print "Installing java 17" +Rem _delay 140 +_Delay 10 +Shell "refresh.cmd" +Print "refreshing path" +_Delay 10 +Shell "startYACYWin.cmd" +Print "starting yacy 1.940" +_Delay 20 +Stop + + diff --git a/Setup_1.940.exe b/Setup_1.940.exe new file mode 100644 index 000000000..8dea6221f Binary files /dev/null and b/Setup_1.940.exe differ diff --git a/java17_0 b/java17_0 new file mode 100644 index 000000000..ba03bf548 Binary files /dev/null and b/java17_0 differ diff --git a/java17_1 b/java17_1 new file mode 100644 index 000000000..76abed903 Binary files /dev/null and b/java17_1 differ diff --git a/java17_2 b/java17_2 new file mode 100644 index 000000000..02ef990f5 Binary files /dev/null and b/java17_2 differ diff --git a/joinjava.cmd b/joinjava.cmd new file mode 100644 index 000000000..5dddbf711 --- /dev/null +++ b/joinjava.cmd @@ -0,0 +1 @@ +copy /b java17_0 + java17_1 + java17_2 java17.msi diff --git a/refresh.cmd b/refresh.cmd new file mode 100644 index 000000000..945f0377e --- /dev/null +++ b/refresh.cmd @@ -0,0 +1,68 @@ +@echo off +:: +:: RefreshEnv.cmd +:: +:: Batch file to read environment variables from registry and +:: set session variables to these values. +:: +:: With this batch file, there should be no need to reload command +:: environment every time you want environment changes to propagate + +::echo "RefreshEnv.cmd only works from cmd.exe, please install the Chocolatey Profile to take advantage of refreshenv from PowerShell" +echo | set /p dummy="Refreshing environment variables from registry for cmd.exe. Please wait..." + +goto main + +:: Set one environment variable from registry key +:SetFromReg + "%WinDir%\System32\Reg" QUERY "%~1" /v "%~2" > "%TEMP%\_envset.tmp" 2>NUL + for /f "usebackq skip=2 tokens=2,*" %%A IN ("%TEMP%\_envset.tmp") do ( + echo/set "%~3=%%B" + ) + goto :EOF + +:: Get a list of environment variables from registry +:GetRegEnv + "%WinDir%\System32\Reg" QUERY "%~1" > "%TEMP%\_envget.tmp" + for /f "usebackq skip=2" %%A IN ("%TEMP%\_envget.tmp") do ( + if /I not "%%~A"=="Path" ( + call :SetFromReg "%~1" "%%~A" "%%~A" + ) + ) + goto :EOF + +:main + echo/@echo off >"%TEMP%\_env.cmd" + + :: Slowly generating final file + call :GetRegEnv "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" >> "%TEMP%\_env.cmd" + call :GetRegEnv "HKCU\Environment">>"%TEMP%\_env.cmd" >> "%TEMP%\_env.cmd" + + :: Special handling for PATH - mix both User and System + call :SetFromReg "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" Path Path_HKLM >> "%TEMP%\_env.cmd" + call :SetFromReg "HKCU\Environment" Path Path_HKCU >> "%TEMP%\_env.cmd" + + :: Caution: do not insert space-chars before >> redirection sign + echo/set "Path=%%Path_HKLM%%;%%Path_HKCU%%" >> "%TEMP%\_env.cmd" + + :: Cleanup + del /f /q "%TEMP%\_envset.tmp" 2>nul + del /f /q "%TEMP%\_envget.tmp" 2>nul + + :: capture user / architecture + SET "OriginalUserName=%USERNAME%" + SET "OriginalArchitecture=%PROCESSOR_ARCHITECTURE%" + + :: Set these variables + call "%TEMP%\_env.cmd" + + :: Cleanup + del /f /q "%TEMP%\_env.cmd" 2>nul + + :: reset user / architecture + SET "USERNAME=%OriginalUserName%" + SET "PROCESSOR_ARCHITECTURE=%OriginalArchitecture%" + + echo | set /p dummy="Finished." + echo . +timeout 5 \ No newline at end of file diff --git a/startYACY.bat b/startYACY.bat deleted file mode 100644 index 5b4dce28c..000000000 --- a/startYACY.bat +++ /dev/null @@ -1,71 +0,0 @@ -@Echo Off -title YaCy - -REM setting startup type for proper restart -if not exist DATA md DATA -echo . >DATA\yacy.noconsole - -Rem Setting the classpath -Set CLASSPATH=lib\yacycore.jar - -REM Please change the "javastart" settings in the web-interface "Basic Configuration" -> "Advanced" -set jmx= -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 - -:STARTJAVA -set javacmd=%javacmd% -Djava.awt.headless=true -Dsolr.directoryFactory=solr.MMapDirectoryFactory -Dfile.encoding=UTF-8 - -Rem Starting YaCy -Echo Generated classpath:%CLASSPATH% -Echo JRE Parameters:%javacmd% -Echo Priority:%priority% -Echo *************************************************************************** -Echo. -Echo If you see a message like "java" not found, you probably have to install Java. -Echo. -Echo You can download Java at http://java.com/ -Echo. -Echo *************************************************************************** -Rem commandline parameter added for -config option, like -config "port=8090" "adminAccount=admin:password" -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 - -Echo You can close the console safely now. - -GoTo :END - -Rem PUBLIC is now freeworld (r4575) -:RENAMEINDEX -for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do ( - if "%%i"=="network.unit.name" set networkname=%%j -) -if not defined networkname set networkname=PUBLIC -cd DATA\INDEX -ren PUBLIC %networkname% -cd .. -cd .. - -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 ( - if "%%i"=="javastart_Xmx" set jmx=%%j - if "%%i"=="javastart_priority" set priolvl=%%j -) -if defined jmx set javacmd=-%jmx% -if defined jms set javacmd=-%jms% %javacmd% -if defined priolvl ( - if %priolvl% == 20 set priority=/LOW - if %priolvl% == 10 set priority=/BELOWNORMAL -) - -GoTo :STARTJAVA - -Rem Target needed to jump to the end of the file -:END diff --git a/startYACY - Copy.bat.cmd b/startYACYWin.cmd similarity index 95% rename from startYACY - Copy.bat.cmd rename to startYACYWin.cmd index 5b4dce28c..09d682806 100644 --- a/startYACY - Copy.bat.cmd +++ b/startYACYWin.cmd @@ -35,7 +35,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% javaw %javacmd% -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9 Echo You can close the console safely now.