hiptext icon indicating copy to clipboard operation
hiptext copied to clipboard

How do you install this on OS X?

Open octos opened this issue 10 years ago • 21 comments

Instructions are welcome :)

octos avatar Nov 15 '14 14:11 octos

I'm honestly not sure. I wrote it on Linux. If you could provide assistance making it more mac friendly, it'd be greatly appreciated.

jart avatar May 30 '15 22:05 jart

@octos I write a Homebrew Formula. Please try:

$ brew install --HEAD https://gist.githubusercontent.com/saitoha/08175fc1e82906966256/raw/e5c6795ff4619661b5a1e335ddaafd09cb3959fa/hiptext.rb

saitoha avatar Jun 24 '15 12:06 saitoha

That's awesome! I'll check it out next week and probably do some more dev work on hiptext.

jart avatar Jun 24 '15 13:06 jart

I didn't get that Homebrew Formula to work. Getting this error.

$ hiptext libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname::collate_byname failed to construct for en_US.utf8 *** Aborted at 1446194691 (unix time) try "date -d @1446194691" if you are using GNU date *** PC: @ 0x7fff90853286 __pthread_kill *** SIGABRT (@0x7fff90853286) received by PID 42905 (TID 0x7fff74ad1300) stack trace: *** @ 0x7fff88ac8f1a _sigtramp @ 0x7fff5228bde8 (unknown) @ 0x7fff8babc9b3 abort @ 0x7fff90811a21 abort_message @ 0x7fff908399b9 default_terminate_handler() @ 0x7fff84f017eb _objc_terminate() @ 0x7fff908370a1 std::__terminate() @ 0x7fff90836d48 __cxa_rethrow @ 0x7fff8cc9342f std::__1::locale::__imp::__imp() @ 0x7fff8cc94ab0 std::__1::locale::locale() @ 0x10d97473e main @ 0x7fff9017e5c9 start Abort trap: 6

WangElectronics avatar Oct 30 '15 09:10 WangElectronics

This worked for me. Quoting out these three lines from hiptext.cc with //'s

https://github.com/jart/hiptext/issues/15#issuecomment-17148097

WangElectronics avatar Oct 30 '15 10:10 WangElectronics

Forked Formula to add Commenting out 3 lines from hiptext.cc to the patch. Please try:

brew install --HEAD https://gist.githubusercontent.com/tcyrus/b984bd04a9852cf2d1ee/raw/a05caaee284775d7dfd62d5d09b169f68890b22e/hiptext.rb

tcyrus avatar Jan 07 '16 00:01 tcyrus

Tried @tcyrus formula and got the following brew error:

...
==> Checking out branch master
==> Patching
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/font.cc b/font.cc
|index e3b3218..b9cf579 100644
|--- a/font.cc
|+++ b/font.cc
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/hiptext.cc b/hiptext.cc
|index a23fa02..da0c96f 100644
|--- a/hiptext.cc
|+++ b/hiptext.cc
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored
Error: Failure while executing: /usr/bin/patch -g 0 -f -p1

CallumHoward avatar Jul 06 '16 13:07 CallumHoward

FWIW I have a working formula:

brew install bfontaine/utils/hiptext

bfontaine avatar May 13 '17 11:05 bfontaine

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for en_US.utf8 *** Aborted at 1494772311 (unix time) try "date -d @1494772311" if you are using GNU date *** PC: @ 0x7fff8f6ec286 __pthread_kill *** SIGABRT (@0x7fff8f6ec286) received by PID 26811 (TID 0x7fff780a1300) stack trace: *** @ 0x7fff866c8f1a _sigtramp @ 0x7fff5352fbf8 (unknown) @ 0x7fff8f63c9a3 abort @ 0x7fff94452a21 abort_message @ 0x7fff9447a9b9 default_terminate_handler() @ 0x7fff86e7d7eb _objc_terminate() @ 0x7fff944780a1 std::__terminate() @ 0x7fff94477d48 __cxa_rethrow @ 0x7fff8c01142f std::__1::locale::__imp::__imp() @ 0x7fff8c012ab0 std::__1::locale::locale() @ 0x10c6d3aad main @ 0x7fff9023c5c9 start Abort trap: 6

WangElectronics avatar May 14 '17 14:05 WangElectronics

Same here.

XNinety9 avatar Feb 24 '20 21:02 XNinety9

@WangElectronics try using gdate within homebrew

mTvare6 avatar Feb 28 '21 10:02 mTvare6

@WangElectronics try using gdate within homebrew

Tried to run brew install gdate but to no avail.

Error: No formulae found in taps.

WangElectronics avatar Mar 01 '21 11:03 WangElectronics

gdate is installed with brew install coreutils. However I can’t reproduce –with or without coreutils–, so I can’t help you:

==> Installing bfontaine/utils/hiptext
==> ./configure --prefix=/usr/local/Cellar/hiptext/0.2
==> make install
🍺  /usr/local/Cellar/hiptext/0.2: 4 files, 284.9KB, built in 18 seconds

bfontaine avatar Mar 01 '21 19:03 bfontaine

Manage to build it now but it gives me

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for en_US.utf8 *** Aborted at 1614627239 (unix time) try "date -d @1614627239" if you are using GNU date *** PC: @ 0x0 (unknown) *** SIGABRT (@0x7fff690fc33a) received by PID 89820 (TID 0x10a962dc0) stack trace: *** @ 0x7fff691ad5fd _sigtramp [1] 89820 abort hiptext

WangElectronics avatar Mar 01 '21 22:03 WangElectronics

Author here. One thing that's worth mentioning is we now have more modern alternatives to hiptext:

  • https://justine.lol/printvideo.html
  • https://justine.lol/printimage.html

jart avatar Mar 02 '21 06:03 jart

Author here. One thing that's worth mentioning is we now have more modern alternatives to hiptext:

* https://justine.lol/printvideo.html

* https://justine.lol/printimage.html

Oh, how do I run these in MacOS-terminal?

WangElectronics avatar Mar 03 '21 10:03 WangElectronics

You can do something like this:

curl -o printvideo https://justine.lol/printvideo.com
chmod u+x printvideo

curl -o printimage https://justine.lol/printimage.com
chmod u+x printimage

Then:

./printvideo ...

./printimage ...

bfontaine avatar Mar 08 '21 09:03 bfontaine

I just get zsh: exec format error: ./printvideo

WangElectronics avatar Mar 08 '21 13:03 WangElectronics

Changed to bash and it works! ⭕

WangElectronics avatar Mar 08 '21 13:03 WangElectronics

Zsh is a KI. Last month I upstreamed a patch addressing the issue. If you build the revision then you won't need bash! https://github.com/zsh-users/zsh/commit/326d9c203b3980c0f841bc62b06e37134c6e51ea

jart avatar Mar 08 '21 17:03 jart

@WangElectronics or else you can run chafa

mTvare6 avatar Mar 10 '21 11:03 mTvare6