pfirsich / makelove

A build tool for löve games
MIT License
140 stars 12 forks source link

Cloned subdirectory fails #22

Open flamendless opened 2 years ago

flamendless commented 2 years ago

i get errors like:

Assembling game directory..
'./modules/hump' is not a file!
'./modules/lume' is not a file!
'./modules/material-love' is not a file!

theyre originally cloned git repos. Ive tried removing the .git dir in each but it still gives the same error

hollunder commented 2 years ago

Those are likely directories. Does the game work if you run it as normal from the commandline or if you manually create a .love file?

flamendless commented 2 years ago

Yeah they are folders with bunch of lua files inside.

It works normally though when I run it with

love .

. Note that i have other subdirectories in the modules folder as well that makelove is not complaining about.

flamendless commented 2 years ago

Upon further inspection it seems that if the directory has subdirectories, that directory is not included but the subdirectories are.

example:

-main.lua
-modules/
--material-love/
----roboto/
-----init.lua

this will zip into:

-main.lua
-modules/
--roboto/
---init.lua
rgrams commented 2 years ago

Same issue here, my git submodule directories get broken (they're just left out entirely). Is there any workaround? Honestly I don't know how makelove can tell the difference, they're just normal directories.


[Edit:] OK, found the problem (roughly) and the workaround. With the default config, makelove tries to be smart and only include files that git is tracking, but that part breaks with submodules. The solution:

  1. In your makelove.toml, under love_files = [, remove: "::git-ls-tree::",.
  2. Replace it with other patterns that include & exclude the appropriate files. Here's my set:
    love_files = [
    "+./*",        # Include all files.
    "-*/.*",       # Exclude all files & folders anywhere starting with '.'
    "-./makelove*" # Make sure to exclude your build folder!
    ]