Move reading the ui file to compile-time