[Vm-dev] Re: [Vm-beginners] Tips to create a plugin with specific platform dependant stuff

Igor Stasenko siguctua at gmail.com
Sun Apr 8 19:46:03 UTC 2012

On 7 April 2012 17:55, Guillermo Polito <guillermopolito at gmail.com> wrote:
> Was playing in my weekend on the InternetConfigPlugin for ubuntu.  And
> that's the problem :), It uses gnome2 stuff to access the system
> configuration (because gnome handles it's own configuration... :/).
> Now, I made it work doing something like this in vmmaker:
> CogFamilyUnixConfig>>configureInternetConfigPlugin: maker
>     "extra rules for InternetConfigPlugin"
>     super configureInternetConfigPlugin: maker.
>     maker addDefinitions: '`pkg-config --libs --cflags gtk+-2.0 gconf-2.0`'.
>     maker addExternalLibrary: '/usr/lib/libgconf-2.so.4'.
>     maker addPlatformSources: #( 'sqUnixInternetConfiguration.c').
> And adding it in the list of internal plugins for Unix.
> But this should only compile and work on a system with gconf and stuff
> installed :).
Then don't make this plugin internal, but external instead. Because if
library is missing,
VM will refuse to start. In contrast, if your plugin will be in
external module, then module will refuse to load
if lib is missing.

> So, how does or should vmmaker and vm building process handle something like
> this?

The philosophy of CMake configurations is to be concrete and without
conditionals. I.E. they should
not contain "if this, do this, if that do that" , instead if you have
such choice, one should make another configuration.

There is no way to predict how different is platform on which you
building VM  from platform where it used (especially in case of unix
systems and their numerous flavors). So, what is working on your OS,
could not work on another. That's why i don't see a point to put
conditionals in build process.

In contrast, if you have a concrete configuration, which says: if you
want to build me, you should have this, this and this, and if you want
to use the built artifact you should have this, this and this
installed, then it makes things much more predictable and

> Guille
> _______________________________________________
> VM-beginners mailing list
> VM-beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners

Best regards,
Igor Stasenko.

More information about the Vm-dev mailing list