- To apply the patch to the source I started by using this code:
svn update -r(Version number)
Can anybody explain me exactly what this line of code does?
A patch file contains information like "change line XXX from AAA to BBB", when there were too many changes to the code since the patch was created, it might not cleanly apply anymore, so this command makes you get an older version of the code. you might miss some new features of the past few weeks, but the patch should apply correctly.
- Second line to apply the patch to the source:
patch -p0 -i name.diff
I've tried the help command but can't seem to find what -p0 and -i do as attributes...
Does anybody have the answer?
"-i <name.diff>" means "input file", otherwise patch reads from the console, i.e. you have to type in everything by hand.
"-p 0" means "strip 0 sections from paths", i.e. when you are in the "trunk" directory, and the patch file has paths like "src/blah.cpp", then use "-p 0" (use the whole path), if it has "a/src/blah.cpp" then use "-p 1" (strip the "a/" from path), if you omit "-p" completely, then only the filename is used, without any paths.
using the wrong option here will get you notices like "file blah.cpp not found, enter correct path:"
- Lastly: When compiling you should change directory to source folder and execute './configure' and 'make'
I found a very small file named configure (6kb), what exactly does this point to, or execute?
And I assume the make command created the exe file?
"configure" is a script that detects your operating system, position of some required programs, libraries, etc. and other options, and creates a file called "Makefile" taking these things into account.
"make" takes this "Makefile", which now contains information how to compile all parts of the program, and usually creates the .exe for you
"make" can take parameters like "make install" to copy the program to a previously defined install location (check "./configure --help"), "make run" to execute the program directly after compiling, "make run-gdb" to start a debug session, or many more
You might not exactly be interested in Ferion
, but if you are, have fun