Fix json paths
This commit is contained in:
parent
132eb2b008
commit
c50a184090
4
Makefile
4
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
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -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.
|
||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -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
|
||||
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/
|
||||
|
@ -12,7 +12,6 @@ use std::env;
|
||||
|
||||
use config::APP_ID;
|
||||
use std::boxed::Box;
|
||||
use users::*;
|
||||
|
||||
// application crates
|
||||
mod build_ui;
|
||||
|
@ -75,7 +75,7 @@ pub fn community_page(
|
||||
);
|
||||
|
||||
let mut json_array: Vec<community_entry> = 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");
|
||||
|
@ -75,7 +75,7 @@ pub fn contribute_page(
|
||||
);
|
||||
|
||||
let mut json_array: Vec<contribute_entry> = 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");
|
||||
|
@ -76,7 +76,7 @@ pub fn look_and_feel_page(
|
||||
);
|
||||
|
||||
let mut json_array: Vec<look_and_feel_entry> = 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");
|
||||
|
@ -69,7 +69,7 @@ pub fn welcome_content_page(window: &adw::ApplicationWindow, content_box: >k::
|
||||
.build();
|
||||
|
||||
let mut json_array: Vec<GString> = 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");
|
||||
|
@ -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<recommended_addons_entry> = 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");
|
||||
|
@ -75,7 +75,7 @@ pub fn setup_steps_page(
|
||||
);
|
||||
|
||||
let mut json_array: Vec<setup_steps_entry> = 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");
|
||||
|
@ -75,7 +75,7 @@ pub fn troubleshoot_page(
|
||||
);
|
||||
|
||||
let mut json_array: Vec<troubleshoot_entry> = 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");
|
||||
|
Loading…
Reference in New Issue
Block a user