Jul 162014
 
 July 16, 2014  Posted by at 5:23 pm C# & F#, JS & TS Tagged with: , ,  Add comments

I’ve had some hectic weeks of travel and haven’t been able to record and edit until now, so expect several Edge.js videos and posts the next couple of weeks as I empty my backlog. First post out it’s setting up your environment on a Mac. Windows was covered in the first video, and Ubuntu week be covered tomorrow.

Since I don’t have a Mac right now I cheekily set up a VM running Mac OS on my Windows machine to record the video before tearing it down. While virtualization of certain OS versions seems to be legal I couldn’t get a clear answer from support if I’m allowed to virtualize on non-Apple hardware. Their license agreement indicates that I am not. I’ll write a separate post on that πŸ™‚ Anyway, I’m sure it’s fine for recording a 5 min video that encourages developers to use their products.

Warning that the video was recorded at 4 AM so I’m rambling a little bit, and I wish I had been more specific when explaining instead of saying ‘stuff’. Hope the write up makes up for it.

The steps are as following:

Install Homebrew

This is a package manager. If it asks you to install some dev tools go ahead and do that.

Mac edge.avi.Still004

Mac edge.avi.Still005

Mac edge.avi.Still006

Install Node

This can be done with brew- I did however not get the npm when I did that and opted for a manual download and install.

Mac edge.avi.Still007

Run brew script provided via GitHub

The script took hours to finish, and I recommend adding -v to it so you can get a verbose output to verify that it is installing and that it hasn’t ‘frozen’

Mac edge.avi.Still008

Run: brew install pkg-config

pkg-config is a helper tool used to compile and link against libraries as well as retrieve information about installed ones.

Run: sudo npm install node-gyp -g

node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js

sudo: Let’s you identify yourself as the root user/super user

Run: Npm install edge

Installs edge module

Notice in the video thatΒ  I didn’t create a directory and chucked everything in the root of the drive- that’s not something you would want to do. For demo purposes on how to setup the environment I get away with it πŸ˜‰

Testing with a Hello world

Create a new file, open in text editor and add hello world

From the path of the root directory run node file.js

Mac edge.avi.Still009

  4 Responses to “Edge.js tutorial part 4: Setting up Mac OSX environment”

  1. Hey
    Probably a random question but which software do you use for video recording?

    /Asad

    • I use Snagit for screen shots, and Camtasia and Expression for screen recording. For editing I use Premier Pro together with audition for audio.

  2. ‘mono64’ would not install for me. I wasn’t sure why. I re-ran ‘brew doctor’ and it noticed the owner on a couple folders had changed. I’m still not sure how that occurred. I changed their ownership back using ‘chown’ and node64 is now installed. Edge is working great!

    • Sweet! Make sure you do -v to get the verbos output, ping it to me then. I love errors πŸ˜€ Congrats on the app btw πŸ˜‰

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 3 + 15 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)