How to compile a vala GIMP plugin on Windows pc?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

How to compile a vala GIMP plugin on Windows pc?

Developers mailing 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing 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 <https://www.msys2.org>, 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

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

Liam R E Quin
In reply to this post by Developers mailing list
On Sun, 2020-12-27 at 21:50 -0800, Pen Guin via gimp-user-list wrote:
> 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.

What are you trying to do exactly?

Are you familiar with C programming?


--
ankh - full time slave in voluntary servitude

_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

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

Developers mailing list
In reply to this post by Developers mailing list
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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

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

Developers mailing list
These are incredibly unhelpful responses.

It is fine to evangelize if you are also providing useful information, but
one cannot simultaneously bemoan the lack of developers for a particular
platform 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 of
Vala support in 2.99.4 so someone must have had some success. I do have a
Windows 10 machine that I installed Debian on using WSL2 (I may have even
installed it from the Microsoft Store) - that may be an easier solution
than installing MSys2, but I cannot say authoritatively. If nothing else,
it may be a better first step to ensure you can build the plugin on
GIMP's primary development environment, then try it with MSys2.

If you can document your Windows Vala Plugin build process in the Wiki that
would be even better. This may be useful to get started:
https://wiki.gimp.org/wiki/Hacking:Building/Windows

Ideally, GIMP would provide a Windows SDK that plugins could be built
against, but I don't know if anyone has considered that. It's quite
possible that with GObject introspection simply installing the GIMP
executable provides that function and you only need a Vala compiler to
compile the Vala code (I don't know how linking works in that case, but it
sounds nice).

Chris


On Sun, Jan 3, 2021 at 5:52 PM Bill Ross via gimp-developer-list <
[hidden email]> 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:    [hidden email]
> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

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

Developers mailing list
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 <[hidden email]> Date: 1/3/21  6:48 PM  (GMT-08:00) To: gimp-developer <[hidden email]> 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 <[hidden email]> 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:    [hidden email]> 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:    [hidden email] 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing 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 <
[hidden email]> 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 <[hidden email]> Date: 1/3/21  6:48
> PM  (GMT-08:00) To: gimp-developer <[hidden email]>
> 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 <[hidden email]> 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:    [hidden email]> 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:    [hidden email] 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:    [hidden email]
> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing list
In reply to this post by Liam R E Quin
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 <[hidden email]> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Liam R E Quin
In reply to this post by Developers mailing list
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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing list
Thanks Liam, I'll give it go. Fingers crossed.

On Wednesday, January 6, 2021, Liam R E Quin <[hidden email]> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: How to compile a vala GIMP plugin on Windows pc?

Developers mailing 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.

_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list

gimp_dev_list_email_reply_ccc_error_attachment.txt (9K) Download Attachment