Tutorial: Subversion for Testers

Tutorials for game development.
User avatar
Ben Urban
Cobol (Esteemed member)
Cobol (Esteemed member)
Posts: 829
Joined: Sat Oct 04, 2008 10:49 pm
Location: Maryland, USA
Contact:

Tutorial: Subversion for Testers

Post by Ben Urban »

Since all the data needed to play Egoboo is now in the Subversion repository, I thought I'd write a tutorial that testers can use to make sure they always have the latest version of everything.

First, some terminology (as applied to Egoboo):
[spoiler="Terminology"]
Version Control System: A system that allows full histories of a project's files to be stored, and allows any version to be retrieved on demand.
Subversion or SVN: A version control system that is used by Egoboo. (Subversion's homepage is http://subversion.tigris.org/.)
Repository: A location on a server (Sourceforge, in this case) where a version control system stores all the data associated with a given project. (Egoboo's repository is at https://egoboo.svn.sourceforge.net/svnroot/egoboo/.)
Branch: A directory within a repository that generally contains a single "set" of versions of the code for a project. (For instance, the 2.6.x branch of Egoboo, found at branches/2.6.x, contains the versions which start with 2.6.)
Revision: A single version of a file, a branch, or a repository, typically referenced by number. (As of the time this tutorial was written, Egoboo's repository was at revision 251, abbreviated r251.)
Working Copy: A copy of a single revision that is stored on your computer. It can be modified at will, but the changes have to be committed before they are available to everyone.
Check Out: A command that creates a working copy from a repository.
Commit or sometimes Check In: A command that submits changes in a working copy to the repository, so that they are publicly accessible. Each commit increments the latest revision number in the repository. Commit access is usually restricted to developers, to prevent things from getting out of hand.
Commit Message: A message that is intended to explain or describe the changes made by a particular revision. Some developers are better at writing good commit messages than others.
Update: A command that attempts to bring a working copy up to date with the latest revision (or a specific revision) of the repository. This can fail if there are conflicts.
Conflict: When updating, if the working copy is modified, and the updated revision contains a change to the same file, and those changes cannot be automatically reconciled by the version control system. Such conflicts must be resolved manually.
Diff or Patch: A file that describes the changes made between two revisions, or between a revision and the working copy, with sufficient detail that the computer can reproduce those changes. This is generally a preferred form for submitting modifications to developers, except when non-text files (images or sounds, for instance) are involved. (Diffs cannot contain non-text data.)
[/spoiler]

Read the instructions corresponding to your operating system to find out what you need to do. If you can't figure out which operating system you have, odds are you should stick with the releases instead.

[spoiler="Windows"]
First you need to download TortoiseSVN, install it and restart your pc. Next you need to download the repository. This is called a checkout and is done only once. Downloading the whole new version of Egoboo using SVN. This is done with the SVN checkout. Make a new folder ("programfiles/egoboo" or whatever) and right click and "SVN Checkout" to download all the files from the SVN repository. This might take some time as the repository is over 300 mb.

From now you just use "SVN Update" to get all the latest fixes, features and changes.

People who do not compile the source themselves, need to download the latest binary files (and re-download the updated binary whenever the source is updated). The binary package is only supported in beta testing phases and also includes all required DLL files.

THE FOLDER ICONS
- If you have done it correctly, all the files in your egoboo folder should be marked with a small green icon. These files are fully working without any of your modifications.
- Folders marked with small red icons have changes that you have made yourself, but not uploaded yet.
- A folder marked with a ? means it's a totally new file which isn't even in the SVN. (like new characters in the players folder for example)
- Folders marked with a + means next time you select "Commit SVN", the file will be uploaded and added to the database as a new file. (new content you might want to add into the game, such as objects or modules)[/spoiler]


[spoiler="Linux"]
There are several good SVN clients.

Recommended foe Gnome: RapidSVN. It is a basic GUI wrapper for svn.
Recommended for KDE: ????

You can use a terminal to check out the repository:

Code: Select all

svn checkout https://egoboo.svn.sourceforge.net/svnroot/egoboo/branches/2.8.x egoboo-2.8.x-svn


Starting with rapid SVN:
- use the checkout function to download the repository (or portion of the repository you are interested in).
- This function will ask you for the home directory for the repository. You want to choose some directory which you have write access to. For a project called PROJECT, you might qant to choose ~/svn/PROJECT or something similar.
- To add files to the project, select the project's home directory from the RapidSVN menu, navigate until you find the file(s) that you want to add. Click on them (doing multi-selection as normal) choose the add function either from the menu or using right-click.
- To upload any changes you have made (if you have write access), select the project's home directory from the RapidSVN menu, select the commit button on the menu bar. If you have not entered your username and password for the svn before, you will be asked to do so at this time.
[/spoiler]

[spoiler="Mac OS X"]
[spoiler="Before you begin"]
You will need:

Xcode Tools, which can be installed from the DVD that came with your Mac
SDL, which you can get from http://www.libsdl.org/download-1.2.php (the "Runtime Libraries" is what you want)
SDL_image, which you can get from http://www.libsdl.org/projects/SDL_image/ (the "Binary" is what you want); drop the framework into your /Library/Frameworks folder
SDL_mixer, which you can get from http://www.libsdl.org/projects/SDL_mixer/ (the "Binary" is what you want); drop the framework into your /Library/Frameworks folder
SDL_ttf, which you can get from http://www.libsdl.org/projects/SDL_ttf/ (the "Binary" is what you want); drop the framework into your /Library/Frameworks folder
Subversion, which you can get from http://subversion.tigris.org/getting.html#osx (the one you want is "openCollabNet (Universal)"); you will be asked for contact information when you download, but you can leave it all blank
• At least 300 MB or so of available hard disk space (not including what you might need for the above)
[/spoiler]

Once you have all of that installed, you will need to check out a working copy of the latest revision from the repository.

[spoiler="Getting a working copy"]
Open Terminal, which is in /Applications/Utilities, and paste this into the terminal window that appears:

Code: Select all

cd Desktop
/opt/subversion/bin/svn checkout \
  https://egoboo.svn.sourceforge.net/svnroot/egoboo/branches/2.8.x/ \
  egoboo-2.8.x


This second command should take a long while to finish, and should dump a list (into the terminal window) of every file in the 2.6.x branch, each preceded by a letter indicating what it's doing. It should also create a folder on your Desktop named egoboo-2.6.x. When you get your prompt back, type exit in the terminal window and press return. It should say Process completed. Now you can quit Terminal.

Open the egoboo-2.6.x folder, and the osx folder inside that. Then open Egoboo.xcodeproj inside that. This will open the project in Xcode.

Look at the list of files in the right-hand pane of the project window. All the files' names should appear in black with one exception: Egoboo.app, which should appear in red. This is because it hasn't been built yet. If one of the SDL frameworks appears with red text, make sure it is installed into /Library/Frameworks.

On the left-hand pane of the project window, double-click the blue icon labeled Egoboo. In the Project "Egoboo" Info window that appears, change SCM System to Subversion.

Click Edit..., and paste this into the Subversion Tool Path field that appears, then click OK:

Code: Select all

/opt/subversion/bin/svn

Turn on Enable SCM, then close the Info window.

You may notice that the SCM icon on the left-hand pane of the project window has temporarily changed into a spinning wheel. This indicates that Subversion is processing; you will probably experience slowdowns within Xcode while that happens.
[/spoiler]

When you want to test Egoboo, you can click on the Build and Go icon in the project window toolbar.

To check for new revisions, choose Refresh Entire Project from the SCM menu. To update your working copy, choose Update Entire Project from the SCM menu.

You can click on SCM in the left pane of the project window to see what files have been changed or added in your working copy. For each file in the list, you will see a letter or symbol next to it that indicates its status:
? means the file is in the project but has not been added to the working copy for inclusion into the repository. (It is common to have a few of these once the project has been built.)
A means the file has been added to the working copy, but is not in the repository yet.
C means the file is in a state of conflict.
D means the file has been removed from the working copy, but is still in the repository.
M means the file is different between the working copy and what is in the repository.
U means the file has an update available in the latest revision.

If you want to generate a diff to submit to a developer, select the file(s) that you have modified (remember to save them first!), and choose Diff WithLatest from the SCM menu. Note that it may take some time for it to get the files from the repository. When it is finished, it will open a window containing the diff. You can then copy it and paste it somewhere (for instance, into a new text file, or an email), and submit it to a developer.
[/spoiler]

LINK TO SVN (Datafiles to run the game):
https://egoboo.svn.sourceforge.net/svnr ... s/install/

LINK TO SVN (Current Code):
https://egoboo.svn.sourceforge.net/svnr ... ches/2.8.x

LINK TO NEW C++ CODE SVN (For coders):
https://egoboo.svn.sourceforge.net/svnr ... hes/2.9.x/

LINK TO OLD CODE SVN (For coders): https://egoboo.svn.sourceforge.net/svnr ... hes/2.6.x/

I recommend locking the thread, and editing this post as needed (if that's possible), to minimize potential confusion.
Last edited by Ben Urban on Tue Mar 24, 2009 1:00 pm, edited 1 time in total.
Thanks to penguinflyer2222 for the avatar, and to penguinflyer5234 for hosting it.
Maiku
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Sun Jan 18, 2009 8:27 am

Post by Maiku »

The linux link in the spoiler is not there.
(Instructions for getting and using Subversion on Linux go here)
User avatar
penguinflyer2222
Queen Penguin (Senior Member)
Queen Penguin (Senior Member)
Posts: 6614
Joined: Wed Jul 23, 2008 1:51 am

Post by penguinflyer2222 »

That is most likely because nobody has come up with instructions for Linux yet.
Also, welcome and have a lightbulb. :idea:
......
User avatar
PurpleSquerkle
Massive Gelfeet (Developer)
Massive Gelfeet (Developer)
Posts: 3176
Joined: Wed Jul 23, 2008 4:54 am
Location: Oakland, CA
Contact:

Post by PurpleSquerkle »

Yeah, the tutorial is not done yet... Someone running Linux should do that part.


Anyway, welcome; have a cookie: :cookie:
User avatar
Ben Urban
Cobol (Esteemed member)
Cobol (Esteemed member)
Posts: 829
Joined: Sat Oct 04, 2008 10:49 pm
Location: Maryland, USA
Contact:

Post by Ben Urban »

Someone running Linux...I wonder who that might be...

@pf5234: Perhaps you can make it tomorrow... I'd be happy to add it if you make it.
Thanks to penguinflyer2222 for the avatar, and to penguinflyer5234 for hosting it.
User avatar
Crux
Acid Blob (New member)
Acid Blob (New member)
Posts: 25
Joined: Sat Feb 28, 2009 10:38 pm
Location: Michigan
Contact:

Post by Crux »

Son of a... Man I'm on ubuntu... I got a windows desktop but its not running atm... BAH!!! I'm quite new to linux/ubuntu and I cant even figure out how to install the latest beta T_T I'm gonna keep trying though, and once I get my desktop up, its going on there, as well as the dev tools =D
Gen2ly
Acid Blob (New member)
Acid Blob (New member)
Posts: 7
Joined: Wed Mar 18, 2009 12:29 am
Contact:

Post by Gen2ly »

Thanks for the guide and adding the Linux spoiler. You might want to add that checkout from svn is the same as OSX:

Code: Select all

svn checkout https://egoboo.svn.sourceforge.net/svnroot/egoboo/branches/2.6.x/ egoboo-2.6.x-svn
User avatar
Ben Urban
Cobol (Esteemed member)
Cobol (Esteemed member)
Posts: 829
Joined: Sat Oct 04, 2008 10:49 pm
Location: Maryland, USA
Contact:

Post by Ben Urban »

I've added it, but I didn't really have a place to do so. Can we get somebody to clean up the Linux and Windows instructions a bit? (For Linux, generic instructions to be used in a terminal would be good.)
Thanks to penguinflyer2222 for the avatar, and to penguinflyer5234 for hosting it.
User avatar
Lordofdragonss
Chest Mimic (Community member)
Chest Mimic (Community member)
Posts: 199
Joined: Fri Nov 28, 2008 11:01 am
Location: Poland

Post by Lordofdragonss »

Ok I did it finally, thanks for showing what to do to get this SVN thing.
Yay, always newest Egeboo everyday! :D
EDIT:

ok, How can I start the game now?
Image FEED ME!
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Download the latest binary and put it into your Egoboo folder. I regularly update the binary so you need to download the new revision once in a while.

http://egoboo.sourceforge.net/forum/vie ... php?t=1002

I'm currently uploading the newest version.
User avatar
Lordofdragonss
Chest Mimic (Community member)
Chest Mimic (Community member)
Posts: 199
Joined: Fri Nov 28, 2008 11:01 am
Location: Poland

Post by Lordofdragonss »

So I have to have actual game right?
I deinstaled it
*facepalm*
Ok So I have to install Egoboo again in the folder with this 4 folders (branches, sandbox, tags, trunk) right?
Image FEED ME!
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

No, you only need to checkout the folder branches/install and copy the binary files there.

The binary files could be downloaded here: http://egoboo.sourceforge.net/forum/vie ... php?t=1002

And now you can play!
User avatar
Lordofdragonss
Chest Mimic (Community member)
Chest Mimic (Community member)
Posts: 199
Joined: Fri Nov 28, 2008 11:01 am
Location: Poland

Post by Lordofdragonss »

Thanks so much Zefz, it's working perfect now!
Image FEED ME!
vanillared
Acid Blob (New member)
Acid Blob (New member)
Posts: 3
Joined: Wed Jan 12, 2011 8:28 pm

Post by vanillared »

1. I have downloaded the repository
2. Downloaded the latest binary (r1476)
3. I ran the binary in the root folder for the SVN repository on my system.
4. I run the egoboo-svn-r1476.exe

Then I get the following error message:

This is the error report: Cannot read mp_data/scancode.txt

For reference I am running Windows 7 64bit if that is of any consequence. I searched through the forums and as far as I can tell I am doing this right and I could not find a similar report anywhere, though I could have overlooked it.

Any help would appreciated =)
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

It doesnt find the basicdat folder where scancode.txt is. Make sure that the basicdat folder with scancode.txt is in the same folder as your binary.
Post Reply