From 913753319601f1daad6ca6b4c08cd91bae501da8 Mon Sep 17 00:00:00 2001 From: Hyperion-21 <69665635+Hyperion-21@users.noreply.github.com> Date: Thu, 22 Oct 2020 22:54:00 -0700 Subject: [PATCH] Update README.md Added most of the text. Pull request to my branch "clarify-readme" if I made any mistakes. --- README.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 85b5d26b..2a4d3914 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,38 @@ Your goal is to produce shapes by cutting, rotating, merging and painting parts 5. If not, file a new issue here: https://github.com/tobspr/shapez.io/issues/new 6. I will then have a look (This can take days or weeks) and convert it to trello, and comment with the link. You can then vote there ;) -## Building +## Building (for windows) -- Make sure `ffmpeg` is on your path -- Install Node.js and Yarn -- Install Java (required for textures) -- Run `yarn` in the root folder -- Cd into `gulp` folder -- Run `yarn` and then `yarn gulp` - it should now open in your browser +(credit to Hyperion-21) + +**SETUP** +1. Download FFmpeg at https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z +2. Extract the .zip onto desktop, rename it to FFmpeg +3. Move the folder into `C:\Program Files (x86)`, anywhere works but there is convienient +4. Go to `Control Panel\System and Security\System` and click on `Advanced system settings` +5. Go to the `Advanced` tab. Click on `Enviornment Variables...` +6. Click on the listing that says `PATH` and click edit. +- On win10, you should see a list. Click `New` then type in `C:\Program Files (x86)\FFmpeg\bin` +- On win7, you should see a window that says `Edit User Variable.` In the text field that says "Variable value:" you want to type at the end `;C:\Program Files (x86)\FFmpeg\bin`. The semicolon is for seperating the file path from the other file paths in that field. +7. FFmpeg should now be installed. To test if you did this correctly, run `cmd.exe` as administrator and type `ffmpeg -version` and it should spit at you several lines of code. +8. Install `Node.js`, `Yarn`, and `GitHub CLI`. All three of these softwares use setup wizards, so installation should be easy. If you don't know what setting to put in, use the default. Also make sure you have `Java` and `Git`, but both are very commom afaik. +9. Run `cmd.exe` or `Powershell`. +10. `cd C:\Program Files (x86)\GitHub CLI` then `gh`. Login through that, selecting HTML over SSH. +11. `gh repo clone tobspr/shapez.io` to make sure the game's code is on your system. +12. `git remote add upstream https://github.com/tobspr/shapez.io.git` for resetting branches to the current and official build on GitHub. +13. Set up branches for development. If you just want to build and not make anything, skip this step. On your fork, you should create a new branch. Each unique pull request should have its own branch. Reserve the `master` branch to being level with `tobspr/master`. Run `git reset --hard upstream/(username)/master && git push --force` to reset your master to be level with tob's. Make sure all of your current work is on the branch you created. + +**EXECUTION** +1. Start `cmd.exe` or `Powershell` +2. If you aren't already on `C:\Users\[Your user]`, type `cd %USERPROFILE%` +3. `cd shapez.io` +4. See below for switching builds. If you wish to perform any of those commands, run them at this step. +5. `yarn & cd gulp & yarn & yarn gulp`. This will take a while, and after it has finished + +**SWITCHING BUILD** +- If you want to run a specific pull request, run `gh pr checkout [pr number]` +- If you want to run a specific fork, run `git remote add [arbitrary name] [HTML url, click 'code' on the fork's page and copy the url here] & git fetch -a`. You now have the fork as a remote. +- If you want to run a specific branch, run `git branch -a` and choose one of the branches. Run `git checkout` followed by the branch you chose. Note that **Notice**: This will produce a debug build with several debugging flags enabled. If you want to disable them, modify [`src/js/core/config.js`](src/js/core/config.js).