| 20 | #include "../boxedwineui.h" |
| 21 | |
| 22 | AppFile::AppFile(BString name, BString installType, BString iconPath, BString filePath, U32 size, BString exe, BString exeOptions, BString help, BString optionsName, BString installOptions, BString installExe, const std::vector<BString>& args) : name(name), optionsName(optionsName), installType(installType), filePath(filePath), iconPath(iconPath), size(size), exe(exe), args(args), installExe(installExe), help(help), iconTexture(NULL) { |
| 23 | if (iconPath.length()) { |
| 24 | int pos = iconPath.lastIndexOf('/'); |
| 25 | if (pos != -1) { |
| 26 | localIconPath = GlobalSettings::getDemoFolder().stringByApppendingPath(iconPath.substr(pos + 1)); |
| 27 | } |
| 28 | } |
| 29 | if (filePath.length()) { |
| 30 | int pos = filePath.lastIndexOf('/'); |
| 31 | if (pos != -1) { |
| 32 | localFilePath = GlobalSettings::getDemoFolder().stringByApppendingPath(filePath.substr(pos + 1)); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | exeOptions.split(',', this->exeOptions); |
| 37 | for (auto& s : this->exeOptions) { |
| 38 | s = s.trim(); |
| 39 | } |
| 40 | installOptions.split(',', this->installOptions); |
| 41 | for (auto& s : this->installOptions) { |
| 42 | s = s.trim(); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void AppFile::buildIconTexture() { |
| 47 | if (Fs::doesNativePathExist(localIconPath)) { |
nothing calls this directly
no test coverage detected