MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / AppFile

Method AppFile

source/ui/data/appFile.cpp:22–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "../boxedwineui.h"
21
22AppFile::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
46void AppFile::buildIconTexture() {
47 if (Fs::doesNativePathExist(localIconPath)) {

Callers

nothing calls this directly

Calls 6

lastIndexOfMethod · 0.80
substrMethod · 0.80
trimMethod · 0.80
lengthMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected