pinokiod 3.3.12 → 3.3.13
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 +2 -1
- package/kernel/shell.js +43 -7
- package/package.json +1 -1
package/kernel/bin/vs.js
CHANGED
package/kernel/shell.js
CHANGED
|
@@ -657,14 +657,50 @@ class Shell {
|
|
|
657
657
|
|
|
658
658
|
|
|
659
659
|
if (this.platform === "win32") {
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
660
|
+
const architecture = os.arch().toLowerCase(); // 'x64', 'ia32' (32-bit), etc.
|
|
661
|
+
const armArchitecture = process.arch.toLowerCase(); // For ARM-based architectures (on Windows), process.arch might be 'arm64', 'arm', etc.
|
|
662
|
+
|
|
663
|
+
// Map architectures to vcvarsall.bat argument
|
|
664
|
+
let arg
|
|
665
|
+
if (architecture === 'x64' || armArchitecture === 'arm64') {
|
|
666
|
+
arg = 'x64'; // 64-bit architecture
|
|
667
|
+
} else if (architecture === 'ia32' || armArchitecture === 'arm') {
|
|
668
|
+
arg = 'x86'; // 32-bit architecture
|
|
669
|
+
} else if (armArchitecture === 'amd64_arm') {
|
|
670
|
+
arg = 'amd64_arm'; // ARM-specific 64-bit
|
|
671
|
+
} else if (armArchitecture === 'x86_arm') {
|
|
672
|
+
arg = 'x86_arm'; // ARM-based 32-bit
|
|
667
673
|
}
|
|
674
|
+
if (architecture === 'x64' || armArchitecture === 'arm64') {
|
|
675
|
+
arg = 'amd64'; // Native 64-bit architecture
|
|
676
|
+
} else if (architecture === 'ia32' || armArchitecture === 'arm') {
|
|
677
|
+
arg = 'x86'; // Native 32-bit architecture
|
|
678
|
+
} else if (armArchitecture === 'x86_arm64') {
|
|
679
|
+
arg = 'x86_arm64'; // ARM64 on x86
|
|
680
|
+
} else if (armArchitecture === 'x86_arm') {
|
|
681
|
+
arg = 'x86_arm'; // ARM on x86
|
|
682
|
+
} else if (armArchitecture === 'amd64_arm64') {
|
|
683
|
+
arg = 'amd64_arm64'; // ARM64 on x64
|
|
684
|
+
} else if (armArchitecture === 'amd64_arm') {
|
|
685
|
+
arg = 'amd64_arm'; // ARM on x64
|
|
686
|
+
} else {
|
|
687
|
+
console.log(`Unsupported arch: os.arch()=${architecture}, process.arch=${armArchitecture}`)
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
if (arg) {
|
|
691
|
+
let vcvars_path = path.resolve(this.kernel.bin.vs_path_env.BUILD_PATH, "vcvarsall.exe")
|
|
692
|
+
console.log({ arg, vcvars_path })
|
|
693
|
+
conda_activation.push(`${vcvars_path} ${arg} > nul 2>&1`)
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// const vs_path_env = this.kernel.bin.vs_path_env
|
|
697
|
+
// console.log({ vs_path_env })
|
|
698
|
+
// if (vs_path_env && vs_path_env.PATH) {
|
|
699
|
+
// this.env.VS_RELATED_PATHS = `${vs_path_env.PATH.join(path.delimiter)}${path.delimiter}`
|
|
700
|
+
// const vs = `set PATH=%VS_RELATED_PATHS%${path.delimiter}%PATH%`
|
|
701
|
+
// console.log({ vs })
|
|
702
|
+
// conda_activation.push(vs)
|
|
703
|
+
// }
|
|
668
704
|
}
|
|
669
705
|
|
|
670
706
|
|