Skip to content

Commit 86f2240

Browse files
Merge pull request #55 from peteruithoven/flatpak
WIP: Package as Flatpak for elementary OS 6
2 parents 00ce4ff + f3246c0 commit 86f2240

15 files changed

+94
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ build/*
22
debian/build/*
33
debian/debhelper-build-stamp
44
*debhelper.log
5+
.flatpak-builder

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66
</a>
77
</p>
88

9-
Quickly resize images from the context menu.
9+
Quickly resize images.
1010
Features:
11-
- Use from context menu: right click on image(s), and select "Resize images".
12-
- Use from Applications menu: Drag and drop image(s).
11+
- Open images with Resizer or open Reizer and Drag and drop images
1312
- Maintains aspect ratio.
1413
- Keyboard control: Change the sizes using the up and down keys, press enter to resize.
1514
- Settings are stored for next time.
1615

17-
![Screenshot 1](screenshot.png)
18-
![Screenshot 2](screenshot2.png)
19-
![Screenshot 3](screenshot3.png)
20-
![Screenshot 4](screenshot4.png)
21-
![Screenshot 5](screenshot5.png)
16+
![Screenshot resize image](screenshot.png)
17+
![Screenshot without images](screenshot2.png)
18+
![Screenshot resize multiple images](screenshot3.png)
19+
![Screenshot error](screenshot4.png)
2220

2321
## Building, Testing, and Installation
2422

@@ -50,5 +48,5 @@ Generate / update `.po` files:
5048

5149
## Credits
5250

53-
A lot of the code is inspired by the [elementary Screenshot tool](https://github.com/elementary/screenshot-tool) and Felipe Escoto's [wallpaperize](https://github.com/Philip-Scott/wallpaperize).
51+
A lot of the code is inspired by the [elementary Screenshot tool](https://github.com/elementary/screenshot-tool) and Felipe Escoto's [wallpaperize](https://github.com/Philip-Scott/wallpaperize).
5452
The icon is based on the [elementary Photos icon](https://github.com/elementary/icons/blob/master/apps/128/multimedia-photo-manager.svgs) and was greatly improved by [TraumaD](https://github.com/TraumaD).
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This is the same ID that you've used in meson.build and other files
2+
app-id: com.github.peteruithoven.resizer
3+
4+
# Instead of manually specifying a long list of build and runtime dependencies,
5+
# we can use a convenient pre-made runtime and SDK. For this example, we'll be
6+
# using the runtime and SDK provided by elementary.
7+
runtime: io.elementary.Platform
8+
runtime-version: '6'
9+
sdk: io.elementary.Sdk
10+
11+
# This should match the exec line in your .desktop file and usually is the same
12+
# as your app ID
13+
command: com.github.peteruithoven.resizer
14+
15+
# Here we can specify the kinds of permissions our app needs to run. Since we're
16+
# not using hardware like webcams, making sound, or reading external files, we
17+
# only need permission to draw our app on screen using either X11 or Wayland.
18+
finish-args:
19+
- '--share=ipc'
20+
- '--socket=fallback-x11'
21+
- '--socket=wayland'
22+
- '--filesystem=home'
23+
24+
# This section is where you list all the source code required to build your app.
25+
# If we had external dependencies that weren't included in our SDK, we would list
26+
# them here.
27+
modules:
28+
- name: resizer
29+
buildsystem: meson
30+
sources:
31+
- type: dir
32+
path: .
33+
# Inspiration: https://github.com/ImageMagick/ImageMagick6/releases/tag/6.9.12-19
34+
- name: imagemagick
35+
config-opts:
36+
- --enable-shared
37+
- --disable-static
38+
- --with-modules
39+
- --with-x
40+
- --with-threads
41+
- --with-magick_plus_plus
42+
- --with-gslib
43+
- --with-wmf
44+
- --with-webp
45+
- --with-openexr
46+
- --with-rsvg
47+
- --with-xml
48+
- --with-jbig
49+
- --with-openjp2
50+
sources:
51+
- type: archive
52+
url: https://github.com/ImageMagick/ImageMagick6/archive/6.9.12-19.tar.gz
53+
sha256: 2f184f1f5c3e19849347b2b4acb6dd074290903d36fa5924956ee06c85ddf783
54+
cleanup:
55+
- /share/doc

data/com.github.peteruithoven.resizer.appdata.xml.in

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
<metadata_license>CC0</metadata_license>
66
<project_license>GPL-3.0+</project_license>
77
<name>Resizer</name>
8-
<summary>Quickly resize images from the context menu</summary>
8+
<summary>Quickly resize images</summary>
99
<description>
1010
<p>
11-
A simple image resizer that resizes one or more images, usable from the context menu or as a standalone app.
11+
A simple image resizer that resizes one or more images.
1212
</p>
1313
<p>
1414
Features:
1515
</p>
1616
<ul>
17-
<li>Use from context menu: right click on image(s), and select "Resize images".</li>
18-
<li>Use from Applications menu: Drag and drop image(s).</li>
17+
<li>Open images with Resizer or open Reizer and Drag and drop images</li>
1918
<li>Maintains aspect ratio.</li>
2019
<li>Keyboard control: Change the sizes using the up and down keys, press enter to resize.</li>
2120
<li>Settings are stored for next time.</li>
@@ -34,9 +33,6 @@
3433
<screenshot>
3534
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/screenshot4.png</image>
3635
</screenshot>
37-
<screenshot>
38-
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/screenshot5.png</image>
39-
</screenshot>
4036
</screenshots>
4137
<releases>
4238
<release version="1.1.4" date="2021-05-25">

data/com.github.peteruithoven.resizer.desktop.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Name=Resizer
33
GenericName=Resizer App
44
Comment=Image resizer
55
Categories=Graphics;2DGraphics;RasterGraphics;
6-
Exec=com.github.peteruithoven.resizer %f
6+
Exec=com.github.peteruithoven.resizer %F
77
Icon=com.github.peteruithoven.resizer
88
Terminal=false
99
Type=Application
1010
X-GNOME-Gettext-Domain=resizer
11-
Keywords=Image;resize;
11+
Keywords=Image;resize;
12+
MimeType=image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-png;image/webp;

meson.build

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), la
1313
# replacing variables like PROJECT_NAME
1414
conf_data = configuration_data()
1515
conf_data.set_quoted('PROJECT_NAME', meson.project_name())
16-
configure_file(
16+
config_file = configure_file(
1717
input : 'src/config.vala.in',
1818
output : 'config.vala',
1919
configuration : conf_data
2020
)
2121

22+
meson.build_root()
23+
2224
executable(
2325
meson.project_name(),
2426
'src/Application.vala',
@@ -29,15 +31,16 @@ executable(
2931
'src/Resizer.vala',
3032
'src/DropArea.vala',
3133
'src/MessageCenter.vala',
32-
'build/config.vala',
34+
config_file,
3335
dependencies: [
3436
dependency('gtk+-3.0'),
35-
dependency('granite')
37+
dependency('granite'),
38+
dependency('libhandy-1', version: '>=1.0.0')
3639
],
3740
install : true
3841
)
3942

4043
meson.add_install_script('meson/post_install.py')
4144

4245
subdir('data')
43-
subdir('po')
46+
subdir('po')

screenshot2.png

-5.03 KB
Loading

screenshot3.png

131 KB
Loading

screenshot4.png

-150 KB
Loading

screenshot5.png

-39.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)