Re: [gedit-list] Confusion writing a Gedit plugin



Il giorno dom, 19/06/2005 alle 17.02 -0400, Tony Nelson ha scritto:
> I first tried installing the Gedit source from the CVS tree, but found that
> it required various things newer than in FC3, or even FC4.  At my stage of
> understanding, that approach seemed like a bad idea, so I rm'd the CVS
> sources and got the FC3 source rpm.  It may be that I should remove other
> things as well?
> 

If you never run make install rm the directory is enough.

> I then installed the Gedit source rpm from FC3 (downloaded from Fedora site
> into ~, rpm -i'd into my own ~/rpmbuild dir, rpmbuild  --recompile -bp),
> ./configure'd and make'd it, and it seemed to build correctly.  Then the
> confusion started.  Possibly I have somehow managed to mix versions of
> stuff when I first tried to use the Gedit source from the main CVS tree.
> 

Honestly I'm not very familiar with source rpms...

Let me note some things:
- Fedora should have a gedit-dev package which shoud allow to develop
plugins for gedit without recompilig gedit itself (if such package
doesn't exists, it's a fedora bug and you shoud report it to the fedora
folks). Obviosly if you want to build the sample plugin, you would still
need to use the gedit sources since the plugin is included there.

- In general if you are interested in developement, the best thing is to
properly assemble a developing environment using all the required
versions from cvs, since targetting a year old release is not the best
thing... however if you are just experimenting, it is completely
understandable that you can't be bothered to build everything from cvs. 
I however suggest you to grab gedit from cvs anyway by using the
gedit-2-8 branch: "cvs -z3
-d:pserver:anonymous anoncvs gnome org:/cvs/gnome co -r gedit-2-8 gedit"
At that point, assuming you already have all the required dev packages,
you just need to run ./autogen.sh, run make and make install.

When you add a directory and modify configure.in and Makefile.am, just
rerun ./autogen.sh, which takes care of rerunning autoconf, automake etc


> Now I want to install the plugin into Gedit.  I don't see how to do that
> (either).  Copying all the likely files from my plugin's source dir into
> ~/.gedit-2/plugins didn't seem to be quite enough, as the checkbox for it
> in Edit menu Preferences dialog Plugins tab is disabled.  Where should I
> put the new plugin's files?

If you build your plugin from inside the gedit source tree (that is by
adding it to configure.in), than make install will already install your
plugin.

If you build your plugin separately (for instance writing your own
makefile), then dropping the .so and the .gedit-plugin file in
~/.gedit-2/plugins should be enough.

Hope that helps

	Paolo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]