Zarbuz / FileToVox

Tool for convert files into Magicavoxel file
MIT License
445 stars 46 forks source link

Cant run on linux #40

Closed montythepython closed 2 years ago

montythepython commented 2 years ago

Salut Zarbuz,

I am trying to run FileToVox on Linux mint 20 and I am running into a libgdiplus problem that is not related to the DLL issue you mention on your wiki. The libgdiplus library seems to be installed well. libgdiplus.so exists and I have added its directory to PATH (this is one of the troubleshooting I found but still, I get what you see below)

System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information. at System.Drawing.LibraryResolver.EnsureRegistered() at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize() at System.Drawing.SafeNativeMethods.Gdip..cctor() --- End of inner exception stack trace --- at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromFile(String filename, IntPtr& bitmap) at System.Drawing.Bitmap..ctor(String filename, Boolean useIcm) at System.Drawing.Bitmap..ctor(String filename) at FileToVox.Converter.Image.PNGToSchematic.WriteSchematicMain() at FileToVox.Converter.Image.PNGToSchematic.WriteSchematic() at FileToVox.Program.SchematicToVox(AbstractToSchematic converter) at FileToVox.Program.ProcessFile()

Do you have an idea on what I could try next?

Thanks

Zarbuz commented 2 years ago

Hello,

Can you test again by adding this in the FileToVox.runtimeconfig.json ? :

{
   "runtimeOptions": {
      "configProperties": {
         "System.Drawing.EnableUnixSupport": true
      }
   }
}
montythepython commented 2 years ago

Hello Zarbus,

I saw that tip as well but I don't have that json file.

Should I create the file or am I doing something wrong with the "install"?

I just simply put the extract of the zip file for Linux in a folder, changed to executable and running ./FileToVox from there...

Merci

Le mer. 24 nov. 2021 à 21:02, Nicolas Perrier @.***> a écrit :

Hello,

Can you test again by adding this in the FileToVox.runtimeconfig.json ? :

{ "runtimeOptions": { "configProperties": { "System.Drawing.EnableUnixSupport": true } } }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zarbuz/FileToVox/issues/40#issuecomment-978181914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL5YDBUVZXRQJSXIL5JVZ3UNVAEBANCNFSM5IWY35UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Zarbuz commented 2 years ago

Yes you can create this json file in the same folder of the executable. If it don't work, I need to remove this dependency of the project but it will be a huge refactor.

montythepython commented 2 years ago

I just tried but I am getting the same message. Please let me know if I should try something else

Thanks

rvorias commented 2 years ago

That Gdip is a hassle! Only got the error during height generation from PNG For shader use, the linux version works fine.

Right now I've worked around it with wine, but also it's tricky because of Out of Memory issues.

montythepython commented 2 years ago

Thank you Zarbus, will try with wine.

I have a Windows machine at work and everything works well there, so I have my way around it at the moment.

Bon we!

Le sam. 27 nov. 2021 à 15:35, aventau @.***> a écrit :

That Gdip is a hassle! Only got the error during height generation from PNG For shader use, the linux version works fine.

Right now I've worked around it with wine, but also it's tricky because of Out of Memory issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zarbuz/FileToVox/issues/40#issuecomment-980636900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL5YDG6QKU4YTNPBYMQKJ3UODUBPANCNFSM5IWY35UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.