Library Version Control

General discussion about LÖVE, Lua, game development, puns, and unicorns.
drunken_munki
Party member
Posts: 134
Joined: Tue Mar 29, 2011 11:05 pm

Re: Library Version Control

Post by drunken_munki »

In Windows I'm using something common in Linux platforms, called a Symbolic Link.

This creates a dummy folder which essentially links to another folder, and pretends to act like it.

So in my source tree I have something like this for the libraries:

c:\common\engine.lua

and for example two project folders:

c:\project_a\
c:\project_b\


I can create a dynamic link of c:\project_a\common to c:\common
and c:\project_b\common also to c:\common

If I edit any LUA files in c:\common they will be seen in the project folders too.

Once set-up, all programs like windows explorer, or an IDE or notepad++ will think the *\common folder is actually there.

So in your LUA files you can still import by using something like require("common/engine") for you engine.lua stuff as an example.

This also means when you copy c:\project_b\ or for example ZIP it up for packaging, then all the c:\common files are included too!

To get this working in windows I use HardLinkShellExt_X64 which is a free license software that can be found here:
http://schinagl.priv.at/nt/hardlinkshel ... nsion.html

After installing the tool, you can select a folder with right click in windows explorer,
for example c:\common\ and choose -> 'Pick Link Source'.

Then go to where you want to make the link for example c:\project_a\ and right click -> 'Drop As' -> 'Symbolic Link'.

There are other cool things the tool can go, explore and have fun.
User avatar
zorg
Party member
Posts: 3470
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Library Version Control

Post by zorg »

drunken_munki wrote:In Windows I'm using something common in Linux platforms, called a Symbolic Link.
(...)
To get this working in windows I use HardLinkShellExt_X64 which is a free license software that can be found here:
http://schinagl.priv.at/nt/hardlinkshel ... nsion.html
Okay but why install an extension? Since WinXP (but at least in Win7, where i tried them myself), symbolic links do exist, along with some other stuff like directory junctions, without the need to install anything extra.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
drunken_munki
Party member
Posts: 134
Joined: Tue Mar 29, 2011 11:05 pm

Re: Library Version Control

Post by drunken_munki »

zorg wrote:
drunken_munki wrote:In Windows I'm using something common in Linux platforms, called a Symbolic Link.
(...)
To get this working in windows I use HardLinkShellExt_X64 which is a free license software that can be found here:
http://schinagl.priv.at/nt/hardlinkshel ... nsion.html
Okay but why install an extension? Since WinXP (but at least in Win7, where i tried them myself), symbolic links do exist, along with some other stuff like directory junctions, without the need to install anything extra.
Good point, I think I have mis-understood what the exension does, which is integrating the tools into windows explorer so you can right click and drop links. Sorry about that.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest