Yes, I think that's the first case but I surely need to better understand this part of the code. In fact, I have no idea what is considered as part of the GUI or not... I mean, in my case, I don't really have a graphical interface but I would like to get the informations of the objects that depends on the font sizes. If I don't call sys_fakefromgui(), I get a division by zero somewhere because the font sizes are not initialized (and perhaps there are other errors but I don't reach these parts of the code). Anyway with the previous version of Pd I didn't have to call this function so didn't really look at that but now I would like to know what it really does and if there is a proper way to initialize this part of Pd.

Thanks!
Pierre


2017-07-15 19:36 GMT+02:00 Miller Puckette <msp@ucsd.edu>:
Do I understand correctly that you're trying to run libpd _without_ the
GUI and discovering that you have to copy code from sys_fakefromgui() to
get it to work?

Or, rather, are you actually trying to start the GUI up and need to know
the path to the GUI files?

In the latter case, I was tacitly assuming that people distributing libpd
apps that wanted to be able to use Pd's GUI would bundle the entire Pd
GUI package (Wish, pd/tcl, pd/po, probably more) with their installation,
as different libpd apps might require different versions.

cheers
Miller

On Sat, Jul 15, 2017 at 04:30:16PM +0200, Pierre Guillot wrote:
> Hi all,
>
> I started to update my project zpd [1] with the last version of Pd (before
> testing the new features in libpd) but I don't really understand how the
> function sys_startgui() should be used and what it does [2] . In the
> Miller's branch of libpd, the example [3] use a relative path but I don't
> know what is the path to my application and what should be the target of
> the path. I asked on GitHub and Dan explained me that I should give the
> path to the tcl scripts to start the Pd GUI but what if I don't have Pd
> installed? The solution I found for the moment is to copy the static
> function sys_fakefromgui() [4] but it's dirty and not very sustainable.
>
> Anyone has a solution?
> Best,
>
> Pierre
>
> [1] https://github.com/pierreguillot/zpd
> [2] https://github.com/pure-data/pure-data/blob/master/src/s_inter.c#L1377
> [3]
> https://github.com/libpd/libpd/pull/171/files/ddd6ef004c00ca41f1834fcb5bf5f72f972bc20d..35e4272a2c3ba610836fa4cdff3bea99dac815fb#diff-44ec7e62314f045847d1166bd74411b5R77
> [4]
> https://github.com/libpd/libpd/pull/171/files/ddd6ef004c00ca41f1834fcb5bf5f72f972bc20d..35e4272a2c3ba610836fa4cdff3bea99dac815fb#diff-44ec7e62314f045847d1166bd74411b5R77

> _______________________________________________
> Pd-dev mailing list
> Pd-dev@lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev