Restructure installation script for various platforms