Skip to content

Building

codekiddy2 edited this page Dec 6, 2015 · 12 revisions

How to build?

QUICK START:

There is a master solution in projects directory, all you need to do is build that solution, it will perform initial setup, download and extract sources and do all the stuff you need. including configure some projects/sources with GNU autotools.

Currently 'master' solution only performs initial job, work is in progress to make the entry build process do the job with single button click.

It will take some time to complete, make sure you don't interupt the process! When done you can have a look on dependency graph in master solution to see how to proceed.

Here is a screenshot of that graph showing how packages/projects depend on each other.

HINT: right click on image and "open image in new tab" to see enlarged version! Alternatively save the image to desktop and open with image viewer to enlarge.

gtkmm dpendency

Beside arrows showing dependency you can also see current status by color meaning following:

  • green: all tests passed for debug/release 64 bit configuration and debug x86, on Windows 10.
  • blue: Unfinished solutions, but functional.
  • purple: Suspended and no longer maintained.
  • Red: Troubling (better avoid them).
  • White: These do not exist yet but might be added one day.

You are advised to understand how properties work in case you start to build solutions that are marked with color other than green, so that you can adjust them according to these simple rules.

It's worth noting in the image above that some of the projects are optional such as pcre and freeglut, also some optional packages might have their dependencies, some projects are just single headers such as unistd and dirent, however majority of packages are required.

Now when you understand how to resolve dependencies and in which order to build read following before building your first project:

  • Projects and Visual Studio solutions are located in msvc-140 folder.
  • msvc-140 folder is "usually" within directory of the package, ie.

D:\Github\Visual-Studio-gtkmm\projects"package name and version"\msvc-140

or

D:\Github\Visual-Studio-gtkmm\projects"package name and version"\build\win32\msvc-140

  • Each solution has a "readme file" with information what to do
  • These readme files also contain past failure notes and tell how to fix them in case they come back.
  • It is possible things won't go the way they should, these solutions has been tested for debug x64 mostly so taking that configuration to compare it to your build type is very good idea!
  • Eventhough it may look like project inherits all the rules because there are no bold settings present keep in mind that some projects both, do not inherit nor override any settings, so this yet another hint on on what to do if you run out of ideas
  • Some projects and/or solutions already have some "non-default" settings, make sure you understand what these do before changing them by reading the MSVC compiler options to learn how to use MSVC compiler and other stuff that comes with Visual Studio.
  • Make sure you run test projects after successful compilation in order to be sure that everything works as it should, for example you definitely do not want to go back from GTK+ to gettext and recompile everything just because you were too lazy to test dependent libraries.

You will need to check following macros found in certain properties:

  • DRIVE (the drive letter on which your cloned repository resides)
  • REPO_DIR (the path to the repository)
  • SRC_DIR (the path to the sources)

You might also need to check preprocessor macros (ex. targeted Windows version)

Eventhough these macros are already set, checking them does not cost much time. The Drive and Repo directory macros are set only once, while sources directory must be set for each solution separately.

There are macros defined in properties which have sufix '_M', this set of macros is used for MSYS2 environment, other macros are used for MS-Build system.

There are some projects which has been "configured" by using configuration files found in configuration directory inside msvc-140 folder.

At present only libffi needs configuration prior to build, and you are not required to perform any kind of configuration, since there are projects withing master solution which do all this automatically.

You can see which projects needed configuration here

See readme of solution in question to learn how to configure (it's not hard) It is possible that some of these files are outdated so you may need to check their contents in case of errors.

Beside "regular" readme files specific to the package version there are 2 other kind of readme files attached to each solution:

  • fundamental.md
  • troubleshooting.md

The "fundamental.md" should be your next step from here, it explains some details not covered in this wiki, you can read the file while working in solution.

The "troubleshooting.md" contains a list of possible troubles and gives general suggestions on how to fix them.

This should be enough information to let you get started, there is much more to read for each project whithin solution.

Also in case of troubles there are few specific readme files found in:

D:\Github\Visual-Studio-gtkmm\Readme

You might find them useful for what ever reason.

Good luck!

Clone this wiki locally