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



At 11:02 AM +0200 6/20/05, Paolo Borelli wrote:

Thank you for your response.

You don't mention any documentaion.  Is there any, beyond (from my original
message):

>I've been following the directions at
><http://live.gnome.org/GeditPluginHowto> , but apparently extra steps are
>needed to turn the changed or new Makefile.am and configure.in files into
>Makefile and configure.  <http://developer.gnome.org/doc/GGAD/ggad.html>
>describes how to create the source tree, more or less ...

?  Note that steps are missing from <http://live.gnome.org/GeditPluginHowto> .

If there isn't documentation, which /few/ source files are relevent to
writing plugins, beyond the plugins' own source in the ./plugins directory?

Documentation would help if you want people to write plugins for Gedit, as
would having your own version of of Fedora's gedit-devel for out-of-tree
plugin development, and supporting the old plugin format along with the new
plugin format.  The hurdles to writing plugins seem pretty high now.  The
very idea of plugins seems to include their out-of-tree development.
Currently, from what you say below, plugins must be developed for the exact
version of Gedit they will run in.


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

Too late, apparantly, as there is Gedit stuff all over.  Strange, since I
couldn't make it.  Possibly I don't know what I did.


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

OK.  I can't claim to be familiar with rpms either; I just know that's how
Fedora Core works, and that installing from tarballs or source trees is
asking for trouble.

>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).

I have installed the gedit-devel rpm, but, as usual, I don't know where it
went.  I'll ask on the Fedora list.

>Obviosly if you want to build the sample plugin, you would still
>need to use the gedit sources since the plugin is included there.

OK.  Is there a way to develop plugins without working from the various
sample plugins?  The Gedit sources, which have the plugin sources, appear
to be the only real "documentation".


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

That year old release is what I use.  If I develop for some other release
using a different plugin arch, will what I make be useful for me or other
Fedore Core 3 users?

If you will hold my hand every step of the way, and show me how to make a
plugin useful to me and other Fedora Core 3 users as well as to you,
without damaging my Fedora Core 3 installation, I will give it a try.  Note
that I won't upgrade packages on my Fedora Core 3 installation without
convincing evidence that no possible harm to my Fedora Core 3 installation
could result, as I want it to keep working.  Any changes that affect only
one user account should be safe, as long as it isn't my normal account.  I
will need explicit step-by-step instructions, and I will have to return for
more instructions each time I have a problem, such as a step not working or
apparently changing something outside of the development account's home
directory.

>however if you are just experimenting, it is completely understandable
>that you can't be bothered to build everything from cvs.

I don't want to damage my Fedora Core 3 installation.  Random package
upgrades seem to be the main reported source of problems.  If checking out
the source tree from CVS had worked, I might have proceeded that way, but
it didn't.

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

What is the advantage of using the CVS tree 2.8.0 source over using the
Fedora Core 3 2.8.1 package sources?  The Fedora Core 3 package has patches
that the Fedora folks thought important for running on Fedora Core 3.  Will
I be able to get Gedit working properly on Fedora Core 3 without those
patches?


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

So ./autogen will replace:

aclocal
automake
autoconf ./configure.in >configure
./configure

?

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

Does it try to install it in my home directory, or in /usr/lib?  Actually,
it seems to try to put it in /usr/local/share, but (fortunately) fails.  Is
there a variant on make install that will install the plugin in my home
directory, not messing with global directories?


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

OK.


>Hope that helps

Thank you.
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson georgeanelson com>
      '                              <http://www.georgeanelson.com/>



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