Skip to content

Commit

Permalink
Include manifest instead
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Dec 20, 2024
1 parent 68d978b commit 6fe70b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
9 changes: 3 additions & 6 deletions crates/autostart-installer/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::error::Error;
use std::path::Path;
use std::{env, fs};

static MANIFEST: &str = include_str!("manifest.xml");

fn main() -> Result<(), Box<dyn Error>> {
if !cfg!(target_os = "windows") {
Expand All @@ -9,10 +9,7 @@ fn main() -> Result<(), Box<dyn Error>> {

let mut res = winres::WindowsResource::new();

let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let dir = Path::new(&manifest_dir);
let manifest = fs::read_to_string(dir.join("manifest.xml"))?;
res.set_manifest(&manifest);
res.set_manifest(MANIFEST);

res.compile()?;

Expand Down
9 changes: 3 additions & 6 deletions crates/loader/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::error::Error;
use std::path::Path;
use std::{env, fs};

static MANIFEST: &str = include_str!("manifest.xml");

fn main() -> Result<(), Box<dyn Error>> {
if !cfg!(target_os = "windows") {
Expand All @@ -9,10 +9,7 @@ fn main() -> Result<(), Box<dyn Error>> {

let mut res = winres::WindowsResource::new();

let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let dir = Path::new(&manifest_dir);
let manifest = fs::read_to_string(dir.join("manifest.xml"))?;
res.set_manifest(&manifest);
res.set_manifest(MANIFEST);

res.compile()?;

Expand Down
9 changes: 3 additions & 6 deletions crates/yabg3nml/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::error::Error;
use std::path::Path;
use std::{env, fs};

static MANIFEST: &str = include_str!("manifest.xml");

fn main() -> Result<(), Box<dyn Error>> {
if !cfg!(target_os = "windows") {
Expand All @@ -11,10 +11,7 @@ fn main() -> Result<(), Box<dyn Error>> {
// ordinal 1
res.set_icon("icon.ico");

let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let dir = Path::new(&manifest_dir);
let manifest = fs::read_to_string(dir.join("manifest.xml"))?;
res.set_manifest(&manifest);
res.set_manifest(MANIFEST);

res.compile()?;

Expand Down

0 comments on commit 6fe70b4

Please sign in to comment.