I have been using SVN for source control which works quite nicely to share commits with different people, but if I want to develop from two computers and not want to commit untested parts, it’s not very effective. Sure, I could do a branch, but that would be overkill and not fun!
I already use Dropbox to share files between computers so I have decided to extend its usage to share my UDK folders, specifically the code part. Of course, if you want to use Dropbox to share something you have to copy it into the Dropbox directory. However, I discovered a neat trick to share specific folders. This can be used for other purposes, as well. We can use the mklink command in windows to do it. So, here we go:
- Install UDK on both computers. The first computer here is the “alternate computer”, while the second computer is the “computer which has the latest files”.
You can extend this guide to be used with as many computers as you want.
- Find the address for Dropbox on the first computer. For me, this is “C:\Dropbox”. I also need to specify what the link’s name should be, so I now have “C:\Dropbox\ARON”.
- Find the folder you want to share through Dropbox. For me, this is “C:\UDK\UDK-2011-05\Development\Src\aron\Classes”.
TAKE BACKUPS OF THIS FOLDER BEFORE CONTINUING.
- Open your cmd by pressing Start-R keys at the same time and then typing “cmd” and enter:
- Follow this format:
mklink /D “firstpart” “secondpart”
The first part is the place where you want your folder’s link to be created, for me it’s C:\Dropbox\ARON, the second part is where your folder is actually located C:\UDK\UDK-2011-05\Development\Src\aron\Classes.
So, I use
mklink /D “C:\Dropbox\ARON” “C:\UDK\UDK-2011-05\Development\Src\aron\Classes”
- Wait for Dropbox to synchronize your folders.
- Go to your second computer, wait for your Dropbox to synchronize the folders, then right click the tray icon and pause syncing.
We need to do this because we don’t want Dropbox to become confused when we create the same link on the second computer.
- In the second computer’s Dropbox folder, delete the linked folder you just created (for me, it’s Dropbox/ARON). Since Dropbox is paused, this won’t affect the other computer’s files.
- Repeat the steps 3 to 5, so I need to type
mklink /D “E:\DROP\Dropbox\ARON” “E:\UDK\UDK-2011-05\Development\Src\aron\Classes”
on the second computer’s cmd.
- Resume syncing of Dropbox in the second computer.
- Now Dropbox will transfer the files from the second computer’s folder to the first computer’s folder. If you want to use the first computer’s folder as a starting point, just restore your backup of those files and they will be synced on the network!
- Modify anything on any computer, the files will be properly synced!
If you have any comments or questions, please write them into the comments.