User:Callahanp/fg-from-scratch: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 1: Line 1:
fg-from-scratch is a windows batch script capable of producing a working release version of flightgear and terragear executables.
fg-from-scratch is a windows batch script capable of producing a working release version of flightgear and terragear executables.


=== Building and Running Flightgear ===
Building and Running any piece of modern software is a complex process.  There are literally millions of pieces of information that need to be brought together and processed in just the right way, in just the right order or the whole thing falls apart and the process ends short of your goal with a flurry of cryptic messages or worse, no message at all.  Stuff happens.  One or more of those millions of pieces of information can be inappropriate, incorrect, incomplete, or missing entirely. 
If you're already familiar with modern build processes, you can skip the basics [[ User:Callahanp/Building_and_Running_Flightgear_basics Building and Running Flightgear - The Basics ]]
=== Improvements Contemplated ===
=== Improvements Contemplated ===



Revision as of 16:54, 25 February 2020

fg-from-scratch is a windows batch script capable of producing a working release version of flightgear and terragear executables.

Building and Running Flightgear

Building and Running any piece of modern software is a complex process. There are literally millions of pieces of information that need to be brought together and processed in just the right way, in just the right order or the whole thing falls apart and the process ends short of your goal with a flurry of cryptic messages or worse, no message at all. Stuff happens. One or more of those millions of pieces of information can be inappropriate, incorrect, incomplete, or missing entirely.

If you're already familiar with modern build processes, you can skip the basics User:Callahanp/Building_and_Running_Flightgear_basics Building and Running Flightgear - The Basics

Improvements Contemplated

This is my personal un-official list. It is not a commitment to do the work necessary to accomplish all of it. I can commit to doing the first item.

  • Visual Studio Debug Build
  • Separate Build and Install Directories for Release and Debug Targets
  • Updated Readme.md
    • add links to vcpkg, Visual Studio and CMake documentation
    • add current state of the script
    • add a bit of history.. who developed it, why, how it grew over time...
  • Document the internal operations of the fg-from-scratch build script
  • Document any limitations or adaptations imposed by upstream libraries
  • fg-from-scratch Issues List
  • Try a remote linux build with Visual Studio
  • Investigate use of Visual Studio Code instead of the full Visual Studio

Build Issues

Warning Messages:

  • command line warning D9002: ignoring unknown option '/arch:SSE2'

Error Messages:

  • Error MSB6006 "cmd.exe" exited with code -1073741515. embeddedresources C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 231
  • Error MSB6006 "cmd.exe" exited with code 1. fgfs_autogen C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 231

Discussion

Discussion of this topic can take place in the following thread on the flightgear-devel mailing list, on the talk page or elsewhere as needed.

Cmake and Visual Studio

vcxpkg

ninja

Tasks:

  • Find out if ninja is currently used in fg-from-scratch.cmd
  • if it is include it in research.
  • If not, discuss advantages/disadvantages with the wider flightgear development community.

Per target build and install directories

A technique I've observed in use is to provide separate build and install directories for each target build: release, rel-with-debug, debug.

Task:

  • Investigate vcpkg-git, scratch-build and scratch-install to determine where per-target build or install directories are and are not used.

Notes

CMakeLists.txt in OpenSceneGraph, Simgear, FlightGear, SimGear

This note is not meant to imply that changes in the named projects Cmake files are or will be needed.

The CMakeLists.txt used by the OpenSceneGraph, Simgear, FlightGear and TerraGear projects are used in automatic build processes and in the case of OSG are separately managed projects. They should be considered out of the scope of changes to fg-from-scratch. Anyone working on fg-from-scratch will have to make do with their current state, adjust to any changes in them, and advocate separately for any proposed changes to them.

Package CMake Compatibility with Built-In CMake Targets

The log of a fg-from-scratch.cmd run includes the following text:

The package openssl is compatible with built-in CMake targets:
   find_package(OpenSSL REQUIRED)
   target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)

Does this imply that there are other packages which do not satisfy this criteria? If so, which ones are not? What is the impact of a package not being compatible with built in CMake targets?