diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-14 13:18:45 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-14 13:18:45 +0300 |
commit | 80e4c62c47bdeec92f32787b614c7326fa6f9bbc (patch) | |
tree | 88e89dbf79ff0182e2250a90d144e48769d28472 | |
parent | 9adb3b5f7ed3688e0b7347e29967154df72ab999 (diff) |
Windows: Open default browser via "cmd.exe start"
This is not a super robust solution, but should work in most cases.
-rw-r--r-- | src/app.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -992,7 +992,10 @@ void openInDefaultBrowser_App(const iString *url) { | |||
992 | #elif defined (iPlatformLinux) | 992 | #elif defined (iPlatformLinux) |
993 | iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) | 993 | iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) |
994 | #elif defined (iPlatformMsys) | 994 | #elif defined (iPlatformMsys) |
995 | iClob(newStringsCStr_StringList("start", cstr_String(url), NULL)) | 995 | iClob(newStringsCStr_StringList( |
996 | "c:\\Windows\\System32\\cmd.exe", "/q", "/c", "start", cstr_String(url), NULL)) | ||
997 | /* TODO: Should consult environment variables to find the | ||
998 | right cmd.exe. Also, the prompt window is shown momentarily... */ | ||
996 | #endif | 999 | #endif |
997 | ); | 1000 | ); |
998 | start_Process(proc); | 1001 | start_Process(proc); |