mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
macos fixes
This commit is contained in:
parent
fa7b6d66bd
commit
ac36f7043a
3 changed files with 16 additions and 4 deletions
|
@ -65,9 +65,21 @@ public class DesktopShortcuts {
|
||||||
pc.executeSimpleCommand("chmod ugo+x \"" + executable + "\"");
|
pc.executeSimpleCommand("chmod ugo+x \"" + executable + "\"");
|
||||||
|
|
||||||
pc.getShellDialect()
|
pc.getShellDialect()
|
||||||
.createScriptTextFileWriteCommand(pc, "APPL????", base + "/PkgInfo")
|
.createTextFileWriteCommand(pc, "APPL????", base + "/Contents/PkgInfo")
|
||||||
.execute();
|
.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,7 +85,7 @@ public class ShellTemp {
|
||||||
|
|
||||||
public static String getSubDirectory(ShellControl proc, String... sub) throws Exception {
|
public static String getSubDirectory(ShellControl proc, String... sub) throws Exception {
|
||||||
var base = proc.getSystemTemporaryDirectory();
|
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);
|
var dir = FileNames.join(arr);
|
||||||
|
|
||||||
// We assume that this directory does not exist yet and therefore don't perform any checks
|
// We assume that this directory does not exist yet and therefore don't perform any checks
|
||||||
|
|
BIN
dist/logo/logo.icns
vendored
BIN
dist/logo/logo.icns
vendored
Binary file not shown.
Loading…
Reference in a new issue