-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathappbundle.h
More file actions
42 lines (31 loc) · 954 Bytes
/
appbundle.h
File metadata and controls
42 lines (31 loc) · 954 Bytes
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 _APPBUNDLE_H_
#define _APPBUNDLE_H_
#include <string>
bool isAppBundle(const std::string &path);
class AppBundle
{
std::string path;
std::string name;
std::string identifier;
std::string _fpath, _fbinary;
// Right now, _appname = _basename without ".app". Eventually, this might
// want to check the InfoPlist for the binary name?
std::string _basename, _appname;
bool _valid;
private:
void findPaths(const std::string &p);
void hashInfoPlist();
void hashCodeResources();
public:
char specialHashes[6][20];
public:
void loadInfoPlist();
bool generateCodeSignatureDirectory();
public:
AppBundle(const std::string &p);
bool isValid() { return _valid; }
const std::string &fullPath() { return _fpath; }
const std::string &fullBinaryPath() { return _fbinary; }
const std::string &bundleIdentifier() { return identifier; }
};
#endif//_APPBUNDLE_H_