mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 10:08:40 -05:00
Initial flatpak support
This commit is contained in:
parent
9bdd44a4e4
commit
a869c5f544
3 changed files with 130 additions and 1 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -114,3 +114,8 @@ dmypy.json
|
||||||
|
|
||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
|
# Flatpak
|
||||||
|
|
||||||
|
.flatpak-builder
|
||||||
|
build-dir
|
||||||
|
|
|
||||||
123
org.trimage.Trimage.json
Normal file
123
org.trimage.Trimage.json
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
{
|
||||||
|
"id": "org.trimage.Trimage",
|
||||||
|
"runtime": "org.kde.Platform",
|
||||||
|
"runtime-version": "5.13",
|
||||||
|
"sdk": "org.kde.Sdk",
|
||||||
|
"command": "trimage",
|
||||||
|
"finish-args": [
|
||||||
|
"--share=network",
|
||||||
|
"--share=ipc",
|
||||||
|
"--socket=x11",
|
||||||
|
"--socket=wayland",
|
||||||
|
"--device=dri"
|
||||||
|
],
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name" : "pyqt5",
|
||||||
|
"config-opts" : [
|
||||||
|
"--disable-static",
|
||||||
|
"--enable-x11"
|
||||||
|
],
|
||||||
|
"sources" : [
|
||||||
|
{
|
||||||
|
"type" : "archive",
|
||||||
|
"url" : "https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.13.1/PyQt5_gpl-5.13.1.tar.gz",
|
||||||
|
"sha256" : "54b7f456341b89eeb3930e786837762ea67f235e886512496c4152ebe106d4af"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "script",
|
||||||
|
"commands": [
|
||||||
|
"python3 configure.py --assume-shared --confirm-license --no-designer-plugin --no-qml-plugin --sysroot=/app --qsci-api --qsci-api-destdir=/app/qsci --sipdir=/app/share/sip --sip=/app/bin/sip --sip-incdir=/app/include QMAKE_CFLAGS_RELEASE='-I/usr/include/python3.7m/' QMAKE_CXXFLAGS_RELEASE='-I/usr/include/python3.7m/'"
|
||||||
|
],
|
||||||
|
"dest-filename": "configure"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"modules" : [
|
||||||
|
{
|
||||||
|
"name" : "sip",
|
||||||
|
"sources" : [
|
||||||
|
{
|
||||||
|
"type" : "archive",
|
||||||
|
"url" : "https://www.riverbankcomputing.com/static/Downloads/sip/4.19.19/sip-4.19.19.tar.gz",
|
||||||
|
"sha256" : "5436b61a78f48c7e8078e93a6b59453ad33780f80c644e5f3af39f94be1ede44"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "script",
|
||||||
|
"commands": [
|
||||||
|
"python3 configure.py --sip-module PyQt5.sip -b ${FLATPAK_DEST}/bin -d ${FLATPAK_DEST}/lib/python3.7/site-packages -e ${FLATPAK_DEST}/include -v ${FLATPAK_DEST}/share/sip --stubsdir=${FLATPAK_DEST}/lib/python3.7/site-packages"
|
||||||
|
],
|
||||||
|
"dest-filename": "configure"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"cleanup" : [
|
||||||
|
"/bin",
|
||||||
|
"/include"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "jpegoptim",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://github.com/tjko/jpegoptim/archive/RELEASE.1.4.6.tar.gz",
|
||||||
|
"sha256": "c44dcfac0a113c3bec13d0fc60faf57a0f9a31f88473ccad33ecdf210b4c0c52"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "optipng",
|
||||||
|
"build-options": {
|
||||||
|
"config-opts": [
|
||||||
|
"--with-system-libs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.7/optipng-0.7.7.tar.gz",
|
||||||
|
"sha256": "4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pngcrush",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://sourceforge.net/projects/pmt/files/pngcrush/1.8.13/pngcrush-1.8.13.tar.gz",
|
||||||
|
"sha256": "bac37d4b2be88d7e88aadcde9661beb3a513a90e7d26784f906c1e2da8ba332e"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build-commands": [
|
||||||
|
"make -f Makefile",
|
||||||
|
"install -D pngcrush /app/bin/pngcrush"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "advpng",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://github.com/amadvance/advancecomp/releases/download/v2.1/advancecomp-2.1.tar.gz",
|
||||||
|
"sha256": "3ac0875e86a8517011976f04107186d5c60d434954078bc502ee731480933eb8"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "trimage",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"pip3 install --prefix=/app --no-deps ."
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "dir",
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -31,9 +31,10 @@ class StartQt(QMainWindow):
|
||||||
self.verbose = True
|
self.verbose = True
|
||||||
self.imagelist = []
|
self.imagelist = []
|
||||||
|
|
||||||
QCoreApplication.setOrganizationName("Kilian Valkhof")
|
QCoreApplication.setOrganizationName("trimage.org")
|
||||||
QCoreApplication.setOrganizationDomain("trimage.org")
|
QCoreApplication.setOrganizationDomain("trimage.org")
|
||||||
QCoreApplication.setApplicationName("Trimage")
|
QCoreApplication.setApplicationName("Trimage")
|
||||||
|
QGuiApplication.setDesktopFileName("org.trimage.Trimage")
|
||||||
self.settings = QSettings()
|
self.settings = QSettings()
|
||||||
if self.settings.value("geometry"):
|
if self.settings.value("geometry"):
|
||||||
self.restoreGeometry(self.settings.value("geometry"))
|
self.restoreGeometry(self.settings.value("geometry"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue