зеркало из https://github.com/openwpm/OpenWPM.git
Update macos install script
This commit is contained in:
Родитель
022d9ff7d0
Коммит
16ee6b52f7
|
@ -7,6 +7,7 @@ docker-volume/
|
|||
# firefox directories
|
||||
firefox-bin/
|
||||
Firefox*.app/
|
||||
Nightly*.app/
|
||||
|
||||
# VIM tmp files
|
||||
*~
|
||||
|
|
5
demo.py
5
demo.py
|
@ -4,6 +4,8 @@ from six.moves import range
|
|||
|
||||
from automation import CommandSequence, TaskManager
|
||||
|
||||
from sys import platform
|
||||
|
||||
# The list of sites that we wish to crawl
|
||||
NUM_BROWSERS = 3
|
||||
sites = ['http://www.example.com',
|
||||
|
@ -19,7 +21,8 @@ for i in range(NUM_BROWSERS):
|
|||
browser_params[i]['http_instrument'] = True
|
||||
# Enable flash for all three browsers
|
||||
browser_params[i]['disable_flash'] = False
|
||||
browser_params[0]['headless'] = True # Launch only browser 0 headless
|
||||
if platform != 'darwin':
|
||||
browser_params[0]['headless'] = True # Launch only browser 0 headless
|
||||
|
||||
# Update TaskManager configuration (use this for crawl-wide settings)
|
||||
manager_params['data_directory'] = '~/Desktop/'
|
||||
|
|
|
@ -9,41 +9,33 @@ if [[ $# -gt 0 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
brew install leveldb
|
||||
brew install leveldb || brew upgrade leveldb
|
||||
|
||||
pip install -U -r requirements.txt
|
||||
|
||||
# Make npm packages available
|
||||
brew install node || brew upgrade node
|
||||
|
||||
# Grab the latest version of Firefox ESR.
|
||||
# For security reasons it is very important to keep up with patch releases
|
||||
# of the ESR, but a major version bump needs to be tested carefully.
|
||||
# Older ESRs are not supported by geckodriver.
|
||||
firefox_version="$(curl 'https://ftp.mozilla.org/pub/firefox/releases/' |
|
||||
grep '/pub/firefox/releases/52.' |
|
||||
tail -n 1 | sed -e 's/.*releases\///g' | cut -d '/' -f1)"
|
||||
wget https://index.taskcluster.net/v1/task/gecko.v2.mozilla-release.latest.firefox.macosx64-add-on-devel/artifacts/public/build/target.dmg
|
||||
|
||||
wget "https://ftp.mozilla.org/pub/firefox/releases/${firefox_version}/mac/en-US/Firefox ${firefox_version}.dmg" -O firefox.dmg
|
||||
|
||||
#npm install get-firefox
|
||||
#npx get-firefox -b esr -p mac -t firefox.dmg
|
||||
|
||||
rm -rf Firefox.app
|
||||
hdiutil attach -nobrowse -mountpoint /Volumes/firefox-tmp firefox.dmg
|
||||
cp -r /Volumes/firefox-tmp/Firefox.app .
|
||||
rm -rf Nightly.app
|
||||
hdiutil attach -nobrowse -mountpoint /Volumes/firefox-tmp target.dmg
|
||||
cp -r /Volumes/firefox-tmp/Nightly.app .
|
||||
hdiutil detach /Volumes/firefox-tmp
|
||||
rm firefox.dmg
|
||||
rm target.dmg
|
||||
|
||||
|
||||
# Selenium 3.3+ requires a 'geckodriver' helper executable, which is not yet
|
||||
# packaged. `geckodriver` 0.16.0+ is not compatible with Firefox 52. See:
|
||||
# https://github.com/mozilla/geckodriver/issues/743
|
||||
# npm geckodriver 1.5.x = geckodriver 0.15.0
|
||||
npm install geckodriver@1.5.0
|
||||
cp node_modules/geckodriver/geckodriver Firefox.app/Contents/MacOS/
|
||||
# packaged.
|
||||
GECKODRIVER_VERSION=0.23.0
|
||||
GECKODRIVER_ARCH=macos
|
||||
|
||||
# Dependencies for OpenWPM development -- NOT needed to run the platform.
|
||||
# * Required for compiling Firefox extension
|
||||
npm install jpm -g
|
||||
wget https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-${GECKODRIVER_ARCH}.tar.gz
|
||||
tar zxf geckodriver-v${GECKODRIVER_VERSION}-${GECKODRIVER_ARCH}.tar.gz
|
||||
rm geckodriver-v${GECKODRIVER_VERSION}-${GECKODRIVER_ARCH}.tar.gz
|
||||
mv geckodriver Nightly.app/Contents/MacOS/
|
||||
|
||||
# Download and build client extension
|
||||
./build-extension.sh
|
||||
|
||||
pip install -U -r requirements-dev.txt
|
||||
|
|
Загрузка…
Ссылка в новой задаче