From 3a05fde4c957f85c626016e82ff9eaed71ebd7c0 Mon Sep 17 00:00:00 2001
From: Voxel <41875513+VoxelCubes@users.noreply.github.com>
Date: Mon, 24 Apr 2023 20:04:09 +0200
Subject: [PATCH] Revert "Support flatpak build system"
This reverts commit 904dc2db4919c6fcab6071c5727533aa3a39221f.
---
.gitignore | 5 -----
.idea/DeepQt.iml | 1 -
DeepQt-flatpak.desktop | 9 ---------
Makefile | 33 +--------------------------------
com.voxel.deepqt.yaml | 25 -------------------------
5 files changed, 1 insertion(+), 72 deletions(-)
delete mode 100644 DeepQt-flatpak.desktop
delete mode 100644 com.voxel.deepqt.yaml
diff --git a/.gitignore b/.gitignore
index 2bbf4cb..28fb514 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,6 @@
.env
.directory
-# Flatpak
-.flatpak-builder/
-.flatpak/
-deepqt.flatpak
-
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
diff --git a/.idea/DeepQt.iml b/.idea/DeepQt.iml
index 68238e4..efd559e 100644
--- a/.idea/DeepQt.iml
+++ b/.idea/DeepQt.iml
@@ -8,7 +8,6 @@
-
diff --git a/DeepQt-flatpak.desktop b/DeepQt-flatpak.desktop
deleted file mode 100644
index ae92d80..0000000
--- a/DeepQt-flatpak.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=DeepQt
-Comment= Harness the power of the DeepL API.
-GenericName=Computer Aided Translation
-Icon=deepqt
-Exec=flatpak run com.voxel.deepqt
-Terminal=false
-Categories=Utility
diff --git a/Makefile b/Makefile
index 7450e7f..04e6955 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,7 @@
# define variables
-PROJECT = deepqt
PYTHON = python
BUILD_DIR = dist/
BUILD_CACHE = deepqt.egg-info/
-FLATPAK_PROJECT = com.voxel.deepqt
-FLATPAK_SOURCE_DIR = .flatpak/flatpak_sources
-FLATPAK_BASE_DIR = .flatpak
-FLATPAK_BUILD_DIR = .flatpak/build-dir
-FLATPAK_REPO_DIR = .flatpak/repo
-FLATPAK_PYTHON_PACKAGE_DIR = $(FLATPAK_SOURCE_DIR)/python-packages
-
# default target
fresh-install: clean build install
@@ -30,28 +22,5 @@ clean:
release:
twine upload $(BUILD_DIR)*
-# flatpak targets
-prepare-flatpak: clean-flatpak
- mkdir -p $(FLATPAK_BUILD_DIR) $(FLATPAK_REPO_DIR)
- mkdir -p $(FLATPAK_SOURCE_DIR)
- pip download -r requirements.txt --dest $(FLATPAK_PYTHON_PACKAGE_DIR)
- # Also build the current package to the dependencies folder.
- $(PYTHON) -m build --outdir $(FLATPAK_PYTHON_PACKAGE_DIR)
- # Include the desktop file and the icon in the flatpak.
- cp ./media/deepqt.png $(FLATPAK_SOURCE_DIR)/deepqt.png
- cp ./DeepQt-flatpak.desktop $(FLATPAK_SOURCE_DIR)/DeepQt.desktop
-
-build-flatpak: prepare-flatpak
- flatpak-builder --repo=$(FLATPAK_REPO_DIR) --force-clean $(FLATPAK_BUILD_DIR) $(FLATPAK_PROJECT).yaml
- @echo 'Building flatpak bundle, this may take a few minutes...'
- flatpak build-bundle $(FLATPAK_REPO_DIR) $(PROJECT).flatpak $(FLATPAK_PROJECT)
- rm -rf $(FLATPAK_BUILD_DIR)
-
-install-flatpak: build-flatpak
- flatpak install --user --bundle $(PROJECT).flatpak
- flatpak run $(FLATPAK_PROJECT)
-
-clean-flatpak:
- rm -rf .flatpak
-.PHONY: clean build install fresh-install release prepare-flatpak build-flatpak clean-flatpak
+.PHONY: clean build install fresh-install release
\ No newline at end of file
diff --git a/com.voxel.deepqt.yaml b/com.voxel.deepqt.yaml
deleted file mode 100644
index c6e03ff..0000000
--- a/com.voxel.deepqt.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-app-id: com.voxel.deepqt
-runtime: org.kde.Platform
-runtime-version: '5.15-22.08'
-sdk: org.kde.Sdk
-command: deepqt
-finish-args:
- - --share=ipc
- - --socket=fallback-x11
- - --socket=wayland
- - --filesystem=xdg-config
- - --filesystem=xdg-cache
- - --filesystem=home
- - --share=network
-modules:
- - name: deepqt
- buildsystem: simple
- build-commands:
- - python3 -m venv /app
- - /app/bin/pip install --no-index --find-links=./python-packages deepqt
- post-install:
- - install -Dm644 DeepQt.desktop /app/share/applications/com.voxel.deepqt.desktop
- - install -Dm644 deepqt.png /app/share/icons/hicolor/256x256/apps/com.voxel.deepqt.png
- sources:
- - type: dir
- path: .flatpak/flatpak_sources