| 189 | } |
| 190 | |
| 191 | bool OSModule::launchFile(File f, String args) |
| 192 | { |
| 193 | if (!f.exists()) |
| 194 | { |
| 195 | NLOGWARNING(niceName, "File does not exist : " + f.getFullPathName()); |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | File wDir = File::getCurrentWorkingDirectory(); |
| 200 | f.getParentDirectory().setAsCurrentWorkingDirectory(); |
| 201 | bool result = f.startAsProcess(args); |
| 202 | wDir.setAsCurrentWorkingDirectory(); |
| 203 | |
| 204 | if (result) outActivityTrigger->trigger(); |
| 205 | else NLOGERROR(niceName, "Could not launch application " + f.getFullPathName() + " with arguments : " + args); |
| 206 | |
| 207 | return result; |
| 208 | } |
| 209 | |
| 210 | void OSModule::launchCommand(const String& command, bool silentMode) |
| 211 | { |
no test coverage detected