Adapted installer script from the one on gecko