Skip to content

Commit bb3a2a0

Browse files
author
ncravino
committed
Add AppImage to make release
1 parent 2c32933 commit bb3a2a0

File tree

7 files changed

+73
-8
lines changed

7 files changed

+73
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
build/
33
.qmake.stash
44
packaging/*
5+
dist/*

Makefile

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
VERSION := $(shell cat VERSION)
2+
DATE := $(shell date +"%Y-%m-%d")
23

34
default: build
45

56
.PHONY: icon
67
icon:
78
convert ./resources/icons/giduba.svg -define icon:auto-resize="256,128,96,64,48,32,16" ./resources/icons/giduba.ico
8-
convert ./resources/icons/giduba.svg -resize 32 ./resources/icons/giduba.png
9+
convert ./resources/icons/giduba.svg -resize 256 ./resources/icons/giduba.png
910

1011
./build/:
1112
mkdir -p build && cd build && qmake ../Giduba.pro
@@ -31,11 +32,13 @@ run:
3132
prepare-deb: build
3233
rm -rf ./packaging/deb/ && \
3334
mkdir -p ./packaging/deb/giduba/usr/bin && \
34-
mkdir -p ./packaging/deb/giduba//usr/share/applications && \
35+
mkdir -p ./packaging/deb/giduba/usr/share/applications && \
36+
mkdir -p ./packaging/deb/giduba/usr/share/metainfo && \
3537
mkdir -p ./packaging/deb/giduba/usr/share/icons/hicolor/scalable/apps/ && \
3638
mkdir -p ./packaging/deb/giduba/DEBIAN && \
3739
VERSION=${VERSION} envsubst < ./scripts/packaging//control > ./packaging/deb/giduba/DEBIAN/control && \
38-
cp ./scripts/packaging//giduba.desktop ./packaging/deb/giduba/usr/share/applications/ && \
40+
VERSION=${VERSION} DATE=${DATE} envsubst < ./scripts/packaging/com.ncravino.giduba.appdata.xml > ./packaging/deb/giduba/usr/share/metainfo/com.ncravino.giduba.appdata.xml && \
41+
cp ./scripts/packaging/com.ncravino.giduba.desktop ./packaging/deb/giduba/usr/share/applications/ && \
3942
cp ./resources/icons/giduba.svg ./packaging/deb/giduba/usr/share/icons/hicolor/scalable/apps/ && \
4043
cp ./build/Giduba ./packaging/deb/giduba/usr/bin/
4144

@@ -54,12 +57,31 @@ deb: prepare-deb
5457
tgz: prepare-tgz
5558
cd ./packaging/tgz/ && tar -czf giduba-${VERSION}.tar.gz ./giduba/*
5659

60+
.PHONY: prepare-appimage
61+
prepare-appimage: build
62+
rm -rf ./packaging/appimage && \
63+
mkdir -p ./packaging/appimage/AppDir/usr/bin/ && \
64+
mkdir -p ./packaging/appimage/AppDir/usr/share/metainfo/ && \
65+
VERSION=${VERSION} DATE=${DATE} envsubst < ./scripts/packaging/com.ncravino.giduba.appdata.xml > ./packaging/appimage/AppDir/usr/share/metainfo/com.ncravino.giduba.appdata.xml && \
66+
cp ./scripts/packaging/com.ncravino.giduba.desktop ./packaging/appimage/ && \
67+
cp ./resources/icons/giduba.svg ./packaging/appimage && \
68+
cp ./build/Giduba ./packaging/appimage/AppDir/usr/bin/
69+
70+
.PHONY: appimage
71+
appimage: prepare-appimage
72+
cd ./packaging/appimage/ && \
73+
linuxdeploy-x86_64.AppImage --appdir AppDir -d ./com.ncravino.giduba.desktop -i ./giduba.svg --output appimage
74+
75+
76+
5777
.PHONY: release
58-
release: clean deb tgz
78+
release: clean deb tgz appimage
5979
mkdir -p ./dist/ && \
6080
cp ./packaging/tgz/giduba-${VERSION}.tar.gz ./dist/ && \
61-
cp ./packaging/deb/giduba-${VERSION}.deb ./dist/
81+
cp ./packaging/deb/giduba-${VERSION}.deb ./dist/ && \
82+
cp ./packaging/appimage/Giduba-x86_64.AppImage ./dist/
6283

6384
.PHONY: deb-install-build-depends
6485
deb-install-build-depends:
6586
sudo apt update && sudo apt install make qt5-qmake qtbase5-dev build-essential
87+

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Giduba is the sumerian word for writing utensils, literally a reed that was cut
2525

2626
## Installing
2727

28-
You can find both .deb and .tar.gz releases in [https://github.com/ncravino/giduba/releases](https://github.com/ncravino/giduba/releases).
28+
You can find both .deb, AppImage, and .tar.gz releases in [https://github.com/ncravino/giduba/releases](https://github.com/ncravino/giduba/releases).
29+
2930
To install a .deb, simply download it and run:
3031
- `sudo dpkg -i filename.deb`
3132

resources/icons/giduba.png

27.1 KB
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop">
3+
<id>com.ncravino.giduba</id>
4+
<name>Giduba</name>
5+
<summary>A small and fast text editor</summary>
6+
<description>
7+
<p>Giduba is a small and simple QT based text editor for quick text editing and manipulation tasks.</p>
8+
<p>It provides:</p>
9+
<ul>
10+
<li>Unicode Support</li>
11+
<li>Configurable via configuration file</li>
12+
<li>Character, word, and line counter</li>
13+
<li>Search and Replace</li>
14+
<li>Word Wrapping</li>
15+
<li>Remember last window geometry state</li>
16+
</ul>
17+
</description>
18+
<content_rating type="oars-1.0"/>
19+
<url type="homepage">https://github.com/ncravino/giduba</url>
20+
<launchable type="desktop-id">com.ncravino.giduba.desktop</launchable>
21+
<metadata_license>CC0-1.0</metadata_license>
22+
<project_license>GPL-3.0+</project_license>
23+
<screenshots>
24+
<screenshot type="default">
25+
<caption>Giduba under KDE Plasma</caption>
26+
<image>https://github.com/ncravino/giduba/blob/main/images/screenshot.png</image>
27+
</screenshot>
28+
</screenshots>
29+
30+
<provides>
31+
<binary>Giduba</binary>
32+
</provides>
33+
<releases>
34+
<release version="$VERSION" date="$DATE" />
35+
</releases>
36+
<developer_name>Nuno Cravino</developer_name>
37+
</component>
38+
39+
40+

scripts/packaging/giduba.desktop renamed to scripts/packaging/com.ncravino.giduba.desktop

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[Desktop Entry]
22
MimeType=text/plain;inode/directory;
3+
StartupWMClass=com.ncravino.giduba
34
Name=Giduba
45
Comment=A lean, small, and simple text editor in QT
56
Exec=Giduba %F

src/editor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,11 @@ Editor::Editor(int argc, char ** argv){
349349
this->main = new Ui::MainWindow();
350350

351351
QApplication::setWindowIcon(this->icon);
352-
QApplication::setDesktopFileName("giduba"); //needed for wayland et al to show icon in window
352+
QApplication::setDesktopFileName("com.ncravino.giduba"); //needed for wayland et al to show icon in window
353353

354354
this->app->setApplicationVersion(QString(VERSION));
355355
this->app->setApplicationDisplayName("Giduba");
356-
this->app->setApplicationName("Giduba");
356+
this->app->setApplicationName("com.ncravino.giduba");
357357
this->app->setQuitOnLastWindowClosed(true);
358358

359359
this->main->setupUi(this->window);

0 commit comments

Comments
 (0)