Board index FlightGear Development Scenery

fg-from-scratch - TerraGear+Windows

Questions and discussion about enhancing and populating the FlightGear world.

fg-from-scratch - TerraGear+Windows

Postby xDraconian » Wed Jun 20, 2018 3:26 am

I'd like the announce the availability of fg-from-scratch.

The scope of this release is targeted toward building the TerraGear tools for Windows.
If you are a Windows scenery developer that has struggled to get a working copy of TerraGear then I invite you to try out this new approach.

As suggested by the name, fg-from-scratch builds everything you need to get a working build of TerraGear. This includes TerraGear itself and ALL of its dependencies (there are many.)

WARNING: This consumes a lot of hard drive space (~18GB) Once you have successfully built TerraGear, you can clean up and reclaim as much of this space as you need.

Download: https://sourceforge.net/projects/xdraco ... ery/files/

Scott (xDraconian)
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby xDraconian » Sat Jun 23, 2018 1:08 am

A new version of fg-from-scratch is available.

Change log:

Removed prompts from command script
Environment variables are no longer necessary. The script now forces x64-windows builds by default.

Scott (xDraconian)
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby xDraconian » Sat Jul 07, 2018 12:22 am

fg-from-scratch is moving into fgmeta.
My personal repro will no longer be maintained.

Scott
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby legoboyvdlp » Mon Sep 03, 2018 7:28 pm

I had an error while running the script:
Code: Select all
Building package mpfr[core]:x64-windows...
-- Downloading http://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.xz...
-- Extracting source C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/vcpkg-git/downloads/mpfr-3.1.6.tar.xz
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_build_cmake.cmake:175 (message):
    Command failed: C:/Program Files/CMake/bin/cmake.exe;--build;.;--config;Release;--target;install;--;-v;-j1
    Working Directory: C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/vcpkg-git/buildtrees/mpfr/x64-windows-rel
    See logs for more information:
      C:\Users\redpa\Documents\FlightGear\flightgear-fgmeta\fg-from-scratch\vcpkg-git\buildtrees\mpfr\install-x64-windows-rel-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/mpfr/portfile.cmake:18 (vcpkg_install_cmake)
  scripts/ports.cmake:71 (include)


Error: Building package mpfr:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: mpfr:x64-windows
  Vcpkg version: 0.0.113-nohash

Additionally, attach any relevant sections from the log files above.


I think the script just silently failed and continued: these packages were left un-installed:

Code: Select all
  cgal[core]:x64-windows
    curl[core,ssl]:x64-windows
    freeglut[core]:x64-windows
    freetype[core]:x64-windows
    gdal[core]:x64-windows
    glew[core]:x64-windows
    jasper[core]:x64-windows
    libxml2[core]:x64-windows
    openal-soft[core]:x64-windows
    openjpeg[core]:x64-windows
    openssl[core]:x64-windows
    plib[core]:x64-windows
    sdl2[core]:x64-windows
    tiff[core]:x64-windows
    zlib[core]:x64-windows


or at least I'd assume so given the lack of asterisk.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: fg-from-scratch - TerraGear+Windows

Postby legoboyvdlp » Mon Sep 03, 2018 7:34 pm

I searched for tiff (the last supposedly not installed one) in the log: it said: (... showing intermediate code)

Code: Select all
-- searching TIFF -->tiff.h<-->libtiff;tiff<-->C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/vcpkg-git/installed/x64-windows<--
-- Warning Debug TIFF not found, using: C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/vcpkg-git/installed/x64-windows/lib/tiff.lib
...
...
...
-- Found TIFF: C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/vcpkg-git/installed/x64-windows/lib/tiff.lib 
...
...
...
CMake does not need to re-run because C:/Users/redpa/Documents/FlightGear/flightgear-fgmeta/fg-from-scratch/openscenegraph-3.4-build/src/osgPlugins/tiff/CMakeFiles/generate.stamp is up-to-date.

Do I proceed and assume everything is ok? It seems it did find the missing ones?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: fg-from-scratch - TerraGear+Windows

Postby legoboyvdlp » Mon Sep 03, 2018 8:08 pm

I figured out it was building OSG, SG, and FG - not just TG, so I removed the first three and reran the code - looks like it is rebuilding those that it missed due to the error.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: fg-from-scratch - TerraGear+Windows

Postby xDraconian » Mon Sep 03, 2018 10:05 pm

You can run fg-from-scratch multiple times. It will attempt to compile those things that it finding missing.
When you run it a second time, it will automatically upgrade packages that already exist when a newer version is available.

Good luck with it.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby legoboyvdlp » Tue Sep 04, 2018 10:50 am

