Re: Library Version Control
Posted: Sat Jun 13, 2015 6:15 pm
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.
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.