Skip to content

Commit e8e2201

Browse files
authored
Merge branch 'pyfa-org:master' into master
2 parents e79f979 + ce6fd4b commit e8e2201

File tree

791 files changed

+386905
-33063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

791 files changed

+386905
-33063
lines changed

.appveyor.yml

Lines changed: 38 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,49 @@
11
image:
2-
- Visual Studio 2019
3-
- Ubuntu
4-
- macos
5-
clone_depth: 1
2+
- Ubuntu2204
3+
- Visual Studio 2022
4+
- macos-catalina
65
for:
76
-
87
matrix:
98
only:
10-
- image: Ubuntu
9+
- image: Ubuntu2204
1110
environment:
12-
APPVEYOR_SSH_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJDW/+oYNGOiPvwuwAL9tc/LQgg58aosIVpMYfepQZ20V+VZnHpZh8IRDA8Jo5xht19p2PksA+hFgqA0kpKtrSkuiWdE8rATQItfk4gf7yB0yGasJGGQZYazy9k/9XtmYkq2HHOOeEqdxvrICddJQ88MLCLT9lJENSUP/YS/yGcjZFXVxE11pTeIcqlCRU+3eYa1v7BeNvXIKNhZoK5orXWrtuH3cy8jrSns/u70aYfJ6B2jA8CnWnDbuvpeQtEY61SQqlKUsSArNa8NAsXj41wr3Ar9gAG9330w7EMTqlutk8HZO35uHI0q5qinUhaQYufPPrVkb2L/N+ZCfu0fnh appveyor"
13-
APPIMAGE_TOOL: appimagetool-x86_64.AppImage
14-
PYTHON_APPIMAGE: python3.7.16-cp37-cp37m-manylinux2014_x86_64.AppImage
11+
APPVEYOR_SSH_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDhb96UEXy8yOy/f+riX/8kKbNx/lOfIZ4pP4Cw3Gj3DmnTwEnxtRtyc+xtaxOsKbt+7+EAXFpCzYX+jHMhtd0QtWB7dbey8DBg31g0f8C5EPquqROibVbhzr/F3f6/d52FFfq6Y/CWaAvLjezvipr+zOOsIFcVusqtXdPJQ/LtUJ0LS5d4lFiw5ELHSxHIpqwGwyb7PbR3ufEFoqbr8eYiCH+vlBob72ArPfo2f3u0sMvpGYmjVVu2jj4FEY2h89sLrGyFdNWBoyumRhkb38+WSAuyPa/Y21+g+S8sRzIlkwbxicGNMtrMIi6zHEIGAgA06Sw2psP807h730PPOVaWjUcU3ojNW8hH3nPizF74pT82+iP7/fFC4PXLP+tBa+8OoHC5yiO7QKUKprMSqVa1qOm8fHbrzglplKJXfzSfUtSE+AQ+HtHhuUWKI+0LBLDrsOJwI5hbsPOAuiZ5I3VfqfAOck6SH9TcmlapVmQEypc7d7oeeUtZSOuIWKXp068= dfx@aw"
12+
APPIMAGE_TOOL: appimage-builder-x86_64.AppImage
1513
DEPLOY_DIR: AppDir/opt/pyfa
16-
# APPVEYOR_SSH_BLOCK: true
14+
# APPVEYOR_SSH_BLOCK: true
1715
cache:
1816
- /home/appveyor/.cache/pip -> requirements.txt
19-
init:
20-
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
17+
# init:
18+
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
2119
install:
22-
- sh: git fetch --prune --unshallow # to fix the version dump issues
23-
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
24-
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3.7-dev libgtk-3-dev python3-pip libwebkit2gtk-4.0-dev
20+
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y update --allow-releaseinfo-change
21+
# AppImage dependencies
22+
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libfuse2
23+
# Preparation script dependencies
24+
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3-wxgtk4.0 python3-sqlalchemy python3-logbook
2525
before_build:
26-
- sh: mkdir build && cd build
27-
- sh: curl -LO https://github.com/AppImage/AppImageKit/releases/download/13/$APPIMAGE_TOOL && chmod +x $APPIMAGE_TOOL
28-
- sh: curl -LO https://github.com/niess/python-appimage/releases/download/python3.7/$PYTHON_APPIMAGE && chmod +x $PYTHON_APPIMAGE
29-
build_script:
30-
# Prepare Python base AppImage, stripping Python metadata
31-
- sh: ./$PYTHON_APPIMAGE --appimage-extract
32-
- sh: mv squashfs-root AppDir
33-
- sh: rm AppDir/python*.desktop
34-
- sh: rm AppDir/usr/share/applications/*.desktop
35-
- sh: rm AppDir/usr/share/metainfo/*.appdata.xml
36-
- sh: unlink AppDir/AppRun
37-
- sh: mkdir -p $DEPLOY_DIR
38-
# run install pyfa packages and any other requirements
39-
40-
- sh: AppDir/usr/bin/python -s -m pip install -U pip setuptools==41.6.0 wheel pathlib2
41-
- sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt
42-
# Speedup, but causes runtime incompatiblities
43-
#- sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 -r ../requirements.txt
44-
45-
# Run scripts to prep pyfa data and build database
46-
- sh: cd ../
26+
# Prepare pyfa data
4727
- sh: find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
48-
- sh: build/AppDir/usr/bin/python scripts/compile_lang.py
49-
- sh: build/AppDir/usr/bin/python scripts/dump_crowdin_progress.py
50-
- sh: build/AppDir/usr/bin/python db_update.py
51-
- sh: export PYFA_VERSION="$(python3.7 scripts/dump_version.py)"
52-
53-
# Copy pyfa files to host
54-
- sh: cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml ./build/$DEPLOY_DIR
55-
- sh: find ./build/$DEPLOY_DIR | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
56-
57-
# Copy static AppImage files
58-
- sh: cd dist_assets/linux
59-
- sh: chmod +x AppRun
60-
- sh: cp AppRun pyfa.desktop ../../build/AppDir/
61-
- sh: cp pyfa.desktop ../../build/AppDir/usr/share/applications/
62-
- sh: cp pyfa.appdata.xml ../../build/AppDir/usr/share/metainfo/
63-
- sh: chmod +x pyfa && cp pyfa ../../build/AppDir/usr/bin
64-
- sh: cd ../../
65-
66-
# Package it all up
67-
- sh: mkdir dist
68-
- sh: ./build/$APPIMAGE_TOOL build/AppDir dist/pyfa-$PYFA_VERSION-linux.AppImage
28+
- sh: pyenv global system
29+
- sh: python3 -B scripts/compile_lang.py
30+
- sh: python3 -B scripts/dump_crowdin_progress.py
31+
- sh: python3 -B db_update.py
32+
- sh: export PYFA_VERSION="$(python3 -B scripts/dump_version.py)"
33+
- sh: mkdir build
34+
# Download packaging tool
35+
- sh: curl -o $APPIMAGE_TOOL -L https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
36+
- sh: chmod +x $APPIMAGE_TOOL
37+
build_script:
38+
- sh: mkdir -p AppDir/opt/pyfa
39+
- sh: cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml AppDir/opt/pyfa/
40+
- sh: mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
41+
- sh: cp imgs/gui/pyfa64.png AppDir/usr/share/icons/hicolor/64x64/apps/pyfa.png
42+
- sh: ./$APPIMAGE_TOOL --recipe dist_assets/linux/AppImageBuilder.yml
6943
after_build:
70-
- sh: ls -la build
44+
- sh: ls -la
7145
artifacts:
72-
- path: dist/pyfa-$PYFA_VERSION-linux.AppImage
46+
- path: pyfa-$PYFA_VERSION-linux.AppImage
7347
deploy:
7448
tag: $PYFA_VERSION
7549
release: pyfa $PYFA_VERSION
@@ -85,17 +59,15 @@ for:
8559
-
8660
matrix:
8761
only:
88-
- image: Visual Studio 2019
62+
- image: Visual Studio 2022
8963
environment:
90-
PYTHON: "C:\\Python37-x64"
64+
PYTHON: "C:\\Python311-x64"
9165
# Should be enabled only for build process debugging
9266
# init:
9367
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
9468
cache:
9569
- C:\users\appveyor\appdata\local\pip\cache\ -> requirements.txt
9670
install:
97-
- cmd: git fetch --prune --unshallow # to fix the version dump issues
98-
9971
- ps: echo("OS version:")
10072
- ps: "[System.Environment]::OSVersion.Version"
10173

@@ -131,10 +103,8 @@ for:
131103
# pip will build them from source using the MSVC compiler matching the
132104
# target Python version and architecture
133105
- ps: echo("Install pip requirements:")
134-
# This one is needed to build wxpython 4.0.6 on windows
135-
- cmd: "python -m pip install pathlib2"
136106
- cmd: "python -m pip install -r requirements.txt"
137-
- cmd: "python -m pip install PyInstaller==3.6"
107+
- cmd: "python -m pip install PyInstaller==6.0.0"
138108
before_build:
139109
# directory that will contain the built files
140110
- ps: $env:PYFA_DIST_DIR = "c:\projects\$env:APPVEYOR_PROJECT_SLUG\dist"
@@ -150,7 +120,7 @@ for:
150120
# Build gamedata DB
151121
- cmd: "python db_update.py"
152122
# Build command for PyInstaller
153-
- cmd: "python -m PyInstaller --noupx --clean --windowed --noconsole -y pyfa.spec"
123+
- cmd: "python -m PyInstaller --clean -y pyfa.spec"
154124
# Copy over manifest (See pyfa-org/pyfa#1622)
155125
- ps: xcopy /y dist_assets\win\pyfa.exe.manifest $env:PYFA_DIST_DIR\pyfa\
156126
# InnoScript EXE building. This is in a separate script because I don't feel like copying over the logic to AppVeyor script right now...
@@ -177,16 +147,15 @@ for:
177147
-
178148
matrix:
179149
only:
180-
- image: macos
150+
- image: macos-catalina
181151
environment:
182152
APPVEYOR_SSH_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJDW/+oYNGOiPvwuwAL9tc/LQgg58aosIVpMYfepQZ20V+VZnHpZh8IRDA8Jo5xht19p2PksA+hFgqA0kpKtrSkuiWdE8rATQItfk4gf7yB0yGasJGGQZYazy9k/9XtmYkq2HHOOeEqdxvrICddJQ88MLCLT9lJENSUP/YS/yGcjZFXVxE11pTeIcqlCRU+3eYa1v7BeNvXIKNhZoK5orXWrtuH3cy8jrSns/u70aYfJ6B2jA8CnWnDbuvpeQtEY61SQqlKUsSArNa8NAsXj41wr3Ar9gAG9330w7EMTqlutk8HZO35uHI0q5qinUhaQYufPPrVkb2L/N+ZCfu0fnh appveyor"
183153
cache:
184154
- /Users/appveyor/Library/Caches/pip/ -> requirements.txt
185155
init:
186156
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
187-
- sh: source ~/venv3.7/bin/activate
157+
- sh: source ~/venv3.11/bin/activate
188158
install:
189-
- sh: git fetch --prune --unshallow # to fix the version dump issues
190159
- sh: bash scripts/osx-setup.sh
191160
build_script:
192161
- sh: bash scripts/osx-translations.sh

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Requirements
44

5-
- Python 3.7
5+
- Python 3.11
66
- Git CLI installed
77
- Python, pip and git are all available as command-line commands (add to the path if needed)
88

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pyfa
22

3-
[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) [![Build Status](https://travis-ci.org/pyfa-org/Pyfa.svg?branch=master)](https://travis-ci.org/pyfa-org/Pyfa)
3+
[![Build Status](https://ci.appveyor.com/api/projects/status/github/pyfa-org/pyfa?branch=master&svg=true)]([https://travis-ci.org/pyfa-org/Pyfa](https://ci.appveyor.com/project/pyfa-org/pyfa))
44

55
![pyfa](https://user-images.githubusercontent.com/275209/66119992-864be080-e5e2-11e9-994a-3a4368c9fad7.png)
66

config.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from eos.const import FittingSlot
1010

1111
from cryptography.fernet import Fernet
12+
from collections import namedtuple
1213

1314
pyfalog = Logger(__name__)
1415

@@ -44,9 +45,16 @@
4445
version = None
4546
language = None
4647

47-
API_CLIENT_ID = '095d8cd841ac40b581330919b49fe746'
48+
ApiServer = namedtuple('ApiBase', ['name', 'sso', 'esi', 'client_id', 'callback', 'supports_auto_login'])
49+
supported_servers = {
50+
"Tranquility": ApiServer("Tranquility", "login.eveonline.com", "esi.evetech.net", '095d8cd841ac40b581330919b49fe746', 'https://pyfa-org.github.io/Pyfa/callback', True),
51+
# No point having SISI: https://developers.eveonline.com/blog/article/removing-datasource-singularity
52+
# "Singularity": ApiServer("Singularity", "sisilogin.testeveonline.com", "esi.evetech.net", 'b9c3cc79448f449ab17f3aebd018842e', 'https://pyfa-org.github.io/Pyfa/callback'),
53+
"Serenity": ApiServer("Serenity", "login.evepc.163.com", "ali-esi.evepc.163.com", 'bc90aa496a404724a93f41b4f4e97761', 'https://ali-esi.evepc.163.com/ui/oauth2-redirect.html', False)
54+
}
55+
56+
SSO_LOGOFF_SERENITY='https://login.evepc.163.com/account/logoff'
4857
ESI_CACHE = 'esi_cache'
49-
SSO_CALLBACK = 'https://pyfa-org.github.io/Pyfa/callback'
5058

5159
LOGLEVEL_MAP = {
5260
"critical": CRITICAL,
@@ -58,13 +66,22 @@
5866

5967
CATALOG = 'lang'
6068

69+
70+
slotColourMapDark = {
71+
FittingSlot.LOW: wx.Colour(44, 36, 19), # yellow = low slots 24/13
72+
FittingSlot.MED: wx.Colour(28, 39, 51), # blue = mid slots 8.1/9.5
73+
FittingSlot.HIGH: wx.Colour(53, 31, 34), # red = high slots 6.5/11.5
74+
FittingSlot.RIG: '',
75+
FittingSlot.SUBSYSTEM: ''}
76+
errColorDark = wx.Colour(70, 20, 20)
6177
slotColourMap = {
6278
FittingSlot.LOW: wx.Colour(250, 235, 204), # yellow = low slots
6379
FittingSlot.MED: wx.Colour(188, 215, 241), # blue = mid slots
6480
FittingSlot.HIGH: wx.Colour(235, 204, 209), # red = high slots
6581
FittingSlot.RIG: '',
66-
FittingSlot.SUBSYSTEM: ''
67-
}
82+
FittingSlot.SUBSYSTEM: ''}
83+
errColor = wx.Colour(204, 51, 51)
84+
6885

6986
def getClientSecret():
7087
return clientHash

0 commit comments

Comments
 (0)