Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows batch files and documentation fixes #3781

Merged
merged 40 commits into from
Aug 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
40195d3
Merge pull request #1 from PokemonGoF/dev
Aug 12, 2016
39d0596
Update installation.md
Aug 12, 2016
ecb6db0
Create manual_installation.md
Aug 12, 2016
d0bf21f
Update installation.md
Aug 12, 2016
fbefff8
Update manual_installation.md
Aug 12, 2016
17b5422
Update manual_installation.md
Aug 12, 2016
5fc5fcc
Update manual_installation.md
Aug 12, 2016
5151a12
Update manual_installation.md
Aug 12, 2016
0c8b13b
Update manual_installation.md
devn0ll Aug 12, 2016
11e18fc
Update manual_installation.md
devn0ll Aug 12, 2016
980747f
Update manual_installation.md
devn0ll Aug 12, 2016
717a0e6
Update manual_installation.md
devn0ll Aug 12, 2016
0602f41
Update manual_installation.md
devn0ll Aug 12, 2016
afe9b3e
Update manual_installation.md
devn0ll Aug 12, 2016
0f8dfd4
Update manual_installation.md
devn0ll Aug 12, 2016
1084321
Update manual_installation.md
devn0ll Aug 12, 2016
7250a05
added windows deps
bruvv Aug 12, 2016
cd506d8
Update manual_installation.md
devn0ll Aug 12, 2016
437b4fa
Update manual_installation.md
devn0ll Aug 12, 2016
720db69
Update manual_installation.md
devn0ll Aug 12, 2016
934c13b
Update manual_installation.md
devn0ll Aug 12, 2016
92771c9
docker merged
bruvv Aug 12, 2016
4ce324e
Update manual_installation.md
devn0ll Aug 12, 2016
cef6d4b
Merge pull request #2 from nivong/windows_bat
Aug 12, 2016
3831f12
Merge pull request #3 from devn0ll/dev
Aug 12, 2016
c33e228
Update installation.md
Aug 12, 2016
ca33698
Update installation.md
Aug 12, 2016
b38d2d1
Update installation.md
Aug 12, 2016
9a8777e
Update installation.md
Aug 12, 2016
e5337b4
Update installation.md
Aug 12, 2016
276e52c
Update installation.md
Aug 12, 2016
97d9188
Update manual_installation.md
Aug 12, 2016
ef3c36e
Update installation.md
Aug 12, 2016
7914ac8
Update installation.md
Aug 12, 2016
8ca23c9
Merge remote-tracking branch 'PokemonGoF/dev' into dev
bruvv Aug 13, 2016
2f54553
rename dir
bruvv Aug 13, 2016
fae9220
v2 windows bat
bruvv Aug 13, 2016
fbc123d
Update manual_installation.md
devn0ll Aug 13, 2016
2a3740a
Merge pull request #5 from devn0ll/dev
Aug 13, 2016
1539f04
Update installation.md
Aug 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions docs/docker.md

This file was deleted.

319 changes: 110 additions & 209 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,209 +1,110 @@
### Requirements (click each one for install guide)

