| 356 | } |
| 357 | |
| 358 | void InlineScript::SetupFile() |
| 359 | { |
| 360 | const auto path = GetLUACompatiblePath(_file); |
| 361 | _fileId = path; |
| 362 | |
| 363 | if (path.empty()) { |
| 364 | return; |
| 365 | } |
| 366 | |
| 367 | if (!QFileInfo(QString::fromStdString(path)).exists()) { |
| 368 | const auto text = preprocessScriptText( |
| 369 | _language == OBS_SCRIPT_LANG_PYTHON |
| 370 | ? _defaultPythonScript.data() |
| 371 | : _defaultLUAScript.data(), |
| 372 | _language, GetID()); |
| 373 | (void)createScriptFile(_file.c_str(), text.c_str()); |
| 374 | } |
| 375 | |
| 376 | _script = std::unique_ptr<obs_script_t, ScriptDeleter>( |
| 377 | CreateOBSScript(path.c_str(), nullptr), {}); |
| 378 | _lastPath = _file; |
| 379 | } |
| 380 | |
| 381 | void InlineScript::SetupInline() |
| 382 | { |
nothing calls this directly
no test coverage detected