-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBaseModule.cpp
42 lines (32 loc) · 1.26 KB
/
BaseModule.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _SCRIPT_PAD_BASE_MODULE_CPP
#define _SCRIPT_PAD_BASE_MODULE_CPP
#include "BaseModule.h"
namespace querier {
BaseModule::BaseModule() {
}
BaseModule::BaseModule(std::wstring applicationName, std::wstring versionArg, bool runAsModule) : IModule(applicationName), m_FFinder() {
m_isUnicode = true;
if (_FindInstallation(applicationName, nullptr)) {
m_bRunAsModule = runAsModule;
m_bIsModuleInstalled = true;
StartInfo.RedirectStdOutput = true;
StartInfo.RedirectStdError = true;
}
}
BaseModule::BaseModule(std::string applicationName, std::string versionArg, bool runAsModule) : IModule(applicationName) {
m_isUnicode = false;
if (_FindInstallation(applicationName, nullptr)) {
m_bRunAsModule = runAsModule;
m_bIsModuleInstalled = true;
StartInfo.RedirectStdOutput = true;
StartInfo.RedirectStdError = true;
}
}
bool BaseModule::_FindInstallation(std::wstring searchFile, File* retFile) {
return m_FFinder.SearchFile(searchFile, retFile);
}
bool BaseModule::_FindInstallation(path searchFile, File* retFile = nullptr) {
return m_FFinder.SearchFile(searchFile, retFile);
}
}
#endif