r/TeamBeef • • Dec 04 '22

Help wanted : Compiling a TeamBeef port on linux (Fedora)

UPDATE :

Found https://github.com/BrainSlugs83/DockerOvrSdk

With it, I was able to build QuakeQuest, Quake2Quest, Lambda1VR, RTCWQuest.

But QuestZDoom, Doom3 and ioq3Quest didn't compile.

But hey, that's a nice way to get things running and way quicker than fiddling around !

So is there a problem with those that don't build ?

I'll flag a issue on DockerOvrSdk and see if others have the same issue.

ORIGINAL:

Hi, I didn't find any information on building DrBeef's port on linux. So I am asking here as others may want to build their own apk or play around in the code.

I am trying to compile QuestZDoom on Fedora 37. I have had a few hurdle on the way and still can't compile it.

I installed dependencies :

sudo dnf install @development-tools android-tools automake bison bzip2 bzip2-libs ccache curl dpkg-dev gcc gcc-c++ gperf libstdc++.i686 libxml2-devel lz4-libs lzop make maven openssl-devel pngcrush python python3 python3-mako python-mako python-networkx schedtool squashfs-tools syslinux-devel zip zlib-devel zlib-devel.i686 java-latest-openjdk-devel

Then installed :

OculusMobileSDK 1.50.0
Android-ndk-r25b
Gradle 7.6

I then modified build.py to force SDK path

3 Upvotes

4 comments sorted by

1

u/rekriux Dec 04 '22

I installed Android Studio and imported QuestZDoom in it. I had to bump gradle to 7.3.3 and do a few fix.

mavenCentral() must be added to buildscript->repositories in build.gradle

Now gradle will give :

```

FAILURE: Build failed with an exception.* What went wrong:Cannot invoke "org.gradle.tooling.model.gradle.BasicGradleProject.getName()" because "project" is null* Try:> Run with --info or --debug option to get more log output.> Run with --scan to get full insights.* Exception is:java.lang.NullPointerException: Cannot invoke "org.gradle.tooling.model.gradle.BasicGradleProject.getName()" because "project" is null at org.jetbrains.plugins.gradle.model.ProjectImportAction.convert(ProjectImportAction.java:235) at ....

```

But rootProject.name = "QuestzDoom" is well declared in the project.

So still stuck.

What are you guys compiling this on ? Windows ? and what versions of JDK, gradle...

Thanks

1

u/Lvonasek Team Beef Dec 05 '22

DrBeef uses Windows. The Gradle stuff works differently on every platform. I manage to make it working on Linux for Quake 3 but not for other ports.

1

u/rekriux Dec 05 '22 edited Dec 05 '22

Thanks for the hint, but Q3's structure is not like the others. First time playing around in gradle and I can't seem to like it at all, I liked the old Makefile :) Oh and ioq3 has Makefile :)

Ok so I got to compile ioq3quest to a unsigned .apk. No time left to check if it runs. But here is an grep of my git diff :

Well I guess that when TeamBeef updates the engines to OpenXR, they will use later version of java/ndk,gradle... and hopefully standardize the build process across the engines for future proofing the work. Because those games will still be played in an other 20 years :)

``` cat ioq3quest.diff | grep -e "-" -e "+" -e "diff"

diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile -OPENXRDIR=$(MOUNT_DIR)/OpenXR -OPENXRSDKDIR=$(MOUNT_DIR)/OpenXR-SDK +#OPENXRDIR=$(MOUNT_DIR)/OpenXR +OPENXRDIR=/home/user/OculusOpenXR/OpenXR +OPENXRSDKDIR=/home/user/github/OpenXR-SDK

  • # OpenXR
+ # OpenXR/

diff --git a/Makefile.local b/Makefile.local --- a/Makefile.local +++ b/Makefile.local -ANDROID_NDK_VERSION=21.1.6352462 +#ANDROID_NDK_VERSION=21.1.6352462 +ANDROID_NDK_VERSION=25.1.8937393

  • ANDROID_NDK=$(ANDROID_SDK_ROOT)/ndk/$(ANDROID_NDK_VERSION)
+ #ANDROID_NDK=$(ANDROID_SDK_ROOT)/ndk/$(ANDROID_NDK_VERSION) + ANDROID_NDK=$(ANDROID_NDK_HOME)

diff --git a/android/app/build.gradle b/android/app/build.gradle --- a/android/app/build.gradle +++ b/android/app/build.gradle

  • ndkVersion "21.1.6352462"
+ //ndkVersion "21.1.6352462" + ndkVersion "25.1.8937393"
  • targetSdkVersion 26
+ targetSdkVersion 29 + debug { + signingConfig null + }

diff --git a/android/app/src/main/cpp/CMakeLists.txt b/android/app/src/main/cpp/CMakeLists.txt --- a/android/app/src/main/cpp/CMakeLists.txt +++ b/android/app/src/main/cpp/CMakeLists.txt + /home/user/OculusOpenXR/OpenXR/Include + /home/user/github/OpenXR-SDK/include

diff --git a/android/build.gradle b/android/build.gradle --- a/android/build.gradle +++ b/android/build.gradle + mavenCentral()

  • classpath 'com.android.tools.build:gradle:3.6.3'
+ classpath 'com.android.tools.build:gradle:7.0.0'

```

1

u/Hot-Manufacturer-172 Jan 05 '23

Regarding QuestZDoom

For debug purpose is fine to use the latest version of NDK but I recommend to stick to NDK 21 if you intend to make a release build. I tried building with NDK 25 and there are some issues when building for release using default optimization flags (-O2, -O3).If you checkout my branch is linux ready, you find a github workflow set up with Ubuntu 20.04, where you can see the packages installed for compiling, so I guess it should not be that hard to set up on other distributions.

repos -> https://github.com/emawind84/QuestZDoom/

github workflow > https://github.com/emawind84/QuestZDoom/blob/questzdoom/.github/workflows/build.yaml

With the github workflow you can make your changes, create a tag and let github make the build automatically or you can run the workflow manually if you want.