diff --git a/Makefile b/Makefile index 486f6d4..a6a9ccc 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ all: true install: - mkdir -p $(DESTDIR)/usr/bin/ cargo fetch cargo build --release + mkdir -p $(DESTDIR)/usr/bin/ cp -vf target/release/pika-welcome $(DESTDIR)/usr/bin/ chmod 755 $(DESTDIR)/usr/bin/pika-welcome cp -vf data/bin/pika-welcome $(DESTDIR)/usr/bin/pika-welcome-autostart @@ -24,4 +24,6 @@ install: mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps cp -vf data/com.github.pikaos-linux.pikawelcome.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/ cp -vf data/icons $(DESTDIR)/usr/share/ + mkdir -p $(DESTDIR)/usr/share/pika-welcome + cp -vf data/config $(DESTDIR)/usr/share/pika-welcome/ #makepot $(DESTDIR)/usr/share/locale diff --git a/debian/control b/debian/control index 8272318..c144808 100644 --- a/debian/control +++ b/debian/control @@ -14,5 +14,5 @@ Rules-Requires-Root: no Package: pika-welcome Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, zenity Description: A frontend in GTK 4 and Libadwaita for Post install PikaOS setup. diff --git a/debian/rules b/debian/rules index 9aa9a75..ca36d27 100755 --- a/debian/rules +++ b/debian/rules @@ -10,9 +10,9 @@ export PATH := "/root/.cargo/bin:$(PWD):$(PATH)" dh $@ override_dh_auto_install: - mkdir -p debian/pika-welcome/usr/bin/ - /root/.cargo/bin/cargo fetch - /root/.cargo/bin/cargo build --release + /root/.cargo/bin/cargo fetch + /root/.cargo/bin/cargo build --release + mkdir -p pika-welcome/usr/bin/ cp -vf target/release/pika-welcome pika-welcome/usr/bin/ chmod 755 pika-welcome/usr/bin/pika-welcome cp -vf data/bin/pika-welcome pika-welcome/usr/bin/pika-welcome-autostart @@ -30,3 +30,5 @@ override_dh_auto_install: mkdir -p pika-welcome/usr/share/icons/hicolor/scalable/apps cp -vf data/com.github.pikaos-linux.pikawelcome.svg pika-welcome/usr/share/icons/hicolor/scalable/apps/ cp -vf data/icons pika-welcome/usr/share/ + mkdir -p pika-welcome/usr/share/pika-welcome + cp -vf data/config pika-welcome/usr/share/pika-welcome/ diff --git a/src/main.rs b/src/main.rs index 2b60586..bf8ebfe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,6 @@ use std::env; use config::APP_ID; use std::boxed::Box; -use users::*; // application crates mod build_ui; diff --git a/src/welcome_content_page/community_page/mod.rs b/src/welcome_content_page/community_page/mod.rs index de91d79..5218f6f 100644 --- a/src/welcome_content_page/community_page/mod.rs +++ b/src/welcome_content_page/community_page/mod.rs @@ -75,7 +75,7 @@ pub fn community_page( ); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/community.json"; + let json_path = "/usr/share/pika-welcome/config/community.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/contribute_page/mod.rs b/src/welcome_content_page/contribute_page/mod.rs index 3630b25..6f7793f 100644 --- a/src/welcome_content_page/contribute_page/mod.rs +++ b/src/welcome_content_page/contribute_page/mod.rs @@ -75,7 +75,7 @@ pub fn contribute_page( ); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/contribute.json"; + let json_path = "/usr/share/pika-welcome/config/contribute.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/look_and_feel_page/mod.rs b/src/welcome_content_page/look_and_feel_page/mod.rs index dd399d5..870e23b 100644 --- a/src/welcome_content_page/look_and_feel_page/mod.rs +++ b/src/welcome_content_page/look_and_feel_page/mod.rs @@ -76,7 +76,7 @@ pub fn look_and_feel_page( ); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/look_and_feel.json"; + let json_path = "/usr/share/pika-welcome/config/look_and_feel.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/mod.rs b/src/welcome_content_page/mod.rs index e5f88e0..0b23583 100644 --- a/src/welcome_content_page/mod.rs +++ b/src/welcome_content_page/mod.rs @@ -69,7 +69,7 @@ pub fn welcome_content_page(window: &adw::ApplicationWindow, content_box: >k:: .build(); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/credits.json"; + let json_path = "/usr/share/pika-welcome/config/credits.json"; let json_data = std::fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/recommended_addons_page/mod.rs b/src/welcome_content_page/recommended_addons_page/mod.rs index c0628ee..f056ce1 100644 --- a/src/welcome_content_page/recommended_addons_page/mod.rs +++ b/src/welcome_content_page/recommended_addons_page/mod.rs @@ -124,7 +124,7 @@ pub fn recommended_addons_page( let entry_buttons_size_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Both); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/recommended_addons.json"; + let json_path = "/usr/share/pika-welcome/config/recommended_addons.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/setup_steps_page/mod.rs b/src/welcome_content_page/setup_steps_page/mod.rs index fe9deb6..03670b4 100644 --- a/src/welcome_content_page/setup_steps_page/mod.rs +++ b/src/welcome_content_page/setup_steps_page/mod.rs @@ -75,7 +75,7 @@ pub fn setup_steps_page( ); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/setup_steps.json"; + let json_path = "/usr/share/pika-welcome/config/setup_steps.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid"); diff --git a/src/welcome_content_page/troubleshoot_page/mod.rs b/src/welcome_content_page/troubleshoot_page/mod.rs index e010c8b..dee87ff 100644 --- a/src/welcome_content_page/troubleshoot_page/mod.rs +++ b/src/welcome_content_page/troubleshoot_page/mod.rs @@ -75,7 +75,7 @@ pub fn troubleshoot_page( ); let mut json_array: Vec = Vec::new(); - let json_path = "/home/ward/builds/pkg-pika-welcome/data/config/troubleshoot.json"; + let json_path = "/usr/share/pika-welcome/config/troubleshoot.json"; let json_data = fs::read_to_string(json_path).expect("Unable to read json"); let json_data: serde_json::Value = serde_json::from_str(&json_data).expect("JSON format invalid");