0

I am working with minko and managed to compile MINKO SDK properly for 3 platforms (Linux, Android, HTML5) and build all tutorials / examples. Moving on to create my own project, I followed the instructions on how to use the existing skeleton project, then using an existing example project.

(I believe there is an error in the skeleton code at this line :

auto sceneManager = SceneManager::create(canvas->context());    //does not compile

where as the example file look like this :

auto sceneManager = SceneManager::create(canvas);   //compile and generate binary

I was able to do so by modifying premake5.lua (to include more plugins) and calling script/solution_gmake_gcc.sh to generate the make solution a week ago. Today, I tried to make a new project in a new folder but calling

script/solution_gmake_gcc.sh and script/clean failed with this error:

minko-master/skel_tut/mycode/premake5.lua:3: attempt to index global 'minko' (a nil value)

Now at premake5.lua line 3 there is this line : minko.project.solution(PROJECT_NAME), however sine i am not familiar with lua at all, can anyone shed any light on the issue ? What is supposed to be declared here, why is it failing suddenly... ? (I can still modify,compile and run the code but i can't for example add more plug-ins)

PS: weirdly enough, the previously 'working' project is also failing at this point.

Thanks.

Jeux
  • 5
  • 5

2 Answers2

0

(I believe there is an error in the skeleton code at this line :

That's possible. Our build server doesn't test the skeleton code. That's a mistake we will fix ASAP to make sure it works properly.

script/solution_gmake_gcc.sh and script/clean failed with this error:

minko-master/skel_tut/mycode/premake5.lua:3: attempt to index global 'minko' (a nil value)

Could you copy/paste your premake5.lua file? Also, what's the value you set for the MINKO_HOME env var? Maybe you've moved the SDK...

Note that instead of setting a global MINKO_HOME env var, you can also set the corresponding LUA constant at the very begining of your premake5.lua file.

Community
  • 1
  • 1
  • Thanks for the fast feedback ! This is the content of premake5.lua (taken from the example): PROJECT_NAME = path.getname(os.getcwd()) minko.project.application("minko-tutorial-" .. PROJECT_NAME) files { "src/**.cpp", "src/**.hpp", "asset/**" } includedirs { "src" } -- plugins minko.plugin.enable("sdl") minko.plugin.enable("assimp") minko.plugin.enable("jpeg") minko.plugin.enable("bullet") minko.plugin.enable("png") --html overlay minko.plugin.enable("html-overlay") MINKO_HOME is still the same. You think lua is unable to find MINKO_HOME and thus creating the issue ? – Jeux Mar 01 '15 at 14:19
  • I need the premake5.lua of YOUR project. Not the one from another example. – Jean-Marc Le Roux Mar 01 '15 at 14:50
  • yes, this is the one used by my project, inspired but modified version of the one of skeleton sample project. (added assimp, html-overlay, turning on jpeg, bullet...) – Jeux Mar 01 '15 at 15:17
0
PROJECT_NAME = path.getname(os.getcwd()) 

minko.project.application("minko-tutorial-" .. PROJECT_NAME)

  files { "src/**.cpp", "src/**.hpp", "asset/**" }
  includedirs { "src" }

  -- plugins
  minko.plugin.enable("sdl")
  minko.plugin.enable("assimp")
  minko.plugin.enable("jpeg")
  minko.plugin.enable("bullet")
  minko.plugin.enable("png")
  --html overlay
  minko.plugin.enable("html-overlay") 

Assuming that's indeed your project premake5.lua file (please us the code tags next time), you should have include "script" at the beginning of the file:

https://github.com/aerys/minko/blob/master/skeleton/premake5.lua#L1

If you don't have this line, it will not include script/premake5.lua which is in charge of including the SDK build system files that defines everything inside the minko Lua namespace/table. That's why you get that error.

I think you copy pasted one of the examples/tutorials premake5.lua file instead of modifying the one provided by the skeleton. The premake conf file of the examples/tutorials are different since they are included from the SDK premake files. But your app premake5.lua does the "opposite": it includes the SDK conf files rather than being included by them.

The best practice is to edit your app's copy of the skeleton's premake5.lua (instead of copy/pasting one from the examples/tutorials).

  • Thanks a lot, that was my issue. Since the skeleton project was not compiling, I picked up minko-tutorial-06-load-3d-files and worked from there. (weirdly it worked last week :-P) Since the change is just one line, i just modified skeleton main.cpp and got it working and will always use it when i wanna start a new project. Again, merci :-) – Jeux Mar 01 '15 at 15:53