| 1222 | } |
| 1223 | |
| 1224 | void |
| 1225 | AppManagerPrivate::handleCommandLineArgsW(int argc, wchar_t** argv) |
| 1226 | { |
| 1227 | std::vector<std::string> utf8Args; |
| 1228 | if (argv) { |
| 1229 | for (int i = 0; i < argc; ++i) { |
| 1230 | std::wstring wide(argv[i]); |
| 1231 | std::string str = StrUtils::utf16_to_utf8(wide); |
| 1232 | assert(StrUtils::is_utf8(str.c_str())); |
| 1233 | utf8Args.push_back(str); |
| 1234 | } |
| 1235 | } else { |
| 1236 | // If the user didn't specify launch arguments (e.g unit testing), |
| 1237 | // At least append the binary path |
| 1238 | std::string path = ProcInfo::applicationDirPath(0); |
| 1239 | utf8Args.push_back(path); |
| 1240 | } |
| 1241 | |
| 1242 | copyUtf8ArgsToMembers(utf8Args); |
| 1243 | } |
| 1244 | |
| 1245 | NATRON_NAMESPACE_EXIT |
no test coverage detected