How to compile source code?


#1

How can i compile the armory3d source code? https://github.com/armory3d/armory


#2

Hi!

If you want to update armory/iron sources to git versions all you need to do is clone the repositories into the sdk. Check here for more details:
http://armory3d.org/manual/dev/gitversion.html

If you need to rebuild Blender+Armory integration itself, the process is mostly identical to building standard Blender and you can get the sources with Armory built-in here:

And highly experimental Blender 2.8 version, (wip, test builds available soon) :slight_smile::


#3

Hi. What means krom? i build Blender+Armory by instructions, but when i run blender - all that related to Armory - is “armory space” that have hothing. in render selector and at scene tab - there is nothing related to armory. also impossible to add armory trait to object.
is there needed addon?
also related to iron: can it be used as game engine? as libgdx for example - with import models and create scene from code? or it is more low level framework.


#4

Did you just give us instructions to compile armory on our own? These steps make no sense

bf_editor_space_armory - Librarian - Additional dependencies - 'ws2_32.lib; dxguid.lib; dsound.lib; dinput8.lib;'
INSTALL project - build
Copy V8 deployment libs to Blender.exe location

If you try to build solution in visual studio 2017 it gives a lot of warnings and errors.


#5

Are you able to build regular Blender in visual studio 2017? What are the errors? I need details, otherwise it’s hard to help.


#6

Yes, I have been able to compile blender with no issues. It was several thousand errors/warnings if I remember correctly. I tried to upload blend with error ,but being a new user wont let me. Most of the errors have this “inconsistent dll linkage bf_editor_space_armory”

These are the exact steps I am doing if it helps any.

1: Create a folder named blender-git on C drive(C:\blender-git)
2: Create a folder named lib in blender-git folder(C:\blender-git\lib)
3: Create a folder named blender in blender-git folder(C:\blender-git\blender)
4: Add blender libs to lib folder(C:\blender-git\lib\win64_vc14)
5: Get blender/armory source code to blender folder(C:\blender-git\blender)
Noticed when pulled from git it was placed in a folder named krom_blender. I copied contents to blender folder.
6: Open Developer Command Prompt for vs 2017
7: Enter C:\blender-git
8: Enter cd blender
9: Enter make full nobuild x64 2015
10: Go to the build folder and open Blender.sln with Visual Studio 2017
11: Select Build Solution
12: End up with over 3,000 errors and like 3 warnings when it finishes

Last time I built blender with no problems was like a month ago. I haven’t tried lately to see if anything has changed. The only thing different was I open CMake to make the build files ,but I tried the same with armory and get same results with the errors.


#7

Hi, I managed to build the krom_blender version (but without the SDK yet):
https://github.com/armory3d/krom_blender/issues/1

There were a few stops in the way, like the old windows CMake file that doesn’t read well the version of Visual Studio 2017, so it fails.
@AFWS88 you didn’t list the part about the Additional Dependencies for bf_editor_space_armory, and the CMake file for that needs some V8 libs that you need to update the path to as well.

In any case, the addon that’s in the ‘armory’ repo has a hardcoded line “with_krom = False”, so in the end there’s also the python side of fixing things. What I’m trying to say is that I don’t think there’s a cookie-cutter, Qt-like way to build it yet, @lubos seems to be working on a full SDK repository to address that if I’m not mistaken.


The reason that I’m trying to build it is that there’s only one playable demo right now, and before investing in it (financially etc.) I want to know if it runs on my machine.

I want to see if my machine can handle the voxel GI, the raytraced shadows, the separable SSS etc. – if anyone knows of desktop Windows demo binaries of the graphics, I’d love to try them (I have looked at the Showcase projects already).
The github examples only work if you already have the engine.

Lubos suggested joining the Patreon, getting the SDK and then cancelling the pledge before you’re charged, but that wouldn’t work because Patreon charges you the moment you pledge (and then it’s repeated at the first of each month afterwards). But I don’t want the full SDK anyway, just trying out cool demos x)


#8

Maybe that’s my issue. Where/how do you get the additional dependencies?


#9

Only the author knows, I got stuck as well (in that github link).


#10

tryed on windows(7)+vc12,
after get stuck here:

found a way that works for me:

How to build blender 2.78 + armory on windows 7 with visual-c-2012 
------------------------------------------------------------------

git clone https://github.com/armory3d/krom_blender blender
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12 lib/win64_vc12


1) EDIT blender\source\blender\editors\space_armory\CMakeLists.txt
--------------------------------------------------------------------
TARGET_LINK_LIBRARIES(bf_editor_space_armory ../../../blender/source/blender/editors/space_armory/V8/Libraries/win32/release/v8.dll)
TARGET_LINK_LIBRARIES(bf_editor_space_armory ../../../blender/source/blender/editors/space_armory/V8/Libraries/win32/release/v8_libplatform.dll)
TARGET_LINK_LIBRARIES(bf_editor_space_armory ../../../blender/source/blender/editors/space_armory/V8/Libraries/win32/release/v8_libbase.dll)

TARGET_LINK_LIBRARIES(bf_editor_space_armory dinput8)
TARGET_LINK_LIBRARIES(bf_editor_space_armory ws2_32)
TARGET_LINK_LIBRARIES(bf_editor_space_armory dxguid)
TARGET_LINK_LIBRARIES(bf_editor_space_armory dsound)


2) CMAKE (gui)
--------------
start cmake gui and set up folders:
  source-folder: blender/
  build-folder:  build_windows_Full_x64_vc12_Release/

-> configure
customize (enable cuda)
-> configure and final -> generate


3) BUILD from cmd
-----------------
cd blender
make full x64 2013


4) COPY required runtime libs
-----------------------------
from: /blender/source/blender/editors/space_armory/Deployment/release/win32/
to:  build_windows_Full_x64_vc12_Release/bin/Release/


5) RUN armored Blender and enable addon:
----------------------------------------
(take care, not compatible with AnimationNodes-addon!)

install from SDK-version: armsdk\armory\blender\addon\armory.py
(same path for SDK in addon-settings, "bundled sdk" did not worked here)

#11

Unfortunately, that didn’t solve the problem as Debian still cannot recognize any source code attached to the compile with your laptop you can connect hp support while any error occurs with it.


#12

https://github.com/armory3d/krom_blender 404s for me


#13

@c.Burnetter
Looks like it has been removed. This was 2.79 with the built in player ,but now only 2.8 has the player built in.

https://github.com/armory3d/blender_v8


#14

do you also need to clone and build iron & kha to compile?


#15

Can i compile using mingw rather than visual studio?