banner



How To Install Glade Touch And Fresh

Overview

The first step in getting GtkSharp to work is to go glade upwardly and running. Glade is an application written to blueprint and create GTK forms via drag and driblet. This ways nosotros tin can drag and drib controls onto a form then finally consign / save an xml file to exist used later past Visual Studio.

From what I've seen there are two unlike GUI's available for designing GTK Forms with elevate and drib controls (Like to WinForms under Visual Studio)

  • Stetic - this is an editor included / embedded into the Monodevelop application, it appears to be limited to GTK2 Applications
  • Glade - this is standalone editor which supports both GTK2 and GTK3

For Glade there are 2 master branches

  • Version 3.eight - Which is used for GTK2 Forms
  • Version 3.19 and above - Which is used for the newer GTK3 Forms

Since I'g looking at using GTK3 and Visual Studio instead of Monodevelop, I'm going to use glade here. It is possible to download a version of glade from the website https://glade.gnome.org/ Even so, the versions for windows don't appear to exist maintained on a regular ground, and so seem to be fairly former. The MSYS2 versions of glade all the same seem to be fairly up to appointment, and it's a lot easier than building from source.

Installing MSYS2

The first step is to make sure we have MSYS2 installed. MSYS2 is a newer replacement for Mingw under windows. It'south simply something that makes running Linux applications natively under windows a lot easier. Then install this first

  • http://sourceforge.net/projects/msys2/
  • http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/

After the initial install open a MSYS2 console window.

msys1img

The first thing nosotros want to do is update the core packages for MSYS

Next update any installed packages for MSYS

Installing Glade

Next nosotros're going to install glade, make certain you have a MSYS console open

To search for the glade packages

To install for 64Bit Windows

                pacman -Southward mingw64/mingw-w64-x86_64-glade              

To install for 32Bit Windows

                pacman -S mingw32/mingw-w64-i686-glade              

Running Glade

We can now run glade via the exe C:\msys64\mingw64\bin\glade.exe

gladeform1img

  • Select File -> New
  • Drag and drop a Window from the TopLevels section into the viewing area
  • Drag and drop a stock-still control inside the Window Command
  • Drag and drop a button and TextEntry control into the stock-still area

One important matter to note for the current version of GtkSharp pulled from NuGet (iii.one.3) This requires the GTK+ version of the glade file to be ready to iii.fourteen

  • Select File -> Backdrop
  • Under Toolkit version required: change this from 3.xvi to iii.fourteen

At this betoken you can salvage your new glade file to anywhere you desire. Later on nosotros'll be using this with GtkSharp and Visual Studio

Copying Across MSYS Files

One of the things I noticed when running glade files from .Net is that the application can take problems finding schema and icon files normally associated with GLib when using for case a FileChooserButton

There'due south some more information over at this GitHub link: https://github.com/openmedicus/gtk-precipitous/issues/six

The quick prepare to this is just to copy and paste some directories from MSYS into ProgamData nether windows

Source Destination
C:\msys64\mingw64\share\glib-2.0\schemas C:\ProgramData\glib-2.0\schemas
C:\msys64\mingw64\share\icons C:\ProgramData\icons
C:\msys64\mingw64\share\themes C:\ProgramData\themes


GtkSharp - Part 1 - Cross Platform Toolkits
GtkSharp - Part 3 - Basic Instance with VS and Glade

Source: http://grbd.github.io/posts/2016/01/29/gtksharp-part-2-setting-up-glade/

Posted by: romerochising.blogspot.com

0 Response to "How To Install Glade Touch And Fresh"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel