Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Compilation Enhancement #476

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading