Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-06 Thread Pen Guin via gimp-developer-list
 Hi Liam,


After trying: valac -X -DGETTEXT_PACKAGE="\"gimp\"" --pkg=gimp-3.0
--pkg=gimp-ui-3.0 goat-exercise-vala.vala

The old error is gone. I'm now getting a new/different error.

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x151d):
undefined reference to `gimp_plug_in_get_type'
collect2.exe: error: ld returned 1 exit status
Compilation failed: 1 error(s), 0 warning(s)
error: cc exited with status 1

>---> Full error report is attached.

Thanks.
goat-exercise-vala.vala.c: In function 'goat_real_create_procedure':
goat-exercise-vala.vala.c:156:112: warning: passing argument 4 of 
'gimp_image_procedure_new' from incompatible pointer type 
[-Wincompatible-pointer-types]
  156 |  _tmp0_ = (GimpImageProcedure*) gimp_image_procedure_new ((GimpPlugIn*) 
self, name, GIMP_PDB_PROC_TYPE_PLUGIN, _goat_run_gimp_run_image_func, 
g_object_ref (self), g_object_unref);
  | 
   ^
  | 
   |
  | 
   GimpValueArray * (*)(GimpProcedure *, 
GimpRunMode,  GimpImage *, GimpDrawable *, GimpValueArray *, void *)
In file included from C:/msys64/mingw64/include/libgimp/gimp.h:49,
 from goat-exercise-vala.vala.c:27:
C:/msys64/mingw64/include/libgimp/gimpimageprocedure.h:86:66: note: expected 
'GimpRunImageFunc' {aka 'GimpValueArray * (*)(GimpProcedure *, GimpRunMode,  
GimpImage *, GimpDrawable *, const GimpValueArray *, void *)'} but argument is 
of type 'GimpValueArray * (*)(GimpProcedure *, GimpRunMode,  GimpImage *, 
GimpDrawable *, GimpValueArray *, void *)'
   86 |GimpRunImageFunc  
run_func,
  |
~~^~~~
goat-exercise-vala.vala.c: In function 'goat_run':
goat-exercise-vala.vala.c:267:10: warning: assignment to 'GtkBox *' from 
incompatible pointer type 'GtkWidget *' [-Wincompatible-pointer-types]
  267 |   _tmp6_ = gtk_dialog_get_content_area ((GtkDialog*) _tmp5_);
  |  ^
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x28): undefined 
reference to `gimp_main'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x1e2): undefined 
reference to `gimp_image_procedure_new'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x201): undefined 
reference to `gimp_procedure_set_image_types'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x214): undefined 
reference to `gimp_procedure_set_menu_label'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x235): undefined 
reference to `gimp_procedure_set_documentation'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x248): undefined 
reference to `gimp_procedure_add_menu_path'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x269): undefined 
reference to `gimp_procedure_set_attribution'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x27c): undefined 
reference to `gimp_procedure_set_icon_name'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x2ae): undefined 
reference to `gimp_standard_help_func'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x500): undefined 
reference to `gimp_ui_init'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x5c1): undefined 
reference to `gimp_dialog_new'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 C:\msys64\tmp\ccmvXvml.o:goat-exercise-vala.vala.c:(.text+0x817): 

Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-06 Thread Pen Guin via gimp-developer-list
Thanks Liam, I'll give it go. Fingers crossed.

On Wednesday, January 6, 2021, Liam R E Quin  wrote:

> On Tue, 2021-01-05 at 20:17 -0800, Pen Guin wrote:
> > ?
> >
> > > ---> Tried again:
> > valac -X -DGETTEXT_PACKAGE="..." --pkg=gimp-3.0 --pkg=gimp-ui-3.0
> > goat-exercise-vala.vala
>
> sorry, somehow i missed the attachmetns before.
>
> Where did you get -DGETTEXT_PACKAGE="..." from? I think in the
> stackoverflow answer that features it, ... is meat to be an example.
>
> You could try, -DGETTEXT_PACKAGE="\"gimp\"" maybe; it shuld evaluate to
> a C string.
>
> >
> https://gitlab.gnome.org/GNOME/vala/-/issues/98
> has a suggested workaround.
>
>
>
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-05 Thread Liam R E Quin
On Tue, 2021-01-05 at 20:17 -0800, Pen Guin wrote:
> 
> > ---> First few lines of the error report:
> goat-exercise-vala.vala.c: In function 'goat_real_create_procedure':
> goat-exercise-vala.vala.c:156:112: warning: passing argument 4 of
> 'gimp_image_procedure_new' from incompatible pointer type

