Not understanding Build from Source instruction
Moderators: winston, another_commander
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
Not understanding Build from Source instruction
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!
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
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
"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
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.
Code: Select all
svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
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.
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
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.
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.
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
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
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Pay close attention to the instructions. You only need to type them exactly as they are shown.
You typed:
It should be
You typed:
Code: Select all
svn co http://svn.berlios.de/svnroot/oolite-linux/trunk
Code: Select all
svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
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.
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.
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
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
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...
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)