pinokiod 3.5.5 → 3.5.7
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/conda.js +1 -1
- package/kernel/index.js +2 -2
- package/kernel/shell.js +32 -28
- package/package.json +1 -1
package/kernel/bin/conda.js
CHANGED
|
@@ -197,7 +197,7 @@ report_errors: false`)
|
|
|
197
197
|
}
|
|
198
198
|
ondata({ raw: `${cmd}\r\n` })
|
|
199
199
|
ondata({ raw: `path: ${this.kernel.bin.path()}\r\n` })
|
|
200
|
-
await this.kernel.bin.exec({ message: cmd, conda: { skip: true } }, (stream) => {
|
|
200
|
+
await this.kernel.bin.exec({ message: cmd, vs: { skip: true }, conda: { skip: true } }, (stream) => {
|
|
201
201
|
ondata(stream)
|
|
202
202
|
})
|
|
203
203
|
|
package/kernel/index.js
CHANGED
|
@@ -380,14 +380,14 @@ class Kernel {
|
|
|
380
380
|
console.log("[initHome] Has the app launched?", this.launch_complete)
|
|
381
381
|
if (this.launch_complete) {
|
|
382
382
|
console.log("[initHome] 1 Give full permission")
|
|
383
|
+
clearInterval(interval)
|
|
383
384
|
await this.bin.exec({
|
|
384
385
|
sudo: true,
|
|
385
386
|
message: `icacls ${this.homedir} /grant Users:(OI)(CI)F /T`
|
|
386
387
|
}, (stream) => {
|
|
387
|
-
|
|
388
|
+
process.stdout.write(stream.raw)
|
|
388
389
|
})
|
|
389
390
|
console.log("[initHome] 2 Give full permission done")
|
|
390
|
-
clearInterval(interval)
|
|
391
391
|
}
|
|
392
392
|
}, 1000)
|
|
393
393
|
}
|
package/kernel/shell.js
CHANGED
|
@@ -672,36 +672,40 @@ class Shell {
|
|
|
672
672
|
|
|
673
673
|
|
|
674
674
|
if (this.platform === "win32") {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
//
|
|
685
|
-
arg
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
675
|
+
if (params.vs && params.vs.skip) {
|
|
676
|
+
console.log("Skip VSVARSALL")
|
|
677
|
+
} else {
|
|
678
|
+
try {
|
|
679
|
+
let vcvars_path = this.kernel.bin.vs_path_env.VCVARSALL_PATH
|
|
680
|
+
if (vcvars_path) {
|
|
681
|
+
const architecture = os.arch().toLowerCase(); // 'x64', 'ia32' (32-bit), etc.
|
|
682
|
+
const armArchitecture = process.arch.toLowerCase(); // For ARM-based architectures (on Windows), process.arch might be 'arm64', 'arm', etc.
|
|
683
|
+
|
|
684
|
+
// Map architectures to vcvarsall.bat argument
|
|
685
|
+
let arg
|
|
686
|
+
if (architecture === 'x64' || armArchitecture === 'arm64') {
|
|
687
|
+
//arg = 'amd64'; // Native 64-bit architecture
|
|
688
|
+
arg = 'x64';
|
|
689
|
+
} else if (architecture === 'ia32' || armArchitecture === 'arm') {
|
|
690
|
+
arg = 'x86'; // Native 32-bit architecture
|
|
691
|
+
} else if (armArchitecture === 'x86_arm64') {
|
|
692
|
+
arg = 'x86_arm64'; // ARM64 on x86
|
|
693
|
+
} else if (armArchitecture === 'x86_arm') {
|
|
694
|
+
arg = 'x86_arm'; // ARM on x86
|
|
695
|
+
} else if (armArchitecture === 'amd64_arm64') {
|
|
696
|
+
arg = 'amd64_arm64'; // ARM64 on x64
|
|
697
|
+
} else if (armArchitecture === 'amd64_arm') {
|
|
698
|
+
arg = 'amd64_arm'; // ARM on x64
|
|
699
|
+
} else {
|
|
700
|
+
console.log(`Unsupported arch: os.arch()=${architecture}, process.arch=${armArchitecture}`)
|
|
701
|
+
}
|
|
699
702
|
|
|
700
|
-
|
|
701
|
-
|
|
703
|
+
if (arg) {
|
|
704
|
+
conda_activation.push(`"${vcvars_path}" ${arg} > nul 2>&1`)
|
|
705
|
+
}
|
|
706
|
+
} else {
|
|
707
|
+
// console.log('vc vars env doesnt exist')
|
|
702
708
|
}
|
|
703
|
-
} else {
|
|
704
|
-
// console.log('vc vars env doesnt exist')
|
|
705
709
|
}
|
|
706
710
|
} catch (e) {
|
|
707
711
|
console.log('vc vars setup', e)
|