this is a warning, not an error. Capture the full log, and maybe use
pastebin.com or pastie.org or include it as a text file attachment.
> > 

Usually with a compiler the actual error is at or near the end of the
output.


___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-04 Thread Pen Guin via gimp-developer-list
Thanks Liam for the files. I'm gonna try and compile the plugin. I hope
I'll have something positive to report shortly.

Thanks for all your help.

Bye.

On Monday, January 4, 2021, Liam R E Quin  wrote:

> On Mon, 2021-01-04 at 09:15 -0800, Pen Guin wrote:
> > Hi Liam,
> >
> > I've been unable to track down the specified vapi files. I've tried
> > google,
> > github, gitlab; so far no luck. These are not available at GIMP
> > master
> > branch either. Should I open a Request-Ticket at GIMP bug tracker,
> > asking
> > the devs to share these files?
> They are built automatically when gimp is compiled, and should be
> included in the release; it would be fine to file a bug requesting that
> they be included so people can build vala plugins.
>
> I can send you the ones i have (built on Linux, though). The .deps
> files are probably not useful as i expect they refer to versions of
> libraries, but these are all text files so you can look at them and
> see.
>
> It's  always best to copy the mailing list on replies - someone else on
> the list may have exactly what you need for Windows.
>
> You'll also need libgimp.dll to link the plugin against. I don't know
> if we've updated gimptool to know about vala yet, if so it'll show you
> where the vapi files should be. I'm sorry this is so rough round the
> edges - if you manage to et something working and feel up to writing it
> up on the gimp wiki that would help a lot of people, i expect.
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-04 Thread Bill Ross via gimp-developer-list

Curses, foiled again! :-)

Glad it's gotten easier, I keep thinking MS might go with the nix in the 
end, once someone looks at the amount of internal effort it takes given 
the nix are so mature, respected, and supported.


Bill

On 1/3/21 11:43 PM, Liam R E Quin wrote:

On Sun, 2021-01-03 at 22:35 -0800, Pen Guin via gimp-developer-list
wrote:

Thanks everyone, for your valuable input.

STATUS UPDATE:

* I have installed msys2 on my windows 8 pc.

haha thank you for proving us wrong! ;:-) that's awesome. (and i'm not
being sarcastic)


--
Phobrain.com
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-03 Thread Liam R E Quin
On Sun, 2021-01-03 at 22:35 -0800, Pen Guin via gimp-developer-list
wrote:
> Thanks everyone, for your valuable input.
> 
> STATUS UPDATE:
> 
> * I have installed msys2 on my windows 8 pc.

haha thank you for proving us wrong! ;:-) that's awesome. (and i'm not
being sarcastic)

> Question 1: To get GIMP header files and vapi (binding) file/s, which
> version/repo of GIMP should I download? Please specify exact url link
> of the resource to avoid possible mixup.
> 
> 
> Question 2: Please specify path of the folder/folder-tree where GIMP
> header files are stored.

You need gimp-ui-3.0.vapi and gimp-3.0.vapi;also bable-0.1.vapi and
gegl-0.4.vapi; on Linux these end up in $PREFIX/share/vala/vapi - i'm
not sure about Windows installs, sorry, maybe someone else can help
with that. But they should be included.

You'll also want to find gimptool-2.99; this has an option to build a
plugin from source, although i don't know if it  works for vala i don't
see why not. You may need to generate the C first using vala, as you
found. I found examples on the Web of people using gimptool in MINGW.

You should have everything you need, depending on where you got gimp.


It's  more  of a mess than usual right now for gimp 2.99.x or gimp 3,
as a lot of API stuff is in transition to 3.0 and instrospection.

liam


___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2021-01-03 Thread Pen Guin via gimp-developer-list
Thanks everyone, for your valuable input.

STATUS UPDATE:

* I have installed msys2 on my windows 8 pc.
* I have installed vala development tools (and its dependencies, gcc
compiler, etc) also.
* I am able to compile vala prog/scripts successfully. This includes
standalone prog/scripts as well as library dependent prog/scripts.
* As an example of 3rd party library prog compilation: I installed
Gtk3 library. Later, I compiled my sample prog/script via: valac
--pkg=gtk+-3.0 testing_gtk.vala
The prog compiled without any warnings and it is working ok.

* UNRESOLVED ISSUE: Compiling GIMP 2.99.x plugin using vala:

In order to compile a prog/script/plugin relating to a 3rd party
library, vala requires:
1) C Header files of that library
2) Vapi (binding) file/s of that library

