mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Various bug fixes
This commit is contained in:
parent
71e9539efd
commit
eba727619f
14 changed files with 66 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation files("$buildDir/generated-modules/sentry-6.11.0.jar")
|
implementation files("$buildDir/generated-modules/sentry-6.16.0.jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
addDependenciesModuleInfo {
|
addDependenciesModuleInfo {
|
||||||
|
@ -8,7 +8,7 @@ addDependenciesModuleInfo {
|
||||||
outputDirectory = file("$buildDir/generated-modules")
|
outputDirectory = file("$buildDir/generated-modules")
|
||||||
modules {
|
modules {
|
||||||
module {
|
module {
|
||||||
artifact 'io.sentry:sentry:6.11.0'
|
artifact 'io.sentry:sentry:6.16.0'
|
||||||
moduleInfoSource = '''
|
moduleInfoSource = '''
|
||||||
module io.sentry {
|
module io.sentry {
|
||||||
exports io.sentry;
|
exports io.sentry;
|
||||||
|
|
|
@ -210,6 +210,17 @@ final class FileListComp extends AnchorPane {
|
||||||
newItems.add(parentEntry);
|
newItems.add(parentEntry);
|
||||||
}
|
}
|
||||||
newItems.addAll(newValue);
|
newItems.addAll(newValue);
|
||||||
|
|
||||||
|
var hasModifiedDate =
|
||||||
|
newItems.size() == 0 || newItems.stream().anyMatch(entry -> entry.getDate() != null);
|
||||||
|
if (!hasModifiedDate) {
|
||||||
|
table.getColumns().remove(mtimeCol);
|
||||||
|
} else {
|
||||||
|
if (!table.getColumns().contains(mtimeCol)) {
|
||||||
|
table.getColumns().add(mtimeCol);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
table.getItems().setAll(newItems);
|
table.getItems().setAll(newItems);
|
||||||
|
|
||||||
var currentDirectory = fileList.getFileSystemModel().getCurrentDirectory();
|
var currentDirectory = fileList.getFileSystemModel().getCurrentDirectory();
|
||||||
|
|
|
@ -36,7 +36,6 @@ public class AboutTabComp extends Comp<CompStructure<?>> {
|
||||||
private Comp<?> createLinks() {
|
private Comp<?> createLinks() {
|
||||||
return new DynamicOptionsBuilder(false)
|
return new DynamicOptionsBuilder(false)
|
||||||
.addTitle("links")
|
.addTitle("links")
|
||||||
.addComp(AppI18n.observable("website"), hyperlink(Hyperlinks.WEBSITE), null)
|
|
||||||
.addComp(AppI18n.observable("documentation"), hyperlink(Hyperlinks.DOCUMENTATION), null)
|
.addComp(AppI18n.observable("documentation"), hyperlink(Hyperlinks.DOCUMENTATION), null)
|
||||||
.addComp(AppI18n.observable("discord"), hyperlink(Hyperlinks.DISCORD), null)
|
.addComp(AppI18n.observable("discord"), hyperlink(Hyperlinks.DISCORD), null)
|
||||||
.addComp(AppI18n.observable("slack"), hyperlink(Hyperlinks.SLACK), null)
|
.addComp(AppI18n.observable("slack"), hyperlink(Hyperlinks.SLACK), null)
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class AppExtensionManager {
|
||||||
private ModuleLayer baseLayer = ModuleLayer.boot();
|
private ModuleLayer baseLayer = ModuleLayer.boot();
|
||||||
private ModuleLayer extendedLayer;
|
private ModuleLayer extendedLayer;
|
||||||
|
|
||||||
public static void init(boolean loadProviders) {
|
public static void init(boolean loadProviders) throws Exception {
|
||||||
if (INSTANCE != null) {
|
if (INSTANCE != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,9 @@ public class AppProperties {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
fullVersion = Optional.ofNullable(props.getProperty("io.xpipe.app.fullVersion")).map(Boolean::parseBoolean).orElse(false);
|
fullVersion = Optional.ofNullable(props.getProperty("io.xpipe.app.fullVersion"))
|
||||||
|
.map(Boolean::parseBoolean)
|
||||||
|
.orElse(false);
|
||||||
version = Optional.ofNullable(props.getProperty("version")).orElse("dev");
|
version = Optional.ofNullable(props.getProperty("version")).orElse("dev");
|
||||||
build = Optional.ofNullable(props.getProperty("build")).orElse("unknown");
|
build = Optional.ofNullable(props.getProperty("build")).orElse("unknown");
|
||||||
buildUuid = Optional.ofNullable(System.getProperty("io.xpipe.app.buildId"))
|
buildUuid = Optional.ofNullable(System.getProperty("io.xpipe.app.buildId"))
|
||||||
|
|
|
@ -14,6 +14,7 @@ import java.util.Date;
|
||||||
public class SentryErrorHandler {
|
public class SentryErrorHandler {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
AppProperties.init();
|
||||||
if (AppProperties.get().getSentryUrl() != null) {
|
if (AppProperties.get().getSentryUrl() != null) {
|
||||||
Sentry.init(options -> {
|
Sentry.init(options -> {
|
||||||
options.setDsn(AppProperties.get().getSentryUrl());
|
options.setDsn(AppProperties.get().getSentryUrl());
|
||||||
|
@ -24,6 +25,7 @@ public class SentryErrorHandler {
|
||||||
options.setRelease(AppProperties.get().getVersion());
|
options.setRelease(AppProperties.get().getVersion());
|
||||||
options.setEnableShutdownHook(false);
|
options.setEnableShutdownHook(false);
|
||||||
options.setProguardUuid(AppProperties.get().getBuildUuid().toString());
|
options.setProguardUuid(AppProperties.get().getBuildUuid().toString());
|
||||||
|
options.setTag("os", System.getProperty("os.name"));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import io.sentry.Sentry;
|
||||||
import io.xpipe.app.core.*;
|
import io.xpipe.app.core.*;
|
||||||
import io.xpipe.app.core.mode.OperationMode;
|
import io.xpipe.app.core.mode.OperationMode;
|
||||||
import io.xpipe.app.update.AppUpdater;
|
import io.xpipe.app.update.AppUpdater;
|
||||||
|
import io.xpipe.app.util.Hyperlinks;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.Alert;
|
||||||
import javafx.scene.control.ButtonBar;
|
import javafx.scene.control.ButtonBar;
|
||||||
|
@ -86,24 +87,23 @@ public class TerminalErrorHandler implements ErrorHandler {
|
||||||
|
|
||||||
private static void handleProbableUpdate() {
|
private static void handleProbableUpdate() {
|
||||||
try {
|
try {
|
||||||
AppUpdater.initFallback();
|
AppUpdater.init();
|
||||||
var rel = AppUpdater.get().checkForUpdate(true);
|
var rel = AppUpdater.get().checkForUpdate(true);
|
||||||
if (rel.isUpdate()) {
|
if (rel.isUpdate()) {
|
||||||
var update = AppWindowHelper.showBlockingAlert(alert -> {
|
var update = AppWindowHelper.showBlockingAlert(alert -> {
|
||||||
alert.setAlertType(Alert.AlertType.INFORMATION);
|
alert.setAlertType(Alert.AlertType.INFORMATION);
|
||||||
alert.setTitle(AppI18n.get("updateAvailableTitle"));
|
alert.setTitle(AppI18n.get("updateAvailableTitle"));
|
||||||
alert.setHeaderText(AppI18n.get("updateAvailableHeader"));
|
alert.setHeaderText(AppI18n.get("updateAvailableHeader", rel.getVersion()));
|
||||||
alert.getDialogPane()
|
alert.getDialogPane()
|
||||||
.setContent(AppWindowHelper.alertContentText(AppI18n.get("updateAvailableContent")));
|
.setContent(AppWindowHelper.alertContentText(AppI18n.get("updateAvailableContent")));
|
||||||
alert.getButtonTypes().clear();
|
alert.getButtonTypes().clear();
|
||||||
alert.getButtonTypes().add(new ButtonType(AppI18n.get("install"), ButtonBar.ButtonData.YES));
|
alert.getButtonTypes().add(new ButtonType(AppI18n.get("checkOutUpdate"), ButtonBar.ButtonData.YES));
|
||||||
alert.getButtonTypes().add(new ButtonType(AppI18n.get("ignore"), ButtonBar.ButtonData.NO));
|
alert.getButtonTypes().add(new ButtonType(AppI18n.get("ignore"), ButtonBar.ButtonData.NO));
|
||||||
})
|
})
|
||||||
.map(buttonType -> buttonType.getButtonData().isDefaultButton())
|
.map(buttonType -> buttonType.getButtonData().isDefaultButton())
|
||||||
.orElse(false);
|
.orElse(false);
|
||||||
if (update) {
|
if (update) {
|
||||||
AppUpdater.get().downloadUpdate();
|
Hyperlinks.open(rel.getReleaseUrl());
|
||||||
AppUpdater.get().executeUpdateAndClose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
package io.xpipe.app.launcher;
|
package io.xpipe.app.launcher;
|
||||||
|
|
||||||
import io.xpipe.app.comp.source.GuiDsCreatorMultiStep;
|
|
||||||
import io.xpipe.app.core.mode.OperationMode;
|
import io.xpipe.app.core.mode.OperationMode;
|
||||||
import io.xpipe.app.ext.ActionProvider;
|
import io.xpipe.app.ext.ActionProvider;
|
||||||
import io.xpipe.app.ext.DataSourceProvider;
|
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.issue.TrackEvent;
|
import io.xpipe.app.issue.TrackEvent;
|
||||||
import io.xpipe.core.impl.FileStore;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
|
@ -117,7 +114,7 @@ public abstract class LauncherInput {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiDsCreatorMultiStep.showForStore(DataSourceProvider.Category.STREAM, FileStore.local(file), null);
|
// GuiDsCreatorMultiStep.showForStore(DataSourceProvider.Category.STREAM, FileStore.local(file), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class AppDownloads {
|
||||||
var repo = getRepository();
|
var repo = getRepository();
|
||||||
|
|
||||||
// Always choose most up-to-date release as we assume that there are only full releases and prereleases
|
// Always choose most up-to-date release as we assume that there are only full releases and prereleases
|
||||||
if (AppPrefs.get().updateToPrereleases().get()) {
|
if (AppPrefs.get() != null && AppPrefs.get().updateToPrereleases().get()) {
|
||||||
return Optional.ofNullable(repo.listReleases().iterator().next());
|
return Optional.ofNullable(repo.listReleases().iterator().next());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package io.xpipe.app.update;
|
package io.xpipe.app.update;
|
||||||
|
|
||||||
import io.xpipe.app.core.AppCache;
|
import io.xpipe.app.core.AppCache;
|
||||||
import io.xpipe.app.core.AppExtensionManager;
|
|
||||||
import io.xpipe.app.core.AppProperties;
|
import io.xpipe.app.core.AppProperties;
|
||||||
import io.xpipe.app.core.mode.OperationMode;
|
import io.xpipe.app.core.mode.OperationMode;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
|
@ -10,8 +9,6 @@ import io.xpipe.app.prefs.AppPrefs;
|
||||||
import io.xpipe.app.util.BusyProperty;
|
import io.xpipe.app.util.BusyProperty;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.app.util.XPipeDistributionType;
|
import io.xpipe.app.util.XPipeDistributionType;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
|
||||||
import io.xpipe.core.util.XPipeSession;
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
import javafx.beans.property.BooleanProperty;
|
||||||
import javafx.beans.property.Property;
|
import javafx.beans.property.Property;
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
|
@ -91,16 +88,6 @@ public class AppUpdater {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initFallback() {
|
|
||||||
AppProperties.init();
|
|
||||||
XPipeSession.init(AppProperties.get().getBuildUuid());
|
|
||||||
|
|
||||||
AppExtensionManager.init(false);
|
|
||||||
ProcessControlProvider.init(AppExtensionManager.getInstance().getExtendedLayer());
|
|
||||||
|
|
||||||
INSTANCE = new AppUpdater();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
if (INSTANCE != null) {
|
if (INSTANCE != null) {
|
||||||
return;
|
return;
|
||||||
|
@ -174,7 +161,9 @@ public class AppUpdater {
|
||||||
event("Performing update download ...");
|
event("Performing update download ...");
|
||||||
try {
|
try {
|
||||||
var downloadFile = AppDownloads.downloadInstaller(
|
var downloadFile = AppDownloads.downloadInstaller(
|
||||||
lastUpdateCheckResult.getValue().getAssetType(), lastUpdateCheckResult.getValue().version, false);
|
lastUpdateCheckResult.getValue().getAssetType(),
|
||||||
|
lastUpdateCheckResult.getValue().version,
|
||||||
|
false);
|
||||||
if (downloadFile.isEmpty()) {
|
if (downloadFile.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
package io.xpipe.app.util;
|
package io.xpipe.app.util;
|
||||||
|
|
||||||
import io.xpipe.app.core.App;
|
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
public class Hyperlinks {
|
public class Hyperlinks {
|
||||||
|
|
||||||
public static final String WEBSITE = "https://xpipe.io";
|
public static final String WEBSITE = "https://xpipe.io";
|
||||||
|
@ -16,23 +12,41 @@ public class Hyperlinks {
|
||||||
"https://join.slack.com/t/x-pipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg";
|
"https://join.slack.com/t/x-pipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg";
|
||||||
public static final String DOCS_PRIVACY = "https://xpipe.io/docs/privacy";
|
public static final String DOCS_PRIVACY = "https://xpipe.io/docs/privacy";
|
||||||
|
|
||||||
public static Runnable openLink(String s) {
|
static final String[] browsers = {
|
||||||
return () -> open(s);
|
"xdg-open",
|
||||||
}
|
"google-chrome",
|
||||||
|
"firefox",
|
||||||
|
"opera",
|
||||||
|
"konqueror",
|
||||||
|
"mozilla"
|
||||||
|
};
|
||||||
|
|
||||||
public static void open(String url) {
|
@SuppressWarnings("deprecation")
|
||||||
var t = new Thread(() -> {
|
public static void open(String uri) {
|
||||||
|
String osName = System.getProperty("os.name");
|
||||||
try {
|
try {
|
||||||
if (App.getApp() != null) {
|
if (osName.startsWith("Mac OS")) {
|
||||||
App.getApp().getHostServices().showDocument(url);
|
Runtime.getRuntime().exec(
|
||||||
} else {
|
"open " + uri);
|
||||||
Desktop.getDesktop().browse(URI.create(url));
|
} else if (osName.startsWith("Windows")) {
|
||||||
|
Runtime.getRuntime().exec(
|
||||||
|
"rundll32 url.dll,FileProtocolHandler " + uri);
|
||||||
|
} else { //assume Unix or Linux
|
||||||
|
String browser = null;
|
||||||
|
for (String b : browsers) {
|
||||||
|
if (browser == null && Runtime.getRuntime().exec(
|
||||||
|
new String[]{"which", b}).getInputStream().read() != -1) {
|
||||||
|
Runtime.getRuntime().exec(new String[]{browser = b, uri});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (browser == null) {
|
||||||
|
throw new Exception("No web browser found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ErrorEvent.fromThrowable(e).build().handle();
|
// should not happen
|
||||||
|
// dump stack for debug purpose
|
||||||
|
ErrorEvent.fromThrowable(e).handle();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
t.setDaemon(true);
|
|
||||||
t.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,8 @@ updateReadyAlertHeader=An update to version $VERSION$ is ready to be installed
|
||||||
updateReadyAlertContent=This will install the new version and restart X-Pipe once the installation finished.
|
updateReadyAlertContent=This will install the new version and restart X-Pipe once the installation finished.
|
||||||
errorNoDetail=No error details are available
|
errorNoDetail=No error details are available
|
||||||
updateAvailableTitle=Update Available
|
updateAvailableTitle=Update Available
|
||||||
updateAvailableHeader=An X-Pipe update is available to install
|
updateAvailableHeader=An X-Pipe update to version $VERSION$ is available to install
|
||||||
updateAvailableContent=Even though X-Pipe could not be started, you can attempt to install the update to potentially fix the underlying issue.
|
updateAvailableContent=Even though X-Pipe could not be started, you can attempt to install the update to potentially fix the issue.
|
||||||
clipboardActionDetectedTitle=Clipboard Action detected
|
clipboardActionDetectedTitle=Clipboard Action detected
|
||||||
clipboardActionDetectedHeader=Do you want to import your clipboard content?
|
clipboardActionDetectedHeader=Do you want to import your clipboard content?
|
||||||
clipboardActionDetectedContent=X-Pipe detected content in your clipboard that can be opened. Do you want to open it now?
|
clipboardActionDetectedContent=X-Pipe detected content in your clipboard that can be opened. Do you want to open it now?
|
||||||
|
|
1
dist/changelogs/0.5.19.md
vendored
Normal file
1
dist/changelogs/0.5.19.md
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
- Fix shell detection on macOS
|
2
version
2
version
|
@ -1 +1 @@
|
||||||
0.5.18
|
0.5.19
|
Loading…
Reference in a new issue