Re: Building glib-genmarshal (while building glib)

2017-08-25 Thread John Emmas

On 24/08/2017 18:46, Emmanuele Bassi wrote:

Could you please open a bug?

Thanks Emmanuele. *Bug 786785* 
 submitted this morning.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-24 Thread Emmanuele Bassi
Could you please open a bug?

Ciao,
 Emmanuele.

On 24 August 2017 at 18:37, John Emmas  wrote:
> On 19/08/2017 12:16, John Emmas wrote:
>
>
> I still don't understand why this line (in commit #fe2a9887a8):-
>
> elif os.name == 'nt'
>
> got changed to this:-
>
> elif os.basename(filedir) == 'bin'
>
> They clearly don't do the same thing...
>
> Any thoughts anyone?
>
>
> Was it maybe intended to be this..?
>
> elif os.basename(filedir) != 'bin'
>
> ___
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>



-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-24 Thread John Emmas

On 19/08/2017 12:16, John Emmas wrote:


I still don't understand why this line (in commit #fe2a9887a8):-

elif os.name == 'nt'

got changed to this:-

elif os.basename(filedir) == 'bin'

They clearly don't do the same thing...

Any thoughts anyone?


Was it maybe intended to be this..?

elif os.basename(filedir) != 'bin'
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-19 Thread John Emmas

On 18/08/2017 08:38, John Emmas wrote:


AFAICT this problem got introduced by commit #fe2a9887a8 - in 
particular the change to 'gdbus-codegen.in' (line 30) which previously 
looked like this:-


elif os.name == 'nt':

but it got changed to this:-

elif os.basename(filedir) == 'bin'

Changing that line back again fixes the problem for me.



Maybe this'll make sense to someone... just after the following line (in 
'gdbus-codegen.in'):-


  sys.path.insert(0, os.path.abspath(path))

I inserted another line, like so:-

  print(sys.path)

On my system, this outputs a path string which happens to start with the 
following folder (notice the double backslashes):-


  F:\\GTK-SOURCES\\gnu-windows\\src\\MB3Glib\\gio\\gdbus-2.0

AFAICT the double-backslashes aren't contributing to the problem. The 
problem only occurs if that specific path is in my list of path strings 
(any other paths work fine).


I guess this could end up being a problem on my particular system - or 
maybe that specific path causes some build problem (an infinite loop maybe?)


Having said all that, I still don't understand why this line (in commit 
#fe2a9887a8):-


elif os.name == 'nt'

got changed to this:-

elif os.basename(filedir) == 'bin'

They clearly don't do the same thing...

Any thoughts anyone?  John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-18 Thread John Emmas

On 17/08/2017 16:48, John Emmas wrote:


