diff --git a/README.md b/README.md index 5dfaafd..d391fcd 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ It is also possible build the dll yourself. You can find more infos at [raylib's * `opengl11` - uses OpenGL 1.1 backend (pseudo OpenGL 1.1 style) * `es2` - uses OpenGL ES 2.0 backend (can be used to link against [Google's ANGLE](https://github.com/google/angle)) * `es3` - experimental support for OpenGL ES 3.0 +* `x11` - force X11 compatibility mode on Wayland ### Documentation diff --git a/examples/others/android/example/README.md b/examples/others/android/example/README.md index 98468ce..6ef631d 100644 --- a/examples/others/android/example/README.md +++ b/examples/others/android/example/README.md @@ -33,16 +33,11 @@ To build apk export path to Android SDK, point to location where you unpacked ar export ANDROID_HOME=/opt/android-sdk -And build apk with ant: - - cd android - ant clean debug - -Or with gradle: +And build apk: ./gradlew assembleDebug -If everything is successfully built apk can be found in bin/ directory or in the android/build/outputs in case `gradle` is used. +If everything is successfully built apk can be found in the android/build/outputs. For aarch64/arm64 replace `arm-linux-androideabi` with `aarch64-linux-android`, set GOARCH to arm64 and use minimum `ANDROID_API=21`. diff --git a/examples/others/android/example/android/AndroidManifest.xml b/examples/others/android/example/android/AndroidManifest.xml index 20cc5cf..19b1694 100644 --- a/examples/others/android/example/android/AndroidManifest.xml +++ b/examples/others/android/example/android/AndroidManifest.xml @@ -1,10 +1,9 @@ - + @@ -15,6 +14,7 @@ diff --git a/examples/others/android/example/android/build.gradle b/examples/others/android/example/android/build.gradle index 3bb73a0..b819fb4 100644 --- a/examples/others/android/example/android/build.gradle +++ b/examples/others/android/example/android/build.gradle @@ -1,13 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + namespace = "com.example.android" + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { applicationId "com.example.android" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 34 versionCode 1 versionName '1.0' } diff --git a/examples/others/android/example/android/build.xml b/examples/others/android/example/android/build.xml deleted file mode 100644 index 3e7a699..0000000 --- a/examples/others/android/example/android/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/others/android/example/android/project.properties b/examples/others/android/example/android/project.properties deleted file mode 100644 index 36b004b..0000000 --- a/examples/others/android/example/android/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Project target. -target=android-27 diff --git a/examples/others/android/example/build.gradle b/examples/others/android/example/build.gradle index e9f7a57..301e2dd 100644 --- a/examples/others/android/example/build.gradle +++ b/examples/others/android/example/build.gradle @@ -4,7 +4,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:8.2.2' } } diff --git a/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties b/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties index 9f7ad18..b05c5cc 100644 --- a/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties +++ b/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip diff --git a/raylib/cgo_linux.go b/raylib/cgo_linux.go index cfaabaf..9c8a507 100644 --- a/raylib/cgo_linux.go +++ b/raylib/cgo_linux.go @@ -34,9 +34,12 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { return GLFW_TRUE; } -#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_WAYLAND -D_GLFW_X11 -Wno-stringop-overflow +#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -Wno-stringop-overflow #cgo linux LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon +#cgo linux,x11 CFLAGS: -D_GLFW_X11 +#cgo linux,!x11 CFLAGS: -D_GLFW_X11 -D_GLFW_WAYLAND + #cgo linux,!es2,!es3 LDFLAGS: -lGL #cgo linux,opengl11,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_11 diff --git a/raylib/platform_android.go b/raylib/platform_android.go index 3d6d3f8..e80c8bc 100644 --- a/raylib/platform_android.go +++ b/raylib/platform_android.go @@ -11,8 +11,8 @@ package rl extern void android_init(); -extern AAssetManager* asset_manager; -extern const char* internal_storage_path; +static AAssetManager* asset_manager; +static const char* internal_storage_path; */ import "C"