diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 9f2bac6b..23c157a6 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -37,7 +37,8 @@ public class AppPrefs { private static final boolean STORAGE_DIR_FIXED = !AppProperties.get().getDataDir().equals(AppProperties.DEFAULT_DATA_DIR); private static final String LOG_LEVEL_PROP = "io.xpipe.app.logLevel"; - private static final String DEFAULT_LOG_LEVEL = "info"; + // Lets keep this at trace for now, at least for the alpha + private static final String DEFAULT_LOG_LEVEL = "trace"; private static final boolean LOG_LEVEL_FIXED = System.getProperty(LOG_LEVEL_PROP) != null; private static final String DEVELOPER_MODE_PROP = "io.xpipe.app.developerMode"; private static AppPrefs INSTANCE; diff --git a/extension/src/main/java/io/xpipe/extension/util/DesktopShortcuts.java b/extension/src/main/java/io/xpipe/extension/util/DesktopShortcuts.java index 9353a74d..f3eed8dd 100644 --- a/extension/src/main/java/io/xpipe/extension/util/DesktopShortcuts.java +++ b/extension/src/main/java/io/xpipe/extension/util/DesktopShortcuts.java @@ -68,7 +68,18 @@ public class DesktopShortcuts { Rez -append $rsrc -o $iconDestination """, icon, target); - ShellStore.local().create().executeSimpleCommand(iconScriptContent); + + try (var pc = ShellStore.local().create().start()) { + var base = System.getProperty("user.home") + "/Desktop/" + name; + pc.executeSimpleCommand(pc.getShellType().flatten(pc.getShellType().getMkdirsCommand(base + "/Contents/MacOS"))); + + var executable = base + "/Contents/MacOS/" + name + ".sh"; + pc.executeSimpleCommand(pc.getShellType().getTextFileWriteCommand(content, executable)); + pc.executeSimpleCommand(pc.getShellType().getMakeExecutableCommand(executable)); + + pc.executeSimpleCommand(pc.getShellType().getTextFileWriteCommand("APPL??", base + "/PkgInfo")); + pc.executeSimpleCommand(iconScriptContent); + } } public static void create(String target, String name) throws Exception {