init all dirs before window.