Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating plugins Windows 10
#1
Hi, all.  Has anyone managed to make a plugin in Windows 10 using Visual Studio or Code::Blocks?  I managed to find gimp-master.zip and gtk-master.zip but for the life of me can't seem to get it to compile.  Could someone give a quick run down of how to get it going in Windows?

Thanks.
Reply
#2
OK.  A little bit of progress.  I guess you would need to build a plugin from the command line:


Code:
gimptool-2.0.exe --build PluginName.c

However, it's complaining with this...

Code:
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
No output from 'pkg-config --cflags gimpui-2.0'

You can get it and it's dependencies here:

http://ftp.gnome.org/pub/gnome/binaries/..._win32.zip
http://ftp.gnome.org/pub/gnome/binaries/..._win32.zip
http://ftp.gnome.org/pub/gnome/binaries/..._win32.zip

Unfortunately, these don't work on my AMD 64-bit machine.  I'll keep digging.

Update.  You need to do the following to get pkg-config going...

Go to http://ftp.gnome.org/pub/gnome/binaries/...endencies/
Download the file pkg-config_0.26-1_win32.zip
Extract the file bin/pkg-config.exe to C:\MinGW\bin
Download the file gettext-runtime_0.18.1.1-2_win32.zip
Extract the file bin/intl.dll to C:\MinGW\bin
Go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
Download the file glib_2.28.8-1_win32.zip
Extract the file bin/libglib-2.0-0.dll to C:\MinGW\bin

Except now it's giving me this:

Code:
Package gimpui-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gimpui-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gimpui-2.0' found
No output from 'pkg-config --cflags gimpui-2.0'

I have no idea where gimpui-2.0.pc is located.  I'll keep digging.

I created a blank file named 'gimpui-2.0.pc' and dropped it in MinGW/bin
I've set PKG_CONFIG_PATH without quotations to MinGW/bin is located and it now says this:


Code:
Package 'gimpui-2.0' has no Name: field
No output from 'pkg-config --cflags gimpui-2.0'

Progress... but now I gotta' figure out what goes in this .pc file.
Reply
#3
Alrighty, looks like gimpui-2.0.pc contains:


Code:
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: GIMP UI
Description: GIMP User Interface Library
Version: @GIMP_REAL_VERSION@
Requires: gimp-@GIMP_PKGCONFIG_VERSION@ >= @GIMP_APP_VERSION@ gtk+-3.0 >= @GTK_REQUIRED_VERSION@
Libs: -L${libdir} -lgimpui-@GIMP_API_VERSION@ -lgimpwidgets-@GIMP_API_VERSION@ -lgimpmodule-@GIMP_API_VERSION@
Cflags: -I${includedir}/gimp-@GIMP_API_VERSION@

Now it's telling me this:

Code:
Package gimp-@GIMP_PKGCONFIG_VERSION@ was not found in the pkg-config search path.
Perhaps you should add the directory containing `gimp-@GIMP_PKGCONFIG_VERSION@.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gimp-@GIMP_PKGCONFIG_VERSION@', required by 'GIMP UI', not found
No output from 'pkg-config --cflags gimpui-2.0'

Is this some kind of cruel joke?  sigh... I'll keep going.
Reply
#4
OK.  I just said 'screw it' and filled in the fields


Code:
includedir=<my project path>/includes
libdir=<my project path>/libs

Name: GIMP UI
Description: GIMP User Interface Library
Version: 2.0
Libs: -L${libdir} -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0
Cflags: -I${includedir}/gimp-2.0

Now I get...


Code:
gcc  -I<my project path> -o'main' 'main.cpp' -mwindows -L<my project path> -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0
gcc: error: 'main.cpp': No such file or directory

Getting warmer... Damn, they do NOT make this easy.
Reply
#5
After that last error message, I'm wondering now as to where the contents of gimp-master.zip & gtk-master.zip should be located.  Should all these be added to the includes directory?
Reply
#6
Alright... I'm tapping out.  Include files are referencing header files that don't exist.  cairo.h comes to mind.  I only found a gimp-cairo.h and renaming it only breaks it more.  I guess the developers only test on Linux machines.

Good night and good luck.
Reply


Forum Jump: