diff --git a/README.md b/README.md index 376a25f4..654fa5dd 100644 --- a/README.md +++ b/README.md @@ -14,16 +14,34 @@ ## Build -### Dependencies - -- build-essential -- meson -- libadwaita-1-dev -- gettext -- desktop-file-utils -- libnm-dev -- libnma-dev -- libnma-gtk4-dev +### Build Dependencies +```bash +sudo apt install -y build-essential debhelper \ + python3 meson \ + libadwaita-1-dev gettext \ + desktop-file-utils \ + libjpeg-dev libnm-dev \ + libnma-dev libnma-gtk4-dev \ + ninja-build +``` + +### Runtime Dependencies +```bash +sudo apt install -y python3 python3-gi \ + python3-tz libadwaita-1-0 \ + gir1.2-gtk-4.0 gir1.2-adw-1 \ + gir1.2-vte-3.91 libnm0 \ + libnma0 libnma-gtk4-0 +``` + +#### Optional Dependencies +```bash +sudo apt install python-requests # required for conn_check +sudo apt install gir1.2-gweather-4.0 # required for timezones +sudo apt install gir1.2-gnomedesktop-4.0 # required for languages, keyboard +sudo apt install gir1.2-nma4-1.0 # required for network +sudo apt install gir1.2-nm-1.0 # required for network +``` ### Build diff --git a/debian/control b/debian/control index c4b23876..c74e2035 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ Build-Depends: libjpeg-dev, libnm-dev, libnma-dev, - libnma-gtk4-dev + libnma-gtk4-dev, + ninja-build Homepage: https://github.com/mirkobrombin/vanilla-first-setup/ Vcs-Browser: hhttps://github.com/mirkobrombin/vanilla-first-setup Vcs-Git: https://github.com/mirkobrombin/vanilla-first-setup.git @@ -31,6 +32,11 @@ Depends: python3, gir1.2-vte-3.91, libnm0, libnma0, - network-manager, libnma-gtk4-0 +Suggests: network-manager, + python-requests, + gir1.2-gweather-4.0, + gir1.2-gnomedesktop-4.0, + gir1.2-nma4-1.0, + gir1.2-nm-1.0 Description: This utility is meant to be used in Vanilla GNOME as a first-setup wizard. diff --git a/vanilla_first_setup/core/languages.py b/vanilla_first_setup/core/languages.py index 3d8e0797..7be0eee1 100644 --- a/vanilla_first_setup/core/languages.py +++ b/vanilla_first_setup/core/languages.py @@ -1,5 +1,9 @@ import locale +import gi + +gi.require_version("GnomeDesktop", "4.0") + from gi.repository import GnomeDesktop all_locale = [ diff --git a/vanilla_first_setup/core/timezones.py b/vanilla_first_setup/core/timezones.py index 6c731616..d52ce415 100644 --- a/vanilla_first_setup/core/timezones.py +++ b/vanilla_first_setup/core/timezones.py @@ -1,3 +1,7 @@ +import gi + +gi.require_version("GWeather", "4.0") + import datetime import logging diff --git a/vanilla_first_setup/defaults/keyboard.py b/vanilla_first_setup/defaults/keyboard.py index 15166a27..c6a76961 100644 --- a/vanilla_first_setup/defaults/keyboard.py +++ b/vanilla_first_setup/defaults/keyboard.py @@ -13,6 +13,9 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import gi + +gi.require_version("GnomeDesktop", "4.0") import contextlib import os diff --git a/vanilla_first_setup/defaults/network.py b/vanilla_first_setup/defaults/network.py index aaafa2fa..944d9c00 100644 --- a/vanilla_first_setup/defaults/network.py +++ b/vanilla_first_setup/defaults/network.py @@ -15,6 +15,10 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import gi + +gi.require_version("NM", "1.0") +gi.require_version("NMA4", "1.0") import html import logging diff --git a/vanilla_first_setup/main.py b/vanilla_first_setup/main.py index ce848c44..faa1edf8 100644 --- a/vanilla_first_setup/main.py +++ b/vanilla_first_setup/main.py @@ -20,10 +20,6 @@ gi.require_version("Gtk", "4.0") gi.require_version("Adw", "1") gi.require_version("Vte", "3.91") -gi.require_version("NM", "1.0") -gi.require_version("NMA4", "1.0") -gi.require_version("GnomeDesktop", "4.0") -gi.require_version("GWeather", "4.0") from gi.repository import Gtk, Gdk, Gio, GLib, Adw