Not understanding Build from Source instruction

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Not understanding Build from Source instruction

Post by Commander Learner »

Hi Pilots!

I posted a topic on how to edit a source code and compile into an exe some time ago, and I read http://wiki.alioth.net/index.php/Runnin ... rom_source. I don't understand Revised build from Source Step 2 "Check out the Oolite code"

Do I copy the source code from the repository to my working dir if I have a modified code? Or just copy the code from the repository?

If I don't need to, how do I compile the "edited code" instead of a new one from the repository as instructed?

Thanks! and Sorry for being troublesome! :)
Shooting polygons since 2001
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

"Check out the Oolite code" is the title of that step. All you need to do is follow the instructions that follow and type the commands in the MSYS shell exactly as shown. In this case, to check out the code, all you do is type

Code: Select all

svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
in the MSYS prompt. The code will be downloaded to the folder you are running the command from automatically (note it takes a while).

You can do modifications inside the code folders freely. Just make sure you don't touch any folder named .svn. You can make changes and execute make debug = no whenever you want to recompile the exe with your changes in. If you want to fall back to the original versions you cheked out or updated, you can type svn revert in the prompt.

See the first post in the related sticky topic. It tells you exactly how you can build it first time and how you can build it subsequently, without checking out the entire source tree again.
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Post by Commander Learner »

Does that mean that my downloaded copy of the source code (somewhere else in my drive) is not involved in the compiling?
Shooting polygons since 2001
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

It works like this:

When you do svn checkout (i.e. a first-time download of the source), a copy of the entire source tree is copied to the hard disk under the directory you executed the svn checkout from. If you are in D:\myoolite - as per instructions in the thread discussing how to build, then the entire source code is copied under D:\myoolite.

The folder D:\myoolite\trunk, which is going to be generated after checkout, will contain a file called GNUmakefile. This is the file that contains all the instructions which "drive" the build process. It tells the compiler how each file should be compiled, what flags and settings to use, how to link the resulting object files, which external libraries must be linked as well to produce a final executable etc. This is the file that is read and executed when the 'make debug = no' command is dispatched. When you compile, you must execute 'make debug = no' from the folder containing the GNUmakefile file, otherwise it doesn't work.

If you have made other copies of the source tree in your hard drive, then you can use them to build too, but remember that the code that gets compiled each time is the one under the folder which you run GNUmakefile from. All other copies are not touched.

I hope I didn't confuse things with this, if you have doubts you can delete all copies of the source in your disk and start again with the instructions in the sticky thread. You just have to follow them exactly and it should work. If the dev environment has been set up already, you only need to type the commands inside the Code tags to get it to build.
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Post by Commander Learner »

When I reach the copy source code part, it tells me

Code: Select all

svn: PROPFIND request failed on '/svnroot/oolite-linux/trunk'
svn: PROPFIND of '/svnroot/oolite-linux/trunk': 405 Method Not Allowed (http://svn.berlios.de)
Shooting polygons since 2001
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Pay close attention to the instructions. You only need to type them exactly as they are shown.
You typed:

Code: Select all

svn co http://svn.berlios.de/svnroot/oolite-linux/trunk
It should be

Code: Select all

svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Post by Commander Learner »

Yeah! Did it! I'm so happy for that because I've no knowledge in programming.... Thanks! :D
Shooting polygons since 2001
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Post by Commander Learner »

What if the internet gets "broken" while the trunk was being copied? Do I have to start all over again? If so, how big is the trunk's download size?
Shooting polygons since 2001
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

svn is meant to work out what differences there are between the local copy and the server copy. It ought to restart the download from a sensible point.

If you have concerns, then it is possible to get a piece at a time.

OSX seems to think that the trunk folder on my machine is around 600 MB but about half of that is build artefacts so I guess the source size is about 300MB.
User avatar
Commander Learner
Dangerous
Dangerous
Posts: 123
Joined: Thu Aug 20, 2009 12:08 pm
Location: Somewheeeeeere over the rainbooooooooooow~

Post by Commander Learner »

When I try again it tells me

Code: Select all

svn: Working copy 'trunk' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
:?
Shooting polygons since 2001
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Err, that's right:

at the command prompt, just type

'svn cleanup'

without the quotes. Then you can do

'svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk'

and it should continue without further problems...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply