Re: Gtkd and libgtksourceview

2019-10-31 Thread Ron Tarrant via Digitalmars-d-learn

On Thursday, 31 October 2019 at 11:47:41 UTC, Mike Wey wrote:

girtod can be found here: 
https://github.com/gtkd-developers/gir-to-d


It's a tool that generates a D Binding from GObject 
Introspection files, if you use the GTK installer from the gtkd 
website or msys2 the needed introspection (.gir) files should 
be installed on your system.


Running the command above in the root of the GtkD project, will 
regenerate the source based on the gir files found on your 
system.


The last two options passed to girtod are for backwards 
compatibility with older version of GtkD, and aren't needed for 
new bindings.


And technically you could also run: "girtod -i GSource-3.0.gir" 
and it will create a "out" directory with a GtkSourceview 
binding that should be fairly complete.


Okay, thanks, Mike. I'll try to set aside some time next week to 
dig into this.


Re: Gtkd and libgtksourceview

2019-10-31 Thread Mike Wey via Digitalmars-d-learn

On 31-10-2019 12:16, Ron Tarrant wrote:

On Wednesday, 30 October 2019 at 22:26:41 UTC, Mike Wey wrote:


---
girtod -i src --use-runtime-linker --use-bind-dir
---


Hmmm... I'll need more information, I'm afraid. I Googled, but I'm not 
finding any instructions for building these DLLs.


girtod can be found here: https://github.com/gtkd-developers/gir-to-d

It's a tool that generates a D Binding from GObject Introspection files, 
if you use the GTK installer from the gtkd website or msys2 the needed 
introspection (.gir) files should be installed on your system.


Running the command above in the root of the GtkD project, will 
regenerate the source based on the gir files found on your system.


The last two options passed to girtod are for backwards compatibility 
with older version of GtkD, and aren't needed for new bindings.


And technically you could also run: "girtod -i GSource-3.0.gir" and it 
will create a "out" directory with a GtkSourceview binding that should 
be fairly complete.


--
Mike Wey


Re: Gtkd and libgtksourceview

2019-10-31 Thread Ron Tarrant via Digitalmars-d-learn

On Wednesday, 30 October 2019 at 22:26:41 UTC, Mike Wey wrote:


---
girtod -i src --use-runtime-linker --use-bind-dir
---


Hmmm... I'll need more information, I'm afraid. I Googled, but 
I'm not finding any instructions for building these DLLs.


Re: Gtkd and libgtksourceview

2019-10-30 Thread bioinfornatics via Digitalmars-d-learn

On Wednesday, 30 October 2019 at 22:26:41 UTC, Mike Wey wrote:

On 30-10-2019 20:17, Ron Tarrant wrote:

[...]


Thanks.


[...]


The installer could use an update, Sourceview 4 is available 
for windows.



[...]


For windows there isn't an easy command to regenerate the 
source, but running this command should work (Its been a while 
since i tried it on windows):


---
girtod -i src --use-runtime-linker --use-bind-dir
---


Thanks a lot Mike and Ron for your help.

Have a nice day


Re: Gtkd and libgtksourceview

2019-10-30 Thread Mike Wey via Digitalmars-d-learn

On 30-10-2019 20:17, Ron Tarrant wrote:

On Wednesday, 30 October 2019 at 18:00:24 UTC, Mike Wey wrote:

GtkSourceview was updated to 4.x in GtkD version 3.9.0, so any older 
version should work with GtkSourceview 3.


Welcome back, Mike...


Thanks.

The latest Windows runtime available on the GtkD downloads page installs 
libgtksourceview-3.0-1.dll, not the 4.0 version, so I suspect the Linux 
libraries may be out of step, too.


The installer could use an update, Sourceview 4 is available for windows.

If you need Sourceview 3 in the newer version of GtkD you could 
replace `file: GtkSource-4.gir` with `file: GtkSource-3.0.gir` in 
`src/APILookupSourceView.txt` and then run `make generate` (requires 
girtod) and you should have a up to date binding for Sourceview 3.


Just for the record, this doesn't work on Windows. I made the change in 
APILookupSourceView.txt and re-ran Build.d, but 
sourceview/gsv/c/functions.d still shows:


version (Windows)
 static immutable LIBRARY_GSV = ["libgtksourceview-4-0.dll"];
else version (OSX)
 static immutable LIBRARY_GSV = ["libgtksourceview-4.0.dylib"];
else
 static immutable LIBRARY_GSV = ["libgtksourceview-4.so.0"];



