Call the build method from main again, it fails.. that's ok for now.

This commit is contained in:
Bas Wiel, van de 2024-04-30 18:47:23 +02:00
parent 1df8ef06ee
commit 5b51830e6d
2 changed files with 8 additions and 4 deletions

View File

@ -24,7 +24,7 @@ pub struct DiskBuilder {
}
impl DiskBuilder {
/// Create a new builder
/// Create a new builder from a manifest
pub fn new(manifest: &Manifest) -> Result<Self, std::io::Error> {
// Gather what we need from the manifest and instantiate structs as needed
let mut disk = Disk::new(manifest.disktype.as_str(), manifest.os.as_str())?;
@ -47,7 +47,10 @@ impl DiskBuilder {
}
/// Copy a file from a downloaded ZIP to the VHD
pub fn copy_file(&mut self, downloader: &ZipDownloader) {}
pub fn copy_file(&mut self, downloader: &ZipDownloader, filename: &str) {}
/// Copy a system file from a downloaed ZIP to the VHD
pub fn copy_sysfile(&mut self, downloader: &ZipDownloader, filename: &str) {}
/// Copy a directory a downloaded ZIP to the VHD
pub fn copy_directory(&mut self, downloader: &ZipDownloader) {}
@ -63,7 +66,7 @@ impl DiskBuilder {
)),
)?;
let gamedownloader = ZipDownloader::from_url(
"https://dosk8s-dis.area536.com/alleycat.zip",
"https://dosk8s-dist.area536.com/alleycat.zip",
Some("Downloading Alley Cat"),
)?;

View File

@ -41,7 +41,8 @@ fn main() {
print_header();
println!("{}", manifest.get_metadata());
println!("{}", manifest);
let builder = DiskBuilder::new(&manifest).expect("Failed to create a DiskBuilder for this manifest.");
let mut builder = DiskBuilder::new(&manifest).expect("Failed to create a DiskBuilder for this manifest.");
builder.build();
}
Commands::Analyze { name } => {
print_header();