2016-02-19 20:15:14 +01:00
|
|
|
.. _doc_configuring_an_ide:
|
2016-02-08 22:07:55 +01:00
|
|
|
|
2016-02-19 20:15:14 +01:00
|
|
|
Configuring an IDE
|
|
|
|
==================
|
2016-02-19 16:17:32 +01:00
|
|
|
|
2016-02-19 20:15:14 +01:00
|
|
|
We assume that you already `cloned <https://github.com/godotengine/godot>`_
|
|
|
|
and :ref:`compiled <toc-compiling>` Godot.
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
Kdevelop
|
|
|
|
--------
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
It is a free, open source IDE (Integrated Development Environment)
|
|
|
|
for Linux, Solaris, FreeBSD, Mac OS X and other Unix flavors.
|
|
|
|
|
|
|
|
You can find a video tutorial `here <https://www.youtube.com/watch?v=yNVoWQi9TJA>`_.
|
|
|
|
Or you may follow this text version tutorial.
|
2016-02-19 15:05:11 +01:00
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
Start by opening Kdevelop and choosing "open project".
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_newproject.png
|
|
|
|
|
|
|
|
Choose the directory where you cloned Godot.
|
|
|
|
|
|
|
|
.. image:: /img/kdevelop_openproject.png
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
For the build system, choose "custom build system".
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_custombuild.png
|
|
|
|
|
|
|
|
Now that the project has been imported, open the project configuration.
|
|
|
|
|
|
|
|
.. image:: /img/kdevelop_openconfig.png
|
|
|
|
|
|
|
|
Add the following includes/imports:
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
::
|
|
|
|
|
|
|
|
. // a dot to indicate the root of the Godot project
|
|
|
|
core/
|
|
|
|
core/os/
|
|
|
|
core/math/
|
|
|
|
tools/
|
|
|
|
drivers/
|
|
|
|
platform/x11/ // make that platform/osx/ is you're using OS X
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_addincludes.png
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
Apply the changes then switch to the "Custom Buildsystem" tab.
|
|
|
|
Leave the build directory blank. Enable build tools and add ``scons``
|
|
|
|
as the executable and add ``platform=x11 target=debug`` (``platform=osx``
|
|
|
|
if you're on OS X).
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_buildconfig.png
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
Next we need to tell KDevelop where to find the binary.
|
|
|
|
From the "run" menu, choose "Configure Launches".
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_configlaunches.png
|
|
|
|
|
2016-02-19 16:17:32 +01:00
|
|
|
Click "Add new" if no launcher exists. Then add the path to your
|
|
|
|
executable in the executable section. Your executable should be located
|
|
|
|
in the ``bin/`` sub-directory and should be named something like
|
|
|
|
``godot.x11.tools.64`` (the name could be different depending on your
|
|
|
|
platform and depending on your build options).
|
2016-02-19 15:05:11 +01:00
|
|
|
|
|
|
|
.. image:: /img/kdevelop_configlaunches2.png
|
|
|
|
|
|
|
|
That's it! Now you should be good to go :)
|
|
|
|
|
2015-12-12 17:57:44 +01:00
|
|
|
|
2016-02-12 22:29:32 +01:00
|
|
|
Eclipse
|
|
|
|
-------
|
2015-12-12 17:57:44 +01:00
|
|
|
|
2016-02-12 22:29:32 +01:00
|
|
|
TODO.
|
2015-12-12 17:57:44 +01:00
|
|
|
|
2016-02-12 22:29:32 +01:00
|
|
|
QtCreator
|
|
|
|
---------
|
|
|
|
|
2016-02-19 14:49:06 +01:00
|
|
|
Importing the project
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2016-02-19 20:15:14 +01:00
|
|
|
- Choose *New Project* -> *Import Project* -> *Import Existing Project*.
|
|
|
|
- Set the path to your Godot root directory and enter the project name.
|
|
|
|
- Here you can choose which folders and files will be visible to the project. C/C++ files
|
|
|
|
are added automatically. Potentially useful additions: \*.py for buildsystem files, \*.java for Android development,
|
|
|
|
\*.mm for OSX. Click "Next".
|
|
|
|
- Click *Finish*.
|
2016-02-25 15:06:40 +01:00
|
|
|
- Add a line containing ``.`` to *project_name.files* to get working code completion.
|
2016-02-19 14:49:06 +01:00
|
|
|
|
|
|
|
Build and run
|
|
|
|
^^^^^^^^^^^^^
|
2016-02-19 20:15:14 +01:00
|
|
|
|
2016-02-19 14:49:06 +01:00
|
|
|
Build configuration:
|
|
|
|
|
2016-02-19 20:15:14 +01:00
|
|
|
- Click on *Projects* and open the *Build* tab.
|
|
|
|
- Delete the pre-defined ``make`` build step.
|
|
|
|
- Click *Add Build Step* -> *Custom Process Step*.
|
|
|
|
- Type ``scons`` in the *Command* field.
|
|
|
|
- Fill the *Arguments* field with your compilation options. (e.g.: ``p=x11 target=debug -j 4``)
|
2016-02-19 14:49:06 +01:00
|
|
|
|
|
|
|
Run configuration:
|
|
|
|
|
2016-02-19 20:15:14 +01:00
|
|
|
- Open the *Run* tab.
|
|
|
|
- Point the *Executable* to your compiled Godot binary.
|
|
|
|
- If you want to run a specific game or project, point *Working directory* to the game directory.
|
|
|
|
- If you want to run the editor, add ``-e`` to the *Command line arguments* field.
|
2016-02-12 22:29:32 +01:00
|
|
|
|
2016-05-26 08:35:24 +02:00
|
|
|
Xcode
|
|
|
|
-----
|
|
|
|
|
|
|
|
Project Setup
|
|
|
|
^^^^^^^^^^^^^
|
|
|
|
|
2016-05-27 08:07:08 +02:00
|
|
|
- Create an |xcode external build| project anywhere
|
2016-05-26 08:35:24 +02:00
|
|
|
- Set the *Build tool* to the path to scons
|
2016-05-27 08:07:08 +02:00
|
|
|
|
|
|
|
Modify Build Target's |xcode Info Tab|:
|
|
|
|
|
|
|
|
- Set *Arguments* to something like: platform=osx tools=yes bits=64 target=debug
|
|
|
|
- Set *Directory* to the path to Godot's source folder. Keep it blank if project is already there.
|
|
|
|
- You may uncheck *Pass build settings in environment*
|
|
|
|
|
|
|
|
Add a Command Line Target:
|
|
|
|
|
|
|
|
- Go to |xcode File > New > Target...| and add a new |xcode command line target|
|
|
|
|
- Name it something so you know not to compile with this target
|
|
|
|
- e.g. GodotXcodeIndex
|
2016-05-28 12:35:38 +02:00
|
|
|
- Goto the newly created target's *Build Settings* tab and search for *Header Search Paths*
|
|
|
|
- Set *Header Search Paths* to an absolute path to Godot's source folder
|
|
|
|
- Make it recursive by adding two \*'s to the end of the path
|
|
|
|
- e.g. /Users/me/repos/godot-source/\**
|
2016-05-27 08:07:08 +02:00
|
|
|
|
|
|
|
Add Godot Source to the Project:
|
|
|
|
|
|
|
|
- Drag and drop godot source into project file browser.
|
|
|
|
- |xcode Uncheck| *Create External Build System*
|
|
|
|
- Click Next
|
|
|
|
- |xcode Select| *create groups*
|
|
|
|
- Check off only your command line target in the *Add to targets* section
|
|
|
|
- Click finish. Xcode will now index the files.
|
2016-05-26 08:35:24 +02:00
|
|
|
- Grab a cup of coffee... Maybe make something to eat, too
|
2016-05-27 08:07:08 +02:00
|
|
|
- You should have jump to definition, auto completion, and full syntax highlighting when it is done.
|
2016-05-26 08:35:24 +02:00
|
|
|
|
|
|
|
Scheme Setup
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
2016-05-27 08:07:08 +02:00
|
|
|
Edit Build Scheme of External Build Target:
|
|
|
|
|
|
|
|
- Open scheme editor of external build target
|
|
|
|
- Expand the *Build* menu
|
|
|
|
- Goto *Post Actions*
|
|
|
|
- Add a new script |xcode run action|
|
|
|
|
- Write a script that gives the binary a name that Xcode will recognize
|
|
|
|
- e.g. ln -f "$SRCROOT"/bin/godot.osx.tools.64 godot
|
2016-05-26 08:35:24 +02:00
|
|
|
- Build the external build target
|
|
|
|
|
2016-05-27 08:07:08 +02:00
|
|
|
Edit Run Scheme of External Build Target:
|
|
|
|
|
|
|
|
- Open the scheme editor again
|
|
|
|
- |xcode Click Run|
|
|
|
|
- Set the *Executable* to the file you linked in your post build action script
|
|
|
|
- Check *Debug executable* if it isn't already
|
|
|
|
|
|
|
|
Test It:
|
|
|
|
|
|
|
|
- set a breakpoint in platform/osx/godot_main_osx.mm
|
|
|
|
- it should break at the point!
|
|
|
|
|
|
|
|
.. |xcode external build| replace:: :download:`external build </img/xcode_1_create_external_build_project.png>`
|
|
|
|
.. |xcode Info Tab| replace:: :download:`Info Tab </img/xcode_2_configure_scons.png>`
|
|
|
|
.. |xcode File > New > Target...| replace:: :download:`File > New > Target... </img/xcode_3_add_new_target.png>`
|
|
|
|
.. |xcode command line target| replace:: :download:`command line target </img/xcode_4_select_command_line_target.png>`
|
|
|
|
.. |xcode Uncheck| replace:: :download:`Uncheck </img/xcode_5_after_add_godot_source_to_project.png>`
|
|
|
|
.. |xcode Select| replace:: :download:`Select </img/xcode_6_after_add_godot_source_to_project_2.png>`
|
|
|
|
.. |xcode run action| replace:: :download:`run action </img/xcode_7_setup_build_post_action.png>`
|
|
|
|
.. |xcode Click Run| replace:: :download:`Click Run </img/xcode_8_setup_run_scheme.png>`
|
2016-05-26 08:35:24 +02:00
|
|
|
|
2016-02-12 22:29:32 +01:00
|
|
|
Other editors (vim, emacs, Atom...)
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
TODO.
|