pinokiod 3.3.21 → 3.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/bin/vs.js +62 -5
- package/kernel/shell.js +5 -4
- package/package.json +1 -1
package/kernel/bin/vs.js
CHANGED
|
@@ -50,6 +50,39 @@ class VS {
|
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
Example:
|
|
57
|
+
{
|
|
58
|
+
ROOT_PATH: "C:\Program Files (x86)\Microsoft Visual Studio"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
MSVC_PATH: [
|
|
62
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC',
|
|
63
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC'
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
{
|
|
67
|
+
BUILD_PATH: [
|
|
68
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build',
|
|
69
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build'
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
{
|
|
73
|
+
CMAKE_PATH: [
|
|
74
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin',
|
|
75
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin'
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
{
|
|
79
|
+
CL_PATH: [
|
|
80
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64',
|
|
81
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.42.34433\\bin\\Hostx64\\x64'
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
*/
|
|
85
|
+
|
|
53
86
|
}
|
|
54
87
|
console.log({ MSVC_PATH, BUILD_PATH, CMAKE_PATH, CL_PATH })
|
|
55
88
|
return {
|
|
@@ -134,14 +167,38 @@ class VS {
|
|
|
134
167
|
if (paths.CMAKE_PATH) env.PATH = env.PATH.concat(paths.CMAKE_PATH)
|
|
135
168
|
if (paths.CL_PATH) env.PATH = env.PATH.concat(paths.CL_PATH)
|
|
136
169
|
|
|
170
|
+
/*
|
|
171
|
+
{
|
|
172
|
+
BUILD_PATH: [
|
|
173
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build',
|
|
174
|
+
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build'
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
*/
|
|
178
|
+
|
|
137
179
|
let build_paths = paths.BUILD_PATH
|
|
138
180
|
// look for vcvarsall
|
|
181
|
+
// try to use 2019 first
|
|
139
182
|
for(let p of build_paths) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
183
|
+
if (/.*2019.*/.test(p)) {
|
|
184
|
+
const e = await this.kernel.bin.exists(p)
|
|
185
|
+
if (e) {
|
|
186
|
+
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
187
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
188
|
+
break
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// only if 2019 doesn't exist try others
|
|
194
|
+
if (!env.VCVARSALL_PATH) {
|
|
195
|
+
for(let p of build_paths) {
|
|
196
|
+
const e = await this.kernel.bin.exists(p)
|
|
197
|
+
if (e) {
|
|
198
|
+
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
199
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
200
|
+
break
|
|
201
|
+
}
|
|
145
202
|
}
|
|
146
203
|
}
|
|
147
204
|
|
package/kernel/shell.js
CHANGED
|
@@ -104,11 +104,12 @@ class Shell {
|
|
|
104
104
|
delete this.env.CMAKE_GENERATOR
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
if (this.env.CUDA_HOME) {
|
|
108
|
-
delete this.env.CUDA_HOME
|
|
109
|
-
}
|
|
107
|
+
// if (this.env.CUDA_HOME) {
|
|
108
|
+
// delete this.env.CUDA_HOME
|
|
109
|
+
// }
|
|
110
110
|
for(let key in this.env) {
|
|
111
|
-
if (key.startsWith("
|
|
111
|
+
if (key.startsWith("CUDA")) {
|
|
112
|
+
console.log("Unset env key: " + key)
|
|
112
113
|
delete this.env[key]
|
|
113
114
|
}
|
|
114
115
|
}
|