1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Update README.md

Did most of EmeraldBlock's suggestions
This commit is contained in:
Hyperion-21 2020-10-23 14:46:26 -07:00 committed by GitHub
parent 9137533196
commit 7ea0968f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,38 +20,40 @@ 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 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 ;) 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 (for windows) ## Building
Note that this process is for Windows. Use equivalent actions for other operating systems. This guide is also meant to be understandable by users with little to no knowledge of Git.
(credit to Hyperion-21) (credit to Hyperion-21)
**SETUP** **SETUP**
1. Download FFmpeg at https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z 1. Download FFmpeg at https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z
2. Extract the .zip onto desktop, rename it to FFmpeg 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 3. Move the folder into `C:\Program Files`, anywhere works but there is convienient
4. Go to `Control Panel\System and Security\System` and click on `Advanced system settings` 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...` 5. Go to the `Advanced` tab. Click on `Enviornment Variables...`
6. Click on the listing that says `PATH` and click edit. 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 win10, you should see a list. Click `New` then type in `C:\Program Files\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. - 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\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. 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. 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. Run `cmd.exe` if you closed it earlier and run `java -version` and `git --version` to test if you already have them installed or not.
9. Run `cmd.exe` or `Powershell`. 9. `cd C:\Program Files (x86)\GitHub CLI` then `gh` in `cmd.exe`. Login through that, selecting HTTP over SSH.
10. `cd C:\Program Files (x86)\GitHub CLI` then `gh`. Login through that, selecting HTML over SSH. 10. `cd %USERPROFILE%` to return to your user folder.
11. `gh repo clone tobspr/shapez.io` to make sure the game's code is on your system. 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. 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. 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** **EXECUTION**
1. Start `cmd.exe` or `Powershell` 1. Start `cmd.exe`
2. If you aren't already on `C:\Users\[Your user]`, type `cd %USERPROFILE%` 2. If you aren't already on `C:\Users\[Your user]`, type `cd %USERPROFILE%`
3. `cd shapez.io` 3. `cd shapez.io`
4. See below for switching builds. If you wish to perform any of those commands, run them at this step. 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 5. `yarn & cd gulp & yarn & yarn gulp`. This will take a while, but afterwards shapez.io should be running in a browser tab. Note that if both `yarn` commands respond with `Already up-to-date`, if the future you only have to run `cd gulp & yarn gulp`, but only do this if you know you are up to date.
**SWITCHING BUILD** **SWITCHING BUILD**
- If you want to run a specific pull request, run `gh pr checkout [pr number]` - 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 fork, run `git remote add [arbitrary name] [HTTP url, click 'code' on the fork's page and copy the url here] & git fetch -a`. You now have the fork as a remote. This will allow you to select the branches of the fork (see below). You only have to do this once per fork, and you can check the remotes you currently have with `git 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 - If you want to run a specific branch, run `git branch -a` and choose the branch you want to run. Run `git checkout [branch]`. This should put you into `detached HEAD`.
**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). **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).