mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cmdline launcher should use "open -a" cmd on MacOS, otherwise at least 32/64 bit mode setting wont be correct.
This commit is contained in:
@@ -137,7 +137,8 @@ public class CreateLauncherScriptAction extends AnAction {
|
||||
String homePath = PathManager.getHomePath();
|
||||
String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase();
|
||||
if (SystemInfo.isMac) {
|
||||
launcherContents = launcherContents.replace("$RUN_PATH$", homePath + "/Contents/MacOS/" + productName);
|
||||
// Just use "*.app"
|
||||
launcherContents = launcherContents.replace("$RUN_PATH$", homePath);
|
||||
}
|
||||
else {
|
||||
launcherContents = launcherContents.replace("$RUN_PATH$", homePath + "/bin/" + productName + ".sh");
|
||||
|
||||
@@ -69,6 +69,13 @@ if port == -1:
|
||||
else:
|
||||
if launch_with_port(port): exit()
|
||||
|
||||
bin_dir, bin_file = os.path.split(RUN_PATH)
|
||||
os.chdir(bin_dir)
|
||||
os.execv(bin_file, [bin_file] + args)
|
||||
if sys.platform == "darwin":
|
||||
# Mac OS: RUN_PATH is *.app path
|
||||
if len(args):
|
||||
args.insert(0, "--args")
|
||||
os.execvp("open", ["-a", RUN_PATH] + args)
|
||||
else:
|
||||
# unix common
|
||||
bin_dir, bin_file = os.path.split(RUN_PATH)
|
||||
os.chdir(bin_dir)
|
||||
os.execv(bin_file, [bin_file] + args)
|
||||
|
||||
Reference in New Issue
Block a user