Compare commits

..

No commits in common. "4b55caca8734a31a1dd690fa8c414d9364bd3fd7" and "d3f3f5933ef71b8503791144499beb353b9a2603" have entirely different histories.

7 changed files with 29 additions and 55 deletions

4
.gitignore vendored
View File

@ -2,7 +2,3 @@ __pycache__
plchat.build plchat.build
dist dist
build build
plchatdeb.py
plchatwindows.py
deb/**/*
!deb/DEBIAN

View File

@ -4,52 +4,35 @@ endif
ifeq ($(LIBDIR),) ifeq ($(LIBDIR),)
LIBDIR := lib/ LIBDIR := lib/
endif endif
VER = $(shell cat installer.cfg | grep version= | head -n 1 | sed s/version=//) PRODUCTVER=0101
all: default pack all: default pack
fresh: clean default pack
systemlibs: systemlibtarget pack systemlibs: systemlibtarget pack
dpkg: debtarget dpkg-build deb: debtarget pack packdeb
windows: wtarget wpack windows: windowstarget
default: default:
python3 -m nuitka --follow-imports --file-reference-choice=runtime --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py python3 -m nuitka --follow-imports --file-reference-choice=runtime --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py
windowstarget:
python3 -m nuitka --follow-imports --include-module=win32ctypes --enable-plugin=qt-plugins --include-qt-plugins=all --windows-disable-console --windows-icon-from-ico=fedi.ico --windows-company-name=plchat --windows-product-name=plchat --windows-product-version=$(PRODUCTVER) --python-flag=-O -o plchat plchat.py
debtarget: debtarget:
mkdir -p deb/usr/lib/plchat echo "You will need to make .deb packages using bash, ensuring you are doing so."
echo "#!/usr/lib/plchat/venv/bin/python" > deb/usr/lib/plchat/plchatdeb.py sudo ./deb/DEBIAN/postinst
echo "" >> deb/usr/lib/plchat/plchatdeb.py source /usr/lib/plchat/venv/bin/activate
cat plchat.py >> deb/usr/lib/plchat/plchatdeb.py pip3 install keyring notify-py appdirs python-dateutil requests urllib3 websockets PyQt5 python-magic
chmod +x deb/usr/lib/plchat/plchatdeb.py python3 -m nuitka --file-reference-choice=runtime --follow-imports --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py
cp fedi.svg deb/usr/lib/plchat
cp fedi.ico deb/usr/lib/plchat
cp send.svg deb/usr/lib/plchat
cp unread.svg deb/usr/lib/plchat
cp README.md deb/usr/lib/plchat
cp LICENSE deb/usr/lib/plchat
cp COPYING deb/usr/lib/plchat
cp audiowidget.py deb/usr/lib/plchat
cp misc.py deb/usr/lib/plchat
cp pleroma.py deb/usr/lib/plchat
cp monkeypatch.py deb/usr/lib/plchat
cp timeconvert.py deb/usr/lib/plchat
cp videowidget.py deb/usr/lib/plchat
systemlibtarget: systemlibtarget:
python3 -m nuitka --file-reference-choice=runtime --nofollow-imports --follow-import-to=misc --follow-import-to=monkeypatch --follow-import-to=pleroma --follow-import-to=timeconvert --follow-import-to=videowidget --follow-import-to=audiowidget --python-flag=-O -o plchat plchat.py python3 -m nuitka --file-reference-choice=runtime --nofollow-imports --follow-import-to=misc --follow-import-to=monkeypatch --follow-import-to=pleroma --follow-import-to=timeconvert --follow-import-to=videowidget --follow-import-to=audiowidget --python-flag=-O -o plchat plchat.py
windowstarget:
cat windows.patch > plchatwindows.py
cat plchat.py >> plchatwindows.py
makensis -VERSION || die "No makensis in path"
python3 -m nsist installer.cfg
wpack:
mv build/nsis/PlChat_$(VER).exe .
zip plchat_windows.zip PlChat_$(VER).exe
pack: pack:
mkdir dist mkdir dist
mv plchat dist mv plchat dist
@ -61,14 +44,14 @@ pack:
cp LICENSE dist cp LICENSE dist
cp COPYING dist cp COPYING dist
dpkg-build: packdeb:
mkdir -p deb/usr/lib/plchat
mv dist deb/usr/lib/plchat
dpkg --build deb dpkg --build deb
mv deb.deb plchat.deb mv deb.deb plchat.deb
clean: clean:
rm -r dist || true rm -r dist || true
rm -r build || true
rm -r deb/usr || true
install: install:
mkdir $(PREFIX)$(LIBDIR) mkdir $(PREFIX)$(LIBDIR)

View File

@ -14,11 +14,9 @@ Download and install the [k-lite codec pack](https://www.codecguide.com/download
Download the installer from https://pond.waldn.net/plchat/windows/latest.zip extract the zip file. Other versions can be found at, for example, https://pond.waldn.net/plchat/windows/1.0.1.zip . Run the installer. Download the installer from https://pond.waldn.net/plchat/windows/latest.zip extract the zip file. Other versions can be found at, for example, https://pond.waldn.net/plchat/windows/1.0.1.zip . Run the installer.
### Linux ### Linux
A prepackaged deb file is provided in https://git.waldn.net/git/knotteye/plchat/releases as ~~well as a compiled binary for amd64 linux~~. The precompiled binary was extremely not-portable and did not work well. Use a package or build from source. A prepackaged deb file is provided in https://git.waldn.net/git/knotteye/plchat/releases as well as a compiled binary for amd64 linux.
If you package plchat for your distro, please let me know and I will add it here. If you package plchat for your distro, please let me know and I will add it here.
Gentoo: can be found in [this overlay](https://git.waldn.net/git/knotteye/overlay)
### MacOS ### MacOS
~~Nuitka does not support cross compilation and I do not have a working MacOS machine or VM, but it should theoretically compile and run just fine. Feel free to message me for support, and I'll be glad to link to your site if you host any binaries you build.~~ ~~Nuitka does not support cross compilation and I do not have a working MacOS machine or VM, but it should theoretically compile and run just fine. Feel free to message me for support, and I'll be glad to link to your site if you host any binaries you build.~~
A macos binary has been provided by [~am](https://decept.org/users/am). You can find it on the releases page. Run `brew install libmagic` before running. A macos binary has been provided by [~am](https://decept.org/users/am). You can find it on the releases page. Run `brew install libmagic` before running.

View File

@ -1,11 +1,11 @@
Package: plchat Package: plchat
Version: 1.0.2 Version: 1.0.1
Section: net Section: net
Priority: optional Priority: optional
Architecture: all Architecture: amd64
Description: A pleroma chat client Description: A pleroma chat client
Homepage: https://git.waldn.net/git/knotteye/plchat Homepage: https://git.waldn.net/git/knotteye/plchat
Maintainer: Knott Eye <knotteye@airmail.cc> Maintainer: Knott Eye <knotteye@airmail.cc>
Pre-Depends: python3 (>= 3.8.0~), python3-pip (>= 19.3), python3-venv, bash Pre-Depends: python3 (>= 3.8.0~), python3-pip (>= 19.3), python3-venv, bash
Depends: dbus, libmagic1, libc6, gstreamer1.0-nice, gstreamer1.0-libav, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-qt5, gstreamer1.0-plugins-base, gstreamer1.0-python3-plugin-loader, python3-keyring, python3-appdirs, python3-magic, python3-dateutil, python3-websockets, python3-requests, python3-dateutil, python3-urllib3 Depends: dbus, libmagic1, libc6, gstreamer1.0-nice, gstreamer1.0-libav, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-qt5, gstreamer1.0-plugins-base, gstreamer1.0-python3-plugin-loader
Suggests: gnome-keyring Suggests: gnome-keyring

View File

@ -1,10 +1,7 @@
#!/bin/bash #!/bin/bash
mkdir -p /usr/lib/plchat mkdir -p /usr/lib/plchat
cd /usr/lib/plchat cd /usr/lib/plchat
python3 -m venv --system-site-packages venv python3 -m venv venv
source venv/bin/activate source venv/bin/activate
pip3 install PyQt5==5.15.4 PyQt5-Qt5 PyQt5-sip notify-py pip3 install PyQt5==5.15.4 PyQt5-Qt5 PyQt5-sip certifi cryptography
echo "#!/bin/sh" > /usr/bin/plchat ln -sf /usr/lib/plchat/dist/plchat /usr/bin/plchat
echo "/usr/lib/plchat/venv/bin/python /usr/plib/plchat/plchatdeb.py" >> /usr/bin/plchat
chmod +x /usr/bin/plchat

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
rm -f /usr/bin/plchat rm -f /usr/bin/plchat
rm -rf /usr/lib/plchat

View File

@ -1,7 +1,7 @@
[Application] [Application]
name=PlChat name=PlChat
version=1.0.2 version=1.0.1
script=plchatwindows.py script=plchat.py
icon=fedi.ico icon=fedi.ico
license_file=LICENSE license_file=LICENSE
console=false console=false