I am not a build tech!
444
2
Advertisement
Today I started on getting ToLua into my engine. Adding the code to my objects to call scripts is the super easy part. Using Lua as a whole is a breeze. Also deciding how my objects would utilize Lua was also the easy part. You can see where this is going :).....
The hard part was figuring out how to get the ToLua++ pre-processing work into my build. I ended up creating a nice little batch file that takes the header files of classes I want to expose to Lua and processes them using the ToLua command line tool. Very straight forward. The next step was adding a pre-build step to call said batch file. Since I'm using Visual Studio this was very straight forward again.
So everything sounds easy and straight forward right? The only flaw in this system is that one of the main reasons that I switched to ToLua++ was to improve my build times over LuaBind. Adding this new pre-build step that gets run each time I build I have just replaced the build time needed for LuaBind with a different type of build time.
I'm going to have to look into creating another build target that performs this pre-build step that I can run that whenever I have an object change so I don't have to do it everytime. Having it run whenever I change a non-Lua exposed object is just silly and a waste of time.
The hard part was figuring out how to get the ToLua++ pre-processing work into my build. I ended up creating a nice little batch file that takes the header files of classes I want to expose to Lua and processes them using the ToLua command line tool. Very straight forward. The next step was adding a pre-build step to call said batch file. Since I'm using Visual Studio this was very straight forward again.
So everything sounds easy and straight forward right? The only flaw in this system is that one of the main reasons that I switched to ToLua++ was to improve my build times over LuaBind. Adding this new pre-build step that gets run each time I build I have just replaced the build time needed for LuaBind with a different type of build time.
I'm going to have to look into creating another build target that performs this pre-build step that I can run that whenever I have an object change so I don't have to do it everytime. Having it run whenever I change a non-Lua exposed object is just silly and a waste of time.
Advertisement
Advertisement
Advertisement
Discussion