diff --git a/app/build.gradle b/app/build.gradle index bbb76d271..ff4826af7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,7 +67,7 @@ dependencies { api group: 'org.kordamp.ikonli', name: 'ikonli-feather-pack', version: "12.2.0" api group: 'org.slf4j', name: 'slf4j-api', version: '2.0.16' api group: 'org.slf4j', name: 'slf4j-jdk-platform-logging', version: '2.0.16' - api 'io.xpipe:modulefs:0.1.5' + api 'io.xpipe:modulefs:0.1.6' api 'net.synedra:validatorfx:0.4.2' api files("$rootDir/gradle/gradle_scripts/atlantafx-base-2.0.2.jar") } diff --git a/build.gradle b/build.gradle index 350f0ebb2..363d07c68 100644 --- a/build.gradle +++ b/build.gradle @@ -134,6 +134,7 @@ project.ext { "--add-opens", "net.synedra.validatorfx/net.synedra.validatorfx=io.xpipe.app", "--add-opens", "java.base/java.nio.file=io.xpipe.app", "--add-exports", "javafx.graphics/com.sun.javafx.tk=io.xpipe.app", + "--add-exports", "jdk.zipfs/jdk.nio.zipfs=io.xpipe.modulefs", "--add-opens", "javafx.graphics/com.sun.glass.ui=io.xpipe.app", "--add-opens", "javafx.graphics/javafx.stage=io.xpipe.app", "--add-opens", "javafx.graphics/com.sun.javafx.tk.quantum=io.xpipe.app", diff --git a/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java b/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java index 09b0e8994..60a50af5d 100644 --- a/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java +++ b/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java @@ -259,6 +259,12 @@ public class XPipeInstallation { public static String getLocalDefaultInstallationBasePath(boolean stage) { String path; if (OsType.getLocal().equals(OsType.WINDOWS)) { + var pg = System.getenv("ProgramFiles"); + var systemPath = Path.of(pg,stage ? "XPipe PTB" : "XPipe"); + if (Files.exists(systemPath)) { + return systemPath.toString(); + } + var base = System.getenv("LOCALAPPDATA"); path = FileNames.join(base, stage ? "XPipe PTB" : "XPipe"); } else if (OsType.getLocal().equals(OsType.LINUX)) { diff --git a/get-xpipe.ps1 b/get-xpipe.ps1 index f598c6b9e..24d2cbe7c 100644 --- a/get-xpipe.ps1 +++ b/get-xpipe.ps1 @@ -100,7 +100,7 @@ function Uninstall { param() # Quick heuristic to see whether is can be possibly installed - if (-not (Test-Path "$env:LOCALAPPDATA\$ProductName" -PathType Container)) { + if (-not ((Test-Path "$env:LOCALAPPDATA\$ProductName" -PathType Container) -or (Test-Path "$env:ProgramFiles\$ProductName" -PathType Container))) { return }