Re: [gtk-osx-users] Bundling with absolute path for binary.




Le 3 févr. 2020 à 22:19, John Ralls <jralls ceridwen us> a écrit :

On Feb 3, 2020, at 12:38 PM, Pascal <p p14 orange fr> wrote:

Hello,

I modify the bundle spec with an absolute binary path:
<main-binary>/opt/chapitre6/exampleapp</main-binary>

But I've got this error:
ValueError: If the source /opt/chapitre6/exampleapp doesn't use a ${prefix} or ${prefix:*} macro, the 
destination path must be set

So I add:
<main-binary dest="${bundle}/Contents/MacOS">/opt/chapitre6/exampleapp</main-binary>

Why dest is then required? What is the relation with prefix macro?


Pascal,

The prefix macro represents the part of the source path that's replaced with the destination path. If 
there's no prefix macro then bundler doesn't know how much of the path to copy over. I suppose that that 
could be special-cased for the main-binary tag, but it isn't.

Remember that gtk-mac-bundler is designed for bundling applications built with gtk-osx and that those 
install everything into a designated prefix. There's some probably misguided flexibility built in to allow 
pulling files from outside of the prefix but especially in the case of binaries it has a good chance of 
breaking the install_name rewriting and should be used with extreme care.

Hell John,

Just to better understand the underlying mechanism in the bundle script:
a)   <binary>
    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
  </binary>
or
  <data>
    ${prefix}/share/themes
  </data>

The bundler put all just after $(prefix) in $(bundle)/Contents/Ressources.
Is it correct?

b)   <main-binary>${prefix}/bin/gtk3-demo</main-binary>

The bundler is here aware of bin folder and put the file after $(prefix)/bin in $(bundle)/Contents/MacOS.
Is it correct?

In this latter case, wouldn't the script put just the file designated by its path in 
$(bundle)/Contents/MacOS, even with an absolute path?

Thanks, Pascal.
https://blady.pagesperso-orange.fr




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