Talk:Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Jump to navigation Jump to search
Improved description of how symlinks will be used to reduce downloading when building multiple versions of flightgear.
(Improved description of how symlinks will be used to reduce downloading when building multiple versions of flightgear.)
Line 114: Line 114:
https://www.gitorious.org/fg/fg-download-and-compile-fgmeta  select branch: feature/directories
https://www.gitorious.org/fg/fg-download-and-compile-fgmeta  select branch: feature/directories


Currently the script uses a single way to structure directories for sources, data, building and installing.  In order to support the proposed features that would prevent multiple downloading of sources and data, a different structure may make things easier.   
Currently the script uses a single way to structure directories for sources, data, building and installing.  In order to prevent multiple downloading of sources and data, symbolic links can be pre-created in a build tree for previously downloaded sources and data completely outside the build tree.   
For example,


* separate directories for each version of fgdata, with clones of the main git archive in each one, set to the branch needed for a particular version of flightgear
This would allow a number of complex build scenarios to be tried without placing an unnecessary burden on gitorious and other source archives, not to mention your own network bandwidth.
* separate directories for different source versions of a pre-requisite development package such as OSG or Boost
* placing source directories at a higher level of the directory hierarchy, while building and installing in a lower level
* keeping versions of source, build and install directories specific to a particular distribution in a way that supports preparation of new versions for the distribution.


All of this should be accomplished in a non-obtrusive way for current users of the script.  Keeping the build working on a "standard" directory structure.  The easiest thing to do is to keep the current directory structure but override the usage of source, build and install directories using hyperlinks when called for.
All of this should be accomplished in a non-obtrusive way for current users of the script.  Unless the user chooses to use the new method, everything just stays where it is in each build tree.


Alternatives:
The easiest thing to do is to keep the current directory structure but override the usage of source, build and install directories using hyperlinks when called for.
* Use an option to drive the creation and re-creation of symlinks
 
** No option, build as usual, no symbolic links are created, <u>but will be used if already in place for the build in progress</u>
* A new option drives the creation and re-creation of symlinks
** No option, build as usual, no symbolic links are created, <u>but symlinks will be used if already in place for the build in progress</u>
** -L 0 same as No Option
** -L 0 same as No Option
** -L 1 Use hyperlinks for a single copy of sources.  Checkouts will be used to set the sources to the correct version.
** -L 1 Use hyperlinks for a single copy of sources.  Checkouts will be used to set the sources to the correct version.
** -L 2 Use hyperlinks for multiple copies of sources, one per version.
** -L 2 Use hyperlinks for multiple copies of sources, one per version.
Use of the symlinks will require a small change in the procedures for building.  Previously, you could just create a directory, cd to it and run the script from the directory to get a complete flightgear build. To use the symlinks, you'll need a parent build directory where the sources and data will go, and a subdirectory for the build.  For example, to support builds of next, master and 2.12.1
FG-git
  + fgsrc
  + othersrc
  + fgdata-git
  + fgdata-2.99.9
  + fgdata-2.12.1
  + download_and_compile.sh
  + master
  + next
  + 2.12.1
FG-git is my master directory, master, next and 2.12.1 each have their own build and install directories and the run_ scripts.  They'll also have symlinks to the actual sources under fgsrc, othersrc and fgdata-git.  The -L 1 option gives you the option of using a single copy of the sources or you can have multiple copies, one for each version needed using -L 2.
===Special Handling for fgdata===
===Special Handling for fgdata===


982

edits

Navigation menu