chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.47k stars 469 forks source link

A Guide on Building GB Studio in the Readme #244

Open DeerTears opened 5 years ago

DeerTears commented 5 years ago

Is your feature request related to a problem? Please describe. I'm trying to make modifications to GBT Player in GB Studio and I have already made these modifications to my fork of GB Studio. The only problem is that I don't know how to build my version of GB Studio to see the result of this, and I haven't been able to get an answer from the community. I know I can just ask one of the devs who are great with the community but it'd be nice to have these instructions available alongside the source code.

Describe the solution you'd like The readme should add a step-by-step guide on how to build the source code from this repository. The guide would mention any programs that need to be installed for building as well.

Describe alternatives you've considered Linking a tutorial by someone else in the readme if the building process is similar to other programs. (I don't know what I'm doing I just vaguely know what it looks like for other programs)

Additional context I'm making my own build to include the -speed parameter in GBT Player for different music speed conversion as well as including my own custom waveforms on the wave channel. These are things that aren't inherently wrong with GBT Player nor GB Studio but I'd like to be able to tinker with the system and continue to use GB Studio as the ready-made testbed.

RichardULZ commented 5 years ago

@DeerTears You never replied to my write up on discord for what software you may need. https://discordapp.com/channels/554713715442712616/570925583421276160/598057812249280524 If it all makes sense, i can try bringing that over here.

Veund commented 5 years ago

i just followed this and was able to pull it off

RichardULZ commented 5 years ago

https://discordapp.com/channels/554713715442712616/591302255102132226/600236344333041684 Improvements to the faq post on compiling from source.

How do i compile GB studio from Git?

My recommendation is to chuck software at it until it builds.

Git, Visual Studio Code, Node.js, Yarn, Electron

Start with Git, Git Desktop is nice, but make sure you still get git command line installed. < https://git-scm.com/book/en/v2/Getting-Started-Installing-Git >

Visual Studio Code (not vs), a lightweight code editor with easy command line. < https://code.visualstudio.com/ >

Node.js This is required to install Electron ;) < https://nodejs.org/en/ >

At this point, we can try building... Clone gbstudio with git (i use git desktop for this)

Make sure you've selected the branch you want! v2beta or v3alpha are current, default is old develop 1.2.2. Then 'pull' to get the latest changes for that branch.

Open Visual Studio Code, File>Open Folder your gbstudio source. Now, Terminal>New Terminal.

Cross your fingers and type

yarn

then

npm start

If you get an error, lets install more stuff!

Try installing Yarn, < https://yarnpkg.com/en/docs/install#windows-stable >

Run the commands again, and read errors carefully. Install more if needed.

Electron js (chrome for desktop apps) < https://electronjs.org/ > try in the vs code terminal, npm i -D electron@latest

One more try, and hopefully you should be running! (If you're on a mac, you may still need xcode)

Once you're set up, you only need to type npm start to run from source, but may need to run yarn or electron again if you encounter problems later.

thomas-alrek commented 5 years ago

@RichardULZ maybe we should take your writeup and add it to a contrubution guide

mathew-fleisch commented 1 year ago

I wrote up some documentation on how to build with docker. Here's the PR https://github.com/chrismaltby/gb-studio/pull/1295