Any other Windows devs able to reproduce this or is it just me..?  
I've tried with python2.7, python3.1 and python3.3 and I see the same 
problem with all of them  :-(




AFAICT this problem got introduced by commit #fe2a9887a8 - in particular 
the change to 'gdbus-codegen.in' (line 30) which previously looked like 
this:-


elif os.name == 'nt':

but it got changed to this:-

elif os.basename(filedir) == 'bin'

Changing that line back again fixes the problem for me.  I haven't yet 
tried linking anything to the built libraries - but the build itself now 
completes successfully.  My guess is that whoever made that change is 
possibly cross-building (from Linux?) whereas a genuine Windows build 
won't work any more.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-17 Thread John Emmas

On 16/08/2017 09:11, John Emmas wrote:


Am I right in thinking that the gdbus-godegen stuff does still need to 
get built (i.e. generated)?


[...].

The script ran fine with my older version of gdbus-codegen (and still 
does)  But it won't work with the latest version  :-(


In case it's any help, it seems to be bombing out at line 196 of 
'codegen_main.py' - where I get this output:-


  line 196, in codegen_main
gen = codegen.CodeGenerator(all_ifaces,
  AttributeError: 'module' object has no attribute 'CodeGenerator'



Any other Windows devs able to reproduce this or is it just me..?  I've 
tried with python2.7, python3.1 and python3.3 and I see the same problem 
with all of them  :-(


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-16 Thread John Emmas

On 15/08/2017 11:56, John Emmas wrote:




if I modify that command to substitute the new 'gdbus-codegen' 
(rather than the older 'gdbus-codegen.in') I get build errors. I'm 
guessing that maybe the command itself needs to be modified now?  Or 
if it looks okay to you guys, I'll supply some more information about 
the errors I'm seeing.




Am I right in thinking that the gdbus-godegen stuff does still need to 
get built (i.e. generated)?  Here's the command that I'm using:-


  python "gdbus-2.0/codegen/gdbus-codegen" --interface-prefix org. \
 --generate-c-code gdbus-daemon-generated --c-namespace 
_G dbus-daemon.xml


Is there anyone building on Windows who could try that command for me? 
As long as the relevant paths are set up, it'll work from a Command 
Prompt (though you'd need to get rid of the backslash and put everything 
on the same line).


I run it from this folder:-

  \Glib\gio

The script ran fine with my older version of gdbus-codegen (and still 
does)  But it won't work with the latest version  :-(


In case it's any help, it seems to be bombing out at line 196 of 
'codegen_main.py' - where I get this output:-


  line 196, in codegen_main
gen = codegen.CodeGenerator(all_ifaces,
  AttributeError: 'module' object has no attribute 'CodeGenerator'

Thanks...

John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-15 Thread John Emmas

On 14/08/2017 16:47, Chun-wei Fan (范君維) wrote:


Take a look at this commit in GLib[1] for glib-genmarshal.  So, for 
Windows, after running the script to generate glib-genmarshal, 
assuming that you are running it in cmd.exe or your Visual Studio 
projects, instead of running it as "glib-genmarshal(.exe) arguments to it>", you do " glib-genmarshal> ", as you would running a 
Python script.  Note that I dropped the projects to build 
glib-genmarshal.exe from the Visual Studio projects.


You have to do likewise for glib-mkenums, by changing "interpretor>  ..." to " 
 ..."




Ah, I get it now!  Thanks guys.

Two of the three python scripts are working fine now but there's a 
problem with gdbus-codegen.  Here's the command I previously used with 
the older file (gdbus-codegen.in) :-


  python "gdbus-2.0/codegen/gdbus-codegen.in" --interface-prefix org. \
 --generate-c-code gdbus-daemon-generated --c-namespace 
_G dbus-daemon.xml


but if I modify that command to substitute the new 'gdbus-codegen' 
(rather than the older 'gdbus-codegen.in') I get build errors.  I'm 
guessing that maybe the command itself needs to be modified now?  Or if 
it looks okay to you guys, I'll supply some more information about the 
errors I'm seeing.  Thanks again,


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-14 Thread 范君維

Hi John,

Take a look at this commit in GLib[1] for glib-genmarshal.  So, for 
Windows, after running the script to generate glib-genmarshal, assuming 
that you are running it in cmd.exe or your Visual Studio projects, 
instead of running it as "glib-genmarshal(.exe) ", 
you do "  arguments to it>", as you would running a Python script.  Note that I 
dropped the projects to build glib-genmarshal.exe from the Visual Studio 
projects.


You have to do likewise for glib-mkenums, by changing "interpretor>  ..." to " 
 ..."


With blessings, and cheers!

[1]: 
https://git.gnome.org/browse/glib/commit/?id=a00e7ed32e510791016725ce0a3dc08f59b9a443



John Emmas 於 2017/8/13 上午 01:34 寫道:

On 12/08/2017 17:51, Bastien Nocera wrote:

There's no C to generate, it's been ported to Python.

So 'glib-genmarshal.exe' doesn't need to get generated any more? When 
I read about the port to python, I assumed it was just that the 
original perl scripts had been ported to python.


For glib-mkenums, the 'C' files are still getting generated, I think 
(gioenumtypes.c + gioenumtypes.h) ?.  Maybe I'm wrong about that...


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread John Emmas

On 12/08/2017 17:51, Bastien Nocera wrote:

There's no C to generate, it's been ported to Python.

So 'glib-genmarshal.exe' doesn't need to get generated any more? When I 
read about the port to python, I assumed it was just that the original 
perl scripts had been ported to python.


For glib-mkenums, the 'C' files are still getting generated, I think 
(gioenumtypes.c + gioenumtypes.h) ?.  Maybe I'm wrong about that...


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread John Emmas

On 12/08/2017 17:42, Ignacio Casal Quinteiro wrote:

Hey John,

Have u thought about using gvsbuild so we unite efforts building stuff 
with msvc?




Hi Ignacio,

At the moment I'm still building GTK+2 so it might not be relevant?  
Maybe a year or two ago, Microsoft itself was planning to release an 
"official" version of the GTK stack for Windows. Dunno whatever happened 
to it...


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread Bastien Nocera
On Sat, 2017-08-12 at 16:45 +0100, John Emmas wrote:
> On 12/08/2017 14:04, Sébastien Wilmet wrote:
> > >From the news file for version 2.53.4:
> > 
> > https://git.gnome.org/browse/glib/tree/NEWS
> > 
> > * glib-genmarshal and glib-mkenums have been rewritten in python.
> >   Every effort has been made to keep compatibility. Please report
> >   problems related to these tools
> > 
>  
> Thanks Sebastien,
> 
> Although I'm building with MSVC I don't use the official MSVC
> projects (mostly because I need to build 3 x targets:- 1) Debug
> build, 2) Release build and 3) Debuggable Release build).  I've
> figured out how to generate the file called "glib-genmarshal" -
> namely,

It'll be generated by configure, simply replace the python executable:
https://git.gnome.org/browse/glib/tree/gobject/glib-genmarshal.in

> python.exe  gen_util_scripts.py --type=glib-genmarshal --
> version=$(GlibVersion)
> 
> But I'm then stuck...  I can't figure out how to use that file to
> generate 'glib-genmarshal.c' (and/or any other files which need to
> get generated from it).

There's no C to generate, it's been ported to Python.

>   Can someone tell me the relevant command?  It isn't likely that
> this issue will affect anyone else.  Thanks,
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread John Emmas

On 12/08/2017 14:04, Sébastien Wilmet wrote:

>From the news file for version 2.53.4:

https://git.gnome.org/browse/glib/tree/NEWS

* glib-genmarshal and glib-mkenums have been rewritten in python.
   Every effort has been made to keep compatibility. Please report
   problems related to these tools



Thanks Sebastien,

Although I'm building with MSVC I don't use the official MSVC projects 
(mostly because I need to build 3 x targets:- 1) Debug build, 2) Release 
build and 3) Debuggable Release build).  I've figured out how to 
generate the file called "glib-genmarshal" - namely,


