| |
13 |
13 |
|
| |
14 |
14 |
|
| |
15 |
15 |
|
| |
16 |
16 |
|
| |
17 |
17 |
|
| |
18 |
18 |
|
| |
19 |
19 |
#ifndef __APPHELPER_H__ |
| |
20 |
20 |
#define __APPHELPER_H__ |
| |
21 |
21 |
|
| |
22 |
22 |
#include <boost/optional.hpp> |
| |
23 |
23 |
#include "TPathProcessor.h" |
| |
24 |
24 |
|
| |
25 |
25 |
class CAppHelper |
| |
26 |
26 |
{ |
| |
27 |
27 |
public: |
| |
28 |
28 |
CAppHelper(); |
| |
29 |
29 |
virtual ~CAppHelper(); |
| |
30 |
30 |
|
| |
31 |
31 |
bool SetAutorun(bool bState); |
| |
32 |
32 |
|
| |
33 |
|
bool IsFirstInstance() const { return m_bFirstInstance; }; |
| |
|
33 |
bool IsFirstInstance() const { return m_bFirstInstance; } |
| |
34 |
34 |
|
| |
35 |
|
PCTSTR GetAppName() const { return m_pszAppName; }; |
| |
36 |
|
PCTSTR GetAppNameVer() const { return m_pszAppNameVer; }; |
| |
37 |
|
PCTSTR GetAppVersion() const { return m_pszAppVersion; }; |
| |
|
35 |
PCTSTR GetAppName() const { return m_pszAppName; } |
| |
|
36 |
PCTSTR GetAppNameVer() const { return m_pszAppNameVer; } |
| |
|
37 |
PCTSTR GetAppVersion() const { return m_pszAppVersion; } |
| |
38 |
38 |
|
| |
39 |
|
PCTSTR GetProgramName() const { return m_pszProgramName; }; |
| |
|
39 |
PCTSTR GetProgramName() const { return m_pszProgramName; } |
| |
40 |
40 |
|
| |
41 |
41 |
bool GetProgramDataPath(CString& rStrPath); |
| |
42 |
42 |
CString ExpandPath(CString strPath); |
| |
43 |
43 |
CString GetProgramPath() const; |
| |
44 |
44 |
|
| |
45 |
45 |
bool IsInPortableMode(); |
| |
46 |
46 |
|
| |
47 |
47 |
protected: |
| |
48 |
48 |
void InitProtection(); |
| |
49 |
49 |
void RetrievePaths(); |
| |
50 |
50 |
void RetrieveAppInfo(); |
| |
51 |
51 |
|
| |
52 |
52 |
protected: |
| |
53 |
53 |
HANDLE m_hMutex; |
| |
54 |
54 |
bool m_bFirstInstance; |
| |
55 |
55 |
|
| |
56 |
56 |
|
| |
57 |
57 |
TPathProcessor m_pathProcessor; |
| |
58 |
58 |
TCHAR* m_pszProgramName; |
| |
59 |
59 |
|