From 4b41e5bd09494ee1bfdcd5cecd41dc46439397d7 Mon Sep 17 00:00:00 2001 From: lwthiker Date: Sun, 17 Apr 2022 17:38:01 +0300 Subject: [PATCH] Add compilation instructions for macOS --- INSTALL.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 3f85422..cac475b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -9,7 +9,8 @@ There are currently two build options depending on your use case: There are two versions of `curl-impersonate` for technical reasons. The **chrome** version is used to impersonate Chrome, Edge and Safari. The **firefox** version is used to impersonate Firefox. ## Native build -Currently tested for Linux only. Work on porting to Mac is in progress. + +### Linux (Ubuntu) Install dependencies for building all the components: ``` @@ -18,7 +19,7 @@ sudo apt install build-essential pkg-config cmake ninja-build curl autoconf auto sudo apt install python3-pip python-is-python3 pip install gyp-next export PATH="$PATH:~/.local/bin" # Add gyp to PATH -# For the Chrome vesion only +# For the Chrome version only sudo apt install golang-go ``` @@ -63,6 +64,32 @@ curl-impersonate-ff https://www.wikipedia.org curl-impersonate-chrome https://www.wikipedia.org ``` +### macOS +*macOS support is still a work in progress and currently supports the Chrome version only.* + +Install dependencies for building all the components: +``` +brew install pkg-config make cmake ninja autoconf automake libtool +# For the Chrome version only +brew install go +``` + +Generate the configure script: +``` +autoconf +``` + +Configure and compile: +``` +mkdir build && cd build +../configure +# Build and install the Chrome version +gmake chrome-build +sudo gmake chrome-install +# Optionally remove all the build files +cd ../ && rm -Rf build +``` + ### Static compilation To compile curl-impersonate statically with libcurl-impersonate, pass `--enable-static` to the `configure` script.