Build UPBGE on Linux - UPBGE/upbge GitHub Wiki

Building

The procedure is almost the same as for building blender:

https://developer.blender.org/docs/handbook/building_blender/linux/

Since Blender is using git lfs, there are some slight changes.

First time:

git lfs install --force
GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/UPBGE/upbge.git
cd upbge
make update
make -j16

Update your local upbge git repo:

cd upbge
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase
make update
git lfs fetch lfs-fallback
make -j16

Troubleshooting

  1. Ensure you have a clean git repository:

To know if your git local repo is clean:

git status

If it is not clean:

To reset all changes in your local git repo (WARNING: it will delete all your local changes):

GIT_LFS_SKIP_SMUDGE=1 git reset --hard

If the above command fails to clean all folders, enter the folder then run the above command:

cd folderName
GIT_LFS_SKIP_SMUDGE=1 git reset --hard
  1. If the build fails:

If you have a clean git repository and that all is up to date (libraries, submodules, master), run:

make clean
make -j16

DEPRECATED:

Get the sources

Note: If you are having troubles with the repository and submodules, just delete the folder and start fresh again.
Beware: Deleting a git folder will also remove any branch/work you made inside, act carefully.

mkdir ~/sources/
cd ~/sources/
git clone https://github.com/UPBGE/upbge.git
cd upbge/scripts
git clone https://github.com/UPBGE/blender-addons.git addons
git submodule sync
git submodule update --init --recursive --remote
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
git clone https://projects.blender.org/blender/blender-addons-contrib.git addons_contrib

Download Libraries

For Intel and AMD Linux systems, we recommend using precompiled libraries. These are the quickest way to get a feature complete Blender build and can be downloaded as follows.

These libraries are built on CentOS 7 for compatibility, but they work fine on other Linux distributions.

mkdir ~/sources/lib
cd ~/sources/lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228

Update the sources, libraries and compiling

The rest of the procedure to get libraries or dependencies and to update the sources and compiling is similar to the exposed in Blender doc: https://wiki.blender.org/wiki/Building_Blender/Linux

EDIT: If you encounter any troubles in building process, try to follow Blender official guide instead:

https://wiki.blender.org/wiki/Building_Blender/Linux

except that instead of cloning blender sources, you'll need to clone upbge sources:

git clone https://github.com/UPBGE/upbge.git

For addons, ask help on discord.