mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-17 07:49:03 +00:00
fix: just buyild stardust without installing to a prefix
This commit is contained in:
parent
030fe86274
commit
8b1583a973
1 changed files with 30 additions and 29 deletions
|
@ -3,10 +3,10 @@ use std::{collections::VecDeque, path::PathBuf};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct StardustServerSpec {
|
pub struct StardustServerSpec {
|
||||||
repo: String,
|
pub repo: String,
|
||||||
branch: String,
|
pub branch: String,
|
||||||
debug: bool,
|
pub debug: bool,
|
||||||
wayland_support: bool,
|
pub wayland_support: bool,
|
||||||
}
|
}
|
||||||
impl Default for StardustServerSpec {
|
impl Default for StardustServerSpec {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
@ -21,42 +21,43 @@ impl Default for StardustServerSpec {
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct StardustClientSpec {
|
pub struct StardustClientSpec {
|
||||||
repo: String,
|
pub repo: String,
|
||||||
branch: String,
|
pub branch: String,
|
||||||
debug: bool,
|
pub debug: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_build_stardust_jobs(
|
pub fn get_build_stardust_jobs(
|
||||||
prefix_path: PathBuf,
|
|
||||||
server_spec: StardustServerSpec,
|
server_spec: StardustServerSpec,
|
||||||
client_specs: &[StardustClientSpec],
|
client_specs: &[StardustClientSpec],
|
||||||
) -> VecDeque<WorkerJob> {
|
) -> VecDeque<WorkerJob> {
|
||||||
let mut jobs = VecDeque::<WorkerJob>::new();
|
let mut jobs = VecDeque::<WorkerJob>::new();
|
||||||
|
|
||||||
let server_git_dir = get_data_dir() + "/stardust-xr-server";
|
let server_git = Git {
|
||||||
|
|
||||||
let server_git_job = Git {
|
|
||||||
repo: server_spec.repo,
|
repo: server_spec.repo,
|
||||||
dir: server_git_dir.clone(),
|
dir: get_data_dir() + "/stardust/stardust-xr-server",
|
||||||
default_branch: server_spec.branch,
|
default_branch: server_spec.branch,
|
||||||
};
|
};
|
||||||
jobs.extend(server_git_job.get_pre_build_jobs(true));
|
jobs.extend(server_git.get_pre_build_jobs(true));
|
||||||
|
jobs.push_back(WorkerJob::new_cmd(
|
||||||
|
None,
|
||||||
|
"cargo".into(),
|
||||||
|
Some({
|
||||||
let mut args = vec![
|
let mut args = vec![
|
||||||
"install".into(),
|
"build".into(),
|
||||||
"--path".into(),
|
"--path".into(),
|
||||||
server_git_dir,
|
server_git.dir,
|
||||||
"--root".into(),
|
|
||||||
prefix_path.to_string_lossy().to_string(),
|
|
||||||
"--no-default-features".into(),
|
"--no-default-features".into(),
|
||||||
];
|
];
|
||||||
if server_spec.wayland_support {
|
if server_spec.wayland_support {
|
||||||
args.push("--features".into());
|
args.push("--features".into());
|
||||||
args.push("wayland".into());
|
args.push("wayland".into());
|
||||||
}
|
}
|
||||||
if server_spec.debug {
|
if !server_spec.debug {
|
||||||
args.push("--debug".into());
|
args.push("--release".into());
|
||||||
}
|
}
|
||||||
jobs.push_back(WorkerJob::new_cmd(None, "cargo".into(), Some(args)));
|
args
|
||||||
|
}),
|
||||||
|
));
|
||||||
|
|
||||||
jobs
|
jobs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue