pinokiod 3.3.25 → 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 +32 -19
- package/kernel/shell.js +1 -1
- package/package.json +1 -1
package/kernel/bin/vs.js
CHANGED
|
@@ -175,30 +175,43 @@ class VS {
|
|
|
175
175
|
}
|
|
176
176
|
*/
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
+
}
|
|
194
|
+
}
|
|
188
195
|
}
|
|
189
196
|
}
|
|
190
|
-
}
|
|
191
197
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
+
}
|
|
211
|
+
}
|
|
200
212
|
}
|
|
201
213
|
}
|
|
214
|
+
console.log(">>> env", env)
|
|
202
215
|
}
|
|
203
216
|
|
|
204
217
|
// const clpaths = await glob('**/bin/Hostx64/x64/cl.exe', { cwd: paths.MSVC_PATH })
|
package/kernel/shell.js
CHANGED