• Stars
    star
    125
  • Rank 280,244 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A build tool for löve games

makelove

A packaging tool for löve games

Features

  • Build fused win32 and win64 löve binaries (including handling of .exe metadata and icon, but only on Windows or with Wine!)
  • Build AppImages using the AppImages from love-appimages (This is feature is only supported on Linux and WSL2. WSL does not support AppImages for a lack of FUSE support)
  • Mac Builds
  • love.js builds (which does not support Lua modules from shared libraries or LuaJIT-specific features, like FFI)
  • Proper handling of shared libraries (both Lua modules and FFI)!
  • Packaging of those binaries in archives, including extra files
  • Versioned builds
  • Control and customization along the way:
    • Configure which targets to build
    • Which files to include in the .love with a list of include/exclude patterns
    • Which löve binaries or AppImage to use as the base
    • Which artifacts to generate or keep
    • pre- and postbuild hooks that are able to change the configuration on the fly. For example you can decide dynamically which files to include in the .love (e.g. through parsing asset lists), inject build metadata or just to upload your build automatically afterwards (e.g. via butler to itch.io))

Quickstart

To use makelove you need to install Python 3.7 or later and then execute (probably just pip on Windows):

pip3 install makelove

Then navigate to the directory containing the main.lua of your game (your game directory) and execute:

makelove --init

and enter the values you are prompted for. This will create a makelove.toml in your working directory.

NOTE: Please have a look at makelove_full.toml for a reference of the possible configuration parameters

It is also possible to execute makelove without any configuration file (makelove will try to guess every configuration parameter), but makelove --init does not take long to execute and will probably give you way better results.

If you want to do unversioned builds, it's simply enough to invoke makelove:

makelove

If you wish to version your builds, you should pass a version the first time you build:

makelove --version-name 0.1

For all subsequent builds the version number will simply be bumped unless you specify a version explicitly and an invocation of makelove without arguments is enough.

There are a number of arguments you can specify to customize the build (e.g. to specify a configuration file explicitly, disable hooks, produce more verbose output or check the config file), so make sure to have a look at the help text of makelove:

makelove --help

Configuration

All possible configuration values are shown and explained in makelove_full.toml (You should look at this!) (not a valid makelove configuration).

If you wish to do some extravagant things, have a look at how_to_x.md, which may list what you are trying to do. If there is anything that you want to do, but can't please let me know and I will try to add whatever is needed, if the change is reasonable.

Versioned & Unversioned Builds

Unversioned Builds

With unversioned builds there is only one build directory (the one specified in build_directory) and in that directory exists a subdirectory for each target.

Whenever a target is built again, the love file will be rebuilt (unless --resume is passed) and the target will be overwritten.

Versioned

For versioned builds on the other hand a new directory (with the version name) is created for each build (the old ones are kept).

You can also build a version + target pair that was already built. If you attempt to rebuild a target, makelove will error, unless you specify --force, which will overwrite that target instead. The löve file will not be rebuilt (even with --force) as it defines the version itself. If you wish to replace the löve file, you can just delete the version directory and rebuild the version completely.

If a versioned built has been made, a build log is created/updated (in build_directory/.makelove-buildlog) that contains a history of the builds (targets built, timestamp, success).

GitHub Actions

You can find an example YAML file that will run makelove in a GitHub Action here: build.yml.

Since Linux is the only platform that can make builds for every platform, an Action might be useful to get those, even if you do not have a Linux machine easily at your disposal.

The file does need some adaptions in regards to where makelove should be executed and the build directory, but otherwise it should be fairly copy-pastable. Do read the comments in that file first though! Also note that this is not meant for versioned builds, since those need an extra manual input (the version). In case you need them, consider taking the version from a file in the repository.

Hooks

Hooks are simply commands that are executed at specific points in the build. After all preparations are done and before the first filesystem operations are executed, the prebuild hook is executed. The postbuild hook is executed after every other step of the build is done.

The configuration as it is currently will be written to a temporary file, which will also be read back after the hook was executed. Through this mechanism hooks are capable of modifying the configuration.

The commands will be executed with additional environment variables:

