Author Topic: Building in OS X 10.10 with homebrew  (Read 39787 times)

0 Members and 1 Guest are viewing this topic.

Offline DeepSymmetry

  • Newbie
  • *
  • Posts: 2
  • Milliwatts: 0
  • Gender: Male
    • View Profile
    • Deep Symmetry
Building in OS X 10.10 with homebrew
« on: September 09, 2015, 07:42:52 pm »
I am interested in exploring the ILD file format to get some shows on an SD card so I can control our laser via DMX from my own open-source light show software, rather than having to hook it up to our dedicated old Windows laptop which runs Pangolin QuickShow over a bulky ILDA cable. LaserBoy looked just the ticket, but I am using a more modern package manager called Homebrew, and the instructions for 10.8 assumed the use of the older MacPorts.

Luckily, the procedure for installing with Homebrew is quite similar to under MacPorts, so I will relate it here in the hopes that it might help someone in a similar situation.

1. Install Homebrew, as described on their home page. This will include installing Xcode and the command-line utilities if they are not already installed:
http://brew.sh

2. Open a Terminal window and install SDL with this command:
brew install sdl

3. Install boost:
brew install boost

4. Because Homebrew puts its include files and libraries in a different place than MacPorts does, copy src/Makefile.osx to src/Makefile.brew and edit that using your favorite text editor to replace all instances of /opt/local/ with /usr/local/

(or, if your would rather, you can download the copy I have attached here).

5. Go to the LaserBoy src directory and build it using this command:
make -f Makefile.brew

You can then run LaserBoy from the parent LaserBoy directory:
./Laserboy 1400 800

The numbers are the width and height in pixels of the window you want the program to use; adjust them to a value that makes sense for your screen. If you have a Retina or 4K display, you will probably find the menus in the program tiny and hard to read. You can fix that by pressing <Tab> to enter the settings menu, then l (lower case L) to set the menu font size factor, then 2 and <Return> to make the text twice as big. Replace the 2 with whatever scale factor you would like to use.

I found that everything seems to work fine for me up until the point at which I am exiting the program, at which point it crashes with a segmentation fault. However, it does that after writing the OUT.ILD output file, so it is only a mild cosmetic problem, and one which I have no idea how to fix. Suggestions are welcome!

I very much look forward to exploring this program more, and the cool libraries of free art that people have shared.
« Last Edit: September 09, 2015, 07:46:01 pm by DeepSymmetry »

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Building in OS X 10.10 with homebrew
« Reply #1 on: September 10, 2015, 12:58:40 pm »
Hello DeepSymmetry.

Wecome to The LaserBoy Forum.

Thanks for writing this HOWTO.

That issue with the crash at the end is well known. It happens with all Mac installs of LaserBoy.

I think it is something in SDL during the cleanup. I believe that it happens when the screen object gets deleted. For some reason it tries to delete the pointer twice or something.

http://laserboy.org/free_art

James.
« Last Edit: September 10, 2015, 02:08:00 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline DeepSymmetry

  • Newbie
  • *
  • Posts: 2
  • Milliwatts: 0
  • Gender: Male
    • View Profile
    • Deep Symmetry
Re: Building in OS X 10.10 with homebrew
« Reply #2 on: September 10, 2015, 03:23:30 pm »
Ah, thanks for that clarification, I thought I might have not done something quite right in my build process.


I have created a nice SVG version of the Deep Symmetry logo with Adobe Illustrator, converted that to an ILD file with a nifty online version of a Python script I found, and now I am going to try to figure out how to get the colors assigned properly in LaserBoy, and then tonight I will write it to an SD card and try it out on the SkyWriter Chroma. W00t! I also can’t wait to see how some of the frames that come with LaserBoy look: they have a ton of potential, and it will be awesome to be able to call them up via DMX from Afterglow.


Oh, I should post a link to that in case anyone is interested in experimenting with algorithmic DMX light shows:
https://github.com/brunchboy/afterglow#afterglow

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Building in OS X 10.10 with homebrew
« Reply #3 on: September 10, 2015, 11:32:54 pm »
Many of the frames that come with LB are there for use with the LB frame and frame set effects. These same effects work on your own frames and frame sets as well.

James.
« Last Edit: September 11, 2015, 11:12:38 am by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline zachnfine

  • Newbie
  • *
  • Posts: 2
  • Milliwatts: 0
    • View Profile
Re: Building in OS X 10.10 with homebrew
« Reply #4 on: November 10, 2015, 02:53:02 pm »

5. Go to the LaserBoy src directory and build it using this command:
make -f Makefile.brew


Just did that on OS X 10.10.5. The application compiles and runs! There are a ton of errors during compilation look like this:


./LaserBoy_palette_set.hpp:122:38: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]                         if(index < 0)


I haven't looked at the code, but there may be a bunch of loops that include statements that should be executed when index<0 that will never be executed.


(edited to get rid of some weird formatting)
« Last Edit: November 10, 2015, 03:01:03 pm by zachnfine »

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Building in OS X 10.10 with homebrew
« Reply #5 on: November 12, 2015, 01:14:27 pm »
Ah! I see!

Those argument declarations of (u_int index) should be (int index).

LaserBoy_palette_set.hpp
lines 88, 102, 116, and 130

It's weird that neither Dev C++ in Windows or GCC in Linux caught that.

I'll have to get on my Windows machine that has a complete compiler and the proper libs to try this.

I also have to compile it on my Linux machine.

James.
« Last Edit: November 12, 2015, 06:24:00 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Building in OS X 10.10 with homebrew
« Reply #6 on: November 13, 2015, 04:28:59 pm »
Hmmmm. I've looked into this a bit more on a computer with a compiler and it seems like just changing those few lines results in a disaster.

Well.... not really.

But I an working on checking every warning and fixing the code.

James.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Building in OS X 10.10 with homebrew
« Reply #7 on: November 21, 2015, 05:47:10 pm »
New release:
http://laserboy.org/code/LaserBoy_2015_11_21.zip

This should fix those warnings.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal