Build UPBGE on Windows - UPBGE/upbge GitHub Wiki
Building
The procedure is almost the same as for building blender:
https://developer.blender.org/docs/handbook/building_blender/windows
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
cd scripts/addons_core
GIT_LFS_SKIP_SMUDGE=1 git submodule update --init --recursive --remote .
cd bge_netlogic
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_bricknodes
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_easyonline
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_thelightmapper
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../../../
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
cd scripts/addons_core
GIT_LFS_SKIP_SMUDGE=1 git submodule update --init --recursive --remote .
cd bge_netlogic
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_bricknodes
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_easyonline
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../bge_thelightmapper
GIT_LFS_SKIP_SMUDGE=1 git checkout master
GIT_LFS_SKIP_SMUDGE=1 git pull --rebase origin master
cd ../../../
make -j16
Troubleshooting
- 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
- 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:
Getting the Sources for UPBGE 0.3 Alpha
cd C:\blender-git
git clone https://github.com/UPBGE/upbge.git
cd upbge
git submodule sync
git submodule update --init --recursive --remote
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
Update Sources and Libraries
For Windows 64 bits:
cd lib\win64_vc15
svn update
cd ..\\..\upbge
git pull --rebase
git submodule update --recursive --remote
git submodule foreach git pull --rebase origin master
GIT_LFS_SKIP_SMUDGE=1 git submodule update --init --progress windows_x64
git -C windows_x64 lfs pull
These commands can be automated in a .bat (executable) file.
Building
For now, the best is to build UPBGE with MSVC 2019.
Once you created the cmake files to build UPBGE, go into build folder, open blender.sln
Configure Visual Studio in Release mode (instead of Debug mode - default mode)
In the solution explorer, right click on INSTALL, then build.
Troubleshooting
Always ensure your libraries are up to date.
Always ensure that your sources are up to date.
Sometimes, you have to run CMake
again (configure, configure, then generate) before you build.
Some AntiVirus programs can prevent compilation. Add an exception in you AntiVirus in the folder where you build UPBGE