Merge tag 'v2.39.2docker' into issue2410

This commit is contained in:
blitzmann
2022-03-23 10:27:12 -04:00
7 changed files with 134 additions and 1 deletions

19
appimage/AppRun Normal file
View File

@@ -0,0 +1,19 @@
#! /bin/bash -i
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# Export TCl/Tk
export TCL_LIBRARY="${APPDIR}/usr/share/tcltk/tcl8.4"
export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.4"
export TKPATH="${TK_LIBRARY}"
# Export SSL certificate
export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem"
# Call the entry point
#! /bin/bash -i
${APPDIR}/usr/bin/pyfa "$@"

67
appimage/Makefile Normal file
View File

@@ -0,0 +1,67 @@
APPIMAGETOOL:=appimagetool-x86_64.AppImage
APPIMAGETOOL_URL:=https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
PYTHON_APPIMAGE=python3.8.12-cp38-cp38-manylinux2014_x86_64.AppImage
PYTHON_APPIMAGE_URL=https://github.com/niess/python-appimage/releases/download/python3.8/$(PYTHON_APPIMAGE)
DEPLOY_DIR=AppDir/opt/pyfa
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PYFA_DIR:=$(realpath $(ROOT_DIR)/..)
EVE_DB:=$(DEPLOY_DIR)/eve.db
# Relative to Pyfa/ dir
PROJECT_FILES=README.md LICENSE eos graphs gui imgs locale scripts service staticdata utils version.yml config.py db_update.py pyfa.py
PROJECT_SOURCES=$(patsubst %, $(DEPLOY_DIR)/%, $(PROJECT_FILES))
# Just so the final appimage is rebuilt when these change
APPIMAGE_FILES=AppRun org.pyfa.pyfa.appdata.xml pyfa pyfa.desktop
APPIMAGE_SOURCES=$(patsubst %, $(ROOT_DIR)/%, $(APPIMAGE_FILES))
Pyfa-x86_64.AppImage: $(PROJECT_SOURCES) | $(APPIMAGETOOL) static deps $(EVE_DB)
./$(APPIMAGETOOL) AppDir
$(EVE_DB): $(PYFA_DIR)/eos $(PYFA_DIR)/db_update.py deps
AppDir/usr/bin/python -s $(DEPLOY_DIR)/db_update.py
.PHONY: deps
deps: $(DEPLOY_DIR) $(PYFA_DIR)/requirements.txt
AppDir/usr/bin/python -s -m pip install -U pip setuptools wheel
AppDir/usr/bin/python -s -m pip install -r $(PYFA_DIR)/requirements.txt
.PHONY: static
static: $(DEPLOY_DIR) $(APPIMAGE_SOURCES)
cp $(ROOT_DIR)/AppRun AppDir/
cp $(ROOT_DIR)/pyfa.desktop AppDir/
cp $(ROOT_DIR)/pyfa.desktop AppDir/usr/share/applications/
cp $(ROOT_DIR)/org.pyfa.pyfa.appdata.xml AppDir/usr/share/metainfo/
chmod +x $(ROOT_DIR)/pyfa && cp $(ROOT_DIR)/pyfa AppDir/usr/bin/
# Rule to copy generated PROJECT_SOURCES
$(DEPLOY_DIR)/%: $(PYFA_DIR)/% $(DEPLOY_DIR)
cp -r $< $@
# Prepare Python base AppImage, stripping Python metadata
$(DEPLOY_DIR): $(PYTHON_APPIMAGE)
./$(PYTHON_APPIMAGE) --appimage-extract
mv squashfs-root AppDir
rm AppDir/python*.desktop
rm AppDir/usr/share/applications/*.desktop
rm AppDir/usr/share/metainfo/*.appdata.xml
mkdir -p $(DEPLOY_DIR)
$(PYTHON_APPIMAGE):
curl -LO $(PYTHON_APPIMAGE_URL)
chmod +x $(PYTHON_APPIMAGE)
$(APPIMAGETOOL):
curl -LO $(APPIMAGETOOL_URL)
chmod +x $(APPIMAGETOOL)
clean:
rm -rf AppDir
clean-all: clean
rm -rf *.AppImage

20
appimage/README.md Normal file
View File

@@ -0,0 +1,20 @@
## Pyfa As AppImage
Needed for building:
- Linux distro, currently tested is Arch/Manjaro
- make, curl
- GTK3 libraries are needed (`gtk3` for Arch based, `libgtk-3-dev` for debian based)
- patience, first time building wxPython can take about 10 minutes
Steps:
```sh
cd appimage
mkdir build
cd build
make -f ../Makefile
```
If everything goes alright, build directory should contain `Pyfa-x86_64.AppImage`.

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.pyfa.pyfa</id>
<metadata_license>MIT</metadata_license>
<project_license>GPL-3</project_license>
<name>Pyfa</name>
<summary>Pyfa </summary>
<description>
<p> Python Fitting Assitant for EVE Online
</p>
</description>
<launchable type="desktop-id">pyfa.desktop</launchable>
<url type="homepage">https://github.com/pyfa-org/Pyfa</url>
<provides>
<binary>pyfa</binary>
</provides>
</component>

3
appimage/pyfa Executable file
View File

@@ -0,0 +1,3 @@
#! /bin/bash
${APPDIR}/usr/bin/python3.8 -s "${APPDIR}/opt/pyfa/pyfa.py" "$@"

7
appimage/pyfa.desktop Normal file
View File

@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Pyfa
Exec=pyfa
Comment=Python Fitting Assistant for EVE: Online
Icon=python
Categories=Game;

View File

@@ -1,4 +1,4 @@
wxPython == 4.0.6
wxPython <4.1
logbook >= 1.0.0
numpy == 1.19.2
matplotlib == 3.2.2