pinokiod 3.3.26 → 3.3.27
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 +30 -28
- package/package.json +1 -1
package/kernel/bin/vs.js
CHANGED
|
@@ -175,42 +175,44 @@ class VS {
|
|
|
175
175
|
}
|
|
176
176
|
*/
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
178
|
+
if (paths.BUILD_PATH) {
|
|
179
|
+
let build_paths = paths.BUILD_PATH
|
|
180
|
+
// look for vcvarsall
|
|
181
|
+
// try to use 2019 first
|
|
182
|
+
for(let p of build_paths) {
|
|
183
|
+
if (/.*2019.*/.test(p)) {
|
|
184
|
+
const e = await this.kernel.bin.exists(p)
|
|
185
|
+
console.log(">1 e", {e, p})
|
|
186
|
+
if (e) {
|
|
187
|
+
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
188
|
+
const e2 = await this.kernel.bin.exists(vcvars_path)
|
|
189
|
+
console.log(">1 e2", e2)
|
|
190
|
+
if (e2) {
|
|
191
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
192
|
+
break
|
|
193
|
+
}
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
|
-
}
|
|
196
197
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
198
|
+
// only if 2019 doesn't exist try others
|
|
199
|
+
if (!env.VCVARSALL_PATH) {
|
|
200
|
+
for(let p of build_paths) {
|
|
201
|
+
const e = await this.kernel.bin.exists(p)
|
|
202
|
+
console.log(">2 e", { e, p})
|
|
203
|
+
if (e) {
|
|
204
|
+
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
205
|
+
const e2 = await this.kernel.bin.exists(vcvars_path)
|
|
206
|
+
console.log(">2 e2", e2)
|
|
207
|
+
if (e2) {
|
|
208
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
209
|
+
break
|
|
210
|
+
}
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
}
|
|
214
|
+
console.log(">>> env", env)
|
|
212
215
|
}
|
|
213
|
-
console.log(">>> env", env)
|
|
214
216
|
|
|
215
217
|
// const clpaths = await glob('**/bin/Hostx64/x64/cl.exe', { cwd: paths.MSVC_PATH })
|
|
216
218
|
// if (clpaths && clpaths.length > 0) {
|