From a17f9c1f2514e4c1286420dc7e8df3f67b5806c0 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Sun, 23 Jan 2022 09:58:01 +0100 Subject: [PATCH] Fix to endes patch (Unitialized html_document.) and default to build flatpak without images to work better on low resources computers. --- AUTHORS.md | 8 +++++--- README.md | 4 ++++ me.sergiotarxz.openmg.yml | 20 -------------------- meson.build | 13 +++++++++---- meson_options.txt | 1 + src/backend/readmng.c | 6 ++++-- 6 files changed, 23 insertions(+), 29 deletions(-) delete mode 100644 me.sergiotarxz.openmg.yml diff --git a/AUTHORS.md b/AUTHORS.md index 5efa8be..9f5b816 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,3 +1,5 @@ -Sergiotarxz sergiotarxz@posteo.net Project leader and developer [Gitea](https://gitea.sergiotarxz.freemyip.com/sergiotarxz) -Germe.db FOSSgerme.deb@tuta.io Author of the icon openmg.svg. [sr.ht](https://sr.ht/~germe-fur/) -Endes endes@disroot.org Developer [Github](https://github.com/endes0) +Sergiotarxz sergiotarxz@posteo.net Project leader and developer. [Gitea](https://gitea.sergiotarxz.freemyip.com/sergiotarxz) + +Germe.db FOSSgerme.deb@tuta.io Designer and icons creator. [sr.ht](https://sr.ht/~germe-fur/) + +Endes endes@disroot.org Developer. [Github](https://github.com/endes0) diff --git a/README.md b/README.md index 6b4b284..c4ecbaf 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ ## Installing the app. +First fine tune the options in `me.sergiotarxz.openmg.json` for +meson you want to have, for example preview images, complete list is +on `meson_options.txt` + ```shell flatpak --user remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo flatpak install org.gnome.Sdk//master diff --git a/me.sergiotarxz.openmg.yml b/me.sergiotarxz.openmg.yml deleted file mode 100644 index 889076e..0000000 --- a/me.sergiotarxz.openmg.yml +++ /dev/null @@ -1,20 +0,0 @@ - -app-id: me.sergiotarxz.openmg -runtime: org.gnome.Platform -runtime-version: master -sdk: org.gnome.Sdk -sdk-version: master -command: openmg -finish-args: - - "--share=ipc" - - "--socket=x11" - - "--socket=wayland" - - "--socket=session-bus" - - "--share=network" - - "--device=dri" -modules: - - name: openmg - buildsystem: meson - sources: - - type: dir - path: . diff --git a/meson.build b/meson.build index 24dbca9..e193194 100644 --- a/meson.build +++ b/meson.build @@ -36,16 +36,21 @@ sources = [ ] link_arguments = [ - '-ldl', '-lm' ] images_on_lists = get_option('images') +is_windows = get_option('windows') -cArgs = '' -if images_on_lists - cArgs = cArgs + '-DLIST_IMAGES' +if not is_windows + link_arguments += ['-ldl'] endif + +cArgs = [] +if images_on_lists + cArgs += ['-DLIST_IMAGES'] +endif + executable('openmg', sources, dependencies : openmgdeps, diff --git a/meson_options.txt b/meson_options.txt index 5bfbecd..084c599 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('images', type : 'boolean', value : true) +option('windows', type : 'boolean', value : false) diff --git a/src/backend/readmng.c b/src/backend/readmng.c index 7ab3f88..f952bda 100644 --- a/src/backend/readmng.c +++ b/src/backend/readmng.c @@ -364,7 +364,7 @@ mg_backend_readmng_retrieve_manga_details (MgBackendReadmng *self, MgManga *manga) { MgUtilXML *xml_utils; - xmlDocPtr html_document; + xmlDocPtr html_document = NULL; xmlNodePtr *movie_detail = NULL; xmlXPathObjectPtr xpath_result = NULL; xmlNodeSetPtr node_set = NULL; @@ -409,7 +409,9 @@ cleanup_mg_backend_readmng_retrieve_manga_details: if (movie_detail) { g_free (movie_detail); } - xmlFreeDoc(html_document); + if (html_document) { + xmlFreeDoc(html_document); + } } static GListStore *