diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-18 10:34:49 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-18 10:34:49 +0300 |
commit | d45b2fd2da5183610aef250becd1d32dab46dcae (patch) | |
tree | 64e1eb635cc26bb1891c27fa9c5e5134cf13941d /src | |
parent | 210d06a75c300593fb8353d48e9a3cb84fdcb4d1 (diff) |
Windows: Use a batch file to open URLs in browser
Opening via urlopen.bat works under MSYS bash as well. The .bat file is also a place where the user can customize which browser to open.
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1017,7 +1017,9 @@ void openInDefaultBrowser_App(const iString *url) { | |||
1017 | iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) | 1017 | iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) |
1018 | #elif defined (iPlatformMsys) | 1018 | #elif defined (iPlatformMsys) |
1019 | iClob(newStringsCStr_StringList( | 1019 | iClob(newStringsCStr_StringList( |
1020 | "c:\\Windows\\System32\\cmd.exe", "/q", "/c", "start", cstr_String(url), NULL)) | 1020 | concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), |
1021 | cstr_String(url), | ||
1022 | NULL)) | ||
1021 | /* TODO: Should consult environment variables to find the | 1023 | /* TODO: Should consult environment variables to find the |
1022 | right cmd.exe. Also, the prompt window is shown momentarily... */ | 1024 | right cmd.exe. Also, the prompt window is shown momentarily... */ |
1023 | #endif | 1025 | #endif |