- [Python 2.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [pip](https://pip.pypa.io/en/stable/installing/)
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended)
- [docker](https://docs.docker.com/engine/installation/) (Optional) - [how to setup after installation](https://github.com/PokemonGoF/PokemonGo-Bot/wiki/How-to-run-with-Docker)
- [protobuf 3](https://github.com/google/protobuf) (OS Dependent, see below)

#Linux/Mac Automatic installation
### Easy installation
1. Clone the git: `git clone https://github.com/PokemonGoF/PokemonGo-Bot`
2. Go into the new directory: `cd PokemonGo-Bot`
3. Run `./setup.sh -i`
This will install the bot and all stuff that is needed to run it (follow the steps in this process)
4. Run `./run.sh`
After you are done following it this will start your bot.

### To update
1. Stop the bot if it's running. (use control + c twice to stop it)
2. Run `./setup.sh -r`
This will reset and makes sure you have no changes made to any code since it will overide it
3. Rerun the bot `./run.sh`

note: we do not support windows at this time


# Manual installation
### Protobuf 3 installation

- OS X: `brew update && brew install --devel protobuf`
- Windows: Download protobuf 3.0: [here](https://github.com/google/protobuf/releases/download/v3.0.0-beta-4/protoc-3.0.0-beta-4-win32.zip) and unzip `bin/protoc.exe` into a folder in your PATH.

### Get encrypt.so (Windows part writing need fine tune)
Due to copywrite on the encrypt.so we are not directly hosting it. Please find a copy elsewhere on the internet and compile it yourself. We accept no responsibility should you encounter any problems with files you download elsewhere.

Ensure you are in the PokemonGo-Bot main folder and run:

`wget http://pgoapi.com/pgoencrypt.tar.gz && tar -xf pgoencrypt.tar.gz && cd pgoencrypt/src/ && make && mv libencrypt.so ../../encrypt.so && cd ../..`

### Note on branch
Please keep in mind that master is not always up-to-date whereas 'dev' is. In the installation note below change `master` to `dev` if you want to get and use the latest version.

## Update
To update your project do (in the project folder): `git pull`

To update python requirement packages do (in the project folder): `pip install --upgrade -r requirements.txt`

### Linux Installation
####on the Example of Ubuntu
(change dev to master for the lastest master version)

if you are on a different Linux OS you maybe have to adapt things like:

- package mananger (for example yum instead of apt-get)
- package names

```bash
##install
#change to root
sudo -i
#go to your home directory with the console
apt-get install build-essential autoconf libtool pkg-config make python-dev python-protobuf python2.7 wget git
#install pip
wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py
rm -f get-pip.py
#get git repo
git clone --recursive -b dev https://github.com/PokemonGoF/PokemonGo-Bot
cd PokemonGo-Bot
#install and enable virtualenv
#You need to make shure your python version and virtualenv verison work together
#install virtualenv and activate it
pip install virtualenv
virtualenv .
source bin/activate
#then install the requierements
pip install -r requirements.txt

##get the encryption.so and move to right folder
wget http://pgoapi.com/pgoencrypt.tar.gz
tar -xzvf pgoencrypt.tar.gz
cd pgoencrypt/src/
make
cd ../../
#make the encrypt able to load
mv pgoencrypt/src/libencrypt.so encrypt.so

##edit the configuration file
cp configs/config.json.example configs/config.json
vi configs/config.json
# gedit is possible too with 'gedit configs/config.json'
#edit "google" to "ptc" if you have a pokemon trainer account
#edit all settings


##update to newest
#if you need to do more i'll update this file
#make shure virtualenv is enabled and you are in the correct folder
git pull
pip install -r requirements.txt

##start the bot
./run.sh configs/config.json

##after reboot or closing the terminal
#at every new start go into the folder of the PokemonGo-Bot by
#going into the folder where you startet installing it an then
cd PokemonGo-Bot
#activate virtualenv and start
source bin/activate
./run.sh configs/config.json
```


### Installation Mac
(change master to dev for the latest version)

```bash
##install
#go to your home directory with the console
brew install --devel protobuf
brew install autoconf libtool pkg-config wget git
#install pip
wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py
rm -f get-pip.py
#get git repo
git clone --recursive -b master https://github.com/PokemonGoF/PokemonGo-Bot
cd PokemonGo-Bot
#install and enable virtualenv
#You need to make shure your python version and virtualenv verison work together
#install virtualenv and activate it
pip install virtualenv
virtualenv .
source bin/activate
#then install the requierements
pip install -r requirements.txt

##get the encryption.so and move to right folder
wget http://pgoapi.com/pgoencrypt.tar.gz
tar -xzvf pgoencrypt.tar.gz
cd pgoencrypt/src/
make
cd ../../
#make the encrypt able to load
mv pgoencrypt/src/libencrypt.so encrypt.so

##edit the configuration file
cp configs/config.json.example configs/config.json
vi configs/config.json
# gedit is possible too with 'gedit configs/config.json'
#edit "google" to "ptc" if you have a pokemon trainer account
#edit all settings


##update to newest
#if you need to do more i'll update this file
#make shure virtualenv is enabled and you are in the correct folder
git pull
pip install -r requirements.txt

##start the bot
./run.sh configs/config.json

##after reboot or closing the terminal
#at every new start go into the folder of the PokemonGo-Bot by
#going into the folder where you startet installing it an then
cd PokemonGo-Bot
#activate virtualenv and start
source bin/activate
./run.sh configs/config.json
```

### Installation Windows
(change master to dev for the latest version)

On Windows, you will need to install PyYaml through the installer and not through requirements.txt.

##### Windows vista, 7, 8:
Go to : http://pyyaml.org/wiki/PyYAML , download the right version for your pc and install it

##### Windows 10:
Go to [this](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml) page and download: PyYAML-3.11-cp27-cp27m-win32.whl
(If running 64-bit python or if you get a 'not a supported wheel on this platform' error,
download the 64 bit version instead: PyYAML-3.11-cp27-cp27m-win_amd64.whl )

*(Run the following commands from Git Bash.)*

```
// switch to the directory where you downloaded PyYAML
$ cd download-directory
// install 32-bit version
$ pip2 install PyYAML-3.11-cp27-cp27m-win32.whl
// if you need to install the 64-bit version, do this instead:
// pip2 install PyYAML-3.11-cp27-cp27m-win_amd64.whl
```

After this, just do:

```
$ git clone -b master https://github.com/PokemonGoF/PokemonGo-Bot
$ cd PokemonGo-Bot
$ virtualenv .
$ script\activate
$ pip2 install -r requirements.txt
$ git submodule init
$ git submodule update
```
#Install the bot
## Table of Contents
- [Linux or Mac Automatic Installation](#linuxmac)
- [Windows Automatic Installation](#windows)
- [Docker Automatic Installation](#docker)


#Linux/Mac
### Requirements (click each one for install guide)
- [Python 2.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [pip](https://pip.pypa.io/en/stable/installing/)
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended)

### Easy installation
1. Clone the git: `git clone https://github.com/PokemonGoF/PokemonGo-Bot`
2. Go into the new directory: `cd PokemonGo-Bot`
3. Run `./setup.sh -i`
This will install the bot and all stuff that is needed to run it (follow the steps in this process)
4. Run `./run.sh`
After you are done following it this will start your bot.

### To update the bot
1. Stop the bot if it's running. (use control + c twice to stop it)
2. Run `./setup.sh -r`
This will reset and makes sure you have no changes made to any code since it will overide it
3. Rerun the bot `./run.sh`

for manual installation please refer to [here](https://github.com/nivong/PokemonGo-Bot/blob/dev/docs/manual_installation.md)

#Windows
We do recommend Windows users to use [Docker](#docker) this will work much easier and smoother (also saver)

##Requirements

- [Python 2.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [Protoc](https://github.com/google/protobuf/releases/download/v3.0.0-beta-4/protoc-3.0.0-beta-4-win32.zip)
- [Microsoft Visual C++ Compiler for Python 2.7](http://www.microsoft.com/en-us/download/details.aspx?id=44266)

###Easy Installation
1. Download `PokemonGo-Bot-Install.bat` file from [HERE](https://raw.githubusercontent.com/nivong/PokemonGo-Bot/dev/windows_bat/PokemonGo-Bot-Install.bat)
2. Run `PokemonGo-Bot-install.bat`
After that has done the bot will be installed
3. Run `PokemonGo-Bot-Start.bat`
This will start the bot and the web interface

### To update the bot
3. Run `PokemonGo-Bot-Start.bat`
This will check for an update and will start the bot afterwards.

### To repair the bot if it isn't working for some reason
1. Stop the bot by closing everything
2. Run `PokemonGo-Bot-Repair.bat`
3. Rerun the bot by using `PokemonGo-Bot-StartBot.bat`

#Docker

###Easy installation
Start by downloading for your platform:
- [Mac](https://www.docker.com/products/docker#/mac)
- [Windows](https://www.docker.com/products/docker#/windows)
- [Linux](https://www.docker.com/products/docker#/linux)

Once you have Docker installed, simply create the various config files for your different accounts (e.g. `configs/config.json`, `configs/userdata.js`) and then create a Docker image for PokemonGo-Bot using the Dockerfile in this repo.

```
cd PokemonGo-Bot
docker build --build-arg timezone=Europe/London -t pokemongo-bot .
```

Optionally you can set your timezone with the --build-arg option (default is Etc/UTC)

After build process you can verify that the image was created with:

```
docker images
```

To run PokemonGo-Bot Docker image you've created:

```
docker run --name=bot1-pokego --rm -it -v $(pwd)/configs/config.json:/usr/src/app/configs/config.json pokemongo-bot
```

Run a second container provided with the OpenPoGoBotWeb view:

```
docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:8000 -v $(pwd)/configs/userdata.js:/usr/src/app/web/userdata.js -w /usr/src/app/web python:2.7 python -m SimpleHTTPServer
```
The OpenPoGoWeb will be served on `http://<your host>:8000`

if docker-compose [installed](https://docs.docker.com/compose/install/) you can alternatively run the PokemonGo-Bot ecosystem with one simple command:
(by using the docker-compose.yml configuration in this repo)

```
docker-compose up
```

Also run one single service from the compose configuration is possible:

```
docker-compose run --rm bot1-pokego
```

command for remove all stopped containers: `docker-compose rm`

TODO: Add infos / configuration for running multiple bot instances.

Do not push your image to a registry with your config.json and account details in it!
Loading