bug fix: set rootDir to the absolute path
move some codes to new files: startup.py and windows.py