Skip to content

Commit

Permalink
Merge pull request #476 from Alireza-Ta/android_enhancement
Browse files Browse the repository at this point in the history
Android Compilation Enhancement
  • Loading branch information
gen2brain authored Dec 17, 2024
2 parents 078d0be + 5dad257 commit edb2c10
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/others/android/example/androidcompile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
)

:COMPILE
@echo compiling for platform %FL%
@echo compiling for platform %FL% and architecture %GOARCH%
@set CGO_CFLAGS="-I%ANDROID_SYSROOT%/usr/include -I%ANDROID_SYSROOT%/usr/include/%TRIPLE% --sysroot=%ANDROID_SYSROOT% -D__ANDROID_API__=%ANDROID_API%"
@set CGO_LDFLAGS="-L%ANDROID_SYSROOT%/usr/lib/%TRIPLE%/%ANDROID_API% -L%ANDROID_TOOLCHAIN%/%TRIPLE%/lib --sysroot=%ANDROID_SYSROOT%"
@set CGO_ENABLED=1
@set GOOS=android
@set GOARCH=arm
@set GOARCH=%GOARCH%
@go build -buildmode=c-shared -ldflags="-s -w -extldflags=-Wl,-soname,lib%LIBRARY_NAME%.so" -o=android/libs/%FL%/lib%LIBRARY_NAME%.so
@EXIT /B

Expand All @@ -48,21 +48,21 @@
@set GOARCH=arm
@CALL:COMPILE )
@IF %TARGET_ARCH% == "arm64-v8a" (
@set CC="armv7a-linux-androideabi%ANDROID_API%-clang"
@set CC="aarch64-linux-android%ANDROID_API%-clang"
@set TRIPLE=aarch64-linux-android
@set FL=arm64-v8a
@set GOARCH=arm64
@CALL:COMPILE )
@IF %TARGET_ARCH% == "x86" (
@set CC="armv7a-linux-androideabi%ANDROID_API%-clang"
@set CC="i686-linux-android%ANDROID_API%-clang"
@set TRIPLE=i686-linux-android
@set FL=x86
@set GOARCH=arm
@set GOARCH=386
@CALL:COMPILE )
@IF %TARGET_ARCH% == "x86_64" (
@set CC="armv7a-linux-androideabi%ANDROID_API%-clang"
@set CC="x86_64-linux-android%ANDROID_API%-clang"
@set TRIPLE=x86_64-linux-android
@set FL=x86_64
@set GOARCH=arm64
@set GOARCH=amd64
@CALL:COMPILE )
@EXIT /B
10 changes: 10 additions & 0 deletions raylib/platforms/rcore_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,16 @@ const char *GetClipboardText(void)
return NULL;
}

// Get clipboard image
Image GetClipboardImage(void)
{
Image image = { 0 };

TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");

return image;
}

// Show mouse cursor
void ShowCursor(void)
{
Expand Down

0 comments on commit edb2c10

Please sign in to comment.