diff --git a/VERSION b/VERSION
index 99d85ec..5c4511c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.6
\ No newline at end of file
+0.0.7
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 8db4abd..59b0cb8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-vanilla-first-setup (0.0.6) jammy; urgency=low
+vanilla-first-setup (0.0.7) jammy; urgency=low
* First release
diff --git a/meson.build b/meson.build
index 1a414ff..9e355f3 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('io.github.vanilla-os.FirstSetup',
- version: '0.0.6',
+ version: '0.0.7',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
'werror=false',
diff --git a/vanilla_first_setup/dialogs/__init__.py b/vanilla_first_setup/dialogs/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/vanilla_first_setup/dialogs/meson.build b/vanilla_first_setup/dialogs/meson.build
new file mode 100644
index 0000000..1d436de
--- /dev/null
+++ b/vanilla_first_setup/dialogs/meson.build
@@ -0,0 +1,9 @@
+pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
+dialogsdir = join_paths(pkgdatadir, 'vanilla_first_setup/dialogs')
+
+sources = [
+ '__init__.py',
+ 'subsystem.py',
+]
+
+install_data(sources, install_dir: dialogsdir)
\ No newline at end of file
diff --git a/vanilla_first_setup/dialogs/subsystem.py b/vanilla_first_setup/dialogs/subsystem.py
new file mode 100644
index 0000000..8e2b3a7
--- /dev/null
+++ b/vanilla_first_setup/dialogs/subsystem.py
@@ -0,0 +1,26 @@
+# subsystem.py
+#
+# Copyright 2022 mirkobrombin
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundationat version 3 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+from gi.repository import Gtk, Adw
+
+
+@Gtk.Template(resource_path='/pm/mirko/FirstSetup/gtk/dialog-subsystem.ui')
+class SubSystemDialog(Adw.Window):
+ __gtype_name__ = 'SubSystemDialog'
+
+ def __init__(self, window, **kwargs):
+ super().__init__(**kwargs)
+ self.set_transient_for(window)
diff --git a/vanilla_first_setup/gtk/dialog-subsystem.ui b/vanilla_first_setup/gtk/dialog-subsystem.ui
new file mode 100644
index 0000000..665c00e
--- /dev/null
+++ b/vanilla_first_setup/gtk/dialog-subsystem.ui
@@ -0,0 +1,36 @@
+
+
+
+
+
+ Info About Sub System
+ 500
+ True
+
+
+
+
+
\ No newline at end of file
diff --git a/vanilla_first_setup/gtk/window.ui b/vanilla_first_setup/gtk/window.ui
index 0e210af..2fce80e 100644
--- a/vanilla_first_setup/gtk/window.ui
+++ b/vanilla_first_setup/gtk/window.ui
@@ -3,8 +3,8 @@
- 800
- 600
+ 750
+ 630
Vanilla OS First Setup
@@ -54,36 +54,57 @@
-
- vertical
- True
- True
- center
+
+ package-x-generic-symbolic
+ Choose the Package Manager
+ Choose one or more package managers from the following options.
+ fill
+ fill
+ true
-
+
+ vertical
+ True
+ True
+ center
-
- How Will you Install the Software?
+
-
- Snap
- Will replace GNOME Software with Snap store if the only package manager.
- switch_snap
+
-
- center
+
+ Flatpak
+ Will also configure the Flathub repository.
+ switch_flatpak
+
+
+ center
+
+
-
-
-
-
- Flatpak
- Will also configure the Flathub repository.
- switch_flatpak
-
- center
+
+ Snap
+ Uses the Snapcraft repository. Default in Ubuntu.
+ switch_snap
+
+
+ center
+
+
+
+
+
+
+ Appimage
+ Will install the necessary dependencies to run Appimages.
+ switch_appimage
+
+
+ center
+
+
@@ -91,44 +112,121 @@
-
- Extra
+
+ Next
+ center
+
+
+
+
+
+
+
+
+
+
+
+ utilities-terminal-symbolic
+ Sub-System
+ Access a minimal mutable Ubuntu installation integrated with Vanilla OS.
+ fill
+ fill
+ true
+
+
+ vertical
+ True
+ True
+ fill
+ center
+ 10
+
+
+ center
+ 10
+ center
-
- Apport
- Do you want to keep the Bug Reporter utility?
- switch_apport
-
-
- center
-
-
+
+ No
+ center
+
-
- Distrobox
- Allows you to create containers with different distributions.
- switch_distrobox
-
-
- center
-
-
+
+ Yes, enable it
+ center
+
+
+
+
+
+ dialog-information-symbolic
+
+
+
+
+
+
+
+ applications-utilities-symbolic
+ Extra Settings
+ The following are optional settings, leave them as they are if you don't know what they do.
+ fill
+ fill
+ true
-
- Save Changes
- center
-
+
+ vertical
+ True
+ True
+ center
+
+
+
+
+
+
+ Apport
+ If enabled, the Bug Reporter utility will be installed.
+ switch_apport
+
+
+ center
+
+
+
+
+
+
+
+
+
+
+ Save Changes
+ center
+
+
+
@@ -156,7 +254,7 @@
emblem-default-symbolic
Done!
- You can now enjoy your new Ubuntu experience.
+ You can now enjoy your Vanila OS experience.
fill
fill
true
diff --git a/vanilla_first_setup/meson.build b/vanilla_first_setup/meson.build
index 15bf36c..8b00412 100644
--- a/vanilla_first_setup/meson.build
+++ b/vanilla_first_setup/meson.build
@@ -35,6 +35,7 @@ configure_file(
subdir('utils')
subdir('models')
+subdir('dialogs')
vanilla_first_setup_sources = [
'__init__.py',
diff --git a/vanilla_first_setup/models/config.py b/vanilla_first_setup/models/config.py
index 241401f..2958bbb 100644
--- a/vanilla_first_setup/models/config.py
+++ b/vanilla_first_setup/models/config.py
@@ -6,15 +6,16 @@ logger = logging.getLogger("FirstSetup::Config")
class Config:
- def __init__(self, snap: bool, flatpak: bool, apport: bool, distrobox: bool):
+ def __init__(self, snap: bool, flatpak: bool, appimage: bool, apport: bool, distrobox: bool):
self.snap = snap
self.flatpak = flatpak
+ self.appimage = appimage
self.apport = apport
self.distrobox = distrobox
def get_str(self) -> str:
- return "snap::{0}|flatpak::{1}|apport::{2}|distrobox::{3}".format(
- self.snap, self.flatpak, self.apport, self.distrobox
+ return "snap::{0}|flatpak::{1}|appimage::{2}|apport::{3}|distrobox::{4}".format(
+ self.snap, self.flatpak, self.appimage, self.apport, self.distrobox
)
def set_val(self, key: str, val: bool):
@@ -22,6 +23,8 @@ class Config:
self.snap = val
elif key == "flatpak":
self.flatpak = val
+ elif key == "appimage":
+ self.appimage = val
elif key == "apport":
self.apport = val
elif key == "distrobox":
@@ -40,12 +43,14 @@ class Config:
snap = items[0].split('::')[1]
flatpak = items[1].split('::')[1]
- apport = items[2].split('::')[1]
- distrobox = items[3].split('::')[1]
+ appimage = items[2].split('::')[1]
+ apport = items[3].split('::')[1]
+ distrobox = items[4].split('::')[1]
return cls(
snap=get_bool(snap),
flatpak=get_bool(flatpak),
+ appimage=get_bool(appimage),
apport=get_bool(apport),
distrobox=get_bool(distrobox)
)
diff --git a/vanilla_first_setup/models/preset.py b/vanilla_first_setup/models/preset.py
index a7923b5..8c74f25 100644
--- a/vanilla_first_setup/models/preset.py
+++ b/vanilla_first_setup/models/preset.py
@@ -1,6 +1,7 @@
class Preset:
- snap: bool = True
+ snap: bool = False
flatpak: bool = True
- apport: bool = True
+ appimage: bool = False
+ apport: bool = False
distrobox: bool = True
diff --git a/vanilla_first_setup/utils/configurator.py b/vanilla_first_setup/utils/configurator.py
index 47919c7..6a85c35 100644
--- a/vanilla_first_setup/utils/configurator.py
+++ b/vanilla_first_setup/utils/configurator.py
@@ -22,6 +22,7 @@ class Configurator:
logging.info(f"Applying config: {self.config.get_str()}")
self.__enable_snap() if self.config.snap else self.__disable_snap()
self.__enable_flatpak() if self.config.flatpak else self.__disable_flatpak()
+ self.__enable_appimage() if self.config.appimage else self.__disable_appimage()
self.__enable_apport() if self.config.apport else self.__disable_apport()
if self.config.distrobox:
self.__enable_distrobox()
@@ -63,6 +64,19 @@ class Configurator:
if checks.is_flatpak_installed():
Apt.purge(['flatpak'])
+
+ def __enable_appimage(self):
+ if self.fake:
+ return self.__fake("Fake: AppImage enabled")
+
+ Apt.install(['fuse2'])
+ Apt.update()
+
+ def __disable_appimage(self):
+ if self.fake:
+ return self.__fake("Fake: AppImage disabled")
+
+ # Apt.purge(['libfuse2']) # NOTE: we should not remove libfuse2, it may be needed by other packages at this point
def __enable_apport(self):
if self.fake:
diff --git a/vanilla_first_setup/vanilla-first-setup.gresource.xml b/vanilla_first_setup/vanilla-first-setup.gresource.xml
index ed48158..57bbad6 100644
--- a/vanilla_first_setup/vanilla-first-setup.gresource.xml
+++ b/vanilla_first_setup/vanilla-first-setup.gresource.xml
@@ -2,5 +2,6 @@
gtk/window.ui
+ gtk/dialog-subsystem.ui
\ No newline at end of file
diff --git a/vanilla_first_setup/window.py b/vanilla_first_setup/window.py
index 2e3bcd6..5bfd789 100644
--- a/vanilla_first_setup/window.py
+++ b/vanilla_first_setup/window.py
@@ -22,6 +22,7 @@ from vanilla_first_setup.models.config import Config
from vanilla_first_setup.utils.processor import Processor
from vanilla_first_setup.utils.run_async import RunAsync
from vanilla_first_setup.utils.welcome_langs import welcome
+from vanilla_first_setup.dialogs.subsystem import SubSystemDialog
@Gtk.Template(resource_path='/pm/mirko/FirstSetup/gtk/window.ui')
@@ -30,24 +31,31 @@ class FirstSetupWindow(Adw.ApplicationWindow):
carousel = Gtk.Template.Child()
btn_start = Gtk.Template.Child()
+ btn_next = Gtk.Template.Child()
btn_save = Gtk.Template.Child()
btn_close = Gtk.Template.Child()
+ btn_no_subsystem = Gtk.Template.Child()
+ btn_use_subsystem = Gtk.Template.Child()
+ btn_info_subsystem = Gtk.Template.Child()
switch_snap = Gtk.Template.Child()
switch_flatpak = Gtk.Template.Child()
+ switch_appimage = Gtk.Template.Child()
switch_apport = Gtk.Template.Child()
- switch_distrobox = Gtk.Template.Child()
spinner = Gtk.Template.Child()
status_welcome = Gtk.Template.Child()
page_welcome = -1
page_configuration = 0
- page_progress = 1
- page_done = 2
+ page_subsystem = 1
+ page_extras = 2
+ page_progress = 3
+ page_done = 4
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.__config = Config(
snap=Preset.snap,
flatpak=Preset.flatpak,
+ appimage=Preset.appimage,
apport=Preset.apport,
distrobox=Preset.distrobox
)
@@ -58,20 +66,22 @@ class FirstSetupWindow(Adw.ApplicationWindow):
def __buiild_ui(self):
self.switch_snap.set_active(Preset.snap)
self.switch_flatpak.set_active(Preset.flatpak)
+ self.switch_appimage.set_active(Preset.appimage)
self.switch_apport.set_active(Preset.apport)
- self.switch_distrobox.set_active(Preset.distrobox)
def __connect_signals(self):
self.btn_start.connect('clicked', self.__on_btn_start_clicked)
+ self.btn_next.connect('clicked', self.__on_btn_next_clicked)
self.btn_save.connect('clicked', self.on_btn_save_clicked)
self.btn_close.connect('clicked', self.on_btn_close_clicked)
+ self.btn_no_subsystem.connect('clicked', self.on_btn_subsystem_clicked, False)
+ self.btn_use_subsystem.connect('clicked', self.on_btn_subsystem_clicked, True)
+ self.btn_info_subsystem.connect('clicked', self.__on_btn_info_subsystem_clicked)
self.switch_snap.connect('state-set', self.__on_switch_snap_state_set)
self.switch_flatpak.connect(
'state-set', self.__on_switch_flatpak_state_set)
self.switch_apport.connect(
'state-set', self.__on_switch_apport_state_set)
- self.switch_distrobox.connect(
- 'state-set', self.__on_switch_distrobox_state_set)
def __show_page(self, page: int):
_page = self.carousel.get_nth_page(page + 1)
@@ -79,6 +89,9 @@ class FirstSetupWindow(Adw.ApplicationWindow):
def __on_btn_start_clicked(self, widget):
self.__show_page(self.page_configuration)
+
+ def __on_btn_next_clicked(self, widget):
+ self.__show_page(self.page_subsystem)
def on_btn_save_clicked(self, widget):
def on_done(result, error=None):
@@ -105,6 +118,13 @@ class FirstSetupWindow(Adw.ApplicationWindow):
def on_btn_close_clicked(self, widget):
self.get_application().quit()
+ def on_btn_subsystem_clicked(self, widget, state):
+ self.__config.set_val('distrobox', state)
+ self.__show_page(self.page_extras)
+
+ def __on_btn_info_subsystem_clicked(self, widget):
+ SubSystemDialog(self).show()
+
def __start_welcome_animation(self):
def change_langs():
for lang in welcome: