| 16 | #include "Configuration.h" |
| 17 | |
| 18 | bool RunApplication(const char *szAppname, const char *szCommandLine) |
| 19 | { |
| 20 | SHELLEXECUTEINFO exec; |
| 21 | memset(&exec, 0, sizeof(SHELLEXECUTEINFO)); |
| 22 | exec.cbSize= sizeof(SHELLEXECUTEINFO); |
| 23 | exec.lpFile= szAppname; |
| 24 | exec.lpParameters= szCommandLine; |
| 25 | exec.lpVerb= "open"; |
| 26 | exec.lpDirectory= g_cfg.ApplicationRoot.c_str(); |
| 27 | exec.nShow= SW_SHOW; |
| 28 | exec.fMask= SEE_MASK_FLAG_NO_UI|SEE_MASK_NOCLOSEPROCESS; |
| 29 | |
| 30 | if (!ShellExecuteEx(&exec)) |
| 31 | { |
| 32 | g_err.Set(stringformat("error executing %s: %s", szAppname, LastError().c_str())); |
| 33 | return false; |
| 34 | } |
| 35 | return true; |
| 36 | } |
| 37 | string concatpath(const string& path1, const string& path2) |
| 38 | { |
| 39 | string path= path1; |
no test coverage detected