pinokiod 3.3.23 → 3.3.26
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 +15 -5
- package/kernel/shell.js +1 -5
- package/package.json +1 -1
- package/server/views/editor.ejs +15 -6
package/kernel/bin/vs.js
CHANGED
|
@@ -150,7 +150,6 @@ class VS {
|
|
|
150
150
|
//
|
|
151
151
|
// }
|
|
152
152
|
async init() {
|
|
153
|
-
console.log("############################################ vs")
|
|
154
153
|
if (this.kernel.platform === "win32") {
|
|
155
154
|
let paths = await this.getpaths()
|
|
156
155
|
|
|
@@ -182,10 +181,15 @@ class VS {
|
|
|
182
181
|
for(let p of build_paths) {
|
|
183
182
|
if (/.*2019.*/.test(p)) {
|
|
184
183
|
const e = await this.kernel.bin.exists(p)
|
|
184
|
+
console.log(">1 e", {e, p})
|
|
185
185
|
if (e) {
|
|
186
186
|
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
const e2 = await this.kernel.bin.exists(vcvars_path)
|
|
188
|
+
console.log(">1 e2", e2)
|
|
189
|
+
if (e2) {
|
|
190
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
191
|
+
break
|
|
192
|
+
}
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
195
|
}
|
|
@@ -194,13 +198,19 @@ class VS {
|
|
|
194
198
|
if (!env.VCVARSALL_PATH) {
|
|
195
199
|
for(let p of build_paths) {
|
|
196
200
|
const e = await this.kernel.bin.exists(p)
|
|
201
|
+
console.log(">2 e", { e, p})
|
|
197
202
|
if (e) {
|
|
198
203
|
let vcvars_path = path.resolve(p, "vcvarsall.bat")
|
|
199
|
-
|
|
200
|
-
|
|
204
|
+
const e2 = await this.kernel.bin.exists(vcvars_path)
|
|
205
|
+
console.log(">2 e2", e2)
|
|
206
|
+
if (e2) {
|
|
207
|
+
env.VCVARSALL_PATH = vcvars_path
|
|
208
|
+
break
|
|
209
|
+
}
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
212
|
}
|
|
213
|
+
console.log(">>> env", env)
|
|
204
214
|
|
|
205
215
|
// const clpaths = await glob('**/bin/Hostx64/x64/cl.exe', { cwd: paths.MSVC_PATH })
|
|
206
216
|
// if (clpaths && clpaths.length > 0) {
|
package/kernel/shell.js
CHANGED
|
@@ -662,11 +662,9 @@ class Shell {
|
|
|
662
662
|
if (this.platform === "win32") {
|
|
663
663
|
try {
|
|
664
664
|
let vcvars_path = this.kernel.bin.vs_path_env.VCVARSALL_PATH
|
|
665
|
-
console.log({ vcvars_path })
|
|
666
665
|
if (vcvars_path) {
|
|
667
666
|
const architecture = os.arch().toLowerCase(); // 'x64', 'ia32' (32-bit), etc.
|
|
668
667
|
const armArchitecture = process.arch.toLowerCase(); // For ARM-based architectures (on Windows), process.arch might be 'arm64', 'arm', etc.
|
|
669
|
-
console.log({ architecture, armArchitecture })
|
|
670
668
|
|
|
671
669
|
// Map architectures to vcvarsall.bat argument
|
|
672
670
|
let arg
|
|
@@ -688,12 +686,10 @@ class Shell {
|
|
|
688
686
|
}
|
|
689
687
|
|
|
690
688
|
if (arg) {
|
|
691
|
-
console.log({ arg, vcvars_path })
|
|
692
689
|
conda_activation.push(`"${vcvars_path}" ${arg} > nul 2>&1`)
|
|
693
690
|
}
|
|
694
|
-
console.log('vc vars setup successful')
|
|
695
691
|
} else {
|
|
696
|
-
console.log('vc vars env doesnt exist')
|
|
692
|
+
// console.log('vc vars env doesnt exist')
|
|
697
693
|
}
|
|
698
694
|
} catch (e) {
|
|
699
695
|
console.log('vc vars setup', e)
|
package/package.json
CHANGED
package/server/views/editor.ejs
CHANGED
|
@@ -46,8 +46,20 @@ body.frozen {
|
|
|
46
46
|
.xterm {
|
|
47
47
|
height: 100%;
|
|
48
48
|
}
|
|
49
|
+
.containers main {
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
.containers.running main {
|
|
54
|
+
height: 50%;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
.containers {
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
49
60
|
.containers .terminal-container {
|
|
50
|
-
height:
|
|
61
|
+
height: 50%;
|
|
62
|
+
width: 100%;
|
|
51
63
|
}
|
|
52
64
|
#table > table {
|
|
53
65
|
border-left: 2px solid black;
|
|
@@ -212,7 +224,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
212
224
|
document.querySelector(".run .starting").classList.add("hidden")
|
|
213
225
|
}
|
|
214
226
|
stop() {
|
|
215
|
-
debugger;
|
|
216
227
|
this.socket.run({
|
|
217
228
|
method: "kernel.api.stop",
|
|
218
229
|
params: {
|
|
@@ -226,7 +237,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
226
237
|
return new Promise((resolve, reject) => {
|
|
227
238
|
let cwd = "<%=execUrl%>"
|
|
228
239
|
//let cwd = "~" + location.pathname
|
|
229
|
-
debugger
|
|
230
240
|
this.socket.close()
|
|
231
241
|
this.socket.run({
|
|
232
242
|
method: "fs.write",
|
|
@@ -249,7 +259,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
249
259
|
await this.socket.close()
|
|
250
260
|
// document.querySelector(".terminal-container").classList.add("hidden")
|
|
251
261
|
let query = Object.fromEntries(new URLSearchParams(location.search))
|
|
252
|
-
document.querySelector(".containers").classList.add("running")
|
|
262
|
+
// document.querySelector(".containers").classList.add("running")
|
|
253
263
|
|
|
254
264
|
|
|
255
265
|
this.socket.run({
|
|
@@ -476,7 +486,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
476
486
|
text: `${packet.data}`,
|
|
477
487
|
})
|
|
478
488
|
} else if (packet.type === "error") {
|
|
479
|
-
debugger
|
|
480
489
|
// n.Noty({
|
|
481
490
|
// text: `${packet.data}`,
|
|
482
491
|
// type: "error"
|
|
@@ -878,7 +887,7 @@ const reloadMemory = async () => {
|
|
|
878
887
|
</div>
|
|
879
888
|
</div>
|
|
880
889
|
<% } else { %>
|
|
881
|
-
<div class='containers
|
|
890
|
+
<div class='containers'>
|
|
882
891
|
<main>
|
|
883
892
|
<!--
|
|
884
893
|
<pre id='response'></pre>
|