In case you have missed this important post by Tim Heuer, SQLIte is now supported on WinRT. As he mentioned, the support for x86 and x64 is there. We still need to wait what ARM story is going to be, but personally I see no reason why this would not work at all.
Once I got the whole process working on my box, I wanted to write done some details to make it easier for me to remember what I did. As Tim mentioned, you must compile x86, x64 and ARM versions of SQLite. How do you do that? The steps Tim describes is exactly the one you need to follow. To compile all those versions, you just need to open corresponding command prompt that ships with Visual Studio. Just switch to metro side, the time “command” to see the list of prompts. Essentially Windows 8 will filter out the list of programs and shortcuts that contain "command” in them.
- Developer Command Prompt can be used to build x86 version,
- x84 Cross Tools Command Command Prompt or x64 Native Tools Command Prompt can be used to build x64 version
- ARM Cross Tools Command Prompt can be used to build ARM version of SQLite.
You will need to delete the results of previous compilation before launching the next one or you will get some strange errors. Just switch to SQLite folder and delete all files that have SQLIte3 in the name that have been modified as of the time you ran nmake command.
You do need to also change the target platform of your project before building it. In my case for testing I am using x64 platform.
VS makes it quite easy for you to setup your solution to be maintainable. Just setup different configurations, one for each target platform.
You can also use pre build events to copy correct sqlite3.dll into the source code folder.
Once you do that, you can create a batch file to build 3 versions of your application using MSBuild or devenv.exe
I am quite excited about SQLIte being supported on WinRT. SQLite team did a great job posting their engine over to WinRT. I think every platform needs some sort of structured storage solution that goes beyond XML files, and SQLite will play this role for Metro Style Applications on Windows 8.
I am planning post full solution after my presentation at Code Stock in 3 weeks. If you need a working example, before that, just let me know.