My main system is Linux and to reduce redundancy I symlink used libraries from a central folder. Of course this makes it harder for collaborators with different setups.... but there are no collaborators.
All projects are managed through Git and the current one is kept on GitHub, so I can sync it when I need to.
I am now trying to load my current (extremely simple) project on Windows 7. I've cloned my Git repository and managed to get Cygwin to create symlinks that Windows will understand. I can open the linked files in my editor (ZeroBrane), but I can't load them in Löve.
Require doesn't work, but the files end in ".lnk", so that could be a reason, but directly loading doesn't work either, even after I enabled symlinks.
Relevant code:
Code: Select all
--main.lua
local os = love.system.getOS()
local quirk = 'quirks/'..os..'.lua'
if love.filesystem.exists( quirk ) then
print( 'fixing '..os..' quirks' )
dofile( quirk )
end
dofile'lib/Vector2.lua.lnk'
os.exit( true, true )
--other stuff
Code: Select all
--quirks/Windows.lua
--fix symlink support for require
love.filesystem.setSymlinksEnabled( true )
package.path = package.path .. package.path:gsub( '.lua', '.lua.lnk' )
Code: Select all
--fix symlink support for require
love.filesystem.setSymlinksEnabled( true )
package.path = package.path .. package.path:gsub( '.lua', '.lua.lnk' )