Skip to content

Conversation

AdianKozlica
Copy link
Contributor

Using libosinfo we can check whether an ISO belongs to the WinNT OS family.

This is not perfect since some ISOs won't be recognized (e.g. Tiny10), but we can prompt the user telling them it is an Unknown OS and that they should proceed with caution.

@TibixDev
Copy link
Owner

TibixDev commented Sep 6, 2025

Hi, this is a cool idea but ideally don't involve a fifth programming language, would it be possible to do this in vanilla JS with or without some dependency?

@AdianKozlica
Copy link
Contributor Author

AdianKozlica commented Sep 6, 2025

Hello, I have tried solving it using the node-gtk library, but it seems like it doesn't really integrate well with Electron.

We could call the osinfo-detect command, and filter the output to gets its OS name and to check whether it is bootable or not.

@TibixDev
Copy link
Owner

TibixDev commented Sep 7, 2025

osinfo-detect doesn't seem preinstalled on most distros though, and asking users to install even more packages would kind of hinder the setup experience. I think it should be possible to get something rudimentary done in TS that just scans the ISO and maybe checks for some Windows magic bytes?

@AdianKozlica
Copy link
Contributor Author

I think I solved it.

We can extract the Volume ID from the ISO file, and then match it against the regexes that I have extracted out of the database generated by osinfo-db-export --system.

We can also check whether the ISO is bootable by extracting the boot indicator.

@TibixDev
Copy link
Owner

Hey, thanks for the changes, can you confirm this fully works?

Ideally a little demo video where you select a few Windows ISO-s and show how it detects them, also selecting some Linux ISO-s to show how it rejects them.

I believe the user shouldn't be allowed to continue if a non-Windows ISO is selected or if said ISO is not bootable, and prompts should be added somewhere explaining why. (Without a scrollbar preferably, we wanna fit everything in one screen)

Let me know how you think we should proceed from a UI/UX standpoint. 😄

@AdianKozlica
Copy link
Contributor Author

Hello, so regarding non Windows ISO files (bootable ones), I don't know what would be the most practical solution.

We could export all non Windows ISO volume IDs from osinfo db but it would have to be constantly updated, and osinfo itself does not contain every volume ID.

The other option is manually checking ISO files whether they contain a certain file (e.g. for Linux the vmlinuz file), but I don't know how reliable would it be.

Or we could keep it as is and just warn the user that they have selected an unknown OS.

recording-winboat.mp4

@TheDokT0r
Copy link
Contributor

I think that's a great idea! I think it should be merged to main

@Levev Levev added the enhancement New feature or request label Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants