Build with GraalVM 22

This commit is contained in:
TheOtherP 2024-06-08 10:50:07 +02:00
parent 57f41bca33
commit cbdcf98dd6
7 changed files with 19 additions and 4 deletions

View File

@ -4,8 +4,8 @@ setlocal
rem call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set path=c:\Programme\graalvm\graalvm-community-openjdk-17.0.9+9.1\bin\;%PATH%;c:\Programme\graalvm\graalvm-community-openjdk-17.0.9+9.1\bin\
set java_home=c:\Programme\graalvm\graalvm-community-openjdk-17.0.9+9.1\
set path=c:\Programme\graalvm\graalvm-community-openjdk-22.0.1+8.1\bin\;%PATH%;c:\Programme\graalvm\graalvm-community-openjdk-22.0.1+8.1\bin\
set java_home=c:\Programme\graalvm\graalvm-community-openjdk-22.0.1+8.1\
set HYDRA_NATIVE_BUILD=true
call mvn -pl org.nzbhydra:core -Pnative clean native:compile -DskipTests

View File

@ -23,6 +23,7 @@ import org.nzbhydra.config.indexer.IndexerConfig;
import org.nzbhydra.externaltools.AddRequest;
import org.nzbhydra.externaltools.ExternalTools;
import org.nzbhydra.notifications.IndexerDisabledNotificationEvent;
import org.nzbhydra.systemcontrol.SystemControl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -57,6 +58,8 @@ public class DevEndpoint {
private boolean devMode;
private static final Logger logger = LoggerFactory.getLogger(DevEndpoint.class);
@Autowired
private SystemControl systemControl;
@Secured({"ROLE_ADMIN"})
@RequestMapping(value = "/dev/countDanglingIndexersearches", method = RequestMethod.GET)
@ -128,5 +131,14 @@ public class DevEndpoint {
unsafe.putAddress(0, 0);
}
@Secured({"ROLE_ADMIN"})
@RequestMapping(value = "/dev/shutDownForUpdate", method = RequestMethod.GET)
public void shutDownForUpdate() throws Exception {
if (!devMode) {
return;
}
systemControl.exitWithReturnCode(SystemControl.UPDATE_RETURN_CODE);
}
}

View File

@ -21,8 +21,8 @@ public class BrowserOpener {
Desktop desktop;
URI uri = urlCalculator.getLocalBaseUriBuilder().build().toUri();
try {
desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
logger.debug("Desktop supported: {}", Desktop.isDesktopSupported());
desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
} catch (Throwable e) {
logger.debug("Unable to get desktop", e);
logger.error("Unable to open browser. Go to {}", uri, e);

View File

@ -445,6 +445,7 @@ public class UpdateManager implements InitializingBean {
currentVersion = new SemanticVersion(currentVersionString);
loadPackageInfo();
logger.info("Running version {}", currentVersionString);
}
public PackageInfo getPackageInfo() {

View File

@ -10,6 +10,8 @@
text: "Correctly marked releases as final and added release dates. See #955"
- type: "fix"
text: "Restore shift click functionality. See #954"
- type: "fix"
text: "Updated the windows build libraries. This requires DLL files to be installed (alongside the main `core.exe´ file). They were previously included in the exe but now need to be provided alongside."
final: true
- version: "v7.1.0"
date: "2024-05-23"

View File

@ -4,6 +4,7 @@
<working_directory value="d:/NZBHydra/nzbhydra2/gowrappertest/update_native" />
<envs>
<env name="NZBHYDRA_FORCE_UPDATE" value="true" />
<env name="nzbhydra_dev_mode" value="true"/>
</envs>
<kind value="PACKAGE" />
<package value="theotherp/console" />

View File

@ -2,4 +2,3 @@ target/
.idea/*
*.iws
*.ipr
*.dll