Question 1: To get GIMP header files and vapi (binding) file/s, which
version/repo of GIMP should I download? Please specify exact url link
of the resource to avoid possible mixup.


Question 2: Please specify path of the folder/folder-tree where GIMP
header files are stored.


Question 3: Please specify path of the folder/folder-tree where vala
vapi (binding) files are stored.

Any other tips, guidance in this regard shall be appreciated.

Thanks.



On Monday, January 4, 2021, Bill Ross via gimp-developer-list <
gimp-developer-list@gnome.org> wrote:

> To be clear, I don't speak for gimp, haven't worked on it even, but did
> look into Windows programming for a possible job during a dry spell, and
> I'd rather code in COBOL with vi. So, sorry the intent was wasted.
> :-)BillAI:http://phobrain.com/pr/home/view.html
>  Original message From: Christopher Curtis via
> gimp-developer-list  Date: 1/3/21  6:48
> PM  (GMT-08:00) To: gimp-developer 
> Subject: Re: [Gimp-developer] [Gimp-user] How to compile a vala GIMP plugin
>   on Windows pc? These are incredibly unhelpful responses.It is fine to
> evangelize if you are also providing useful information, butone cannot
> simultaneously bemoan the lack of developers for a particularplatform and
> also chastise those developing on that platform.To the original questioner,
> I would suggest following Jernej's advice. I,unfortunately, don't regularly
> use Windows or Vala, but there are claims ofVala support in 2.99.4 so
> someone must have had some success. I do have aWindows 10 machine that I
> installed Debian on using WSL2 (I may have eveninstalled it from the
> Microsoft Store) - that may be an easier solutionthan installing MSys2, but
> I cannot say authoritatively. If nothing else,it may be a better first step
> to ensure you can build the plugin onGIMP's primary development
> environment, then try it with MSys2.If you can document your Windows Vala
> Plugin build process in the Wiki thatwould be even better. This may be
> useful to get started:https://wiki.gimp.org/wiki/Hacking:Building/
> WindowsIdeally, GIMP would provide a Windows SDK that plugins could be
> builtagainst, but I don't know if anyone has considered that. It's
> quitepossible that with GObject introspection simply installing the
> GIMPexecutable provides that function and you only need a Vala compiler
> tocompile the Vala code (I don't know how linking works in that case, but
> itsounds nice).ChrisOn Sun, Jan 3, 2021 at 5:52 PM Bill Ross via
> gimp-developer-list  wrote:> If you can
> find any online docs on Windows programming, that should> finish convincing
> you.>> Bill>> On 1/3/21 12:36 PM, Ruben Safir wrote:> > Save yourself a
> life time of trouble and switch ovr the a GNU system now> --> Phobrain.com>
> ___> gimp-developer-list
> mailing list> List address:gimp-developer-list@gnome.org> List
> membership:> https://mail.gnome.org/mailman/listinfo/gimp-developer-list>
> List archives:   https://mail.gnome.org/archives/gimp-developer-list>_
> __gimp-developer-list mailing
> listList address:gimp-developer-list@gnome.orgList membership:
> https://mail.gnome.org/mailman/listinfo/gimp-developer-listList
> archives:   https://mail.gnome.org/archives/gimp-developer-list
> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-
> developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2020-12-28 Thread Jernej Simončič via gimp-developer-list
On Monday, December 28, 2020, 06:50:54, Pen Guin via gimp-developer-list wrote:

> I want to compile the goat-exercise vala plugin shipped with GIMP.  Can
> anyone please tell me how can I compile a vala plugin on my pc? What other
> softwares AND/OR dependent-files do I need to download? What command and
> attributes do I need to pass to the vala compiler to get a working exe
> without any errors?

You will have to install MSys2 from , and then set up 
environment inside MSys2 - install GTK+ 3, gegl, babl etc. You can then follow 
the guides for compiling GIMP on Linux.

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >

Estimating a figure may be enough to catch an error.
   -- Berkeley's Fifteenth Law

___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] How to compile a vala GIMP plugin on Windows pc?

2020-12-27 Thread Pen Guin via gimp-developer-list
Hi,

I have downloaded GIMP 2.99.4 on my Windows 8 pc.

I want to compile the goat-exercise vala plugin shipped with GIMP.  Can
anyone please tell me how can I compile a vala plugin on my pc? What other
softwares AND/OR dependent-files do I need to download? What command and
attributes do I need to pass to the vala compiler to get a working exe
without any errors?

 Thanks.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list