Menu

#283 [windows] windows install process (WIP)

open
nobody
None
2023-09-02
2023-08-08
Anonymous
No

Originally created by: 00000o1

to install bbpro on windows:

  1. winget install openjs.nodejs
  2. winget install python.python.3.8
  3. winget install microsoft.visualstudio.2022.buildtools (select c++ tools)

Discussion

  • Anonymous

    Anonymous - 2023-08-08

    Originally posted by: 00000o1

    got up to

    C:\Users\cris\BrowserBoxPro>npm i
    npm ERR! code 1
    npm ERR! path C:\Users\cris\BrowserBoxPro\node_modules\lmdb
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build-optional-packages
    npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
    npm ERR!
    npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools for v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\cris\BrowserBoxPro\node_modules\lmdb\build\lmdb.vcxproj]
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@9.4.0
    npm ERR! gyp info using node@20.5.0 | win32 | arm64
    npm ERR! gyp info find Python using Python version 3.8.10 found at "C:\Users\cris\AppData\Local\Programs\Python\Python38\python.exe"
    npm ERR! gyp info find VS using VS2022 (17.6.33829.357) found at:
    npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
    npm ERR! gyp info find VS run with --verbose for detailed information
    npm ERR! gyp info spawn C:\Users\cris\AppData\Local\Programs\Python\Python38\python.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
    npm ERR! gyp info spawn args   'binding.gyp',
    npm ERR! gyp info spawn args   '-f',
    npm ERR! gyp info spawn args   'msvs',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\cris\\BrowserBoxPro\\node_modules\\lmdb\\build\\config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\cris\\AppData\\Local\\node-gyp\\Cache\\20.5.0\\include\\node\\common.gypi',
    npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args   '-Dvisibility=default',
    npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\cris\\AppData\\Local\\node-gyp\\Cache\\20.5.0',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\cris\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.5.0\\\\<(target_arch)\\\\node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\cris\\BrowserBoxPro\\node_modules\\lmdb',
    npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    npm ERR! gyp info spawn args   '--depth=.',
    npm ERR! gyp info spawn args   '--no-parallel',
    npm ERR! gyp info spawn args   '--generator-output',
    npm ERR! gyp info spawn args   'C:\\Users\\cris\\BrowserBoxPro\\node_modules\\lmdb\\build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\arm64\MSBuild.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'build/binding.sln',
    npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
    npm ERR! gyp info spawn args   '/nologo',
    npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=ARM64'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp ERR! build error
    npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\arm64\MSBuild.exe` failed with exit code: 1
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
    npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
    npm ERR! gyp ERR! System Windows_NT 10.0.22621
    npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    npm ERR! gyp ERR! cwd C:\Users\cris\BrowserBoxPro\node_modules\lmdb
    npm ERR! gyp ERR! node -v v20.5.0
    npm ERR! gyp ERR! node-gyp -v v9.4.0
    npm ERR! gyp ERR! not ok
    
    npm ERR! A complete log of this run can be found in: C:\Users\cris\AppData\Local\npm-cache\_logs\2023-08-08T13_40_51_132Z-debug-0.log
    
     
  • Anonymous

    Anonymous - 2023-08-27

    Originally posted by: 00000o1

    Seems git bash is a good option for trying to install.

    Need to work on issues with || : syntax I think tho

     
  • Anonymous

    Anonymous - 2023-09-02

    Originally posted by: 00000o1

    Works! Devtools and audio still don't work but that's likely only because bash scripts are not updated to be win compat yet. Process is basically:

    1. Ensure you have chocolatey or scoop installed.
    2. Ensure you have nvm installed.
    3. Ensure you have Google Chrome installed.
    4. Ensure you are using an x64 version of Node. So, if you are running Win on ARM, make sure you switch to an x64 shell and nvm install a version number you previously haven't installed. Then use this version for BBPRO.
    5. Clone BBPRO and run ./deploy-scripts/global_install.sh localhost
    6. Don't run setup_machine.sh (it's not necessary on a consumer system (Mac or Windows).
    7. The install script will: install mkcert and create the local certs; copy the key command files (setup_bbpro and bbpro) to /usr/local/bin; install the application and sslcerts into /usr/local/share/dosyago/; and other tasks.
    8. Then run setup_bbpro (you may need to run it from git bash, I haven't tested running that from the CMD or PS, but it could be OK).
    9. Then cd into BrowserBoxPro in your clone directory and run "npm test". This will start the version in this directory. It should work being run from CMD, or git bash. (It may also work being run from PS, I have not tested. Also I have not tested running just bbpro, the same caveats to running that command apply as to the previously mentioned caveats for setup_bbpro).

    All in all, the most important thing is to ensure you are using an x64 version of node for THE ENTIRE PROCESS above. You can verify that via the output of node -p process.arch at the command line. It should be (some versin of) x64.

    Another caveat is perhaps global_install must be run under git bash (I have not I think tested it under PS or CMD).

    But the app itself can be started from whatever command line interface you have that recognizes npm (and therefore pm2, nvm, etc).

    Soliding up Windows support is great.

     

Log in to post a comment.