mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-23 08:30:38 +12:00
macos fixes
This commit is contained in:
parent
fa7b6d66bd
commit
ac36f7043a
|
@ -65,9 +65,21 @@ public class DesktopShortcuts {
|
|||
pc.executeSimpleCommand("chmod ugo+x \"" + executable + "\"");
|
||||
|
||||
pc.getShellDialect()
|
||||
.createScriptTextFileWriteCommand(pc, "APPL????", base + "/PkgInfo")
|
||||
.createTextFileWriteCommand(pc, "APPL????", base + "/Contents/PkgInfo")
|
||||
.execute();
|
||||
pc.executeSimpleCommand("cp \"" + icon + "\" \"" + base + "/Contents/Resources/" + name + ".icns\"");
|
||||
pc.getShellDialect()
|
||||
.createTextFileWriteCommand(pc, """
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
</dict>
|
||||
</plist>
|
||||
""", base + "/Contents/Info.plist")
|
||||
.execute();
|
||||
pc.executeSimpleCommand("cp \"" + icon + "\" \"" + base + "/Contents/Resources/icon.icns\"");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,9 +85,9 @@ public class ShellTemp {
|
|||
|
||||
public static String getSubDirectory(ShellControl proc, String... sub) throws Exception {
|
||||
var base = proc.getSystemTemporaryDirectory();
|
||||
var arr = Stream.concat(Stream.of(base), Arrays.stream(sub)).toArray(String[]::new);
|
||||
var arr = Stream.concat(Stream.of(base.toString()), Arrays.stream(sub)).toArray(String[]::new);
|
||||
var dir = FileNames.join(arr);
|
||||
|
||||
|
||||
// We assume that this directory does not exist yet and therefore don't perform any checks
|
||||
proc.getShellDialect().prepareUserTempDirectory(proc, dir).execute();
|
||||
|
||||
|
|
BIN
dist/logo/logo.icns
vendored
BIN
dist/logo/logo.icns
vendored
Binary file not shown.
Loading…
Reference in a new issue