added: mac os support for setting loc
added: build script for mac os