MAC OS X support for arbtt

Vincent Rasneur vrasneur at free.fr
Mon Apr 4 12:52:44 CEST 2016


Hi Waldir,

Thanks for the kind words.

I've installed Homebrew, and deleted my old MacPorts packages in order to see if there are some differences.

With Homebrew, the only difference is that I have no linking error with libiconv, as Homebrew does not install this library and relies on the system one. And there are no cabal issues when I configure/build arbtt. By the way, the MAC OS X port does not add any new dependencies in the cabal file.

For the installation directory, with Homebrew or MacPorts, my binaries were installed in ~/Library/Haskell/bin, not ~/.cabal/bin (and I don't know why...).

For the bunch of warnings, I have seen these warnings too (mixing of tabs/spaces, deprecated functions, ...), but they seem easy to fix and are not located in my patches ;-)

I think the patches are going to be fully integrated upstream. There is a commit in the arbtt repo here: https://github.com/nomeata/darcs-mirror-arbtt/commit/b979d03b1650e210fd302567a3024ad0e3b9ae1a

But the src/Capture/OSX.hs and src/Graphics/OSX/Window.hs files are still missing. Maybe they will be added in a future commit?

Regards,

Vincent

----- Mail original -----
> De: "Waldir Pimenta" <waldir at email.com>
> À: vrasneur at free.fr
> Cc: "arbtt" <arbtt at lists.nomeata.de>
> Envoyé: Jeudi 31 Mars 2016 00:52:40
> Objet: Re: MAC OS X support for arbtt
> 
> 
> 
> By the way, to actually run the arbtt-capture command from Terminal
> and have it be detached, I had to do (./arbtt-capture &) rather than
> just ./arbtt-capture&.
> 
> 
> Also, to set it up to run automatically at startup, I did crontab -e
> and wrote @reboot /Users/peekmeddev/.cabal/bin/arbtt-capture
> (according to this:
> http://apple.stackexchange.com/questions/156288/how-to-get-shell-scripts-to-run-at-startup-on-yosemite
> )
> 
> 
> --Waldir
> 
> 
> On Wed, Mar 30, 2016 at 11:39 PM, Waldir Pimenta < waldir at email.com >
> wrote:
> 
> 
> 
> Hi Vincent! What a great timing! My work laptop is a Mac and I've
> been sorely missing arbtt since I started using it. Your
> instructions worked great, thanks for the detail! I'll give you
> feedback on my experience, hoping it can be useful.
> 
> 
> I use Homebrew, and already had cabal-install, pkg-config and pcre
> installed through it. One curious detail, which I'm not sure is
> relevant, is that the first time I ran cabal install
> --only-dependencies it only configured/built/installed pcre, but
> told me I should update cabal; after running cabal update, I tried
> running cabal install --only-dependencies again, and this time it
> installed a bunch of other packages: fail, tagged, semigroups and
> aeson. I wonder if this means something.
> 
> 
> Afterwards, cabal build worked, although there were quite a few
> deprecation warnings. Installation worked seamlessly. However,
> there's no ~/Library/Haskell directory on my machine. The arbtt
> binaries were placed in ~/ .cabal/bin/. I wonder if this is a
> difference between Homebrew and MacPorts...
> 
> 
> Other than that, it seems to be working perfectly. Amazing work! Let
> me know if i can assist in anyway in getting this ready to merge
> upstream :)
> 
> 
> --Waldir
> 
> 
> 
> 
> 
> 
> 
> 
> On Tue, Mar 29, 2016 at 12:12 PM, < vrasneur at free.fr > wrote:
> 
> 
> Hi,
> 
> I have some code that makes arbtt work with MAC OS X.
> The changes are available in a git branch:
> https://github.com/vrasneur/darcs-mirror-arbtt/commit/e2a138ae865a68bd1b9117f41a1f5ea881995e71
> 
> Can somebody with a Mac test that arbtt works correctly with his
> computer?
> 
> Here are the compilation instructions:
> 
> First, you need the Haskell platform for Mac.
> You also need:
> * git
> * a package manager for OS X. I use MacPorts (
> https://www.macports.org/ ) but it should work with Homebrew.
> * XCode and the XCode command line tools
> 
> Note: the OS X port itself does not need a C/Objective-C compiler. It
> uses the Haskell FFI to call the Mac OS X specific functions.
> 
> then,
> 
> * install the C dependencies with your package manager
> sudo port install pkgconfig
> sudo port install pcre
> 
> * clone the OS X git branch
> git clone -b osx-support
> https://github.com/vrasneur/darcs-mirror-arbtt/
> 
> * use cabal to build/install arbtt
> cd darcs-mirror-arbtt
> cabal install --only-dependencies
> cabal configure --extra-lib-dir=/usr/lib
> cabal build
> cabal install
> 
> The option "--extra-lib-dir=/usr/lib" is necessary because of a
> conflict with iconv. (See http://blog.omega-prime.co.uk/?p=96 for a
> detailed explanation)
> 
> * then, go to /Users/<user>/Library/Haskell/bin/ and type ls
> You should see all the arbtt binaries.
> 
> * then, you can execute the binaries:
> cd /Users/<user>/Library/Haskell/bin/
> ./arbtt-capture&
> ./arbtt-dump
> 
> Regards,
> 
> Vincent Rasneur
> 
> _______________________________________________
> arbtt mailing list
> arbtt at lists.nomeata.de
> https://lists.nomeata.de/mailman/listinfo/arbtt
> 
> 
> 
> _______________________________________________
> arbtt mailing list
> arbtt at lists.nomeata.de
> https://lists.nomeata.de/mailman/listinfo/arbtt
>




More information about the arbtt mailing list