Help building the Defold Editor on Windows

I decided to study deeper how the editor is organized, followed the instructions defold/editor/README_CURSIVE.md at dev · defold/defold · GitHub.
I got to step 8. From a command-line prompt, cd into the defold/editor directory and type lein run to start the editor., I get this:

When opening a project in Intellij idea, I see the same thing:

OS: windows 11

Any idea what to do next?

The issue is that you’re missing the engine and Bob components that are also needed by the editor. The Cursive Setup Guide is only a small part of the instructions. You are intended to start with the README.md file, which links to README_CURSIVE.md for the Cursive-specific steps. Specifically, I think you’re missing the instructions in README_BUILD.md, which details how to build the engine and Bob, or download pre-built versions of those components that the editor can use.

I admit we could probably do a better job of clarifying these instructions. There’s a lot of jumping around between documents and it’s easy to miss a step somewhere along the way.

2 Likes

So, I started from the very beginning, and again the same rake)

I got to the point of installing the SDK, installed visual studio 2022, selected the necessary components (I’m not sure, because not everything matches the documentation).

I executed

./scripts/package/package_win32_sdk.sh

I received two files: Microsoft-Visual-Studio-2022-14.43.34808.tar.gz and WindowsKits-10.0.20348.0.tar.gz
Now I run

$ ./scripts/build.py --package-path=/d/projects/defold/source/defold/local_sdks install_sdk --platform=x86_64-win32
Couldn't find build_vendor.py. Skipping.
[exec] git remote get-url origin
Running 'install_sdk'
SDK already installed: d:\projects\defold\source\ext\SDKs\Win32\WindowsKits\10
Could not find local file: D:/projects/defold/source/defold/local_sdks/Microsoft-Visual-Studio-2022-14.37.32822.tar.gz

In the Visual Studio installer I see packages of version 14.37, but they are marked as discontinued. If I install them, then version 14.43 is still packed. If I delete version 14.43, then the packer does not find the SDK.

$ ./scripts/package/package_win32_sdk.sh
Found MSVC_VERSION=
Found VS_ROOT=
Found YEAR=
Found SDK_VERSION=10.0.20348.0
Found SDK_ROOT=C:\Program Files (x86)\Windows Kits\10\
Package /d/projects/defold/source/defold/local_sdks/WindowsKits-10.0.20348.0.tar.gz already existed
Packing to Microsoft-Visual-Studio--.tar.gz
cp: cannot stat '/bin/Hostx64/x64': No such file or directory

Question: how to install the required SDK???

You are correct that we need sdk’s to build code.
However, you don’t need to package them yourself in order to build the code:

It’s specified here which says this about local installations:

Using local installation

Our build setup can find the installation of the platform SDK’s for the common platforms. See Platform SDK

If you have these tools installed, you can skip the ./scripts/build.py install_sdk step altogether.

Since support for locally installed SDK’s is in progress, some platforms still do require the --install_sdk step, and thus requires you to have the prepackaged sdk’s available.

And if you click through that link, you end up here:

To make contributions easier, we detect local installations of the common platform SDK’s:

  • macOS + iOS: XCode
  • Linux: Clang++
  • Windows: Visual Studio Community 2022
    • We also require Clang:
      • In Visual Studio Installer, under Individual components, select C++ Clang Compiler for Windows and MSBuild support for LLVM (clang-cl) toolset.
      • Add clang to your PATH. For a default installation, the path to add will likely be C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin
  • Android: Android Studio

For consoles, we refer to each vendor’s installation notes.

Also, since I’m thinking you really only wanted to build the editor, you should be able to use a stable release for that (i.e. prebuilt engine etc):

lein init 591eb496d52f4140bc2c7de547131f1b9408b9b4

This command let’s you skip building the engine and bob locally.

Note that I use the sha1 of the 1.10.0 Release, as the current build instruction doesn’t work right now:

lein init archived-stable

2 Likes

Oh, yes, it worked! Thank you very much! We will look into it further )