Environment variable Description
MAKELOVE_TEMP_CONFIG The path to the temporary configuration file
MAKELOVE_VERSION The version being built. Also in the command {version} is being replaced with this. An empty string for unversioned builds.
MAKELOVE_TARGETS The targets being built.
MAKELOVE_BUILD_DIRECTORY The build directory. For versioned builds this is the version's build directory. In the command {build_directory} is being replaced with this.

An example of how to use the parameter replacement in the commands is in makelove_full.toml.

More Repositories

1

jprof

Profiling library/tool for löve
Lua
86
star
2

lua-discordRPC

LuaJIT FFI Wrapper for the Discord Rich Presence API
Lua
72
star
3

andross

andross is a Lua library for 2D skeletal/bone animations.
Lua
32
star
4

love-appimages

Scripts to create AppImages of löve (https://love2d.org/)
Python
22
star
5

meleeFrameDataExtractor

Generates frame data for Super Smash Bros. Melee as JSON from the character data files.
Python
13
star
6

gciso

Python library to read/write GameCube .iso files.
Python
11
star
7

kraidGUI

GUI framework for programmers. Implemented in Lua. Can be used with different backends, a löve2d backend is developed alongside it by me.
Lua
10
star
8

gltf

glTF Loader Library for modern C++
C++
10
star
9

htcpp

An HTTP server using liburingpp
C++
10
star
10

Ray-casting-test

This is an implementation/comparison of various methods for ray casting in 2D grids, also referenced in my corresponding blog post: http://theshoemaker.de/2016/02/ray-casting-in-2d-grids/
Lua
9
star
11

7dfps_2020

Game for 7DFPS 2020
C++
7
star
12

meleeDat2Json

A Melee .dat file reader in Python, that dumps character data to JSON.
Python
7
star
13

love-discord-faq

A collection of written up answers to frequently asked questions / frequently stated problems in the LÖVE Discord.
7
star
14

aiopp

Asynchronous IO for C++20
C++
7
star
15

kaun

Lua module for 3D graphics to be used with löve (http://love2d.org)
C++
7
star
16

melee-framedata

A website for frame data for Super Smash Bros. Melee
Python
7
star
17

exquisite

Exquisite Text - An attempt to make a terminal text editor, that is a bit like Sublime Text
C++
6
star
18

cpp-ecs

C++
5
star
19

love-TextLine

A single line text input class (including selection with mouse and keyboard, copy&paste, etc.)
Lua
5
star
20

GMTKJam18

https://itch.io/jam/gmtk-2018
Lua
4
star
21

NGN

Graphics Engine using C++11/OpenGL. This is almost completely untested and very work in progress. master might not even compile.
C++
4
star
22

superprintf_love2d

This is a new printf function for love2d that let's you include images in your text, change colors inside the string and define custom commands.
Lua
4
star
23

doc.lua

A very simple documentation generator for Lua
Lua
3
star
24

Frontdown

Open source (hardlink) backup
Python
3
star
25

shipIt-love

A Python script for easily making distributables of your love 2d game.
Python
3
star
26

glwrap

OpenGL Wrapper
C
2
star
27

SparklEd

Particle effect editor for löve 2D particle system
Lua
2
star
28

Screwdriver

Map editor for 2D games (in preparation for Indie Speed Run 2015)
Lua
2
star
29

love-quakeconsole

Lua
2
star
30

love-discord-bot

Discord Bot for the löve community server
Lua
2
star
31

GGJ2017

C#
1
star
32

ModifyAssignInLua

A lua loader that adds the functionaly of modify-assign operators (*=, -=, /=, +=) in Lua
Lua
1
star
33

cpprom

A very small Prometheus client library for C++
C++
1
star
34

lovejam20

Lua
1
star
35

joml-cpp

C++
1
star
36

welo

Command line weight loss and calorie tracker
Python
1
star
37

bullider

Special purpose collision detection library for bullet hell games
Lua
1
star
38

joml

Joel's Markup Language
Python
1
star
39

chu

3D library on top of kaun (https://github.com/pfirsich/kaun) inspired by three.js (https://threejs.org)
1
star
40

clipp

A command line argument parser library for C++17
C++
1
star
41

ggj2020

C#
1
star
42

invisibledb

C++
1
star
43

naw

Lua Entity-Component-System library
Lua
1
star
44

myl

My seemingly weekly engine project, ugh
C++
1
star