Builder now also processes the game files.

This commit is contained in:
Bas Wiel, van de 2024-05-02 16:39:17 +02:00
parent b0e3c9a451
commit 2d13ecce28
1 changed files with 8 additions and 3 deletions

View File

@ -55,7 +55,7 @@ impl DiskBuilder {
if let Some(source_file) = downloader.get_file_by_name(filename) {
self.filesystem
.mkfile(None, source_file.get_name(), source_file.get_bytes())?;
println!("Copied {} to the VHD.", filename);
println!("Copied regular file {} to the VHD.", filename);
Ok(())
} else {
// If the file was not found, nothing essentially bad happens. Just continue and do nothing for now.
@ -73,10 +73,10 @@ impl DiskBuilder {
if let Some(source_file) = downloader.get_file_by_name(filename) {
self.filesystem
.mksysfile(source_file.get_name(), source_file.get_bytes())?;
println!("Copied {} to the VHD.", filename);
println!("Copied system file {} to the VHD.", filename);
Ok(())
} else {
println!("We did not find file {}.", filename);
println!("We did not find system file {}.", filename);
Ok(())
}
}
@ -108,6 +108,11 @@ impl DiskBuilder {
self.copy_sysfile(&osdownloader, &self.operating_system.get_msdossys())?;
self.copy_file(&osdownloader, &self.operating_system.get_commandcom())?;
// Process all files in the game ZIP
for file in gamedownloader.get_files() {
self.copy_file(&gamedownloader,file.get_name())?;
}
// filesystem.mkdir(None, "DOS")?;
//filesystem.mkdir(None,"GAME")?;
// Last action: write the allocation table copies to the disk