Simple Bash script to automate building to all Windows Mac Linux

Ever make a tiny game you want to share to all PC users, Windows, Mac, and Linux?
It takes a long time to keep switching your build settings every time, at least for me.
This is a simple Bash script to automate building and zipping.

Link to script.
Instructions on my devblog.

Hello all. This is my first time putting up a tool I made for myself for public use.
Perhaps there is a better version of this as well. I could not find one however, though I might’ve not looked hard enough.

Also, sorry, but this script is Mac-only.
If enough people think this is useful, I will make a Windows version, or someone else more skilled can.

Unity’s awesome in that it can export to Windows, Mac, and Linux. It’s one of my favorite features. I routinely make little games, which I release for all platforms. The problem is, it takes a long time for me to click Build Settings, change to Windows, build, wait, Build Settings, change to Mac, build, wait, and then Linux. Depending on the size of the project, I have to sit there for a few minutes! It sucks.
Sure, sure that’s crazy. SnowHydra, you’re just lazy. Yep.

So here I have a Bash script that uses the nice command-line batch mode Unity has.
This script allows me to essentially one-click and build my current project to Windows, Mac, and Linux.

It will build the file to the directory of your choosing, with the game name of your choosing.
It will zip up each of the binaries in a nice little package, and label them with (Windows) (Mac) (Linux) respectively.

That’s it.

Maybe you’ll find it useful!
Let me know if you have any problems or questions. Or corrections. I’m not the best at Bash scripting, so let me know if I’m committing any cardinal sins.

1 Like

Thanks. Very useful for me.