<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>therning.org/ magnus &#187; seed</title>
	<atom:link href="http://therning.org/magnus/archives/tag/seed/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Thu, 12 Jan 2012 13:40:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Epilicious is dead, say hello to BMS</title>
		<link>http://therning.org/magnus/archives/762</link>
		<comments>http://therning.org/magnus/archives/762#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:38:19 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[epilicious]]></category>
		<category><![CDATA[epiphany]]></category>
		<category><![CDATA[seed]]></category>
		<category><![CDATA[vala]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=762</guid>
		<description><![CDATA[With Python being dropped as a language for extensions in epiphany 2.28 I needed to replace epilicious. I tried writing it in JavaScript (seed was integrated in 2.28), but I gave up due to hitting too many hurdles on the way. Instead I decided to rewrite epilicious using Vala and a minimal layer of C. [...]]]></description>
			<content:encoded><![CDATA[<p>With Python being dropped as a language for extensions in epiphany 2.28 I needed to replace <a href="http://therning.org/magnus/computer/epilicious">epilicious</a>.  I tried writing it in JavaScript (<a href="http://live.gnome.org/Seed">seed</a> was integrated in 2.28), but I gave up due to hitting too many hurdles on the way. Instead I decided to rewrite epilicious using <a href="http://live.gnome.org/Vala">Vala</a> and a minimal layer of C.</p>

<p>It turned out to be very doable, despite epiphany&#8217;s extension API lacking Vala bindings (Cosimo Cecchi, I&#8217;m looking at <a href="http://uwstopia.nl/blog/2008/07/vala-bindings-for-epiphany-extensions">you</a> <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).  Basically I did the following setup:</p>

<ol>
<li>Add the extension following the instructions in <a href="http://projects.gnome.org/epiphany/documentation/extensions/index.html">Writing Epiphany Extensions</a> by Adam Hooper.</li>
<li>Add a check for valac in <code>configure.ac</code>.</li>
<li>Add a rule in the extension&#8217;s <code>Makefile.am</code> to generate a C header file for all the Vala code, for use from C.</li>
</ol>

<p>Then I started writing the actual extension.  I did the minimal amount of work in C, trying to escape as soon as possible into Vala.  In the few places I needed to call from Vala into C I would declare a delegate in Vala, and pass a function from C<sup><a href="http://therning.org/magnus/archives/762#footnote_0_762" id="identifier_0_762" class="footnote-link footnote-identifier-link" title="The format of .vapi files are unknown to me, and I haven&amp;#8217;t managed to find much documentation.  Using function pointers seemed like an easier way, especially given that I needed this in exactly 3 places.">i</a></sup>.</p>

<p>I call this new version BMS, for <em>b</em>ook<em>m</em>ark <em>s</em>ynchronisation.  I have a <a href="http://therning.org/magnus_files/epiphany-extension-bms-1.0-2.src.tar.gz">patch for BMS that applies to epiphany 2.28.1</a>.  (The file also contain a <code>PKGBUILD</code> in order to delight Arch users <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>

<p>I should probably point out that while epilicious never could be called polished, BMS is even less so.  I might find the time to make it multi-threaded, so that it&#8217;s possible to do some sort of progress dialogue, but don&#8217;t hold your breath.  In the back of my mind is also the thought of rewriting it yet again, in JavaScript/seed.</p>
<ol class="footnotes"><li id="footnote_0_762" class="footnote">The format of <code>.vapi</code> files are unknown to me, and I haven&#8217;t managed to find much documentation.  Using function pointers seemed like an easier way, especially given that I needed this in exactly 3 places.</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F762&amp;title=Epilicious%20is%20dead%2C%20say%20hello%20to%20BMS" id="wpa2a_2">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/762/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up Epiphany to play with Seed extensions</title>
		<link>http://therning.org/magnus/archives/674</link>
		<comments>http://therning.org/magnus/archives/674#comments</comments>
		<pubDate>Fri, 03 Jul 2009 08:22:05 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[epiphany]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[seed]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=674</guid>
		<description><![CDATA[Since the Python extensions to Epiphany have been removed from the repository I thought it was high time to start playing with what seems to be the replacement to Python extensions: Seed extensions. The first step is of course to get a version of Epiphany that supports Seed extensions. After a few emails on the [...]]]></description>
			<content:encoded><![CDATA[<p>Since the Python extensions to Epiphany have been removed from the repository I thought it was high time to start playing with what seems to be the replacement to Python extensions: <a href="http://live.gnome.org/Seed/">Seed</a> extensions.  The first step is of course to get a version of Epiphany that supports Seed extensions.  After a few emails on the mailing list I&#8217;ve come to a recipe (I&#8217;ve done this twice now on different machines to I&#8217;m fairly confident it works).  I should probably preface this by saying that I run an up-to-date <a href="http://www.archlinux.org/">Arch</a> system, if you run something else you might need to do a bit more, or less if you&#8217;re lucky <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<ol>
<li>Make sure the following packages are installed<sup><a href="http://therning.org/magnus/archives/674#footnote_0_674" id="identifier_0_674" class="footnote-link footnote-identifier-link" title="You might need a few more packages depending on what desktop environment you use.  Those were the packages I needed to add to my machine where I run Gnome and do regular non-Gnome development">i</a></sup>: <code>libsoup</code>, <code>libwebkit</code>, <code>gnome-common</code>, <code>intltool</code>, <code>libffi</code></li>
<li>Clone the following Git repositories from <a href="http://git.gnome.org/">git.gnome.org</a>: <code>epiphany-extensions</code>, <code>epiphany</code>, <code>seed</code>, <code>gobject-inspection</code>, <code>gnome-js-common</code>, <code>gir-repository</code></li>
<li><p>Decide on a <code>$prefix</code>, i.e. where you want it all installed (I use <code>~/opt/gnome-trunk</code>).  Then export the following environment variables:</p>

<pre><code>export PATH=$prefix/bin:$PATH
export PKG_CONFIG_PATH=$prefix/lib/pkgconfig
</code></pre></li>
<li><p>Then configure, build and install everything.  Use the <code>autogen.sh</code> script to create the configuration, and make sure to pass it <code>prefix=$prefix</code> each time.  Some of the modules need extra arguments as well.  This is the order and extra arguments I used:</p>

<ol>
<li><code>gnome-js-common</code> (<code>--disable-seed --disable-gjs</code>)</li>
<li><code>seed</code></li>
<li><code>gnome-js-common</code> (<code>--disable-gjs</code>)</li>
<li><code>gobject-introspection</code></li>
<li><code>gir-repository</code></li>
<li><code>epiphany</code> (<code>--enable-introspection --enable-seed</code>)</li>
<li><code>epiphany-extensions</code></li>
</ol></li>
</ol>

<p>After that you can put your extensions in <code>~/.gnome2/epiphany/extensions/</code>.  I have two instances of Epiphany installed, a stable from my distro, and the dev version I built myself.  I haven&#8217;t managed to run them both side by side, but beyond that there seems to be no bad interaction between them.</p>
<ol class="footnotes"><li id="footnote_0_674" class="footnote">You might need a few more packages depending on what desktop environment you use.  Those were the packages I needed to add to my machine where I run Gnome and do regular non-Gnome development</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F674&amp;title=Setting%20up%20Epiphany%20to%20play%20with%20Seed%20extensions" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/674/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

