diff --git a/assets/images/icon.png b/assets/images/icon.png
index 6355931..ab98821 100644
Binary files a/assets/images/icon.png and b/assets/images/icon.png differ
diff --git a/assets/resources.xml b/assets/resources.xml
index 18718a2..2997889 100644
--- a/assets/resources.xml
+++ b/assets/resources.xml
@@ -1,6 +1,24 @@
-
- images/icon.png
+
+ images/icon.png
+
+
+ ui/.dist/main.ui
+ ui/.dist/first_run.ui
+ ui/.dist/preferences.ui
+
+
+ ui/.dist/first_run/page_1.ui
+ ui/.dist/first_run/page_2.ui
+ ui/.dist/first_run/page_3.ui
+ ui/.dist/first_run/page_4.ui
+ ui/.dist/first_run/page_5.ui
+ ui/.dist/first_run/page_6.ui
+
+
+ ui/.dist/preferences/general.ui
+ ui/.dist/preferences/enhancements.ui
+ ui/.dist/preferences/environment.ui
diff --git a/build.rs b/build.rs
index cc8ed00..3015b64 100644
--- a/build.rs
+++ b/build.rs
@@ -74,6 +74,8 @@ fn blp_process_dir(dir: String) {
}
fn main() {
+ blp_process_dir(String::new());
+
if let Ok(_) = read_to_string("assets/resources.xml") {
gtk4::gio::compile_resources(
"assets",
@@ -81,6 +83,4 @@ fn main() {
".assets.gresource",
);
}
-
- blp_process_dir(String::new());
}
diff --git a/src/ui/first_run/mod.rs b/src/ui/first_run/mod.rs
index 62f39dd..355ffcb 100644
--- a/src/ui/first_run/mod.rs
+++ b/src/ui/first_run/mod.rs
@@ -46,7 +46,7 @@ pub struct AppWidgets {
impl AppWidgets {
pub fn try_get() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run.ui");
let result = Self {
window: get_object(&builder, "window")?,
diff --git a/src/ui/first_run/page_1.rs b/src/ui/first_run/page_1.rs
index a0817d2..c0618f2 100644
--- a/src/ui/first_run/page_1.rs
+++ b/src/ui/first_run/page_1.rs
@@ -10,7 +10,7 @@ pub struct Page {
impl Page {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_1.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_1.ui");
Ok(Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/first_run/page_2.rs b/src/ui/first_run/page_2.rs
index 27bdb9b..065333b 100644
--- a/src/ui/first_run/page_2.rs
+++ b/src/ui/first_run/page_2.rs
@@ -18,7 +18,7 @@ pub struct Page {
impl Page {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_2.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_2.ui");
let result = Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/first_run/page_3.rs b/src/ui/first_run/page_3.rs
index a6a41f1..e6b89a4 100644
--- a/src/ui/first_run/page_3.rs
+++ b/src/ui/first_run/page_3.rs
@@ -11,7 +11,7 @@ pub struct Page {
impl Page {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_3.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_3.ui");
Ok(Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/first_run/page_4.rs b/src/ui/first_run/page_4.rs
index 0df71f4..63a3209 100644
--- a/src/ui/first_run/page_4.rs
+++ b/src/ui/first_run/page_4.rs
@@ -53,7 +53,7 @@ pub struct Page {
impl Page {
pub fn new(window: gtk::Window) -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_4.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_4.ui");
let result = Self {
window,
diff --git a/src/ui/first_run/page_5.rs b/src/ui/first_run/page_5.rs
index da36be4..cf11d4c 100644
--- a/src/ui/first_run/page_5.rs
+++ b/src/ui/first_run/page_5.rs
@@ -19,7 +19,7 @@ pub struct Page {
impl Page {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_5.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_5.ui");
Ok(Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/first_run/page_6.rs b/src/ui/first_run/page_6.rs
index 0a9596c..35ae70c 100644
--- a/src/ui/first_run/page_6.rs
+++ b/src/ui/first_run/page_6.rs
@@ -11,7 +11,7 @@ pub struct Page {
impl Page {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/first_run/page_6.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/first_run/page_6.ui");
Ok(Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/main.rs b/src/ui/main.rs
index 4d7fe1d..156f6d3 100644
--- a/src/ui/main.rs
+++ b/src/ui/main.rs
@@ -55,7 +55,7 @@ pub struct AppWidgets {
impl AppWidgets {
pub fn try_get() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../assets/ui/.dist/main.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/main.ui");
let window = get_object::(&builder, "window")?;
let toast_overlay = get_object::(&builder, "toast_overlay")?;
@@ -103,6 +103,10 @@ impl AppWidgets {
"Nikita Podvirnyy "
]);
+ result.about.add_credit_section("Logo", &[
+ "@nightany https://pinterest.com/pin/356206651788051017"
+ ]);
+
let curl_info = anime_game_core::curl_sys::Version::get();
result.about.set_system_information(Some(&[
diff --git a/src/ui/preferences/enhancements.rs b/src/ui/preferences/enhancements.rs
index 2a77535..bf117a0 100644
--- a/src/ui/preferences/enhancements.rs
+++ b/src/ui/preferences/enhancements.rs
@@ -31,7 +31,7 @@ pub struct AppWidgets {
impl AppWidgets {
fn try_get() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/preferences/enhancements.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/preferences/enhancements.ui");
let result = Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/preferences/environment.rs b/src/ui/preferences/environment.rs
index 8656ae5..08716ca 100644
--- a/src/ui/preferences/environment.rs
+++ b/src/ui/preferences/environment.rs
@@ -32,7 +32,7 @@ pub struct AppWidgets {
impl AppWidgets {
fn try_get() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/preferences/environment.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/preferences/environment.ui");
let result = Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/preferences/general.rs b/src/ui/preferences/general.rs
index 656811d..2baa8f1 100644
--- a/src/ui/preferences/general.rs
+++ b/src/ui/preferences/general.rs
@@ -56,7 +56,7 @@ pub struct AppWidgets {
impl AppWidgets {
pub fn try_get() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/preferences/general.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/preferences/general.ui");
let mut result = Self {
page: get_object(&builder, "page")?,
diff --git a/src/ui/preferences/mod.rs b/src/ui/preferences/mod.rs
index bc7fe9f..1867030 100644
--- a/src/ui/preferences/mod.rs
+++ b/src/ui/preferences/mod.rs
@@ -39,7 +39,7 @@ pub struct PreferencesStack {
impl PreferencesStack {
pub fn new() -> Result {
- let builder = gtk::Builder::from_string(include_str!("../../../assets/ui/.dist/preferences.ui"));
+ let builder = gtk::Builder::from_resource("/org/app/ui/preferences.ui");
let result = Self {
app: Default::default(),