For windows there isn't an easy command to regenerate the source, but 
running this command should work (Its been a while since i tried it on 
windows):


---
girtod -i src --use-runtime-linker --use-bind-dir
---


--
Mike Wey


Re: Gtkd and libgtksourceview

2019-10-30 Thread Ron Tarrant via Digitalmars-d-learn

On Wednesday, 30 October 2019 at 18:00:24 UTC, Mike Wey wrote:

GtkSourceview was updated to 4.x in GtkD version 3.9.0, so any 
older version should work with GtkSourceview 3.


Welcome back, Mike...

The latest Windows runtime available on the GtkD downloads page 
installs libgtksourceview-3.0-1.dll, not the 4.0 version, so I 
suspect the Linux libraries may be out of step, too.


If you need Sourceview 3 in the newer version of GtkD you could 
replace `file: GtkSource-4.gir` with `file: GtkSource-3.0.gir` 
in `src/APILookupSourceView.txt` and then run `make generate` 
(requires girtod) and you should have a up to date binding for 
Sourceview 3.


Just for the record, this doesn't work on Windows. I made the 
change in APILookupSourceView.txt and re-ran Build.d, but 
sourceview/gsv/c/functions.d still shows:


version (Windows)
static immutable LIBRARY_GSV = ["libgtksourceview-4-0.dll"];
else version (OSX)
static immutable LIBRARY_GSV = ["libgtksourceview-4.0.dylib"];
else
static immutable LIBRARY_GSV = ["libgtksourceview-4.so.0"];



Re: Gtkd and libgtksourceview

2019-10-30 Thread Mike Wey via Digitalmars-d-learn

On 30-10-2019 15:48, bioinfornatics wrote:

Dear,

I tried the latest gtkd release and it try to open dynamically 
libgtksourceview-4.so.0 however  I have only libgtksourceview-3.so.1


so which version should I used to be compatible with libgtksourceview-3 
(I use centos 7)




GtkSourceview was updated to 4.x in GtkD version 3.9.0, so any older 
version should work with GtkSourceview 3.


If you need Sourceview 3 in the newer version of GtkD you could replace 
`file: GtkSource-4.gir` with `file: GtkSource-3.0.gir` in 
`src/APILookupSourceView.txt` and then run `make generate` (requires 
girtod) and you should have a up to date binding for Sourceview 3.


--
Mike Wey


Re: Gtkd and libgtksourceview

2019-10-30 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 30 October 2019 at 14:48:23 UTC, bioinfornatics 
wrote:


so which version should I used to be compatible with 
libgtksourceview-3 (I use centos 7)


When Mike Wey gets back in town (any day now) he should be able 
to provide a solution that's less of a kludge.


Re: Gtkd and libgtksourceview

2019-10-30 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 30 October 2019 at 14:48:23 UTC, bioinfornatics 
wrote:


I tried the latest gtkd release and it try to open dynamically 
libgtksourceview-4.so.0 however  I have only 
libgtksourceview-3.so.1


On Windows, I had to change a line in 
C:\D\dmd2\src\sourceview\gsv\c\functions.d from:


static immutable LIBRARY_GSV = ["libgtksourceview-4.0.dll"];

to:

static immutable LIBRARY_GSV = ["libgtksourceview-3.0-1.dll"];


Assuming the sourceview/gsv/c/functions.d exists on Linux as 
well, a similar change should help.


However, you will also, very likely, have to look for a folder in 
generated/ called:


"sourceview"

and copy it and its contents to:

dmd2/src/

And I have no idea where you'll find the dmd2/src/ folder on 
Linux. But, assuming you can find it, this may get you up and 
running.


Let me know how it goes.


Gtkd and libgtksourceview

2019-10-30 Thread bioinfornatics via Digitalmars-d-learn

Dear,

I tried the latest gtkd release and it try to open dynamically 
libgtksourceview-4.so.0 however  I have only 
libgtksourceview-3.so.1


so which version should I used to be compatible with 
libgtksourceview-3 (I use centos 7)


Code:

$ ldc2 container_014_10_notebook_basic.d 
-I=$LDC2_ROOT/include/d/gtkd-3 -L=-lgtk-3 -L=-latk-1.0 
-L=-lgtkd-3 -L=-lgtkdgl-3 -L=-lgtkdsv-3 -of container

$ ./container
object.Exception@generated/gtkd/gtkd/Loader.d(125): Library load 
failed (libgtksourceview-4.so.0): libgtksourceview-4.so.0: cannot 
open shared object file: No such file or directory

Illegal instruction (core dumped)