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

如何构建/How to build? #1

Open
CosineMath opened this issue Jan 7, 2022 · 9 comments
Open

如何构建/How to build? #1

CosineMath opened this issue Jan 7, 2022 · 9 comments

Comments

@CosineMath
Copy link
Collaborator

这里是构建说明
This issue is about building.

@CosineMath
Copy link
Collaborator Author

CosineMath commented Jan 7, 2022

boat-3.2.2分支:
安装Android NDK,OpenJDK和ant等,这里不细说。
进入源码顶级目录,打开终端模拟器。
先将NDK里的编译工具链(aarch64-linux-android21-clangaarch64-linux-android-gcc等)放到PATH里。
然后把编译好的dyncall静态库放到<lwjgl3-boat>/bin/libs/boat/arm64/目录下。

先执行:ant compile-templates
ant -Dbuild.arch="arm64" -Dplatform.boat=true -Dlwjgl.cross.cc=aarch64-linux-android21-clang -Dlwjgl.cross.cxx=aarch64-linux-android21-clang++ -Dlwjgl.cross.strip=aarch64-linux-android-strip -Dbuild.offline=true -Dbinding.assimp=false -Dbinding.bgfx=false -Dbinding.bullet=false -Dbinding.cuda=false -Dbinding.egl=true -Dbinding.glfw=true -Dbinding.jawt=false -Dbinding.jemalloc=true -Dbinding.libdivide=false -Dbinding.llvm=false -Dbinding.lmdb=false -Dbinding.lz4=false -Dbinding.meow=false -Dbinding.nanovg=false -Dbinding.nfd=false -Dbinding.nuklear=false -Dbinding.odbc=false -Dbinding.openal=true -Dbinding.opencl=false -Dbinding.opengl=true -Dbinding.opengles=true -Dbinding.openvr=false -Dbinding.opus=false -Dbinding.par=false -Dbinding.remotery=false -Dbinding.rpmalloc=false -Dbinding.sse=false -Dbinding.stb=true -Dbinding.tinyexr=false -Dbinding.tinyfd=true -Dbinding.tootle=false -Dbinding.vma=false -Dbinding.vulkan=true -Dbinding.xxhash=false -Dbinding.yoga=false -Dbinding.zstd=false compile-templates

再执行:ant compile
ant -Dbuild.arch="arm64" -Dplatform.boat=true -Dlwjgl.cross.cc=aarch64-linux-android21-clang -Dlwjgl.cross.cxx=aarch64-linux-android21-clang++ -Dlwjgl.cross.strip=aarch64-linux-android-strip -Dbuild.offline=true -Dbinding.assimp=false -Dbinding.bgfx=false -Dbinding.bullet=false -Dbinding.cuda=false -Dbinding.egl=true -Dbinding.glfw=true -Dbinding.jawt=false -Dbinding.jemalloc=true -Dbinding.libdivide=false -Dbinding.llvm=false -Dbinding.lmdb=false -Dbinding.lz4=false -Dbinding.meow=false -Dbinding.nanovg=false -Dbinding.nfd=false -Dbinding.nuklear=false -Dbinding.odbc=false -Dbinding.openal=true -Dbinding.opencl=false -Dbinding.opengl=true -Dbinding.opengles=true -Dbinding.openvr=false -Dbinding.opus=false -Dbinding.par=false -Dbinding.remotery=false -Dbinding.rpmalloc=false -Dbinding.sse=false -Dbinding.stb=true -Dbinding.tinyexr=false -Dbinding.tinyfd=true -Dbinding.tootle=false -Dbinding.vma=false -Dbinding.vulkan=true -Dbinding.xxhash=false -Dbinding.yoga=false -Dbinding.zstd=false compile

最后是:ant compile-native
ant -Dbuild.arch="arm64" -Dplatform.boat=true -Dlwjgl.cross.cc=aarch64-linux-android21-clang -Dlwjgl.cross.cxx=aarch64-linux-android21-clang++ -Dlwjgl.cross.strip=aarch64-linux-android-strip -Dbuild.offline=true -Dbinding.assimp=false -Dbinding.bgfx=false -Dbinding.bullet=false -Dbinding.cuda=false -Dbinding.egl=true -Dbinding.glfw=true -Dbinding.jawt=false -Dbinding.jemalloc=true -Dbinding.libdivide=false -Dbinding.llvm=false -Dbinding.lmdb=false -Dbinding.lz4=false -Dbinding.meow=false -Dbinding.nanovg=false -Dbinding.nfd=false -Dbinding.nuklear=false -Dbinding.odbc=false -Dbinding.openal=true -Dbinding.opencl=false -Dbinding.opengl=true -Dbinding.opengles=true -Dbinding.openvr=false -Dbinding.opus=false -Dbinding.par=false -Dbinding.remotery=false -Dbinding.rpmalloc=false -Dbinding.sse=false -Dbinding.stb=true -Dbinding.tinyexr=false -Dbinding.tinyfd=true -Dbinding.tootle=false -Dbinding.vma=false -Dbinding.vulkan=true -Dbinding.xxhash=false -Dbinding.yoga=false -Dbinding.zstd=false compile-native

这些-Dbinding.xxx=false是为了禁用不能用/编译不了的binding。

打包jar:ant release
ant -Dbuild.arch="arm64" -Dplatform.boat=true -Dlwjgl.cross.cc=aarch64-linux-android21-clang -Dlwjgl.cross.cxx=aarch64-linux-android21-clang++ -Dlwjgl.cross.strip=aarch64-linux-android-strip -Dbuild.offline=true -Dbinding.assimp=false -Dbinding.bgfx=false -Dbinding.bullet=false -Dbinding.cuda=false -Dbinding.egl=true -Dbinding.glfw=true -Dbinding.jawt=false -Dbinding.jemalloc=true -Dbinding.libdivide=false -Dbinding.llvm=false -Dbinding.lmdb=false -Dbinding.lz4=false -Dbinding.meow=false -Dbinding.nanovg=false -Dbinding.nfd=false -Dbinding.nuklear=false -Dbinding.odbc=false -Dbinding.openal=true -Dbinding.opencl=false -Dbinding.opengl=true -Dbinding.opengles=true -Dbinding.openvr=false -Dbinding.opus=false -Dbinding.par=false -Dbinding.remotery=false -Dbinding.rpmalloc=false -Dbinding.sse=false -Dbinding.stb=true -Dbinding.tinyexr=false -Dbinding.tinyfd=true -Dbinding.tootle=false -Dbinding.vma=false -Dbinding.vulkan=true -Dbinding.xxhash=false -Dbinding.yoga=false -Dbinding.zstd=false release

交叉编译工具链不一定用clang,也可以指定为gcc。

@ShirosakiMio
Copy link

这里是构建说明 This issue is about building.

执行第三个命令报错了,还有dyncall静态库应该是放到lwjgl3文件夹的bin/libs/boat/arm64/吧,${lib}/${platform}/${build.arch}/打印出来是bin/libs/boat/arm64/

@ShirosakiMio
Copy link

这里是构建说明 This issue is about building.

执行第三个命令报错了,还有dyncall静态库应该是放到lwjgl3文件夹的bin/libs/boat/arm64/吧,${lib}/${platform}/${build.arch}/打印出来是bin/libs/boat/arm64/
D1$S4$CMH1EBZ)3Y}B}DI

@CosineMath
Copy link
Collaborator Author

这里是构建说明 This issue is about building.

执行第三个命令报错了,还有dyncall静态库应该是放到lwjgl3文件夹的bin/libs/boat/arm64/吧,${lib}/${platform}/${build.arch}/打印出来是bin/libs/boat/arm64/
D1$S4$CMH1EBZ)3Y}B}DI

你file看看elf格式是不是搞成x86_64了。。。

@ShirosakiMio
Copy link

这里是构建说明 This issue is about building.

执行第三个命令报错了,还有dyncall静态库应该是放到lwjgl3文件夹的bin/libs/boat/arm64/吧,${lib}/${platform}/${build.arch}/打印出来是bin/libs/boat/arm64/
D1$S4$CMH1EBZ)3Y}B}DI

你file看看elf格式是不是搞成x86_64了。。。

这我倒是想到了,不过file输出了这么个东
OFOLPMBSX{JOOINV`SN75A
西

@CosineMath
Copy link
Collaborator Author

llvm ir。。。不加-emit-llvm之类的不会出这种东西吧

@CosineMath
Copy link
Collaborator Author

CosineMath commented Jan 8, 2022

clang36。。。你的NDK是哪个版本的啊。要不你用gcc也行。

@ShirosakiMio
Copy link

用的r10e

@CosineMath
Copy link
Collaborator Author

既然是r10e,那你直接用gcc好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants