Skip to content

Commit 3a5cf29

Browse files
committed
first test build
1 parent c8a2ca3 commit 3a5cf29

File tree

3 files changed

+90
-11
lines changed

3 files changed

+90
-11
lines changed

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,88 @@ without a GUI.
2424
[![Screenshot](images/shot2.png)](images/shot2.png)
2525

2626
https://github.com/user-attachments/assets/6f7bdee1-183c-4554-9701-e0c30e75d58a
27+
28+
## flatpak
29+
30+
Add the `flathub` repo:
31+
32+
```shell
33+
flatpak remote-add --if-not-exists \
34+
flathub https://flathub.org/repo/flathub.flatpakrepo
35+
```
36+
37+
Install the gtk4 SDK and runtime:
38+
39+
```shell
40+
flatpak install org.gnome.Sdk//47
41+
flatpak install org.gnome.Platform//47
42+
```
43+
44+
Allow file. Recent security changes to git will cause submodule checkout
45+
to fail inside flatpak. If you get errors like `fatal: transport 'file'
46+
not allowed`, re-enable file transport with:
47+
48+
```shell
49+
git config --global protocol.file.allow always
50+
```
51+
52+
Build and try running it:
53+
54+
```shell
55+
flatpak-builder --force-clean --user --install build-dir org.libvips.nip4.json
56+
flatpak run org.libvips.nip4 ~/pics/k2.jpg
57+
```
58+
59+
Force a complete redownload and rebuild (should only rarely be necessary) with:
60+
61+
```shell
62+
rm -rf .flatpak-builder
63+
```
64+
65+
Check the files that are in the flatpak you built with:
66+
67+
```shell
68+
ls build-dir/files
69+
```
70+
71+
Uninstall with:
72+
73+
```shell
74+
flatpak uninstall nip4
75+
```
76+
77+
## Notes on flatpak build process
78+
79+
- niftiio is annoying to build, skip it.
80+
81+
- x265 is annoying to build, skip it
82+
83+
- we skip imagemagick as well, too huge
84+
85+
## Packaging for flathub
86+
87+
Install the appdata checker:
88+
89+
```shell
90+
flatpak install flathub org.freedesktop.appstream-glib
91+
flatpak run org.freedesktop.appstream-glib validate org.libvips.nip4.metainfo.xml
92+
```
93+
94+
Also:
95+
96+
```shell
97+
desktop-file-validate org.libvips.nip4.desktop
98+
```
99+
100+
## Uploading to flathub
101+
102+
Make a PR on:
103+
104+
https://github.com/flathub/org.libvips.nip4
105+
106+
then check the build status here:
107+
108+
https://flathub.org/builds/#/apps/org.libvips.nip4
109+
110+
On success, merge to master.
111+

TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
will need a network connection
44

5-
must wrap libgsl
5+
probably need imagemagick
66

77
- try to save and restore image view scale and position
88

org.libvips.nip4.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -448,18 +448,12 @@
448448
{
449449
"name" : "libgsl",
450450
"builddir" : true,
451-
"buildsystem" : "cmake-ninja",
452-
"build-options" : {
453-
"config-opts" : [
454-
"-DCMAKE_INSTALL_LIBDIR=lib"
455-
]
456-
},
451+
"buildsystem" : "autotools",
457452
"sources" : [
458453
{
459-
"type" : "git",
460-
"url" : "https://github.com/ebiggers/libgsl.git",
461-
"tag" : "v1.22",
462-
"commit" : "2335c047e91cac6fd04cb0fd2769380395149f15"
454+
"type" : "archive",
455+
"url" : "https://ftp.snt.utwente.nl/pub/software/gnu/gsl/gsl-2.8.tar.gz",
456+
"sha256" : "6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190"
463457
}
464458
]
465459
},

0 commit comments

Comments
 (0)