Wednesday, January 28, 2015

Dexter Manager (Windows version) now builds by itself (almost)

Since my last update, I've done something I should've done years ago: set up an automated build system, sometimes called a Continuous Delivery system.

I am using a tool called Go , which I became familiar with as a result of my day job.  What you see in the picture is a list of build tasks.  The former ones such as zlib, expat, jansson, and openssl, do not have any dependencies and will build standlone.  Mpolib (my cross-platform bridge library) depends on zlib, expat, jansson, and optionally openssl, so it will be built if any of the former source code repositories (which I am storing locally for simplicity) change.  WxWidgets is also somewhat independent and technically has no dependencies (it can build using zlib if available or can use an internal zlib if not available).  DexterManagerLib depends on mpolib and so will build if mpolib changes or if the DexterManagerLib's code changes.  Finally, DexterManagerTest (unit testing suite for DexterManagerLib) and DexterManager (the final application that will run on the desktop) depends on DexterManagerLib and both will rebuild if DexterManagerLib changes.

Some of the cool aspects of this is the mpolib and dextermanagerlib both have unit tests suites which will get automatically run after either of those two libraries gets built.

Even more cooler is that all of this is happening on linux, but it is cross-compiling windows binaries using mingw for linux.  And the unit tests?  They are running under wine (which is super geekish and cool).

As you can see, one of the stages for DexterManagerTest is red.  This is because I have written a new unit test which is currently failing.  This is known as Test Driven Development: write the unit test first, see that it fails, then write the code to make the test pass, and see that the test now passes.  And repeat until the product is finished.  This is my preferred way to write software, although it requires a lot of patience and faith because it feels slower to develop using method.  But overall, it is definitely faster, because debugging is a breeze and doesn't take much time.

DexterManager (the final desktop app) is also red at the moment.  That's because I haven't finished setting up this stage to build successfully.  It took sooo much work to get to this point, that I am showing off what I've accomplished without actually finishing.  It doesn't look like much, but yes, it is a lot of work.

I will also need to set another set of pipelines up for building Raspberry Pi binaries, and, if I am _really_ ambitious, for building AVR binaries too (although building those by hand isn't a big deal since they don't have any external dependencies).

Tuesday, January 6, 2015

Dexter Manager WIP 6 January 2015

This probably won't look like much, but it represents a ton of work.  Like DaphneLoader, the forthcoming DexterManager app can now self-update.  My last video showed a contrived example of what the UI would look this.  This example is no longer contrived but it is actually downloading a real update, applying the update, and restarting.