hzeller/flaschen-taschen

send-text utility does not run on Mac

Closed this issue · 9 comments

We tried to run send-text on a Mac but it quits with an error. (see below)
It appears that LoadFont method in the Font class does not properly load the font.
We tried both the latest "master" and the "macos-compatible" branches and the result was the same.
It worked for Miloh on linux.

Here is what send-text says:

$ ./send-text -h ft.noise -o "what happens" -f "fonts/7x13B.bdf" 
Need to provide a font.
usage: ./send-text [options] <TEXT>
Options:
-g <width>x<height>[+<off_x>+<off_y>[+<layer>]] : Output geometry. Default 45x<font-height>+0+0+1
-l <layer>      : Layer 0..15. Default 1 (note if also given in -g, then last counts)
-h <host>       : Flaschen-Taschen display hostname.
-f <fontfile>   : Path to *.bdf font file
-s<ms>          : Scroll milliseconds per pixel (default 60). 0 for no-scroll.
-o              : Only run once, don't scroll forever.
-c<RRGGBB>      : Text color as hex (default: FFFFFF)
-b<RRGGBB>      : Background color as hex (default: 000000)
$

Maybe the mac-libraries have a broken getopt() - implementation ?

Did you try to directly pass the parameter without space ?
./send-text -ffonts/7x13B.bdf ...

I'm not sure...
but we just tried a few variations on the command line with and without
spaces.

-rolf

On Tue, Apr 5, 2016 at 10:54 PM, Henner Zeller notifications@github.com
wrote:

Maybe the mac-libraries have a broken getopt() - implementation ?

Did you try to directly pass the parameter without space ?
./send-text -ffonts/7x13B.bdf ...


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#7 (comment)

Mac has really old BSD libraries which might not be up-par with the GNU libraries you typically find on Linux. One thing I have read somewhere is, that it has trouble with spaces in parameters. Since above, the parameter starts with a space, this could be a problem.

miloh commented

is -o the same on head for mac-os-compilable and master?

Henner, apologies...

It seems to be our bug.

This version of the command line options works!

$ ./send-text -h ft.noise -l 10 -f fonts/7x13B.bdf -o "what happens"

We were using -o incorrectly.

-rolf

On Tue, Apr 5, 2016 at 11:08 PM, miloh notifications@github.com wrote:

is -o the same on head for mac-os-compilable and master?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#7 (comment)

Yeah, the gnu-tools can figure out non-parameter options in the middle of the command line (and re-arrange things), while the Mac version seemed to be getting confused and requires the "what happens" always at the end.

I think you could argue for either version being more correct.
Miloh had put the TEXT param in the middle which is a bit unusual.
It worked when we put it at the end.
There's no bug.
So my only suggestion is to put an example usage somewhere, like inside the
code.

-Rolf

On Wednesday, April 6, 2016, Henner Zeller notifications@github.com wrote:

Yeah, the gnu-tools can figure out non-parameter options in the middle of
the command line (and re-arrange things), while the Mac version seemed to
be getting confused and requires the "what happens" always at the end.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#7 (comment)

miloh commented

did rolf just throw me under the bus?

;-)

On Wed, Apr 6, 2016 at 11:03 PM, rolfmobile99 notifications@github.com
wrote:

I think you could argue for either version being more correct.
Miloh had put the TEXT param in the middle which is a bit unusual.
It worked when we put it at the end.
There's no bug.
So my only suggestion is to put an example usage somewhere, like inside the
code.

-Rolf

On Wednesday, April 6, 2016, Henner Zeller notifications@github.com
wrote:

Yeah, the gnu-tools can figure out non-parameter options in the middle of
the command line (and re-arrange things), while the Mac version seemed to
be getting confused and requires the "what happens" always at the end.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
<
#7 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#7 (comment)

He hailed you for being an awesome tester @miloh !