I've installed this project using LuaRocks https://github.com/jgm/lunamark and I'd like to know how I can integrate it with my LÖVE project. If I open up the Lua interpreter I can use Lunamark just fine, but trying to require it on the LÖVE project doesn't work. I'm aware that https://github.com/Alloyed/loverocks exists but I'd like to know a normal method that doesn't rely on that library specifically.
Thanks!
How to use a LuaRocks project with a LÖVE one?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: How to use a LuaRocks project with a LÖVE one?
Can you post some example code that fails? I installed Lunamark through Luarocks and I can require() it in a LÖVE project without error (although Lunamark itself breaks on a bug inside its Markdown reader).
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: How to use a LuaRocks project with a LÖVE one?
Sorry but I'm not familiar with the paths Luarocks uses on Windows. It might help to print(package.path) from within Lua to see all the places it's searching for lunamark and then append that to package.path in LÖVE before you try to require() the package.
Re: How to use a LuaRocks project with a LÖVE one?
Will that help me when I need to distribute the application to other people though?
Re: How to use a LuaRocks project with a LÖVE one?
When you distribute, you just grab the .dll manually and put it in the same folder as love.exe
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: How to use a LuaRocks project with a LÖVE one?
To use luarocks, you typically need to first add its loader:
I would recommend you look into loverocks, it does a lot of the work for you, though I still haven't found a nice "distribute" function yet. (Though it is at most as much work as it would be with luarocks.)
Code: Select all
require "luarocks.loader"
Re: How to use a LuaRocks project with a LÖVE one?
I can't find any lunamark.dll. The only executable lunamark file I can find is a command line script written in Lua:Muzz wrote:When you distribute, you just grab the .dll manually and put it in the same folder as love.exe
And a batch script:
Trying to require "luarocks.loader" results in the same error as trying to require lunamark.bartbes wrote:To use luarocks, you typically need to first add its loader:Code: Select all
require "luarocks.loader"
Re: How to use a LuaRocks project with a LÖVE one?
Hmm i thought that luarocks would download the dll.
Perhaps you need to build it using the make file though?
Perhaps you need to build it using the make file though?
Re: How to use a LuaRocks project with a LÖVE one?
I get
How do I install lovelocks on macOS, Lua 5.4.6?➜ test2 git:(main) ✗ luarocks install loverocks
Warning: falling back to wget - install luasec to get native HTTPS support
Error: No results matching query were found for Lua 5.4.
To check if it is available for other Lua versions, use --check-lua-versions.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests