diff --git a/img/xcode_1_create_external_build_project.png b/img/xcode_1_create_external_build_project.png new file mode 100644 index 00000000..23f9339f Binary files /dev/null and b/img/xcode_1_create_external_build_project.png differ diff --git a/img/xcode_2_configure_scons.png b/img/xcode_2_configure_scons.png new file mode 100644 index 00000000..2750094a Binary files /dev/null and b/img/xcode_2_configure_scons.png differ diff --git a/img/xcode_3_add_new_target.png b/img/xcode_3_add_new_target.png new file mode 100644 index 00000000..f0ec58f4 Binary files /dev/null and b/img/xcode_3_add_new_target.png differ diff --git a/img/xcode_4_select_command_line_target.png b/img/xcode_4_select_command_line_target.png new file mode 100644 index 00000000..5e462d40 Binary files /dev/null and b/img/xcode_4_select_command_line_target.png differ diff --git a/img/xcode_5_after_add_godot_source_to_project.png b/img/xcode_5_after_add_godot_source_to_project.png new file mode 100644 index 00000000..f41c0f5c Binary files /dev/null and b/img/xcode_5_after_add_godot_source_to_project.png differ diff --git a/img/xcode_6_after_add_godot_source_to_project_2.png b/img/xcode_6_after_add_godot_source_to_project_2.png new file mode 100644 index 00000000..a8ce9e71 Binary files /dev/null and b/img/xcode_6_after_add_godot_source_to_project_2.png differ diff --git a/img/xcode_7_setup_build_post_action.png b/img/xcode_7_setup_build_post_action.png new file mode 100644 index 00000000..de10f2d2 Binary files /dev/null and b/img/xcode_7_setup_build_post_action.png differ diff --git a/img/xcode_8_setup_run_scheme.png b/img/xcode_8_setup_run_scheme.png new file mode 100644 index 00000000..5f9602a2 Binary files /dev/null and b/img/xcode_8_setup_run_scheme.png differ diff --git a/reference/configuring_an_ide.rst b/reference/configuring_an_ide.rst index 174c3322..809f4341 100644 --- a/reference/configuring_an_ide.rst +++ b/reference/configuring_an_ide.rst @@ -108,47 +108,68 @@ Run configuration: Xcode ----- -Here is an `image album ` of the steps as well. - Project Setup ^^^^^^^^^^^^^ -- Create an external build project anywhere +- Create an |xcode external build| project anywhere - Set the *Build tool* to the path to scons -- In the external build target's info panel that should now be open - - 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* -- Go to File > New > Target... and add a new command line target - - Name it something so you know not to compile with this target - - e.g. GodotXcodeIndex -- Drag and drop godot source into project file browser - - Uncheck *Create External Build System* - - Click Next - - Select create groups - - Check off only your command line target in the *Add to targets* section - - Click finish. Xcode will now index the files. + +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 + +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. - Grab a cup of coffee... Maybe make something to eat, too - - You should have jump to definition, auto completion, and full syntax highlighting when it is done. +- You should have jump to definition, auto completion, and full syntax highlighting when it is done. Scheme Setup ^^^^^^^^^^^^ -- Open scheme editor of external build target - - Expand the *Build* menu - - Goto *Post Actions* - - Add a new script 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 -- Build the external build target -- Open the scheme editor again - - Click *Run* - - Set the *Executable* to the file you linked in your post build action script - - Check if *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! +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 +- Build the external build target + +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 ` +.. |xcode Info Tab| replace:: :download:`Info Tab ` +.. |xcode File > New > Target...| replace:: :download:`File > New > Target... ` +.. |xcode command line target| replace:: :download:`command line target ` +.. |xcode Uncheck| replace:: :download:`Uncheck ` +.. |xcode Select| replace:: :download:`Select ` +.. |xcode run action| replace:: :download:`run action ` +.. |xcode Click Run| replace:: :download:`Click Run ` Other editors (vim, emacs, Atom...) -----------------------------------