Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Jul 10, 2024
1 parent 6f54ee3 commit c8313bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build_android.nims
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# for details about the copyright.

import std/[os, strutils, sugar]
from std/private/globs import nativeToUnixPath

type
CpuPlatform = enum
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit c8313bb

Please sign in to comment.