Skip to content

Preparation

codekiddy2 edited this page Dec 6, 2015 · 14 revisions

Let's prepare!

Step 1

Here is a list of tools that we need, Do not download or install any of them yet.

Following tools are optional, you might need them for optional tasks such as customization of existing projects, debugging or to perform some sort of fixup.

You might already have some of these tools installed on your machine, or you might also have some other tools that do the same thing as those listed here, if so then please read on carefully!

To compile you will need Visual Studio Enterprise edition, but later for library usage any kind of visual studio will do.

Why Enterprise? actually currently only 'master' solution requires Enterprise edition, this is because of graphs and visualisation, and there will be more such graphs in the near future. You can create your own master solution to avoid Enterprise, but this wiki will not cover this process.

It is also possible to compile for older Visual Studio (minimum version VS 2010), however compilation must be done with VS 2015 Enterprise, meaning you'll need 2 versions of Visual Studio installed: VS 2010 or VS 2013 (any edition for compilers and tools) VS 2013 - 2015 (Enterprise for compilation)

To actually compile for older version you need to "retarget" solution to use SDK from older VS. This is done by right clicking on Solution > "Retarget Solution"

Which Python should be used? It depends on which target you want to build:

  • compile on Windows x64 for x64 target: Python x64
  • compile on Windows x64 for x86 target: Python x86

The same apply for Windows x86, but I'm not sure if x64 bit python libs can be installed on x86 Windows?

Perl and msys2 does not matter, install x64 bit version for x64 Windows and x86 version for x86 windows. what matters is to use correct msys2 shell, more on that later.

mozilla-build, anything done with mozilla-build can also be done with MSYS2. currently mozilla-build system is not used to produce new updates for Visual-Studio-gtkmm, since MSYS2 does the job better and has better update system. but you might find it useful for any reason.

There is a thing called Directory structure which means that certain tools has to be installed into certain places. For example you might have Visual Studio 2015 already installed in

C:\Program Files (x86)

If so then you'll have to uninstall it from that location and reinstall it into another location, because there are cases where code won't compile if compiler is installed in some place that contains spaces.

To read more which projects depend on which tools please see This Link

Step 2

Before installing anything, you will need a parition with letter "D" on your system ( D:\ ), if you do not have such partition re-assign existing one to "D" or if you have only one partition (ie. C:\ ) then please create new one and assign letter "D" to that partition.

If you ask why, the answer is that all the projects are pre-configured so that they depend on certain settings.

Of course you can use different partition and even different instalation path but in that case you'll also have to reconfigure a lot of things which are currently not covered in this wiki.

In total you might need around 20+ GB of free disk space

Step 3

There are 2 ways to download Visual-Studio-gtkmm, by using GitHub for Windows or by downloding a zip file.

The difference is as follows:

By using GitHub for Windows you will be able to simplify update of repository and rebuild / relink updated components only, granting you latest features and fixes.

By downloading a zipped file, you can still update but having control on what exactly to update is a bit of overhead.

The benefit of staying up to date is significant, sooner or later you might encounter whatever problem with libraries, and if so, knowing what excatly is going on is hard.

If you wish to use GitHub client for download see this. For help about using GitHub desktop see this. See below where to clone repository..

Else if you do not care about updates, download repository link click on "Download ZIP" button and extract contents ( not top folder ) to D:\Github\Visual-Studio-gtkmm You should end up with following root directory containing projects and properties:

D:\Github\Visual-Studio-gtkmm\

Again, it is important not to extract somewhere else unless you understand how to adjust projects and properties to use different paths.

Step 4

See Directory structure to learn how directories will ( or should ) be created in D:\Github. Some will be created during tools installment, some during build process and some might need to be created manually.

Step 5

We need to set up system locale See Locale Setup

System locale might change your keyboard settings, you can set your keyboard back to previous settings but system locale should be as told in above link.

There are causes where code might not compile correctly with system locale other than mentioned.

Step 6

Now it's time to install all the tools we downloaded!

Visual studio can be installed with following Extenstions:

Each setup program should ask you where to install it. Please take care to install them into correct locations. if unsure please again see Directory structure to figure out where to install.

Not all of the tools need to be installed into these locations, the only exceptions are:

  • Visual Studio Code
  • 7-zip
  • Windows debuggings symbols

but for the sake of completenes I've put them all into D:\Github\Install

Step 7

Next we need to set up PATH environment variable.

At this point it's time you decide how many configurations you intend to build, ie. only Debug for 64 bit Windows?, only Release for 32 bit Windows? or multiple configurations?

If you are about to build multiple configurations then modifying the PATH variable is bad, because you won't be able to run tests against multiple configurations, in this case it's better to modify PATH directly in debugger settings in Visual Studio.

Depending on build type you can add tools to PATH, see PATH Setup

Step 8

Now we have tools, and it's time to configure them so that they work the way we told them!

See This link to learn how to set up debugging symbols

See This link to learn how to set up most useful options in Visual Studio

Clone this wiki locally