App Bundles

Stephen Paul Weber singpolyma at singpolyma.net
Fri Aug 28 09:35:55 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Somebody claiming to be Alberto Ruiz wrote:
> Stephen Paul Weber wrote:
> 
> > This problem is the same on all OSs.  It's just on linux we have a
> > solution
> > (package managers) and so we think of it as a much bigger problem.
> >
> We can make use of PackageKit to solve these issues. The .desktop file
> could have options like X-Bundle-Assumes = gtk2, libfoo and PackageKit
> could solve the issue afterwards :-)

Sure, that's one solution.

> > I actually have the start of such a bundle-open command, but yes, the big
> > hurdle would be getting GNOME and KDE to support the format.
> On the GNOME side, we're open to it, and for the conversations I had
> with KDE people, I think they would be open to the idea as well (another
> issue is who writes the patches, but I'm pretty sure we can manage), so
> don't let that stop you ;-)

Cool.

On the app dev side, I've written a first pass at a shell script that can be
run from inside a project to build an app bundle.

It assume make is being used, that there is a make install rule, and that
the make install rule properly handles  make prefix=blah/blah install

http://pastie.org/597905

It will generate `basename `pwd``.app in the current directory, with the
correct layout, and a wrapper script to set up the environment.

I have tested it on my patched version of Hedgewars (patched to use
XDG_DATA_DIRS and PATH for relocation) and it's worked marvelously.

Using a wrapper script to set up the env has many benefits.  It remains
compatible with MacOS (which does not set the env vars we're interested in)
and also means that you can easily invoke the script from the command line
(if you invoke it with its full path).  Also, app devs may wish to have a
slightly different env, and could therefore create their own wrapper script
if they desired.

- -- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJKmAdqAAoJENEcKRHOUZzeI1QQALi/fw4CUxuqlcWcR0PW/lON
n3XKui4OQgedkCFLj2MpYOrmXonV8IlvCJguJvsvoBgvdGMdJAySWA77ZTWILTa2
I6qQQ78FUJyMn3WZxHQpQNiUD+NM4RSRCiVwZnHQlhnzAZbOvizgrueKyVph/tgq
dq7FO9XbWSLRkSzcoFTz6D8Ux2biwsd4BddDOEz+vEwfcYrO7W4JBCZWR3d1HnsF
U3Y4GnHTP7ozA/EPMRMLtriUvBxY/jsUJUOKM4uuX24wPf6Thnyb3aidpFdIPxJp
EGbyqa3nVdJwjUrTG6Iv5V//Uyahp/meQrlR3EwiYM/JyuJdxChTNtT4UtqvH+yD
Ua3XXx4U7DVRNJ9Eq9IGxtGJMfTdVooP8iplt+mCgLMMZgAwhLaSw2Mom7tc3gQh
Fzc96mIIm1VpXiZMsWj4i+bBGfWYkoeZYiU5I7hC8BXKForxgRevOT8fihGy6pqm
TfBstT2u/RnU4OKuHSohZz7bAHvMOmvSmO+W5M1SEQ7gixW0SDADz0Kd/hF23Br1
A8Ql9vVF4wQ2NElWhRLiq7uD+I7hSf9w8AViA3m+bP/ScK1rH7876pc1qnpb7rJt
Je/ZiWX4SAFfTuOtovbd4sg+Nimr3beR7hhMV2PDocumtw4BbVH/X3g53DNG1ZhE
YLQZdV04RUEjUVWgqyjh
=q94g
-----END PGP SIGNATURE-----


More information about the xdg mailing list