vsimon / webrtcbuilds

Getting started with WebRTC natively is no easy picnic. The goal of webrtcbuilds is to provide a single standalone WebRTC static library and package.
BSD 3-Clause "New" or "Revised" License
202 stars 163 forks source link

Build problems on OSX #15

Closed vsimon closed 8 years ago

vsimon commented 8 years ago
  1. checking for the absence of variable via -v MSVSVER does not work with the 'nounset' option on non-windows platforms.
  2. readlink on osx does not have an -f option.
DanielTBrown commented 8 years ago

Regarding -v MSVSVER, I see my mistake. With 'nounset' set, a way that should work is:

if [ -n "${MSVSVER:-}" ]; then

I am testing.

vsimon commented 8 years ago

For readlink, just wanted an absolute path. OUTDIR=$(cd $OUTDIR && pwd -P) may suffice (OSX, linux works I think that would also work on Windows).

DanielTBrown commented 8 years ago

A reasonable solution for the -v MSVSVER problem that works is:

MSVSVER=${MSVSVER:-} if [ -n MSVSVER ]; then export GYP_MSVS_VERSION=$MSVSVER fi

I will create a pull request.

vsimon commented 8 years ago

Looks good.

Just tested it and the conditional always hit on OSX, due to the missing $ var reference, -n tests for a not-zero length string...perhaps something like this?

if [ -n "$MSVSVER" ]; then export GYP_MSVS_VERSION=$MSVSVER fi

DanielTBrown commented 8 years ago

I am testing your solution (-n "$MSVSVER") under Ubuntu, which is all I have this afternoon. It seems to work so far.

vsimon commented 8 years ago

Great, thank you!

DanielTBrown commented 8 years ago

The solution -n "$MSVSVER" works under Ubuntu 16.04.

vsimon commented 8 years ago

With https://github.com/vsimon/webrtcbuilds/pull/19 merged, good to close.