Work on documentation for build.py, also add checkout step.

This commit is contained in:
2025-06-11 21:00:55 -04:00
parent af69dbe15d
commit d074d2be05
2 changed files with 55 additions and 54 deletions

View File

@@ -1,50 +1,9 @@
LINUX INSTRUCTIONS: LINUX INSTRUCTIONS:
Warnings: All the important instructions are in 'build.py'
- Do NOT follow the installation instructions for Unreal!
- Follow these instructions instead.
Install important Software
- install git-lfs support. Usually: apt-get install git-lfs
- install visual studio code. Usually: apt-get install code
- install dotnet6. Usually: apt-get install dotnet6
- install clangd-15. Usually: apt-get install clangd-15
- install jq. On Linux, this is usually already installed.
- install python3. On Linux, this is usually already installed.
Git Clone the UnrealEngine repository:
- The repository is at https://github.com/EpicGames/UnrealEngine.git
- Cloning the repository requires creating an account and a password and
some other fiddly credential management stuff I don't remember how to do.
- Clone it into your home directory, $HOME/UnrealEngine
- Check out the correct version: git checkout 5.3.1-release
Git Clone the integration Repository
- The repository is at https://www.gnaut.com/team/integration.git
- Clone it into your home directory, $HOME/integration
Apply patches and build everything:
- Change directory to $HOME/integration
- python3 build-everything.py
Launch Integration in the Debugger
- Change directory to $HOME/integration
- Start the IDE: code Integration.code-workspace
- Wait until a popup appears about 'recommended extensions'
- Install the recommended extensions (only have to do this once)
- Click 'Run/Start Debugging'
- Is is preconfigured to launch and debug the unreal editor with the integration code.
To edit and recompile, from inside the IDE:
- Edit some source files
- Click 'Terminal/Run Task...'
- If you edited the code in 'Source': Click 'IntegrationEditor Linux DebugGame Build'
- If you edited the code in 'Luprex': Click 'build luprex'
- Alternately, you can recompile from the command line by typing 'make' again.
- After recompiling in the IDE, you can go straight back to debugging.

View File

@@ -1,17 +1,41 @@
#!/usr/bin/python3 #!/usr/bin/python3
# #
# This build script can be run in three modes: # The one-and-only build script for luprex.
# Do not follow any of the build instructions on the Unreal Engine
# websites! Instead, use these instructions.
# #
# build.py all - rebuilds everything
# build.py c++ - works when you've only edited c++ code
# build.py clean - remove some build products
# #
# If you clone the UnrealEngine and integration repositories, # HOW TO BUILD THE FIRST TIME
# and then run "build.py all", this will build both unreal engine and #
# integration. It will also build project files for vscode, an # First, install the following software:
# intellisense database, and several other things. Once it is done, #
# you can start up vscode using 'code Integration.code-workspace'. # apt-get install git-lfs
# Then, you can run our game in the vscode debugger. # apt-get install code
# apt-get install dotnet6
# apt-get install clangd-15 or better.
#
# Then, git clone the UnrealEngine and integration repositories:
#
# cd $HOME
# git clone https://github.com/EpicGames/UnrealEngine.git
# git clone https://www.gnaut.com/team/integration.git
#
# It is important that these two repositories be located
# at $HOME/UnrealEngine and $HOME/integration.
#
# Of course, you will have to jump through a bunch of hoops to
# get access to these repositories. See the instructions on the
# unreal engine website.
#
# After cloning the two repositories, change directory into
# the "integration" repository and run "build.py all".
# This will build both unreal engine and integration. It will
# also build project files for vscode, an intellisense database,
# and several other things. Once it is done, everything is built.
# You can start up the debugger.
#
#
# HOW TO REBUILD WHEN YOU'VE EDITED SOMETHING
# #
# You can also use "build.py all" to rebuild. This is the preferred # You can also use "build.py all" to rebuild. This is the preferred
# way to rebuild when you aren't sure what's been edited. However, # way to rebuild when you aren't sure what's been edited. However,
@@ -26,12 +50,22 @@
# anything else, you need to use "build.py all" to rebuild. # anything else, you need to use "build.py all" to rebuild.
# #
# Editing Lua or Blueprint code doesn't require any kind of rebuild. # Editing Lua or Blueprint code doesn't require any kind of rebuild.
#
#
# USING VISUAL STUDIO CODE
# #
# We have a "build.py clean", but it hasn't gotten a lot of love. # To start up vscode, change directory to the integration repository,
# I honestly have no idea what it removes and what it doesn't. # and run "code Integration.code-workspace". From inside vscode, you can
# use Terminal/Run_Build_Task to run "build.py all" or "build.py c++".
# You can also select Run/Start_Debugging to launch the game.
# #
# The first time you launch vscode, you will see a popup about
# recommended extensions. These are actually recommended by this
# script, build.py, so they're actually good recommendations. Install
# them: you will only have to do this once.
# #
import sys, os, json, shutil, subprocess, re, time, tarfile, itertools, hashlib import sys, os, json, shutil, subprocess, re, time, tarfile, itertools, hashlib
from pathlib import Path from pathlib import Path
from types import SimpleNamespace from types import SimpleNamespace
@@ -176,6 +210,13 @@ def store_system_config_in_globals(config):
# The actual build steps. # The actual build steps.
# #
def checkout_correct_unreal_engine_branch():
"""
This is the version of Unreal Engine that we're currently using.
"""
shell(UNREALENGINE, "git checkout 5.3.1-release")
def generate_buildconfiguration_xml(): def generate_buildconfiguration_xml():
""" """
Generates BuildConfiguration.xml. We actually have two versions of this Generates BuildConfiguration.xml. We actually have two versions of this
@@ -338,6 +379,7 @@ store_system_config_in_globals(CONFIG)
os.chdir(f"{INTEGRATION}/EnginePatches") os.chdir(f"{INTEGRATION}/EnginePatches")
if MODE == "all": if MODE == "all":
checkout_correct_unreal_engine_branch()
generate_buildconfiguration_xml() generate_buildconfiguration_xml()
generate_lpx_paths() generate_lpx_paths()
patch_unrealengine_source_code() patch_unrealengine_source_code()