Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

KDevelop

KDevelop 是一個免費且可用於所有桌面平台的開放原始碼 IDE。

匯入專案

  • 在 KDevelop 的主畫面中選擇 Open Project

../../../_images/kdevelop_newproject.png

KDevelop 的主畫面。

  • 前往 Godot 根目錄並選擇該資料夾。

  • 在下一個畫面中,將 Project Manager 設為 Custom Build System

../../../_images/kdevelop_custombuild.png
  • 專案匯入後,在 Projects 面板中右鍵點擊專案來開啟專案設定,並選擇 Open Configuration... 選項。

../../../_images/kdevelop_openconfig.png
  • Language Support 中開啟 Includes/Imports 分頁,然後新增下列路徑:

    .  // A dot, to indicate the root of the Godot project
    core/
    core/os/
    core/math/
    drivers/
    platform/<your_platform>/  // Replace <your_platform> with a folder
                                  corresponding to your current platform
    
../../../_images/kdevelop_addincludes.png
  • 套用更改。

  • Custom Build System 中新增一個新的建置設定,並填入下列設定:

    Build Directory

    留空

    啟用

    Executable

    scons

    參數

    有關完整的參數列表,請參考 建置系統簡介

../../../_images/kdevelop_buildconfig.png
  • 套用更改並關閉設定視窗。

對專案進行除錯

  • 從上方選單中選擇 Run > Configure Launches...

../../../_images/kdevelop_configlaunches.png
  • 點擊 新增 來建立新的執行設定。

  • 選擇 Executable 選項,然後指定位於 <Godot 根目錄>/bin 資料夾中的可執行檔。執行檔的名稱會依據建置選項而有所不同,如有啟用 tools 的 64 位元 X11 平台版為``godot.x11.tools.64`` 。

../../../_images/kdevelop_configlaunches2.png

若遇到任何問題,請在 任何一個 Godot 的社群頻道 中尋求幫助。