Giter Club home page Giter Club logo

u3d-doxygened-lua-bindings's Introduction

U3D-Doxygened-Lua-Bindings

Automatic Binding Generator using Doxygen, Python, and Sol3

Use with this branch of U3D: https://github.com/SirNate0/U3D/tree/lua-bindings

Instructions

  1. Build that U3D branch. The samples and player will fail to build, as the binding function is left undefined.
  2. Build this project, pointing it at the library that was just built as URHO3D_HOME. This project defines the binding function.
  3. You will need to symlink the bin/Data folder into the Build/bin folder, as it needs a few of the changed files. I think Urho's CMake code handles this automatically.
  4. The Build/bin/test-sol3 executable should run without crashing. However, it's not possible to interact with it, as event subscriptions are not finished at present (hence the function at the start of bin/Data/run.lua that just prints a TODO.

To rebuild the bindings

  1. Navigate to the generator folder
  2. Run doxygen Doxyfile. You will need to edit the Doxyfile to point at your U3D installation first.
  • You may need to run it a couple times or remove the generated-xml contents first, I've had some issues in the past where it looked like it was using old content (I may have been mistaken, but I thought I should mention the possibility).
  1. Run generate-bindings.py. You will probably have to install a few packages for this.
  • This removes the generator/generated folder and recreates it (this way old no-longer-existing files are removed and don't stick around).
  • To prevent make from thinking this means all of the generated files change every time, the python code then selectively updates the generator/synced-generated files based on actual changes.
  • This generator/synced-generated folder is what make is building, symlinked into the outer project folder as generated. This avoids the unnecessary extra rebuilding, without needing something like CCache.
  1. Rebuild

u3d-doxygened-lua-bindings's People

Contributors

sirnate0 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

lucasvinbr

u3d-doxygened-lua-bindings's Issues

Building on Windows

After setting up the symlinks, I've successfully built and run the project on Linux, but I've run into some issues when building with visual studio on Windows:

  • I get this C1128 error when compiling BindFunctions_Urho3d.cpp , but adding the /bigobj command line argument solves it. Would it be necessary to break the generated file into multiple ones in this case?
  • I had to add a #ifdef SendMessage #undef SendMessage #endif to the BindConnection.cpp file, just like in Urho's Connection.cpp file, because apparently Windows has that define overriding things. It could be added via the binding generator, right?
  • After solving the points above, I'm getting multiple messages No constructor could take the source type, or constructor overload resolution was ambiguous in some files, followed by C2440 errors in those same files and lines.
    -- The error message in all of them is can't convert from "unkown" to "sol::this_state".
    -- Here's my build log; it's in portuguese, but the line numbers are there, so maybe it could help: build-out.txt .
    -- The one pattern I've noticed is that the overloads the compiler complained about seem to be the ones that have parameters with default values for them, like Node's CreateChild with CreateMode mode = REPLICATED

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.