Skip to content

Commit 590ae78

Browse files
committed
Split setup instructions per platform
skip-ci
1 parent 4ddf260 commit 590ae78

File tree

4 files changed

+365
-197
lines changed

4 files changed

+365
-197
lines changed

README_SETUP.md

Lines changed: 3 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -2,200 +2,6 @@
22

33
(Setup instructions for the editor [here](/editor/README.md)).
44

5-
## Required Software
6-
7-
### Required Software - Java JDK 11
8-
9-
You need Java JDK 11 installed to build the tools. [Download and install release 11.0.1 from OpenJDK](https://jdk.java.net/archive/). When Java is installed you may also add need to add java to your PATH and export JAVA_HOME:
10-
11-
Set PATH and JAVA_HOME:
12-
13-
> nano ~/.bashrc
14-
15-
export JAVA_HOME=<JAVA_INSTALL_PATH>
16-
export PATH=$JAVA_HOME/bin:$PATH
17-
18-
19-
Verify that Java is installed and working:
20-
21-
> javac -version
22-
23-
#### Linux
24-
25-
On Linux you can use apt-get to install the open jdk:
26-
27-
> apt-get install -y software-properties-common
28-
> add-apt-repository ppa:openjdk-r/ppa
29-
> apt-get update
30-
> apt-get install -y openjdk-11-jdk
31-
32-
### Required Software - Python 2
33-
34-
You need a 64 bit Python 2 version to build the engine and tools. The latest tested on all platforms is Python 2.7.16. You also need `easy_install` to install additional packages.
35-
36-
#### macOS
37-
38-
Catalina comes with both 64-bit Python 2.7.16 and Easy Install installed. For older versions of macOS you may need to install using [Brew](https://brew.sh/):
39-
40-
> brew install python2
41-
42-
#### Windows
43-
44-
Install Python from the [official download page](https://www.python.org/downloads/windows/). There is an install option to add `C:\Python27` to the PATH environment variable, select it or add the path manually. You also need to add `C:\Python27\Scripts` to the PATH to be able to use Easy Install.
45-
46-
#### Linux
47-
48-
Install Python 2 using:
49-
50-
> sudo apt install python-minimal python-setuptools
51-
52-
Configure use of Easy Install (if it's not already installed: `which easy_install`):
53-
54-
> sh -c "echo \#\!/usr/bin/env bash > /usr/local/bin/easy_install"
55-
> sh -c "echo python /usr/lib/python2.7/dist-packages/easy_install.py $\* >> /usr/local/bin/easy_install"
56-
> chmod +x /usr/local/bin/easy_install
57-
58-
59-
### Required Software - Linux
60-
61-
You need additional files and tools to be able to build and work with Defold on Linux:
62-
63-
**Development files**
64-
* **libxi-dev** - X11 Input extension library
65-
* **libxext-dev** - X11 Miscellaneous extensions library
66-
* **x11proto-xext-dev** - X11 various extension wire protocol
67-
* **freeglut3-dev** - OpenGL Utility Toolkit development files
68-
* **libglu1-mesa-dev** + libgl1-mesa-dev + mesa-common-dev - Mesa OpenGL development files
69-
* **libcurl4-openssl-dev** - Development files and documentation for libcurl
70-
* **uuid-dev** - Universally Unique ID library
71-
* **libopenal-dev** - Software implementation of the OpenAL audio API
72-
73-
**Tools**
74-
* **build-essential** - Compilers
75-
* **rpm** - package manager for RPM
76-
* **git** - Fast, scalable, distributed revision control system
77-
* **curl** - Command line tool for transferring data with URL syntax
78-
* **autoconf** - Automatic configure script builder
79-
* **libtool** - Generic library support script
80-
* **automake** - Tool for generating GNU Standards-compliant Makefiles
81-
* **cmake** - Cross-platform, open-source make system
82-
* **tofrodos** - Converts DOS <-> Unix text files
83-
* **valgrind** - Instrumentation framework for building dynamic analysis tools
84-
85-
Download and install using `apt-get`:
86-
87-
> sudo apt-get install -y --no-install-recommends libssl-dev openssl libtool autoconf automake build-essential uuid-dev libxi-dev libopenal-dev libgl1-mesa-dev libglw1-mesa-dev freeglut3-dev
88-
89-
### Required Software - Windows
90-
91-
#### Visual C++ 2019 Community
92-
93-
[Download](https://visualstudio.microsoft.com/vs/older-downloads/) the Community version or use the Professional or Enterprise version if you have the proper licence. When installing, select the "Desktop Development with C++" workload. There is also an optional 3rd party git client.
94-
95-
#### MSYS/MinGW
96-
97-
This will get you a shell that behaves like Linux and is much easier to build Defold through. [Download](http://www.mingw.org/download/installer) and run the installer and check these packages (binary):
98-
99-
* MingW Base System: `mingw32-base-bin`, 'mingw32-gcc-g++-bin'
100-
* MSYS Base System: `msys-base-bin`, `msys-patch-bin`
101-
* MinGW Developer Toolkit: `mingw-developer-toolkit-bin`
102-
103-
Select the menu option `Installation -> Apply Changes`.
104-
105-
You also need to install `wget`. From the mingw terminal run:
106-
107-
> mingw-get install msys-wget-bin msys-zip msys-unzip
108-
109-
**NOTE:** You can start the visual installer again by simply running `mingw-get`
110-
111-
#### Git
112-
113-
You need to [download](https://git-scm.com/download/win) a command line version of Git. During install, select the option to not do any CR/LF conversion. If you use ssh (public/private keys) to access GitHub then:
114-
115-
- Run Git GUI
116-
- Help > Show SSH Key
117-
- If you don't have an SSH Key, press Generate Key
118-
- Add the public key to your Github profile
119-
- You might need to run `start-ssh-agent` (in `C:\Program Files\Git\cmd`)
120-
121-
Alternatively, you can easily create your own key from command line:
122-
123-
$ ssh-keygen -t rsa -b 1024 -C "[email protected]"
124-
# Copy the contents of the public file
125-
$ cat ~/.ssh/id_rsa.pub
126-
# Add the public key to your Github profile
127-
# Test your new key:
128-
129-
130-
Now you should be able to clone the defold repo from a command prompt:
131-
132-
> git clone [email protected]:defold/defold.git
133-
134-
If this won't work, you can try cloning using Github Desktop.
135-
136-
### Required Software - macOS
137-
138-
You need the `dos2unix` command line tool to convert line endings of certain source files when building files in `share/ext`. You can install `dos2unix` using [Brew](https://brew.sh/):
139-
140-
> brew install dos2unix
141-
142-
---
143-
144-
## Optional Software
145-
146-
It is recommended but not required that you install the following software:
147-
148-
* **wget** + **curl** - for downloading packages
149-
* **7z** - for extracting packages (archives and binaries)
150-
* **ccache** - for faster compilations of source code
151-
* **cmake** for easier building of external projects
152-
* **patch** for easier patching on windows (when building external projects)
153-
154-
Quick and easy install:
155-
156-
* macOS: `> brew install wget curl p7zip ccache`
157-
* Linux: `> sudo apt-get install wget curl p7zip ccache`
158-
* Windows: `> pip install cmake patch`
159-
160-
Configure `ccache` by running ([source](https://ccache.samba.org/manual.html))
161-
162-
> /usr/local/bin/ccache --max-size=5G
163-
164-
165-
### Optional Software - Windows
166-
167-
* [Chocolatey](https://chocolatey.org/docs/installation) - Chocolatey is another package installer that will help install various helper tools such as [ripgrep](https://github.com/BurntSushi/ripgrep)
168-
169-
* [ripgrep](https://github.com/BurntSushi/ripgrep) - A very fast text search program
170-
171-
### Optional Software - Linux
172-
173-
Install snapd package manager:
174-
175-
> sudo apt install snapd
176-
177-
Install ripgrep:
178-
179-
> sudo snap install ripgrep --classic
180-
181-
---
182-
183-
## Optional Setup
184-
185-
### Optional Setup - Command Prompt
186-
187-
It's useful to modify your command prompt to show the status of the repo you're in.
188-
E.g. it makes it easier to keep the git branches apart.
189-
190-
You do this by editing the `PS1` variable. Put it in the recommended config for your system (e.g. `.profile` or `.bashrc`)
191-
Here's a very small improvement on the default prompt, whic shows you the time of the last command, as well as the current git branch name and its status:
192-
193-
git_branch() {
194-
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
195-
}
196-
acolor() {
197-
[[ -n $(git status --porcelain=v2 2>/dev/null) ]] && echo 31 || echo 33
198-
}
199-
export PS1='\t \[\033[32m\]\w\[\033[$(acolor)m\] $(git_branch)\[\033[00m\] $ '
200-
201-
5+
* macOS - [Setup instructions](/README_SETUP_MACOS.md)
6+
* Windows - [Setup instructions](/README_SETUP_WINDOWS.md)
7+
* Linux - [Setup instructions](/README_SETUP_LINUX.md)

README_SETUP_LINUX.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Setup Engine - Linux
2+
3+
(Setup instructions for the editor [here](/editor/README.md)).
4+
5+
## Required Software
6+
7+
### Required Software - Java JDK 11
8+
9+
You need Java JDK 11 installed to build the tools. On Linux you can use apt-get to install the open jdk:
10+
11+
```sh
12+
> apt-get install -y software-properties-common
13+
> add-apt-repository ppa:openjdk-r/ppa
14+
> apt-get update
15+
> apt-get install -y openjdk-11-jdk
16+
```
17+
18+
When Java is installed you may also add need to add java to your PATH and export JAVA_HOME:
19+
20+
```sh
21+
> nano ~/.bashrc
22+
23+
export JAVA_HOME=<JAVA_INSTALL_PATH>
24+
export PATH=$JAVA_HOME/bin:$PATH
25+
```
26+
27+
Verify that Java is installed and working:
28+
29+
```sh
30+
> javac -version
31+
```
32+
33+
34+
### Required Software - Python 2
35+
36+
You need a 64 bit Python 2 version to build the engine and tools. The latest tested on all platforms is Python 2.7.16. You also need `easy_install` to install additional packages. Install Python 2 using:
37+
38+
```sh
39+
> sudo apt install python-minimal python-setuptools
40+
```
41+
42+
Configure use of Easy Install (if it's not already installed: `which easy_install`):
43+
44+
```sh
45+
> sh -c "echo \#\!/usr/bin/env bash > /usr/local/bin/easy_install"
46+
> sh -c "echo python /usr/lib/python2.7/dist-packages/easy_install.py $\* >> /usr/local/bin/easy_install"
47+
> chmod +x /usr/local/bin/easy_install
48+
```
49+
50+
51+
### Required Software - Additional tools
52+
53+
You need additional files and tools to be able to build and work with Defold on Linux:
54+
55+
**Development files**
56+
* **libxi-dev** - X11 Input extension library
57+
* **libxext-dev** - X11 Miscellaneous extensions library
58+
* **x11proto-xext-dev** - X11 various extension wire protocol
59+
* **freeglut3-dev** - OpenGL Utility Toolkit development files
60+
* **libglu1-mesa-dev** + libgl1-mesa-dev + mesa-common-dev - Mesa OpenGL development files
61+
* **libcurl4-openssl-dev** - Development files and documentation for libcurl
62+
* **uuid-dev** - Universally Unique ID library
63+
* **libopenal-dev** - Software implementation of the OpenAL audio API
64+
65+
**Tools**
66+
* **build-essential** - Compilers
67+
* **rpm** - package manager for RPM
68+
* **git** - Fast, scalable, distributed revision control system
69+
* **curl** - Command line tool for transferring data with URL syntax
70+
* **autoconf** - Automatic configure script builder
71+
* **libtool** - Generic library support script
72+
* **automake** - Tool for generating GNU Standards-compliant Makefiles
73+
* **cmake** - Cross-platform, open-source make system
74+
* **tofrodos** - Converts DOS <-> Unix text files
75+
* **valgrind** - Instrumentation framework for building dynamic analysis tools
76+
77+
Download and install using `apt-get`:
78+
79+
```sh
80+
> sudo apt-get install -y --no-install-recommends libssl-dev openssl libtool autoconf automake build-essential uuid-dev libxi-dev libopenal-dev libgl1-mesa-dev libglw1-mesa-dev freeglut3-dev
81+
```
82+
83+
---
84+
85+
## Optional Software
86+
87+
It is recommended but not required that you install the following software:
88+
89+
* **wget** + **curl** - for downloading packages
90+
* **7z** - for extracting packages (archives and binaries)
91+
* **ccache** - for faster compilations of source code
92+
* **cmake** for easier building of external projects
93+
* **patch** for easier patching on windows (when building external projects)
94+
* **snapd** for installing snap packages
95+
* **ripgrep** for faster search
96+
97+
Quick and easy install:
98+
99+
```sh
100+
> sudo apt-get install wget curl p7zip ccache
101+
```
102+
103+
Configure `ccache` by running ([source](https://ccache.samba.org/manual.html))
104+
105+
```sh
106+
> /usr/local/bin/ccache --max-size=5G
107+
```
108+
109+
Install snapd package manager:
110+
111+
```sh
112+
> sudo apt install snapd
113+
```
114+
115+
Install ripgrep:
116+
117+
```sh
118+
> sudo snap install ripgrep --classic
119+
```
120+
121+
---
122+
123+
## Optional Setup
124+
125+
### Optional Setup - Command Prompt
126+
127+
It's useful to modify your command prompt to show the status of the repo you're in.
128+
E.g. it makes it easier to keep the git branches apart.
129+
130+
You do this by editing the `PS1` variable. Put it in the recommended config for your system (e.g. `.profile` or `.bashrc`)
131+
Here's a very small improvement on the default prompt, whic shows you the time of the last command, as well as the current git branch name and its status:
132+
133+
```sh
134+
git_branch() {
135+
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
136+
}
137+
acolor() {
138+
[[ -n $(git status --porcelain=v2 2>/dev/null) ]] && echo 31 || echo 33
139+
}
140+
export PS1='\t \[\033[32m\]\w\[\033[$(acolor)m\] $(git_branch)\[\033[00m\] $ '
141+
```

0 commit comments

Comments
 (0)