| 57 | static bool setupDone = setup(); |
| 58 | |
| 59 | static void cleanupScriptFile(const std::string &path) |
| 60 | { |
| 61 | const QFileInfo fileInfo(QString::fromStdString(path)); |
| 62 | if (!fileInfo.isFile()) { |
| 63 | return; |
| 64 | } |
| 65 | QFile file(fileInfo.absoluteFilePath()); |
| 66 | if (!file.remove()) { |
| 67 | vblog(LOG_INFO, "failed to clean up script file %s", |
| 68 | fileInfo.absoluteFilePath().toStdString().c_str()); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | static std::optional<std::string> |
| 73 | getScriptTempFilePath(obs_script_lang language) |