How easy is it to create distributable game from Love2D source code and what platforms you can distribute your Love2D game on?
There are many questions regarding this in Love Forums and not many clear answers. Be prepared: except for Windows it is a tedious process.
Simple answer: You can distribute your Love2D game on desktop (Windows, Mac, Linux) as well as on mobile (Android APK / GooglePlay) and for web (Love2D web player).
Easy-peasy (all desktops and Android): love-release
Download and use love-release script that automatically creates files (it requires zip, unzip and curl to work) required for the platforms you choose. This software will create game release for these platforms automatically:
- .exe for Windows
- .app for Mac
- .deb for Debian-based distros
- .apk for Android mobile
- .love for others
Windows: .exe file
Zip (pack) your complete directory of the Love2D source code and rename this .zip file to .love file. After creating a single .love file, use official love.exe file and join it with your .love file:
copy /b love.exe+YOURFILE.love YOUR FILE.exe
This will create YOURFILE.exe that you can distribute separately (executable file) or optionally you can use some installer for the distribution.
More info on distributing for Windows on Wiki of Love2D.
Mac: .app file
You need to first extract the official Love2D .app file and copy your source code (join) into this extracted .app file: .app/Contents/Resources/ directory. You will also need to modify info on the file located in: .app/Contents/Info.plist. Now zip (pack) the .app file and it is ready to be distributed.
Linux: multiple options
There is no unified way to distribute files under Linux as there are many different Linux distros available. You can depend on bash .sh scripts or on .bin/.run scripts that will contain bash instructions (e.g. create this directory, start unzipping this etc.) and have also a binary part that contains your packed source code.
For Ubuntu, you can create a .deb file that will list its dependencies: love and liblove. Creating such a file by hand might be tedious. Use love-release as recommended above.
You can however distribute .love file and ask users to install Love2D through their package manager (mostly deb and rpm based distros).
Android: .apk file / Google Play store
You will need to use love-android-sdl2 (debug) package to pack your .love file for distributing on Android as .apk file. If you want to sell (or offer) your Love2D game in Google Play store, you will need to register.
Web: Love2D player
Details on distributing Love2D games
More information on the topic of distributing your .love games is available on the official wiki.