Coder Social home page Coder Social logo

Comments (4)

GazHank avatar GazHank commented on June 3, 2024 1

Hi @yeungh & @hirisov

sorry it's taken a while to respond, I certainly recognise your pain, I had so much trouble initially getting everything working. Even when I did get it all working, I couldn't really share instructions as so much trial and error meant I want sure which steps were really needed.

I'll give it a try to describe all of the steps needed to get a fully functional environment to build Bazecor. I've just installed a fresh OS on a blank SSD, so I can hopefully confirm all of the steps needed, do please let me know if anything could be clarified or simplified.

While my install was conducted on Linux (Ubuntu 20.04.2 LTS), I'm far more familiar with Windows, so I'll try to help on other platforms if I can.

The main steps are:

  1. Install Node.js
  2. Install build tools
  3. Clone the Bazecor Repository
  4. Have Yarn download (and rebuild) the required packages
  5. Enjoy! (Build or Test Bazecor)

1. Install Node.js

You can find instructions at https://nodejs.org/ or https://nodejs.org/en/download/package-manager/

I'd suggest using the current release (v16 at the moment) , or you could try the LTS (v14) if you prefer, but be very careful if you try to use older versions as you may hit compatibility issues

2. Install Build tools

There are a few tools you need to build Bazecor and the things it depends upon:

  • Git - Since you are viewing this on Github you probably know why git is useful :-)
  • Yarn - all of the packaging and building of Bazecor is handled by yarn
  • Build essentials (support for C, Python etc) - This is mainly needed to build/rebuild native dependencies - There is a chance that we can remove this dependency in the future, but this is all good stuff to have on your machine if you are developing stuff

Git

https://git-scm.com/downloads

Yarn

https://classic.yarnpkg.com/

Build Essentials

Windows:

  1. run npm install --global windows-build-tools

Linux:

  1. run sudo apt-get install -y build-essential
  2. run sudo apt-get install libudev-dev

Mac:

  1. < not sure, perhaps someone with a fruit machine can confirm? >

3. Clone the Bazecor Repository

  1. Open a command prompt (whatever your poison: bash, cmd, powershell)
  2. Make (/navigate to) a directory to keep you git repositories in
  3. run git clone https://github.com/Dygmalab/Bazecor.git

4. Have Yarn download the required packages

  1. run yarn

While this will probably result in lots of warning about some packages which we depend upon being out of date, this should get all of the packages we need.

you may see some error messages for packages like USB and SerialPort "prebuild-install WARN install No prebuilt binaries found (target=16.1.0 runtime=node..."

To rebuild native packages run yarn rebuild this will probably be needed for SerialPort since prebuild versions for electron 12 are not yet published.

Note: I've run the same steps on Linux and Windows, and while Linux successfully executed the rebuild process by just running yarn, on windows it required the follow up yarn rebuild step. Perhaps there is a slight issue with the config, or my local windows environment.

5. Enjoy! (Build or Test Bazecor)

Now is the time to have some fun (hopefully!)

You should now be ready to start testing or building Bazecor!

To test things run Yarn start, this will run the app in a dev environment which is great for testing when you have made a code tweak and want to check if it is working.

To build a packaged executable run yarn build:osx / build:win / build:linux
While you could run build:all, most environments can't cross compile, so it's probably best to just build for your local machine.


So from a fresh Ubuntu 20.04.2 LTS install (standard install)

sudo snap install curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo apt install git
sudo npm install yarn
sudo apt-get install -y build-essential
sudo apt-get install libudev-dev

mkdir Git
cd Git
git clone https://github.com/Dygmalab/Bazecor.git
cd Bazecor

yarn

yarn start

Please do let me know if this is helpful, or if you face any issues with any of the steps, There might be some extra tweaks needed on Windows or Mac especially, but if this is useful then I'd like to update the instructions based on your feedback if possible.

@AlexDygma would you be able to take a review too, or have other members of the team take a look, especially anyone with experience on the Mac side, I think it would be great if we can make it easier for others to build and interact with the code, and hopefully help make Bazecor even better :-)

Cheers

Gaz

from bazecor.

hirisov avatar hirisov commented on June 3, 2024

This would be great, I would like to add support for a new layout, but Bazecor does not compile with the current nodejs version, then I accidentally find this thread and successfully compile it with version 10, but it gives an empty canvas after start and some not very descriptive electronjs errors :( Some "official" info would be great for how to set up for development and how to contribute.

from bazecor.

martinhauke avatar martinhauke commented on June 3, 2024

It's probably a good idea to add a .nvmrc file and run nvm use && yarn.

from bazecor.

javierguzman avatar javierguzman commented on June 3, 2024

Bazecor is like any other Nodejs project. You just need node and yarn(we do not use npm). Installing these two things will take care of the build stuff you need. If you are still having problems with this, feel free to reopen and specify exactly what errors/problems you are facing.

from bazecor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.