mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Small fixes
This commit is contained in:
parent
e7b5d7e9ee
commit
ff99506d3a
5 changed files with 9 additions and 7 deletions
|
@ -156,11 +156,10 @@ public class ErrorHandlerComp extends SimpleComp {
|
|||
if (desc == null) {
|
||||
desc = AppI18n.get("errorNoDetail");
|
||||
}
|
||||
var limitedDescription = desc.substring(0, Math.min(1000, desc.length()));
|
||||
|
||||
var header = new Label(AppI18n.get(headerId));
|
||||
AppFont.header(header);
|
||||
var descriptionField = new TextArea(limitedDescription);
|
||||
var descriptionField = new TextArea(desc);
|
||||
descriptionField.setPrefRowCount(4);
|
||||
descriptionField.setWrapText(true);
|
||||
descriptionField.setEditable(false);
|
||||
|
|
|
@ -60,10 +60,10 @@ public class DesktopShortcuts {
|
|||
pc.executeSimpleCommand(pc.getShellDialect().getMkdirsCommand(base + "/Contents/Resources"));
|
||||
|
||||
var executable = base + "/Contents/MacOS/" + name;
|
||||
pc.getShellDialect().createTextFileWriteCommand(pc, content, executable).execute();
|
||||
pc.getShellDialect().createScriptTextFileWriteCommand(pc, content, executable).execute();
|
||||
pc.executeSimpleCommand("chmod ugo+x \"" + executable + "\"");
|
||||
|
||||
pc.getShellDialect().createTextFileWriteCommand(pc, "APPL????", base + "/PkgInfo").execute();
|
||||
pc.getShellDialect().createScriptTextFileWriteCommand(pc, "APPL????", base + "/PkgInfo").execute();
|
||||
pc.executeSimpleCommand("cp \"" + icon + "\" \"" + base + "/Contents/Resources/" + name + ".icns\"");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ScriptHelper {
|
|||
// processControl.executeSimpleCommand(type.getFileTouchCommand(file), "Failed to create script " + file);
|
||||
processControl
|
||||
.getShellDialect()
|
||||
.createTextFileWriteCommand(processControl, content, file)
|
||||
.createScriptTextFileWriteCommand(processControl, content, file)
|
||||
.execute();
|
||||
var e = type.getMakeExecutableCommand(file);
|
||||
if (e != null) {
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.xpipe.core.process;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.xpipe.core.charsetter.NewLine;
|
||||
import io.xpipe.core.charsetter.StreamCharset;
|
||||
import io.xpipe.core.store.FileSystem;
|
||||
import io.xpipe.core.util.SecretValue;
|
||||
|
||||
|
@ -124,6 +125,8 @@ public interface ShellDialect {
|
|||
|
||||
String getPrintWorkingDirectoryCommand();
|
||||
|
||||
StreamCharset getScriptCharset();
|
||||
|
||||
String getFileCopyCommand(String oldFile, String newFile);
|
||||
|
||||
String getFileMoveCommand(String oldFile, String newFile);
|
||||
|
@ -132,7 +135,7 @@ public interface ShellDialect {
|
|||
return content.contains("\n");
|
||||
}
|
||||
|
||||
CommandControl createTextFileWriteCommand(ShellControl parent, String content, String file);
|
||||
CommandControl createScriptTextFileWriteCommand(ShellControl parent, String content, String file);
|
||||
|
||||
String getFileDeleteCommand(String file);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public class XPipeSystemId {
|
|||
proc.getShellDialect().getMkdirsCommand(FileNames.getParent(file)),
|
||||
"Unable to access or create directory " + file);
|
||||
var id = UUID.randomUUID();
|
||||
proc.getShellDialect().createTextFileWriteCommand(proc, id.toString(), file).execute();
|
||||
proc.getShellDialect().createScriptTextFileWriteCommand(proc, id.toString(), file).execute();
|
||||
return id;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue