sonik-br / GDMENUCardManager

Manage content on SD Card for Dreamcast's GDMenu
GNU General Public License v3.0
239 stars 19 forks source link

Linux port? #2

Closed tomasz-nolberczak closed 3 years ago

tomasz-nolberczak commented 3 years ago

Hi, thanks for good work! 👏🏻

Are there any chances to make it available also for other OS's?

sonik-br commented 3 years ago

Hi. It's not currently planned. Unfortunately I don't have the time to implement it. Can you test it with Wine or other ways to run windows apps on linux?

Edit: To target other OS's it would also need versions of cdi4dc, gdishrink and mkisofs. Compressed files would not be supported as it needs 7z.dll

tomasz-nolberczak commented 3 years ago

Thanks for a quick reply. I will check it with Wine, for now I manually put GDI's into SD card, however it would be really good to have separate software to do this for me. I'll let you know here about the results.

sonik-br commented 3 years ago

When you say "manually"... are you just putting the folders/files on the card? Or you also rebuild the menu image for it to boot faster?

I'm looking into ways to port it to another platforms. Done a quick test with a small program and it seems doable! I will have to migrate the code to .Net Core and redo the GUI. Can't guarantee it will work. And even if works, some features will have to be cut like GdiShrink and support for compressed files. Hope to have news in a few weeks.

tomasz-nolberczak commented 3 years ago

When you say "manually"... are you just putting the folders/files on the card? Or you also rebuild the menu image for it to boot faster?

Yes, this is how I install games on SD Card. Like an animal 😬

I'm looking into ways to port it to another platforms. Done a quick test with a small program and it seems doable! I will have to migrate the code to .Net Core and redo the GUI. Can't guarantee it will work. And even if works, some features will have to be cut like GdiShrink and support for compressed files. Hope to have news in a few weeks.

Great news! Really looking forward to it.

sonik-br commented 3 years ago

Please check if your distro comes with mkisofs. And please check if this program works: https://sourceforge.net/projects/img4dc/files/cdi4dc/ file cdi4dc_02b_linux.zip

Mi1ezDR commented 3 years ago

I second a desperate need for this utility in Linux. When executed in WINE, I get an error indicating that I'm missing DotNet 4.0 despite WINETRICKS showing me that I already have it installed in the current WINEPREFIX I've got selected as the default.

sonik-br commented 3 years ago

The linux (and mac) version is almost ready. I just need to do some tests. What distro do you use? I'm testing on Ubuntu on a VM. It mounts my card reader on /media/.... It''s the common way to handle removeable storage devices?

tomasz-nolberczak commented 3 years ago

I'm testing on Ubuntu on a VM. It mounts my card reader on /media/.... It''s the common way to handle removeable storage devices?

I think so, it mounts mine also on /media/... I am using Ubuntu 20.04.

Mi1ezDR commented 3 years ago

Yep! Correct! The way Ubuntu's automounting works--it mounts flash drives in /media/userid/volumename Ref: https://help.ubuntu.com/community/Mount/USB

Mi1ezDR commented 3 years ago

Might be handy to do something equivalent to this tiny bit of BASH code to detect plugged-in USB flash drives. I tested it out and it worked reliably. https://unix.stackexchange.com/questions/214687/what-is-a-linux-command-that-lists-only-usb-storage-devices

sonik-br commented 3 years ago

New release is ready! Go for it! :) Linux port is using AvaloniaUI. It currently does not support drag-and-drop from the desktop. Dragging and dropping is a great function of the program. I don't like not having it. But I've done my best. If you need to add a bunch of GDI files it will be a pain. You will have to add one by one. Please test and let me know if there are any problems.

cinnamonmatexfce commented 3 years ago

Compressed files would not be supported as it needs 7z.dll

Could you import the library into Linux version? See: https://github.com/stonewell/lib7zip

Is it doable?

sonik-br commented 3 years ago

I will have to look into it. Can't guarantee. It's a C library and I have no idea how to integrate it with C# on linux. And p7zip is an unofficial port of 7z. Last updated in 2016.

Mi1ezDR commented 3 years ago

Big need here, as 7zip are much smaller than ZIP for these images and it's how I've kept them archived. I use a shell script to create and burn images for now since GDMENUCardManager couldn't do 7z natively. I'd rather use GDMENUCardManager but my hands are tied until it does (not that the shell script doesn't work well).

sonik-br commented 3 years ago

I will look into it. But I can't guarantee as I don't have much free time to work on it.

cinnamonmatexfce commented 3 years ago

And p7zip is an unofficial port of 7z. Last updated in 2016.

You can find two updated (2021) releases: Official original Linux alpha release

or

another p7izp (unofficial) fork, updated

cinnamonmatexfce commented 3 years ago

Big need here, as 7zip are much smaller than ZIP for these images and it's how I've kept them archived.

I suggest you to compress your images with chdman, if you care... 😉

Mi1ezDR commented 3 years ago

Big need here, as 7zip are much smaller than ZIP for these images and it's how I've kept them archived.

I suggest you to compress your images with chdman, if you care...

Hadn't used this before. Does it actually compress? It's designed for MAME/MESS but if it truly does compress smaller than 7z (I find it hard to believe that it does) then that would make a viable candidate for a compress/decompress option to add to GDMENUCardManager. I'm not a #net coder, though. Does a CHD library show up as an available option?

miles@unicron:~$ chdman --help
chdman - MAME Compressed Hunks of Data (CHD) manager 0.195 (unknown)
Usage:
   chdman info: displays information about a CHD
   chdman verify: verifies a CHD's integrity
   chdman createraw: create a raw CHD from the input file
   chdman createhd: create a hard disk CHD from the input file
   chdman createcd: create a CD CHD from the input file
   chdman createld: create a laserdisc CHD from the input file
   chdman extractraw: extract raw file from a CHD input file
   chdman extracthd: extract raw hard disk file from a CHD input file
   chdman extractcd: extract CD file from a CHD input file
   chdman extractld: extract laserdisc AVI from a CHD input file
   chdman copy: copy data from one CHD to another of the same type
   chdman addmeta: add metadata to the CHD
   chdman delmeta: remove metadata from the CHD
   chdman dumpmeta: dump metadata from the CHD to stdout or to a file
   chdman listtemplates: list hard disk templates

For help with any command, run:
   chdman help <command>
sonik-br commented 3 years ago

There's an implementation of the 7z decompression in c#. Last time I checked it was very slow. I need to test it again. Might be viable to use in linux (and osx).

About chd I don't think there's any library usable in c#.

cinnamonmatexfce commented 3 years ago

Big need here, as 7zip are much smaller than ZIP for these images and it's how I've kept them archived.

I suggest you to compress your images with chdman, if you care...

Hadn't used this before. Does it actually compress? It's designed for MAME/MESS

designed by MAME. CHD is not more than a Compressed Hunks of Data

Mi1ezDR commented 3 years ago

Big need here, as 7zip are much smaller than ZIP for these images and it's how I've kept them archived.

I suggest you to compress your images with chdman, if you care...

Hadn't used this before. Does it actually compress? It's designed for MAME/MESS

designed by MAME. CHD is not more than a Compressed Hunks of Data

Sure, but will it compress better than 7z (which seems to do a surprisingly good job on multimedia/disk images).

cinnamonmatexfce commented 3 years ago

Sure, but will it compress better than 7z (which seems to do a surprisingly good job on multimedia/disk images).

Well, just try it by yourself... Just remeber to use latest chmand (0.231 at time of writing)!!!

sonik-br commented 3 years ago

Implemented 7z and rar support for linux by using the SharpCompress lib. @cinnamonmatexfce and @Mi1ezDR please go to the releases and grab the file named BETA. It needs some testing. Let me know of any problem.