forked from kipr/harrogate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
44 lines (36 loc) · 1.02 KB
/
config.js
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
43
44
var Fs, Os, Path, config, version;
Fs = require('fs');
Os = require('os');
Path = require('path');
version = require('./package.json').version.split('.');
config = {
version: {
major: version[0],
minor: version[1],
build_number: version[2]
}
};
// Botball board firmware version
if (Os.platform() === 'linux') {
try {
version = Fs.readFileSync('/usr/share/kipr/board_fw_version.txt', 'utf8');
config.botball_fw_version = version;
} catch (undefined) {}
}
if (Os.platform() === 'win32') {
config.ext_deps = {
include_path: Path.join(__dirname, '..', 'shared', 'include'),
lib_path: Path.join(__dirname, '..', 'shared', 'lib'),
bin_path: Path.join(__dirname, '..', 'shared', 'bin'),
min_gw: {
bin_path: Path.join(__dirname, '..', 'MinGW', 'bin')
}
};
} else {
config.ext_deps = {
include_path: Path.join('/usr', 'local', 'include', 'include'),
lib_path: Path.join('/usr', 'local', 'lib'),
bin_path: Path.join('/usr', 'local', 'bin')
};
}
module.exports = config;