mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-22 23:49:09 -04:00
Check for freerdp3
This commit is contained in:
@@ -16,21 +16,22 @@ import lombok.extern.jackson.Jacksonized;
|
||||
@Value
|
||||
@Jacksonized
|
||||
@Builder
|
||||
public class FreeRdpClient implements ExternalApplicationType.PathApplication, ExternalRdpClient {
|
||||
public class FreeRdpClient implements ExternalRdpClient {
|
||||
|
||||
@Override
|
||||
public void launch(RdpLaunchConfig configuration) throws Exception {
|
||||
CommandSupport.isInPathOrThrow(
|
||||
LocalShell.getShell(),
|
||||
getExecutable(),
|
||||
"XFreeRDP",
|
||||
DataStorage.get().local());
|
||||
var v3 = LocalShell.getShell().view().findProgram("xfreerdp3");
|
||||
if (v3.isEmpty()) {
|
||||
CommandSupport.isInPathOrThrow(LocalShell.getShell(), getExecutable(), "xfreerdp", DataStorage.get().local());
|
||||
}
|
||||
|
||||
var file = writeRdpConfigFile(configuration.getTitle(), configuration.getConfig());
|
||||
// macOS uses xfreerdp3 by default
|
||||
var isV3Executable = v3.isPresent() || OsType.ofLocal() == OsType.MACOS;
|
||||
var b = CommandBuilder.of()
|
||||
.add(getExecutable())
|
||||
.add(v3.isPresent() ? "xfreerdp3" : "xfreerdp")
|
||||
.addFile(file.toString())
|
||||
.add(OsType.ofLocal() == OsType.LINUX ? "/cert-ignore" : "/cert:ignore")
|
||||
.add(isV3Executable ? "/cert:ignore" : "/cert-ignore")
|
||||
.add("/dynamic-resolution")
|
||||
.add("/network:auto")
|
||||
.add("/compression")
|
||||
@@ -59,16 +60,6 @@ public class FreeRdpClient implements ExternalApplicationType.PathApplication, E
|
||||
return "https://www.freerdp.com/";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExecutable() {
|
||||
return "xfreerdp";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean detach() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return "app.xfreeRdp";
|
||||
|
||||
Reference in New Issue
Block a user