Skip to content

Commit

Permalink
add(#10) flatpak packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
xlmnxp committed Sep 25, 2024
1 parent 47f6c53 commit cac5fe0
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea
/venv
.flatpak-builder
72 changes: 72 additions & 0 deletions flatpak/sa.sy.qocker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"app-id": "sa.sy.Qocker",
"runtime": "org.kde.Platform",
"runtime-version": "5.15",
"sdk": "org.kde.Sdk",
"command": "qocker",
"modules": [
{
"name": "PyQt5",
"cleanup": [
"/bin/sip",
"/include",
"/lib/python3.9/site-packages/*.pyi"
],
"config-opts": [
"--disable-static",
"--enable-x11"
],
"buildsystem": "simple",
"build-commands": [
"python configure.py --confirm-license --no-docstrings --assume-shared --no-sip-files --no-qml-plugin --no-tools --no-qsci-api -d ${FLATPAK_DEST}/lib/python3.9/site-packages --sip=${FLATPAK_DEST}/bin/sip --sip-incdir=${FLATPAK_DEST}/include --stubsdir=${FLATPAK_DEST}/lib/python3.9/site-packages --disable=QtSensors --disable=QtWebEngine --disable=QtQuick --disable=QtQml --disable=QtWebChannel --disable=QtWebEngineCore --disable=QWebEngineWidgets --disable=QtQuickWidgets --disable=QtSql --disable=QtXmlPatterns --disable=QtMultimedia --disable=QtMultimediaWidgets --disable=QtLocation --disable=QtDesigner --disable=QtOpenGL --disable=QtBluetooth --disable=QtWebKit --disable=QtWebKitWidgets --disable=QtNfc --disable=QtPositioning",
"make -j $FLATPAK_BUILDER_N_JOBS",
"make install"
],
"sources": [
{
"type": "archive",
"url": "https://pypi.io/packages/source/P/PyQt5/PyQt5-5.15.4.tar.gz",
"sha256": "2a69597e0dd11caabe75fae133feca66387819fc9bc050f547e5551bce97e5be"
}
],
"modules": [
{
"name": "sip",
"buildsystem": "simple",
"build-commands": [
"python configure.py --sip-module PyQt5.sip -b ${FLATPAK_DEST}/bin -d ${FLATPAK_DEST}/lib/python3.9/site-packages -e ${FLATPAK_DEST}/include -v ${FLATPAK_DEST}/share/sip --stubsdir=${FLATPAK_DEST}/lib/python3.9/site-packages",
"make",
"make install"
],
"sources": [
{
"type": "archive",
"url": "https://www.riverbankcomputing.com/static/Downloads/sip/4.19.25/sip-4.19.25.tar.gz",
"sha256": "b39d93e937647807bac23579edbff25fe46d16213f708370072574ab1f1b4211"
}
]
}
]
},
{
"name": "qocker",
"buildsystem": "simple",
"build-commands": [
"install -Dm755 main.py /app/bin/qocker"
],
"sources": [
{
"type": "git",
"url": "https://github.com/xlmnxp/qocker.git",
"tag": "v0.2"
}
]
}
],
"finish-args": [
"--share=network",
"--socket=x11",
"--socket=pulseaudio",
"--env=QT_QPA_PLATFORM=xcb"
]
}
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import sys
from PyQt5.QtWidgets import (QApplication, QMainWindow, QTabWidget, QTreeWidget, QTreeWidgetItem,
QVBoxLayout, QHBoxLayout, QWidget, QToolBar, QAction, QMenu,
Expand Down

0 comments on commit cac5fe0

Please sign in to comment.