makelove icon indicating copy to clipboard operation
makelove copied to clipboard

Cloned subdirectory fails

Open flamendless opened this issue 3 years ago • 4 comments

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

flamendless avatar Oct 10 '21 08:10 flamendless

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?

hollunder avatar Oct 12 '21 19:10 hollunder

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 avatar Oct 12 '21 23:10 flamendless

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

flamendless avatar Oct 17 '21 11:10 flamendless

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!
]

rgrams avatar Nov 18 '21 02:11 rgrams