added flatgui var and changed buildscript