pinokiod 3.3.11 → 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.
@@ -37,7 +37,8 @@ class Playwright {
37
37
  //"npm init -y",
38
38
  //"npm install playwright@latest --quiet --install-deps"
39
39
  //"npm init -y playwright@latest -- --lang js --quiet --install-deps",
40
- "npm init -y playwright@latest -- --quiet --install-deps",
40
+ //"npm init -y playwright@latest -- --quiet --install-deps",
41
+ "npm init -y playwright@latest -- --quiet",
41
42
  //"npm install npm corepack playwright@1.49.1 --loglevel verbose",
42
43
  //"npm install playwright --loglevel verbose",
43
44
  //"playwright install firefox",
package/kernel/bin/vs.js CHANGED
@@ -125,7 +125,8 @@ class VS {
125
125
  PATH: [
126
126
  // "C:\\Windows\\System32",
127
127
  "C:\\Windows\\System32\\WindowsPowerShell\\v1.0",
128
- ]
128
+ ],
129
+ BUILD_PATH: paths.BUILD_PATH
129
130
  }
130
131
 
131
132
  if (paths.MSVC_PATH) env.PATH = env.PATH.concat(paths.MSVC_PATH)
package/kernel/shell.js CHANGED
@@ -657,14 +657,50 @@ class Shell {
657
657
 
658
658
 
659
659
  if (this.platform === "win32") {
660
- const vs_path_env = this.kernel.bin.vs_path_env
661
- console.log({ vs_path_env })
662
- if (vs_path_env && vs_path_env.PATH) {
663
- this.env.VS_RELATED_PATHS = `${vs_path_env.PATH.join(path.delimiter)}${path.delimiter}`
664
- const vs = `set PATH=%VS_RELATED_PATHS%${path.delimiter}%PATH%`
665
- console.log({ vs })
666
- conda_activation.push(vs)
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.3.11",
3
+ "version": "3.3.13",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {