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 Build #13

Open
NounKim opened this issue Jun 8, 2022 · 11 comments
Open

Android Build #13

NounKim opened this issue Jun 8, 2022 · 11 comments

Comments

@NounKim
Copy link

NounKim commented Jun 8, 2022

I just trying to package unreal project with this plugin, but error begins:

/AssimpHolder/Plugins/UE4_Assimp/Source/UE_Assimp/Public/AIScene.h(7,10): fatal error: 'assimp/scene.h' file not found
UATHelper: Packaging(Android (ASTC)): #include "assimp/scene.h"

https://github.com/irajsb/UE4_Assimp/wiki/How-To-Build

I followed this document faithfully, and it completed.

this error seems to be a dependency error. where have i fix it

@irajsb
Copy link
Owner

irajsb commented Jun 8, 2022

Assimp currently is built and tested for windows . to build for android you've to handle a lot of things ! Start by https://github.com/assimp/assimp

@irajsb irajsb changed the title fatal error: 'assimp/scene.h' file not found Android Build Jun 8, 2022
@irajsb
Copy link
Owner

irajsb commented Jun 8, 2022

cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DANDROID_NDK=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/21.4.7075529 -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a with NEON"

Cmake generate sample

@NounKim
Copy link
Author

NounKim commented Jun 9, 2022

cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DANDROID_NDK=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/21.4.7075529 -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a with NEON"

Cmake generate sample

sorry sir
It seems that gen.cpp is not finding the Assimp library. Same problem with Windows package. Something problem in Module.UE_Assimp.cpp...


------error message----
The file 'AssimpHolder\Plugins\UE4_Assimp\Binaries\Win64\assimp.dll' cannot be accessed by a process because it is being used by another process. (Seems like UE_AssimpLibrary.Build.cs => CopyFile(AssimpDll,BinPath); is Failed, I think this Doc is related this error http://www.valentinkraft.de/including-the-point-cloud-library-into-unreal-tutorial/)

[1/3] Module.UE_Assimp.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winnt.h(611): warning C4005: 'TEXT': ��ũ�� ������
C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL/Platform.h(1085): note: 'TEXT'�� ���� ���Ǹ� �����Ͻʽÿ�.
C:/Users/P5820-510/Documents/Unreal Projects/AssimpProj/Plugins/UE4_Assimp/Source/UE_Assimp/Private/UE_Assimp.cpp(10): fatal error C1083: ���� ������ �� �� �����ϴ�. 'Interfaces/IPluginManager.h': No such file or directory


PS: The broken text is an encoding problem with the Korean version of Unreal. This issue is not being fixed. Broken Text may be mean redefine TEXT macro

@irajsb
Copy link
Owner

irajsb commented Jun 10, 2022

I pushed an update . there is still an error only for android where its in https://github.com/assimp/assimp/blob/master/contrib/poly2tri/poly2tri/common/shapes.h
you have to get rid of throw std::runtime_error(std::string("repeat points")); line 142.
after that you'll get another error which is caused by missing assimp binary files for android which you need to manually build it using cmake like what we did for windows .

@Zi1mann
Copy link

Zi1mann commented Mar 29, 2023

I assume rebuilding assmip will also be the solution when I want to build a dedicated server for Linux? Currently, when packaging my game for that target, I get compiler errors regarding the assimp plugin.

@irajsb
Copy link
Owner

irajsb commented Mar 30, 2023

do you need the assimp to be included in a dedicated server ? ( depends on your project but probably not) . you can disable it in dedicated server target file otherwise yes you've to build it and add the binaries .

@Zi1mann
Copy link

Zi1mann commented Mar 31, 2023

About inlcuding it in the server build - this actually is a good point. I just tried to rebuild my project for Windows and could not launch either the dedicated server, nor the client build without adding RuntimeDependencies.Add("$(TargetOutputDir)/assimp.dll", System.IO.Path.Combine("$(ProjectDir)/Plugins/UE4_Assimp", "Source/ThirdParty/UE_AssimpLibrary/assimp/bin/Release/assimp.dll") to my projects build.cs-file. The loading is done locally and then the Meshes are placed through a server rpc but the server does not need to know the meshes since the client will provide the Mesh object.

Building for Linux seemed reasonable since the physical server to run the dedicated server is running on Linux. Regardless, maybe putting a link to the corresponding documentation about including third party libraries into the packaged game would be great for anybody interested in this plugin?

@irajsb
Copy link
Owner

irajsb commented Apr 1, 2023

I recommend looking at other plugins which are already in unreal engine and have third party code.

@yuengil
Copy link

yuengil commented May 25, 2023

ok so this is what I have figured out so far
I have built android library for assimp using script inside assimp github
https://github.com/assimp/assimp/tree/master/scripts/android_crosscompile
you can run the batch file from the link provided above, but you need to build the entire project with cmake first
when you first download and unzip.
Then you can copy the .so file to binary folder inside the assimp plugin folder
This will compile for android, package and launch to android device.

However, I have not yet figured out how to use the features with assimp in android device

@irajsb
Copy link
Owner

irajsb commented May 26, 2023

Download the sample project . only thing you need to change is open file dialogue. That is windows specific so you have to replace it with some kind of android file import function .

@irajsb
Copy link
Owner

irajsb commented May 26, 2023

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

4 participants