936
edits
Philosopher (talk | contribs) (→8. Build Stable: Fix ending tag) |
(Big correction. You have to have run download_and_compile.sh before you can use this technique. Directions are still untested.) |
||
Line 12: | Line 12: | ||
* you may only need one copy of each version of fgdata you are working with | * you may only need one copy of each version of fgdata you are working with | ||
* fgdata normally lives as a sub-directory in install/fgfs/ | * fgdata normally lives as a sub-directory in install/fgfs/ | ||
* install/fgdata can | * once it exists, install/fgdata can moved and replaced by a symbolic link to fgdata's real directory location | ||
====Technical Points and command examples==== | ====Technical Points and command examples==== | ||
Line 19: | Line 20: | ||
* mv can move a directory | * mv can move a directory | ||
* cp -R will copy a directory recursively. | * cp -R will copy a directory recursively. | ||
* ln -s targetname linkname creates linkname as a symbolic link to the target. The target may or may not yet exist and that's ok. | * ln -s targetname linkname creates linkname as a symbolic link to the target. The target may or may not yet exist and that's normally ok. Not in this case, because of the way we create the directory with git. | ||
* the symbolic link must be created <b>after</b> downloading | |||
* Important: You can move the flightgear source directories and download_and_compile.sh to different folders at will. Git will not care. All the git specific files move right along with the sources. Its the same for svn. However, the same does not hold true for the files created during a build by cmake. The build and install folders cannot be moved because the files in them have hard coded paths in some cases. They'll need to be deleted and rebuilt. | * Important: You can move the flightgear source directories and download_and_compile.sh to different folders at will. Git will not care. All the git specific files move right along with the sources. Its the same for svn. However, the same does not hold true for the files created during a build by cmake. The build and install folders cannot be moved because the files in them have hard coded paths in some cases. They'll need to be deleted and rebuilt. | ||
Line 39: | Line 40: | ||
mkdir -p ~/work/fg/fgdata_2.11.0 | mkdir -p ~/work/fg/fgdata_2.11.0 | ||
</code> | </code> | ||
Eventually a particular version of fgdata will be in | Eventually a particular version of fgdata will be in each | ||
=====2. Create a directory for each version or variation of flightgear you want to build.===== | =====2. Create a directory for each version or variation of flightgear you want to build.===== | ||
Line 55: | Line 56: | ||
Note that I never build at the ~/work/fg level. download_and_compile.sh is always run from a sub-directory | Note that I never build at the ~/work/fg level. download_and_compile.sh is always run from a sub-directory | ||
=====3. | =====3. Do you first build of flightgear ===== | ||
You can skip this step if you've already done one. | |||
If you've never used download_and_compile.sh before you're ready to go. | |||
<code> | <code> | ||
cp download_and_compile.sh ~/work/fg/master | |||
cd ~/work/fg/master | |||
./download_and_compile.sh ALL | |||
</code> | </code> | ||
and | That will build just about everything and will download fgdata into | ||
~/work/fg/master/install/fgfs/fgdata | |||
=====4. retrofit prevous use of download_and_compile.sh ===== | |||
Download_and_compile.sh placed the fgdata directory in the install/fgfs directory. | |||
We're going to move it. N | |||
From the directory where you ran download_and_compile: | From the directory where you ran download_and_compile: | ||
<code> | <code> | ||
Line 90: | Line 85: | ||
Test to see that everything is hooked up. | Test to see that everything is hooked up. | ||
<code> | <code> | ||
./download_and_compile.sh | ./download_and_compile.sh DATA | ||
</code> | </code> | ||
=====5. Prepare to build another version.===== | |||
===== | |||
In step 1, we created a spot for two fgdata versions. So far only one is actually there, fgdata_2.11.0/fgdata. Lets fix that so we don't have to download another copy for 2.10.0 | In step 1, we created a spot for two fgdata versions. So far only one is actually there, fgdata_2.11.0/fgdata. Lets fix that so we don't have to download another copy for 2.10.0 | ||
<code> | <code> | ||
cd ~/work/fg/fgdata_2. | cd ~/work/fg/fgdata_2.8.0 | ||
cp -r ~/work/fg/fgdata_2.11.0 fgdata | cp -r ~/work/fg/fgdata_2.11.0 fgdata | ||
</code> | </code> | ||
That's right, we just made a copy of 2.11.0's fgdata and are calling it 2. | That's right, we just made a copy of 2.11.0's fgdata and are calling it 2.8.0. | ||
While we're at it, lets copy the 2.11.0 source code | |||
<code> | <code> | ||
cd ~/work/fg/stable | cd ~/work/fg/stable | ||
Line 134: | Line 109: | ||
cp -R ~/work/fg/master/fgcom ./ | cp -R ~/work/fg/master/fgcom ./ | ||
cp -R ~/work/fg/master/fgcomgui ./ | cp -R ~/work/fg/master/fgcomgui ./ | ||
</code> | |||
And replace the link to the right version | |||
mkdir -p /installfgfs | |||
ln -s ~/work/fg/fgdata/2.8.0 install/fgfs | |||
ls -lah install/fgfs/fgdata # show the symlink to fgdata | ls -lah install/fgfs/fgdata # show the symlink to fgdata | ||
ls install/fgfs/fgdata # make sure there's something there. | ls install/fgfs/fgdata # make sure there's something there. | ||
Line 142: | Line 122: | ||
</code> | </code> | ||
===== | =====6. Building with options===== | ||
You can use download_and_compile to build master or stable with various options such as -i for openrti or -g to build a debug version. | You can use download_and_compile to build master or stable with various options such as -i for openrti or -g to build a debug version. |
edits