python.exe  gen_util_scripts.py --type=glib-genmarshal 
--version=$(GlibVersion)


But I'm then stuck...  I can't figure out how to use that file to 
generate 'glib-genmarshal.c' (and/or any other files which need to get 
generated from it).  Can someone tell me the relevant command?  It isn't 
likely that this issue will affect anyone else.  Thanks,


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread Tim-Philipp Müller
On Sat, 2017-08-12 at 13:54 +0100, John Emmas wrote:

Hi John,

> What's happened to 'glib-genmarshal.c'?  It seems to have been
> removed from git master - although (AFAICT) it doesn't get auto-
> generated. A new file does get generated (gobject/glib-genmarshal)
> but i can't see how that gets used to generate glib-
> genmarshal.c..  What am I missing??  
> (I'm building on Windows BTW).

It has been rewritten in python, so there's nothing to compile any
more.

Cheers
 -Tim
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Building glib-genmarshal (while building glib)

2017-08-12 Thread Sébastien Wilmet
On Sat, Aug 12, 2017 at 01:54:29PM +0100, John Emmas wrote:
> What's happened to 'glib-genmarshal.c'?  It seems to have been removed from
> git master - although (AFAICT) it doesn't get auto-generated.  A new file
> does get generated (gobject/glib-genmarshal) but i can't see how that gets
> used to generate glib-genmarshal.c..  What am I missing??  (I'm building on
> Windows BTW).

>From the news file for version 2.53.4:

https://git.gnome.org/browse/glib/tree/NEWS

* glib-genmarshal and glib-mkenums have been rewritten in python.
  Every effort has been made to keep compatibility. Please report
  problems related to these tools

--
Sébastien
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list