Looks like it built successfully! Thanks for the script :)


For future reference, OSG and SG are required for TG building - FG is not.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: fg-from-scratch - TerraGear+Windows

Postby xDraconian » Tue Sep 04, 2018 3:53 pm

@legoboyvdlp

Thanks for the feedback. The original version did not include FG, but it was part of the roadmap to include it and was later added to the script. That is why I went with the fg-from-scratch name instead of tg-from-scratch.
Congratulations on getting it working.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby pb321 » Sun Jan 13, 2019 7:49 pm

I'm trying to prepare my computer with the dependencies needed for fg-from-scratch. I downloaded QT per the automatic detection of OS, which led to Windows 64-bit (qt-unified-windows-x86-3.06-online.exe). It installed to c:\qt, not c:\qt\qt5 as described in the readme for fg-from-scratch. How do I accommodate this difference? Do I simply create a subfolder "qt5" and move the folder "cmake-3.13.2-win64-x64" from "c:\qt" to "c:\qt\qt5\"? Or have I grabbed the wrong qt version? (I've never used QT before). Or change the statement in the script from "SET QT5x64=C:/Qt/Qt5/5.10.1/msvc2017_64" to "ET QT5x64=C:/Qt/5.10.1/msvc2017_64"?
Also, I read that setting the environment variables is no longer required but the readme for fg-from-scratch indicates they should be. Which is the case?
Thank you.
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro

Re: fg-from-scratch - TerraGear+Windows

Postby xDraconian » Mon Jan 14, 2019 9:09 am

pb321 wrote in Sun Jan 13, 2019 7:49 pm:Or change the statement in the script from "SET QT5x64=C:/Qt/Qt5/5.10.1/msvc2017_64" to "ET QT5x64=C:/Qt/5.10.1/msvc2017_64"?

@pb321, Simply modify your script to reflect where your Qt is installed.
The current version of fg-from-scratch already reflects this change (SET QT5x64=C:/Qt/5.10.1/msvc2017_64). Double-check that you have the most recent version from fgmeta.

The next version of fg-from-scratch will automatically determine the Qt install location via (qtpaths --install-prefix), but this is not released yet.

pb321 wrote in Sun Jan 13, 2019 7:49 pm:Also, I read that setting the environment variables is no longer required but the readme for fg-from-scratch indicates they should be. Which is the case?

The fg-from-scratch script leverages it to help ensure the proper Qt version is found - think of it as a hint. Without the variable, whether Qt is found correctly depends on how many Qt versions you have installed.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: fg-from-scratch - TerraGear+Windows

Postby pb321 » Mon Jan 14, 2019 3:52 pm

Thank you, @xDraconian! I inadvertantly used an older version and will find the latest. I'll include the environment variables.
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro

Re: fg-from-scratch - TerraGear+Windows

Postby pb321 » Wed Jan 16, 2019 9:01 pm

Got through the script. However, got the following near the end:
Code: Select all
Checking out files:  98% (2802/2859)   
Checking out files:  99% (2831/2859)   
Checking out files: 100% (2859/2859)   
Checking out files: 100% (2859/2859), done.
Downloading TerraGear . . .
Cloning into 'terragear-git'...
Compiling OpenSceneGraph . . .
'cmake' is not recognized as an internal or external command,
operable program or batch file.
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Compiling SimGear . . .
'cmake' is not recognized as an internal or external command,
operable program or batch file.
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Compiling FlightGear . . .
'cmake' is not recognized as an internal or external command,
operable program or batch file.
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Compiling TerraGear . . .
'cmake' is not recognized as an internal or external command,
operable program or batch file.
'cmake' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
        0 file(s) copied.
All done!


Here is the location and version of CMake:
c:\programs\cmake-3.13.2-win64-x64

Folders in this directory include: bin, doc, man and share.

What should be my next step?
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro

Re: fg-from-scratch - TerraGear+Windows

Postby legoboyvdlp » Wed Jan 16, 2019 10:52 pm

Did you check the variables at the top of fg-from-scratch.cmd? I think one of them might be the cmake toolchain path? Maybe I'm wrong...
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: fg-from-scratch - TerraGear+Windows

Postby pb321 » Thu Jan 17, 2019 12:32 am

I think you're right, @legoboyvdlp. But I'm not sure how to change it, as it says:
SET CMAKE_TOOLCHAIN="Visual Studio 15 2017 Win64"

Do you think it should be changed to the path to the CMAKE folder? Guess I'll give that a try.
pb321
 
Posts: 424
Joined: Sun Nov 27, 2016 5:08 pm
Version: 2020.4.0
OS: Windows 10 Pro

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 6 guests