Page 1 of 1
Not understanding Build from Source instruction
Posted: Tue Jul 06, 2010 12:42 pm
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!
Posted: Tue Jul 06, 2010 12:55 pm
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.
Posted: Tue Jul 06, 2010 1:11 pm
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?
Posted: Tue Jul 06, 2010 2:41 pm
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.
Posted: Wed Jul 07, 2010 3:30 am
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)
Posted: Wed Jul 07, 2010 6:02 am
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
Posted: Thu Jul 08, 2010 12:30 pm
by Commander Learner
Yeah! Did it! I'm so happy for that because I've no knowledge in programming.... Thanks!
Posted: Sun Jul 11, 2010 1:27 pm
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?
Posted: Sun Jul 11, 2010 1:47 pm
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.
Posted: Sun Jul 11, 2010 2:22 pm
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)
Posted: Sun Jul 11, 2010 2:47 pm
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...