compile script, multiplatform