Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Updated to Gtk 3.12 #128

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
61c921e
Mark deprecated functions as Obsolete
Nov 3, 2014
5fc657a
Generator problems in GtkWidgetClass
Nov 3, 2014
d33628d
Updated to Gtk 3.12
Nov 3, 2014
33722f0
Make samples able to compile
Nov 3, 2014
2baa86a
Include cairo in gapi
Nov 3, 2014
9df7449
Update to cairo API 1.12
Nov 3, 2014
54eb84c
Int size on 64 bit
Nov 5, 2014
c851bdc
Ignore gui-thread-check on windows
Nov 5, 2014
4c4e2a8
Remove utf8 variant. Not used anymore on windows
Nov 5, 2014
d445b49
Fix conditional in Makefile.am
Nov 5, 2014
cfb2f3f
Install cairo-api.xml
Nov 5, 2014
4efdb7c
Seperate pkgconfig version from package version
Nov 5, 2014
9cb9715
Don't use API 3.12.0.0 just yet
Nov 6, 2014
8bf4dc1
3.14.6
mikkeljohnsen Jan 20, 2015
eb227d8
Removed CssProvider reference to unavailable interface GtkStyleProvid…
nyxiscoo1 Jul 23, 2015
4e1224b
Merge pull request #1 from nyxiscoo1/master
mikkeljohnsen Jul 24, 2015
120b3ce
Merge remote-tracking branch 'upstream/master'
Jul 24, 2015
6774f0b
Track 3.16.6
Sep 4, 2015
95f59a7
Fix IScrollable and List class
Sep 4, 2015
e1cba41
Rename RowActivated to ListRowActivated for ListBox
Sep 4, 2015
e34a6d7
Return false if no border set
Sep 4, 2015
542be14
Constructor
Sep 4, 2015
d98f6c3
csproj ToolsVersion to 4.0
Jun 8, 2015
16310b1
Update csproj TargetFrameworkVersion
Oct 29, 2015
751a5ce
Update References file's in csproj
Oct 29, 2015
c7dfa5d
Update Solution to Visual Studio 2013
Oct 29, 2015
018b624
Create gtkdotnet Project in Solution
Oct 29, 2015
b20872a
Revert: Seperate pkgconfig version from package version
Oct 29, 2015
5a7a0f7
Fix properties setting when constructing GLib.Objects
martinKupec Sep 1, 2015
a76f60d
Add possibility to pick glib type name for custom classes
martinKupec Sep 1, 2015
c2fd7af
Changed type of property BackgroundGdk in gtk-api.raw
orion75 Oct 29, 2015
c099ec1
build: Post-release version bump to 3.14.0, Update API_VERSION, Updat…
orion75 Oct 29, 2015
62b9345
Merge pull request #2 from orion75/gtk-sharp-3-14-branch
mikkeljohnsen Oct 30, 2015
4c65e70
gtk: Fix return types for null_term_array* methods in AboutDialog
orion75 Nov 6, 2015
a8d9a11
Update to Gtk 3.18.2
Nov 10, 2015
b0d741f
Use PACKAGE_VERSION 3.0
mikkeljohnsen Nov 10, 2015
2c5ba65
Updated to gtk+ 3.18.5
mikkeljohnsen Dec 2, 2015
0b38a45
Update to 3.18.5. Downgrade API tp 3.0.0.0. So that you don't have to…
mikkeljohnsen Dec 2, 2015
28ba487
Merge pull request #3 from orion75/gtk-sharp-3-14-branch
mikkeljohnsen Dec 2, 2015
114899f
Fixed memory leak when scheduling timeout and idle callbacks
nyxiscoo1 Feb 16, 2016
f087270
Merge pull request #7 from nyxiscoo1/mleakfix
mikkeljohnsen Feb 17, 2016
5e75d00
Fix Dialog creation
harry-cpp May 6, 2016
c661437
Merge pull request #8 from cra0zy/fixialogcreation
mikkeljohnsen May 9, 2016
36b6b71
Updated to Gtk+ 3.20.4
mikkeljohnsen May 11, 2016
c1daeff
Made alias Symbol GdkRgba to GdkRGBA. This will provide properties of…
mikkeljohnsen May 17, 2016
110b73d
Generate GdkColor properties
mikkeljohnsen May 17, 2016
8134f48
Generate 'rgba' property
mikkeljohnsen May 17, 2016
7236eb3
Upstream patches
mikkeljohnsen Jun 8, 2016
b898323
Added StyleProviderPriority
mikkeljohnsen Jun 8, 2016
7918531
Small change to allow for building against latest gtk3
Hecatron Jun 30, 2016
fe849a7
Merge pull request #16 from grbd/master
mikkeljohnsen Jul 25, 2016
8e355c7
Updated to 3.20.6 and included SimpleAction
mikkeljohnsen Jul 25, 2016
9758c7a
Merge branch 'master' of github.com:openmedicus/gtk-sharp
mikkeljohnsen Jul 25, 2016
f861aeb
Merge from upstream
mikkeljohnsen Jul 25, 2016
182aa7e
Updated to 3.20.6
mikkeljohnsen Jul 25, 2016
728c1f5
Try to wrap NativeDialog for Windows
mikkeljohnsen Jul 25, 2016
99a8599
Added python scripts for building NuGet packages via windows or linux
Hecatron Oct 1, 2016
3a80531
Merge pull request #18 from grbd/Nuget
mikkeljohnsen Oct 1, 2016
c45e355
Rewrite of the nuget package genertion code, also included the glue libs
Hecatron Oct 17, 2016
9c00e25
Added some code for trying out the build of Gtksharp using dotnet cli…
Hecatron Oct 17, 2016
43c86d7
updated patches for 3.22
Hecatron Oct 17, 2016
048ebea
Merge pull request #19 from ASoftTech/master
mikkeljohnsen Oct 18, 2016
2c82d95
Fix System.Array usage in {List,Tree}Store
grendello Dec 17, 2016
5e164b4
Fix the ActionMap.AddActionEntries API
grendello Dec 17, 2016
669efed
Merge pull request #21 from grendello/fix_actionmap
mikkeljohnsen Dec 18, 2016
be3214d
Merge pull request #20 from grendello/fix_array_usage
mikkeljohnsen Dec 18, 2016
3d99318
Make GLib.Object.{Set,Get}Property public
grendello Dec 18, 2016
ccbd9ca
Bind a number of Gtk.CellRendererTextProperties
grendello Dec 18, 2016
487fe38
Merge pull request #22 from grendello/object_setproperty_public
mikkeljohnsen Dec 19, 2016
42982bd
Merge pull request #23 from grendello/text_rendered_properties
mikkeljohnsen Dec 19, 2016
9af0176
Updated to 3.22. Need to fix GtkMenu and Popup
mikkeljohnsen Jan 20, 2017
e2bf48f
Add Deprecated method Create in CairoHelper
mikkeljohnsen Jan 26, 2017
af3956b
Updated version to 3.22.6
mikkeljohnsen Feb 2, 2017
5063385
AppVeyor integration (#25)
stil Feb 5, 2017
b6260e8
Include debugging symbols in nupkg (#26)
stil Feb 5, 2017
87d4d29
Some fixes to support updated gstreamer-sharp (#29)
thiblahute Aug 24, 2017
4f388c6
Add meson build definitions (#30)
thiblahute Aug 24, 2017
6d9c9fe
meson: Add glue libraries generation (#31)
thiblahute Aug 24, 2017
f90d29d
meson: Install missing .pc/lib/gapi XML files (#32)
thiblahute Aug 24, 2017
2be7166
meson: Specify all link dependencies in declare_dependency (#33)
thiblahute Aug 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config.*
configure
depcomp
doc/gtk-sharp-3-docs.*
generated
generated/*/*.cs
generated.c
generated-stamp
install-sh
Expand All @@ -42,3 +42,14 @@ stamp-h1
AssemblyInfo.cs
Makefile
Makefile.in

# Nuget build files
NuGet/build
NuGet/nupkg

# Python compiled files
*.egg-*
*.pyc
.eggs
dist
*.suo
67 changes: 67 additions & 0 deletions NuGet/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Readme

## Overview

This is a series of python scripts to generate the binaries and NuGet Packages for GtkSharp and Gtk

* NuGet Packages for the GtkSharp .Net libraries
* NuGet Packages for the Windows 32bit / 64bit Gtk dll's

## Windows

### Depends

The following is used as part of the build process

* MSYS2 - Windows install

Also it's assumed that you've already installed the 32bit and 64bit binaries for gtk within the MSYS environment
if your going to generate the Win32 / Win64 Nuget Packages for windows

```
pacman -S mingw-w64-i686-pango mingw-w64-i686-atk mingw-w64-i686-gtk3
pacman -S mingw-w64-x86_64-pango mingw-w64-x86_64-atk mingw-w64-x86_64-gtk3
```

And installed the executor python module
```
C:\Python35\Scripts\pip.exe install executor yattag vsgen
```

### Running Build

To run the build
```
cd gtk-sharp\NuGet
build.py all
```

## Linux

### Depends

For Ubuntu we need to install pip for python 3 and a few other packages
```
sudo apt-get install python3-pip autoconf libtool libtool-bin mono-complete
sudo apt-get install libglib2.0-dev libpango1.0-dev libatk1.0-dev libgtk-3-dev
```

Then install the executor python module
```
pip3 install executor yattag vsgen
```

The version of Nuget needs to be the latest for linux
```
sudo wget https://dist.nuget.org/win-x86-commandline/v3.5.0-rc1/NuGet.exe -O /usr/local/bin/nuget.exe
sudo chmod +x /usr/local/bin/nuget.exe
```

### Running Build

To run the build
```
cd gtk-sharp/NuGet
chmod +x build.py
./build.py all
```
92 changes: 92 additions & 0 deletions NuGet/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/python3
"""Script to build out the .Net dll's and package them into a Nuget Package for gtksharp3"""
import sys
from pybuild.profiles.GtkSharp import GtkSharp
from pybuild.profiles.GtkSharp_Core import GtkSharp_Core
from pybuild.profiles.Glue_Win32 import Glue_Win32
from pybuild.profiles.Glue_Win64 import Glue_Win64
from pybuild.profiles.Gtk_Win32 import Gtk_Win32
from pybuild.profiles.Gtk_Win64 import Gtk_Win64
from pybuild.Helper import Helper


# Ideally I'd like to see the GtkSharp Build system redone via the build system of .Net core (dotnet cli tool)
# and using Scons / Cuppa for the glue libraries
# For now though we rely on the use of make to build the .Net dll's
# under linux we run this natively, under windows we can use MSYS2

class Build(object):
# Clean the Build directory
@staticmethod
def clean():
"""Clean the build dir"""
Helper.emptydir('./build')
print("Clean finished")

# Print Usage
@staticmethod
def usage():
print("Please use GtkSharp3_Build.py <target> where <target> is one of")
print(" clean to clean the output directory: ./build")

print(" gtksharp to build .Net libs for GtkSharp, via .Net 4.5")
print(" gtksharp_core to build .Net libs for GtkSharp, via .Net 4.5 using the dotnet cli tool")

print(" gtk_win32 to build the Nuget package for GtkSharp.Win32")
print(" gtk_win64 to build the Nuget package for GtkSharp.Win64")
print(" all to make all")

def main(self):
if len(sys.argv) != 2:
self.usage()
return

if sys.argv[1] == 'all':
self.runbuild('gtksharp')
self.runbuild('gtk_win32')
self.runbuild('gtk_win64')
return

self.runbuild(sys.argv[1])

def runbuild(self, build_type):

if build_type == 'clean':
self.clean()
return

Helper.install_pacman_deps()

if build_type == 'gtksharp':
profile = GtkSharp()
profile.clean()
profile.build()
profile.copy()
profile.build_nuget()

elif build_type == 'gtksharp_core':
profile = GtkSharp_Core()
profile.clean()
profile.build()
profile.copy_dll()
profile.build_nuget()

elif build_type == 'gtk_win32':
profile_glue = Glue_Win32()
profile_glue.clean()
profile_glue.build()
profile_gtk = Gtk_Win32()
profile_gtk.build()
profile_gtk.build_nuget()

elif build_type == 'gtk_win64':
profile_glue = Glue_Win64()
profile_glue.clean()
profile_glue.build()
profile = Gtk_Win64()
profile.build()
profile.build_nuget()


if __name__ == "__main__":
Build().main()
11 changes: 11 additions & 0 deletions NuGet/misc/GtkSharp.Native.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyNativeDLLs" AfterTargets="AfterBuild">
<CreateItem Include="$(MSBuildThisFileDirectory)\*.dl_">
<Output TaskParameter="Include" ItemName="NativeDLLs" />
</CreateItem>

<Copy SourceFiles="@(NativeDLLs)" DestinationFiles="@(NativeDLLs->'$(OutDir)\%(RecursiveDir)%(Filename).dll')" />
</Target>
</Project>

16 changes: 16 additions & 0 deletions NuGet/misc/GtkSharp.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>GBD.GtkSharp</id>
<version>3.22.0</version>
<authors>Grbd</authors>
<owners>grbd</owners>
<licenseUrl>https://github.com/mono/gtk-sharp/blob/master/COPYING</licenseUrl>
<projectUrl>https://github.com/mono/gtk-sharp</projectUrl>
<iconUrl>https://upload.wikimedia.org/wikipedia/en/5/5f/Gtk_Sharp_Logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Gtk# is a .NET language binding for the GTK+ toolkit and assorted GNOME libraries. Gtk# is free software, licensed under the GNU LGPL.</description>
<copyright>Copyright 2016</copyright>
<tags>GTK3 GTK# gtk3-sharp</tags>
</metadata>
</package>
10 changes: 10 additions & 0 deletions NuGet/misc/GtkSharp.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyMapConfigs" AfterTargets="AfterBuild">
<CreateItem Include="$(MSBuildThisFileDirectory)\*.config">
<Output TaskParameter="Include" ItemName="MapConfigs" />
</CreateItem>

<Copy SourceFiles="@(MapConfigs)" DestinationFiles="@(MapConfigs->'$(OutDir)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
</Project>
101 changes: 101 additions & 0 deletions NuGet/pybuild/Helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/usr/bin/python3
"""Helper Functions"""

import os
from os.path import join

from executor import ExternalCommand


class Helper(object):
@staticmethod
def emptydir(top):
"""Empty a Directory"""
if top == '/' or top == "\\":
return
else:
for root, dirs, files in os.walk(top, topdown=False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
os.rmdir(os.path.join(root, name))

@staticmethod
def run_cmd(cmdarray, workdir):
"""Run a command on the shell"""
cmd = ExternalCommand(*cmdarray, capture=True, capture_stderr=True, async=True, shell=False, directory=workdir)
cmd.start()
last_out = ''
last_err = ''
while cmd.is_running:
new_out = cmd.stdout.decode(cmd.encoding, 'ignore').replace(last_out, '')
new_err = cmd.stderr.decode(cmd.encoding, 'ignore').replace(last_err, '')

last_out += new_out
last_err += new_err
new_out = new_out.replace(u"\u2018", "'").replace(u"\u2019", "'")
new_err = new_err.replace(u"\u2018", "'").replace(u"\u2019", "'")
if new_out != '':
print(new_out, end='')
if new_err != '':
print(new_err, end='')

if cmd.returncode != 0:
raise RuntimeError('Failure to run command')
return cmd

@staticmethod
def winpath_to_msyspath(winpath):
"""Convert a Windows path to a Msys type path"""
winpath = '/' + winpath[0] + winpath[2:].replace('\\', '/')
return winpath

@staticmethod
def get_gtksharp_version(srcdir):
"""Get the Version of GTK Sharp in use from the source directory"""
ret = None
with open(join(srcdir, 'configure.ac')) as f:
for line in f:
if line.startswith('AC_INIT'):
ret = line
ret = ret.replace('AC_INIT(gtk-sharp,', '')
ret = ret.replace(' ', '')
ret = ret.replace(')\n', '')
break
return ret

@staticmethod
def install_pacman_deps():
Helper.run_pacman_cmd(['-Sy'])

args = ['--needed', '--nodeps', '--noprogressbar', '--noconfirm', '-S']
args += 'unzip autoconf automake libtool pkg-config make'.split(' ')

deps_arch = 'gcc glib2 pango atk gtk3 zlib libiconv'
args += ['mingw-w64-i686-{0}'.format(i) for i in deps_arch.split(' ')]
args += ['mingw-w64-x86_64-{0}'.format(i) for i in deps_arch.split(' ')]

Helper.run_pacman_cmd(args)

@staticmethod
def run_pacman_cmd(pacman_args):
msyspath = 'C:\\msys64'
pacman_path = join(msyspath, 'usr\\bin\\pacman.exe')
return Helper.run_cmd([pacman_path] + pacman_args, msyspath)

@staticmethod
def get_gtk_version_msys(msyspath):
ret = ''
pacman_path = join(msyspath, 'usr\\bin\\pacman.exe')
# pull version from msys2 / pacman
# pacman -Qi mingw-w64-i686-gtk3
cmd = Helper.run_cmd([pacman_path, '-Qi', 'mingw-w64-i686-gtk3'], msyspath)

for line in cmd.output.split('\n'):
if 'Version' in line:
ret = line.replace('Version', '')
ret = ret.replace(' ', '').replace(':', '')
if '-' in ret:
ret = ret[:-2]
break
return ret
Loading