diff --git a/build_android.nims b/build_android.nims index eb44f76..222e2f4 100644 --- a/build_android.nims +++ b/build_android.nims @@ -5,6 +5,7 @@ # for details about the copyright. import std/[os, strutils, sugar] +from std/private/globs import nativeToUnixPath type CpuPlatform = enum @@ -138,6 +139,7 @@ task compile, "Compile raylib project for Android": " --nimcache:" & nimcacheDir().parentDir / (ProjectName & "_" & $cpu) & " " & ProjectSourceFile) for f in listFiles(ProjectBuildPath): echo f + echo "inside lib" for f in listFiles(ProjectBuildPath / "lib" / AndroidCPUs[0].toArchName): echo f # Compile project .java code into .class (Java bytecode) @@ -164,7 +166,7 @@ task compile, "Compile raylib project for Android": withDir(ProjectBuildPath): for cpu in AndroidCPUs: exec(AndroidBuildTools / "aapt" & " add " & "bin" / (ProjectName & ".unaligned.apk") & " " & - "lib" / cpu.toArchName / ("lib" & ProjectLibraryName & ".so")) + nativeToUnixPath("lib" / cpu.toArchName / ("lib" & ProjectLibraryName & ".so"))) # Create zip-aligned APK package: bin/{ProjectName}.aligned.apk exec(AndroidBuildTools / "zipalign" & " -p -f 4 " & unalignedApkPath & " " & alignedApkPath) # Create signed APK package using generated Key: {ProjectName}.apk