Saturday, March 24, 2012

Getting UDK under control part 2

If you are carrying on from part 1 then you should be able to navigate into your new project. If you click on the code button the under code click HTTP you should see something like this:

  • Copy the contents of HTTP access and paste them into NotePad (or something similar) 

svn checkout --username=cheesewhiskg mycustomudkgame-code

This is the entire command to get the code from your repository but as we're going to be using tortoiseSvn we only need this bit:

  • Remove the everything else so your URL starts with https and ends with trunk.

We need to set up a folder to link to our repository, lets set up something on the desktop for now to get us started.
  • Go to your UDk directory C:\UDK\UDK-2012-02
  • In the folder and right click anywhere then down to 'SVN checkout... '
  • Paste the URL you edited in NotePad into the 'URL of repository' and click OK
  • You should be asked for your login credentials and save them *
  • TortoiseSvn will grab everything from the repository and download it to your folder. 

But wait, there's nothing in our repository right? Wrong, svn uses invisible metadata folders to keep track of all your files, what we've just done is set up a link between out repository and this folder. 

Try right clicking in the folder again, notice how 'SVN Checkout...' has been replaced with 'SVN Update' and 'SVN Commit...' 

Also if you close the folder you will see a nice big green tick overlaying the folder, this means that everything inside this folder is up to date with the repository on the server.

So this is great, but what we want to do next is actually add something to our repository right? 

OK so, add a new folder perhaps call it something like 'Assets' where artists can save their .max files before importing them into the UDK package.
You should notice that the icon overlay is blue with a question mark, this is SVN for WTF, it has no idea what this folder is because it doesn't exists in the repository.
We tell it all about the folder by Right clicking on 'Assets' and going to 'TortoiseSVN>Add...'
You should get a panel showing which files you are about to add, click OK

If everything went well you should now have a panel with 'Add Finished!' at the top, again click OK
The icon overlay on 'Assets' should have also changed to reflect this, it should now be a blue + symbol. 
If we come out of the parent folder you will notice it's overlay icon has also changed, but now it's a red ! symbol, this means we're out of sync with the repository, but didn't we just add the file? Well yes but we now need to commit that change.

  • Right click on 'Assets' 
  • Go to 'SVN Commit...'
  • You need to add a message to every Commit you make, this should be something descriptive about what you are changing.
  • Type something like: 'Adding initial art assets folder' and click OK
If everything went to plan Assets will have been uploaded and all our icons will have nice green ticks. w00t!

We've come a long way, but we still haven't added our project, in part 3 I'll be explaining which folders we want to get under control because we don't want to have to upload 7+gb now do we.

* You can only store one pair of auth credentials in tortoiseSVN at any one time, if you move between projects you need to clear them by:
  • Right clicking anywhere go to tortoiseSVN>Settings
  • Click Saved Data
  • Next to where it says 'Authentication data' click 'Clear'

No comments:

Post a Comment