<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 15.04.2012, at 06:47, Guillermo Polito wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Apr 15, 2012 at 2:37 PM, Guillermo Polito <span dir="ltr">&lt;<a href="mailto:guillermopolito@gmail.com">guillermopolito@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
Bump :)<br><br>I've been working last week a bit on the internet plugin to fetch some system proxy configuration in unix.<br><br>Since<br><br>- the plugin is external<br>- it loads gconf libraries using dlopen, so the libraries are not needed during compilation nor running<br>

- if gconf library is not found, looks at the http-proxy and ftp-proxy env vars.<br><br>It should break nothing :P<br><br>But I'm not an expert :/.<br><br>What do you think?&nbsp; Is it worth of integration?</blockquote></div></blockquote><div><br></div><div>I have not looked at your code yet, but it sounds good.</div><br><blockquote type="cite"><div class="gmail_quote"><div>Another option is to write this using FFI, but then I'm not so sure what should be part of the core and what not.&nbsp; I.e. should FFI be part of the Core?<br></div></div></blockquote><div><br></div><div>Not for Squeak. A plugin is the Right Thing because it abstracts over the platform differences. And since we have the Mac plugin already it just makes sense having on the other platforms too. Thanks for working on this!</div><div><br></div><span class="Apple-style-span" style="font-size: 12px; ">- Bert -</span></div><div><span class="Apple-style-span" style="font-size: 12px;"><br></span><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
<br>Guille<br>
<br><div class="gmail_quote">On Mon, Apr 9, 2012 at 4:38 PM, Guillermo Polito <span dir="ltr">&lt;<a href="mailto:guillermopolito@gmail.com" target="_blank">guillermopolito@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

ok,<br><br>I did this:<br>- configured the plugin as external<br>- created <br><br>CogFamilyUnixConfig&gt;&gt;configureInternetConfigPlugin: maker<br>&nbsp;&nbsp;&nbsp; super configureInternetConfigPlugin: maker.<br>&nbsp;&nbsp;&nbsp; maker addPlatformSources: #( 'sqUnixInternetConfiguration')<br>


<br>and put the file attached in /platforms/unix/plugins/InternetConfigPlugin.<br>I finally used dlopen to load gconf dinamically and check if it is available, and if it's not, I check the env vars with getenv().<br>

<br>
If someone can do a little review, it would be nice :).<br><br>Guille<div><div><br><br><div class="gmail_quote">On Sun, Apr 8, 2012 at 9:55 PM, Guillermo Polito <span dir="ltr">&lt;<a href="mailto:guillermopolito@gmail.com" target="_blank">guillermopolito@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Haha! :)<br><br>You won me :).&nbsp; I was about to reply this:<br><br>"Ok, so I talked with Esteban today :).&nbsp; And thanks to him I reached the conclussion that this plugin should be external."<br>


<br>I'll spend some hours tomorrow to finish it.<br>
<br>Now, as I think it happens with the ssl plugin... Where should we put the code and what should I in order to get it easily integrated in the ci buildings? :)<br><br>Thanks!<br>Guille<div><div>
<br><br><div class="gmail_quote">On Sun, Apr 8, 2012 at 9:46 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 7 April 2012 17:55, Guillermo Polito &lt;<a href="mailto:guillermopolito@gmail.com" target="_blank">guillermopolito@gmail.com</a>&gt; wrote:<br>




&gt; Was playing in my weekend on the InternetConfigPlugin for ubuntu.&nbsp; And<br>
&gt; that's the problem :), It uses gnome2 stuff to access the system<br>
&gt; configuration (because gnome handles it's own configuration... :/).<br>
&gt;<br>
&gt; Now, I made it work doing something like this in vmmaker:<br>
&gt;<br>
&gt; CogFamilyUnixConfig&gt;&gt;configureInternetConfigPlugin: maker<br>
&gt; &nbsp;&nbsp;&nbsp; "extra rules for InternetConfigPlugin"<br>
&gt;<br>
&gt; &nbsp;&nbsp;&nbsp; super configureInternetConfigPlugin: maker.<br>
&gt; &nbsp;&nbsp;&nbsp; maker addDefinitions: '`pkg-config --libs --cflags gtk+-2.0 gconf-2.0`'.<br>
&gt; &nbsp;&nbsp;&nbsp; maker addExternalLibrary: '/usr/lib/libgconf-2.so.4'.<br>
&gt; &nbsp;&nbsp;&nbsp; maker addPlatformSources: #( 'sqUnixInternetConfiguration.c').<br>
&gt;<br>
&gt; And adding it in the list of internal plugins for Unix.<br>
&gt;<br>
&gt; But this should only compile and work on a system with gconf and stuff<br>
&gt; installed :).<br>
&gt;<br>
</div>Then don't make this plugin internal, but external instead. Because if<br>
library is missing,<br>
VM will refuse to start. In contrast, if your plugin will be in<br>
external module, then module will refuse to load<br>
if lib is missing.<br>
<div><br>
&gt; So, how does or should vmmaker and vm building process handle something like<br>
&gt; this?<br>
&gt;<br>
<br>
</div>The philosophy of CMake configurations is to be concrete and without<br>
conditionals. I.E. they should<br>
not contain "if this, do this, if that do that" , instead if you have<br>
such choice, one should make another configuration.<br>
<br>
There is no way to predict how different is platform on which you<br>
building VM &nbsp;from platform where it used (especially in case of unix<br>
systems and their numerous flavors). So, what is working on your OS,<br>
could not work on another. That's why i don't see a point to put<br>
conditionals in build process.<br>
<br>
In contrast, if you have a concrete configuration, which says: if you<br>
want to build me, you should have this, this and this, and if you want<br>
to use the built artifact you should have this, this and this<br>
installed, then it makes things much more predictable and<br>
straightforward.<br>
<br>
<br>
&gt; Guille<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; VM-beginners mailing list<br>
&gt; <a href="mailto:VM-beginners@lists.squeakfoundation.org" target="_blank">VM-beginners@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners</a><br>
&gt;<span class="HOEnZb"><font color="#888888"><br>
<span><font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko.<br>
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br>
</font></span></div></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br>
</font></span></div></div></blockquote></div><br>
</blockquote></div><br>
_______________________________________________<br>VM-beginners mailing list<br><a href="mailto:VM-beginners@lists.squeakfoundation.org">VM-beginners@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners<br></blockquote></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>