New readme and windows build

This commit is contained in:
Wiktor Mazur
2020-05-25 17:19:30 +02:00
parent c9510340da
commit 7aab5a1e8b
2 changed files with 38 additions and 40 deletions
+7 -6
View File
@@ -17,6 +17,8 @@ Albion online stats is an extension to MMORPG game - Albion Online. It tracks ne
![0.7.0](https://user-images.githubusercontent.com/11301109/71000581-d9124000-20db-11ea-8c19-4d7f69a2c155.png) ![0.7.0](https://user-images.githubusercontent.com/11301109/71000581-d9124000-20db-11ea-8c19-4d7f69a2c155.png)
> **Note** Network packet tracking and API for game events moved to other project. See [Albion Online Addons](https://github.com/mazurwiktor/albion-online-addons)
# How to use this app # How to use this app
> **Note** this section does not require any coding knowledge. Those simple two steps are required to use this software :) > **Note** this section does not require any coding knowledge. Those simple two steps are required to use this software :)
@@ -52,8 +54,7 @@ After first execution the app is going to create default configuration file name
## Prerequisites ## Prerequisites
- Rust installed (https://www.rust-lang.org/tools/install) - Python installed (python3.6 / python3.7 / python3.8)
- Python installed (python3.5 / python3.6 / python3.7)
- *Windows only prerequisites* https://github.com/libpnet/libpnet#windows - *Windows only prerequisites* https://github.com/libpnet/libpnet#windows
@@ -73,19 +74,19 @@ After first execution the app is going to create default configuration file name
or alternatively using conda and skip installing requirements step or alternatively using conda and skip installing requirements step
```shell ```shell
conda env create --file application/environment.yml conda env create --file environment.yml
conda activate albion conda activate albion
``` ```
3. Install requirements (backend will be compiled during requirements installation) 3. Install requirements
```shell ```shell
pip install -v -r application/requirements.txt pip install -v -r requirements.txt
``` ```
4. Run the application 4. Run the application
```shell ```shell
[sudo on linux] python application/albion-online-stats.py [sudo on linux] python albion-online-stats.py
``` ```
# Contribution # Contribution
+30 -33
View File
@@ -1,51 +1,48 @@
image: Visual Studio 2017 image: Visual Studio 2017
environment: environment:
RUST_TEST_THREADS: 1 TWINE_USERNAME: mazurwiktor
# Note: TWINE_PASSWORD is set in Appveyor settings.
matrix: matrix:
- TARGET: x86_64-pc-windows-msvc # Stable 64-bit MSVC
RUST_CHANNEL: beta - channel: stable
WPD_LIB_PATH: "C:/dl/wpdpack/WpdPack/Lib/x64/Packet.lib" target: x86_64-pc-windows-msvc
PYTHON: "C:\\Python36-x64" PYTHON: "C:\\Python36-x64"
PYTHON_SCRIPTS: "C:\\Python36-x64\\Scripts"
PYTHON_LIB: "C:\\Python36-x64\\libs\\python36.lib" PYTHON_LIB: "C:\\Python36-x64\\libs\\python36.lib"
PYTHON_ARCH: "64" # Stable 32-bit MSVC
VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\vcvars64.bat" - channel: stable
target: i686-pc-windows-msvc
PYTHON: "C:\\Python36"
PYTHON_SCRIPTS: "C:\\Python36\\Scripts"
PYTHON_LIB: "C:\\Python36\\libs\\python36.lib"
# From https://github.com/starkat99/appveyor-rust/blob/master/appveyor.yml
install: install:
- ps: ls C:\\Python36-x64 - SET PATH=%PYTHON%;%path%
- SET PATH=%PYTHON%;%path% - SET PATH=%PYTHON_SCRIPTS%;%path%
- ps: mkdir C:/dl - python --version
- curl -o "C:/dl/wpd.zip" "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip" - python -m pip install -U pip
- ps: Add-Type -AssemblyName system.io.compression.filesystem - python -m venv env
- ps: "[io.compression.zipfile]::ExtractToDirectory(\"C:/dl/wpd.zip\", \"C:/dl/wpdpack\")" - python -m pip install -r requirements.txt
- ps: cp ${env:WPD_LIB_PATH} "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
- ps: cp ${env:PYTHON_LIB} "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_CHANNEL}-${env:TARGET}.exe"
- rust-%RUST_CHANNEL%-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- CALL "%VCVARS%"
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- choco install winpcap
- rustc -V
- cargo -V
test: true
test_script:
- ps: cd backend
- cargo test
- ps: cd ..
- python -m pip install tox - python -m pip install tox
- ps: cd application
- python -m tox -e ut
- pd: cd ..
build_script: build_script:
- python -m venv env - python -m venv env
- ps: .\env\Scripts\activate.ps1 - ps: .\env\Scripts\activate.ps1
- python -m pip install dataclasses - python -m pip install dataclasses
- python -m pip install -v -r application\requirements.txt - python -m pip install -v -r requirements.txt
- pyinstaller -F -w -i assets\albion-stats-icon.ico --add-data application\src\assets;src\assets --add-data application\src\scripts;src\scripts application\albion-online-stats.py - pyinstaller -F -w -i assets\albion-stats-icon.ico --add-data src\assets;src\assets --add-data src\scripts;src\scripts albion-online-stats.py
- ps: deactivate - ps: deactivate
test_script:
- python -m tox -e ut
after_build: after_build:
- ps: mv dist\albion-online-stats.exe albion-online-stats.exe - ps: mv dist\albion-online-stats.exe albion-online-stats-$Env:target.exe
- ps: ls - ps: ls
artifacts: artifacts:
path: albion-online-stats.exe path: albion-online-stats*.exe
name: binary name: binary
deploy: deploy:
provider: GitHub provider: GitHub