Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloned subdirectory fails #22

Open
flamendless opened this issue Oct 10, 2021 · 4 comments · May be fixed by #23
Open

Cloned subdirectory fails #22

flamendless opened this issue Oct 10, 2021 · 4 comments · May be fixed by #23

Comments

@flamendless
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link

rgrams commented Nov 18, 2021

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

idbrii added a commit to idbrii/love-makelove that referenced this issue Jan 6, 2022
Fix pfirsich#22: Cloned subdirectory fails

ls-tree doesn't support --recurse-submodules, but --ls-files does. So
provide it as an option.
@idbrii idbrii linked a pull request Jan 6, 2022 that will close this issue
idbrii added a commit to idbrii/love-makelove that referenced this issue Mar 6, 2022
Fix pfirsich#22: Cloned subdirectory fails

ls-tree doesn't support --recurse-submodules, but --ls-files does. So
provide it as an option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants