summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--res/urlopen.bat2
-rw-r--r--src/app.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53b3561f..39b5e63a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,7 +189,11 @@ if (MSYS)
189 if (NOT ENABLE_RESOURCE_EMBED) 189 if (NOT ENABLE_RESOURCE_EMBED)
190 install (FILES ${EMB_BIN} DESTINATION .) 190 install (FILES ${EMB_BIN} DESTINATION .)
191 endif () 191 endif ()
192 install (PROGRAMS ${SDL2_LIBDIR}/SDL2.dll DESTINATION .) 192 install (PROGRAMS
193 ${SDL2_LIBDIR}/SDL2.dll
194 res/urlopen.bat
195 DESTINATION .
196 )
193 if (INSTALL_THE_FOUNDATION) 197 if (INSTALL_THE_FOUNDATION)
194 install (PROGRAMS $<TARGET_FILE:the_Foundation::the_Foundation> DESTINATION .) 198 install (PROGRAMS $<TARGET_FILE:the_Foundation::the_Foundation> DESTINATION .)
195 endif () 199 endif ()
diff --git a/res/urlopen.bat b/res/urlopen.bat
new file mode 100644
index 00000000..82935824
--- /dev/null
+++ b/res/urlopen.bat
@@ -0,0 +1,2 @@
1@echo off
2start %1
diff --git a/src/app.c b/src/app.c
index 15eb96a9..285036cb 100644
--- a/src/app.c
+++ b/src/app.c
@@ -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