browsh/SETUP_DEV_WIN.md

73 wiersze
1.8 KiB
Markdown
Czysty Zwykły widok Historia

2018-09-17 22:20:43 +00:00
# How to set up the build environment for Browsh on Windows
2018-09-21 14:05:30 +00:00
This guide is for those who want to set up the build environment on Windows Command Prompt or Powershell. Since some of the shell scripts are needed to set up the environment, you can just use **Git Bash** to run these scripts.
2018-09-17 22:20:43 +00:00
2018-09-21 14:05:30 +00:00
## Setting up Go, NodeJs, and GOPATH
Download and install Go for Windows at [Go download page](https://golang.org/dl/).
2018-09-17 22:20:43 +00:00
Download and install NodeJs for Windows at [NodeJs download page](https://nodejs.org/en/download/)
2018-09-17 22:20:43 +00:00
2018-09-21 14:05:30 +00:00
Using Command Prompt or Powershell:
2018-09-17 22:20:43 +00:00
Create a go workspace:
2018-09-17 23:42:53 +00:00
> mkdir go
> cd go
Set GOPATH to current directory.
> set GOPATH=%cd%
Create subdirectories bin and src within your go directory:
> mkdir bin
2018-09-21 14:05:30 +00:00
2018-09-17 23:42:53 +00:00
> mkdir src
Add %GOPATH%/bin to your PATH.
2018-09-21 14:05:30 +00:00
## Installing chocolatey and dep
2018-09-17 23:42:53 +00:00
2018-09-21 14:05:30 +00:00
Download and install Chocolatey package manager at [Chocolatey download page](https://chocolatey.org/install).
2018-09-17 23:42:53 +00:00
Using chocolatey package manager run:
> choco install dep
2018-09-21 14:05:30 +00:00
## Installing webpack, web-ext, and Firefox
2018-09-17 23:42:53 +00:00
> npm install -g --no-audit webpack
2018-09-21 14:05:30 +00:00
> npm install -g --ignore-scripts web-ext
2018-09-17 23:42:53 +00:00
2018-09-21 14:05:30 +00:00
Download and install Firefox for Windows at [Firefox download page](https://www.mozilla.org/en-US/firefox/new/).
Note: **Version 57 or higher is required.**
2018-09-17 23:42:53 +00:00
## Cloning the browsh repository
Navigate to GOPATH/src and run:
2018-09-21 14:11:18 +00:00
> git clone https://github.com/browsh-org/browsh.git
2018-09-17 23:42:53 +00:00
2018-09-21 14:05:30 +00:00
## Setting up dependencies
Navigate to browsh/webext and run:
> npm install
## Building browsh with Git Bash
2018-09-21 14:05:30 +00:00
Using Git Bash, navigate to browsh/interfacer/contrib and run:
> ./build_browsh.sh
## Running browsh
2018-09-21 14:13:46 +00:00
Using three Command Prompts or Powershells:
2018-09-21 14:05:30 +00:00
Navigate to GOPATH/browsh and run:
2018-09-21 14:11:18 +00:00
> go run ./interfacer/src/main.go --firefox.use-existing --debug
2018-09-21 14:05:30 +00:00
Navigate to browsh/webext and run:
2018-09-21 14:11:18 +00:00
> webpack --watch
2018-09-21 14:05:30 +00:00
Navigate to browsh/webext/dist and run:
2018-09-21 14:11:18 +00:00
> web-ext run --verbose
2018-09-21 14:05:30 +00:00
2018-09-17 23:42:53 +00:00