add res direcory and output res file.