@@ -98,54 +98,54 @@ To use it:
9898Note that the sdk disables the integration if it's unable to import debugpy on first use, meaning
9999you may not get away with manipulating ` sys.path ` . Instead, consider using [ ` ._pth ` files] ( https://docs.python.org/3/library/sys_path_init.html ) .
100100
101- # Installation
102- 1 . Download the relevant [ release] ( https://github.com/bl-sdk/pyunrealsdk/releases ) .
103-
104- If you don't know which compiler's version to get, we recommend MSVC (so functions log messages
105- include namespaces).
106-
107- 2 . Install some game specific plugin loader. The released dlls are not set up to alias any system
108- dlls, you can't just call it ` d3d9.dll ` and assume your game will load fine.
109-
110- If you know a specific dll name is fine to use without aliasing, rename ` pyunrealsdk.dll ` .
111-
112- 3 . Extract all files to somewhere in your game's dll search path. Your plugin loader's plugins
113- folder may work, otherwise you can fall back to the same directory as the executable.
114-
115101# Development
116- To build:
102+ The sdk can be built with one of five different toolchains, each of which have a few different
103+ configurations:
104+
105+ - MSVC
106+ - Clang (Windows)
107+ - Clang (Cross Compile) <sup >* </sup >
108+ - MinGW <sup >* </sup >
109+ - LLVM MinGW <sup >* </sup >
110+
111+ The toolchains with an asterix are all cross compiling toolchains. These all also have an associated
112+ dev container, which is the recommended way of building them. The ` clang-cross-* ` presets in
113+ particular hardcode a path assuming they're running in the container.
114+
115+ The sdk is always built as a Windows dll. To allow the cross compiling toolchains to link against a
116+ Windows copy of Python, rather than using CMake's normal ` FindPython ` helpers, when configuring we
117+ download a copy from Python's site. When integrating the sdk into your own projects, exactly which
118+ version can be specified using the ` EXPLICIT_PYTHON_ARCH ` and ` EXPLICIT_PYTHON_VERSION ` variables.
119+ The CMake presets already have these set if building locally.
120+
121+ To download the relevant python version, you need a copy of Python with requests on your path. When
122+ cross compiling you also need ` msiextract ` , which is typically part of an ` msitools ` package. The
123+ dev containers already have these set up.
124+ ``` sh
125+ pip install requests
126+ python -c ' import requests'
127+
128+ # Linux only
129+ apt install msitools # Or equivalent
130+ msiextract --version
131+ ```
132+
133+ Once you've got this all set up, to build the sdk:
117134
1181351 . Clone the repo (including submodules).
119136 ``` sh
120137 git clone --recursive https://github.com/bl-sdk/pyunrealsdk.git
121138 ```
122139
123- 2 . Make sure you have Python with requests on your PATH. This doesn't need to be the same version
124- as what the SDK uses, it's just used by the script which downloads the correct one.
125- ``` sh
126- pip install requests
127- python -c ' import requests'
128- ```
129-
130- If not running on Windows, make sure ` msiextract ` is also on your PATH. This is typically part
131- of an ` msitools ` package.
132- ``` sh
133- apt install msitools # Or equivalent
134- msiextract --version
135- ```
136-
137- See the explicit python [ readme] ( https://github.com/bl-sdk/common_cmake/blob/master/explicit_python/Readme.md )
138- for a few extra details.
139-
140- 3 . (OPTIONAL) Copy ` postbuild.template ` , and edit it to copy files to your game install directories.
140+ 2 . (OPTIONAL) Copy ` postbuild.template ` , and edit it to copy files to your game install directories.
141141
142- 4 . Choose a preset, and run CMake. Most IDEs will be able to do this for you,
142+ 3 . Choose a preset, and run CMake. Most IDEs will be able to do this for you,
143143 ```
144144 cmake . --preset msvc-ue4-x64-debug
145145 cmake --build out/build/msvc-ue4-x64-debug
146146 ```
147147
148- 5 . (OPTIONAL) Copy the python runtime files to the game's directory. At a minimum, you probably
148+ 4 . (OPTIONAL) Copy the python runtime files to the game's directory. At a minimum, you probably
149149 want these:
150150 ```
151151 python3.dll
@@ -159,10 +159,10 @@ To build:
159159 cmake --build out/build/msvc-ue4-x64-debug --target install
160160 ```
161161
162- As an alternative to this and step 3 , you could point the CMake install dir directly at your
162+ As an alternative to this and step 2 , you could point the CMake install dir directly at your
163163 game, so everything's automatically copied. This however will only work with one game at a time.
164164
165- 6 . (OPTIONAL) If you're debugging a game on Steam, add a ` steam_appid.txt ` in the same folder as the
165+ 5 . (OPTIONAL) If you're debugging a game on Steam, add a ` steam_appid.txt ` in the same folder as the
166166 executable, containing the game's Steam App Id.
167167
168168 Normally, games compiled with Steamworks will call
0 commit comments