|
2 | 2 |
|
3 | 3 | (Setup instructions for the editor [here](/editor/README.md)).
|
4 | 4 |
|
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) |
0 commit comments