Wherigo rant
Posted: 17 July 17 3:21 pm
GeocachingNSW has picked a Wherigo cache as their pick for May 2017. Nothing wrong with it, I tried a couple of them. However, there is seriously no proper (open or not) Wherigo support these days any more.
Let me walk you through it:
There are several formats for Wherigo cartridges: WGZ which are ZIP files which contain all the data and the Lua source code and WGC which are a more-or-less undocumented format which contains the data and the bytecode for the Lua program.
The data are files like MP3 files, JPG images etc. The Lua source code is what you can run. The bytecode is a compiled version of that Lua source code which you can run again in a Lua interpreter.
So far so good, you can do some magic. If you can run the Lua source code, you can do the cache. If you can run the Lua bytecode, you can do the cache. Now the gotchas: Not all Wherigo caches supply the Lua source code (none in Australia for example). And the Lua bytecode you can only run in environments which are compatible with the Lua compiler they were made with: It needs to be the same version (version 5.1.x, last release in 2012) and the 32 bit bytecode.
Building Lua inside Xcode isn't difficult, getting the Lua interpreter running code on the iPhone isn't difficult, getting the Lua interpreter running 64 bit bytecode on the iPhone isn't difficult. However, getting the Lua interpreter running 32 bit bytecode on the iPhone is not possible at all. And if the possibility to run 32 bit bytecode on a 64 bit Lua interpreter ever shows up, then I doubt they will backport it version 5.1.x.
TL;DR: Wherigo cartridges use Lua 5.1.x 32 bit bytecode, there doesn't seem to be a way to run them on 64 bit devices anymore.
Let me walk you through it:
There are several formats for Wherigo cartridges: WGZ which are ZIP files which contain all the data and the Lua source code and WGC which are a more-or-less undocumented format which contains the data and the bytecode for the Lua program.
The data are files like MP3 files, JPG images etc. The Lua source code is what you can run. The bytecode is a compiled version of that Lua source code which you can run again in a Lua interpreter.
So far so good, you can do some magic. If you can run the Lua source code, you can do the cache. If you can run the Lua bytecode, you can do the cache. Now the gotchas: Not all Wherigo caches supply the Lua source code (none in Australia for example). And the Lua bytecode you can only run in environments which are compatible with the Lua compiler they were made with: It needs to be the same version (version 5.1.x, last release in 2012) and the 32 bit bytecode.
Building Lua inside Xcode isn't difficult, getting the Lua interpreter running code on the iPhone isn't difficult, getting the Lua interpreter running 64 bit bytecode on the iPhone isn't difficult. However, getting the Lua interpreter running 32 bit bytecode on the iPhone is not possible at all. And if the possibility to run 32 bit bytecode on a 64 bit Lua interpreter ever shows up, then I doubt they will backport it version 5.1.x.
TL;DR: Wherigo cartridges use Lua 5.1.x 32 bit bytecode, there doesn't seem to be a way to run them on 64 bit devices anymore.