Skip to content

Project configuration

Wolfyxon edited this page Nov 10, 2024 · 6 revisions

Note

If you're looking for help with global Lover configuration, see configuration.

Getting started

Project config is stored in lover.toml in the root directory of your project. Lover uses the TOML format for configuration files as it's very simple.

Essential parts

Your config must always include name under [package].

[package]
name = "Cool Game"

Fields

package

[package] stores info about your game. This field is required and must contain name.

  • name: Name of your project
  • description: Short description of your project
  • author: You!
  • version: Version of your project
  • icon: Path to the icon image
[package]
name = "Cool Game"
description = "A cool game I made"
author = "Cool person"
version = "1.0"
icon = "icon.png"

build

[build] contains settings of how the project is built.

Important

It's not the same as [build] in the global config. See build in lover configuration.

  • default: Default build targets, built when lover build is ran without any arguments.
[build]
default = ["love", "win64", "linux"]

directories

[directories] stores locations to directories in your project required for Lover to work.

  • source: Game's code with main.lua
  • build: Temporary build files and exported project.
[directories]
source = "src"
build = "build"

Warning

Never store any files in build and absolutely do not set it to your project's directory (for example .) or your code might be deleted. This is a temporary folder meant only for build files.

Lover has some basic config checking to prevent such situation, but you should still be careful.

Env

[env] contains custom environment variables.

  • global: Always applied
  • build: Applied on build
  • run: Applied on lover run
[env]
global = { pants = "my pants" }
run = { i = "am about to poop" }
build = { i = "pooped" }

Learn more.

Run

[run] contains test run settings.

  • default_args: Default arguments given if none are specified after lover run
[run]
default_args = ["hi", "--mode=debug", "--scene=game"]
Clone this wiki locally