summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-14 13:18:45 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-14 13:18:45 +0300
commit80e4c62c47bdeec92f32787b614c7326fa6f9bbc (patch)
tree88e89dbf79ff0182e2250a90d144e48769d28472
parent9adb3b5f7ed3688e0b7347e29967154df72ab999 (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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index 36388062..5eceebec 100644
--- a/src/app.c
+++ b/src/app.c
@@ -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);