Home

Awesome

love-deploy

What this project does

This repo contains a single Makefile, which tries to provide a few useful targets to build and deploy a LOVE project (to itch.io). This currently works on Windows, used from WSL.

Prerequisites

Setup

First, let's do a little bit of setup:

# projects folder for love projects
- myLoveProjets
# a LOVE project here
    - helloWorld
    - ...

Now let's give make actual data: In the "root Makefile", you'll see that there's a variable called love; this is where you tell make where your LOVE install folder is (where the love.exe and the required .dll are).

# just an example
love = /mnt/c/Program\ Files/LOVE

In your "project Makefile" (the one that's empty in your project folder), add the two following variables:

# this is the your project name, it will be used in `name.exe` and `name.love`
name = MY_PROJECT
# this is your username and the name of your project on itch.io
itchio = USERNAME/TEST-GAME
# use this to pass options to love.js. More info here: https://github.com/Davidobot/love.js#options
# this is compatibility mode for example:
web_options = -c

âš  itch.io tends to convert the name of the project when there's underscores in it, replacing them with hyphens, so make sure you use the one that's shown in the URL and not the actual project name

âš  also, make sure you created the project on itch.io before you deploy to it, because butler doesn't create it for you

ℹ I'd recommend setting the size of your HTML embed on itch.io to 780x680 to get nice looking margins 😀. Or just set the game to start in fullscreen instead of embedding it on the page!

âš  If you build a web version and push it to itchio, make sure you either use the compatibility mode (web_options = -c), or activate the experimental SharedArrayBuffer support: https://itch.io/t/2025776/experimental-sharedarraybuffer-support.

Note that you can also provide your own index.html by putting it in your project folder.

How to run

In the root LOVE folder, run

make TARGET project=FOLDER

to run the operation TARGET on the project FOLDER_NAME.

List of useful targets

Or just have a read through the Makefile! 😉

Feel free to modify it however you want, and let me know if you come up with something cool, I'll be happy to integrate it to this project!

Sample run

Given the following folder structure:

ROOT_FOLDER/
 |_ Makefile
 |_ hello/
    |_ index.html (optional)
    |_ main.lua
    |_ Makefile
# hello/Makefile
name = my_project
itchio = tducasse/test-deploy
make deploy project=hello && make clean project=hello

image