tryphotino / photino.NET

https://tryphotino.io
Apache License 2.0
833 stars 68 forks source link

Photino.Net not running on Linux #177

Closed GermanJack closed 2 months ago

GermanJack commented 2 months ago

Great Project but, unfortunately poor Linux support.

I did many tries to get the my Programm running under Linux using Photino.net. I always get this error: System.DllNotFoundException: Unable to load shared library 'Photino.Native' or one of its dependencies.

As descried I have installed the depending gtk library. No success. I tried to run it on 32 Bit and 64 Bit Debian Linux on x64 CPU. (I read that only 64 Bit ist supported; but I give it a try anyway) I tried it on 64 Bit and 32 Bit RaspBerry OS on ARM64. Always the same error.

So, I have tried to do a new compilation. After searching I found out that your published compile command is wrong. It must contain the Italic apostrophe ` and not the straight one ' ! Compilation went well. But, after running my program I got another error message: Popup window with: Initial parameters are 0 bytes, but expected 520 bytes.

I need a working version for Linux! Please help.

MikeYeager commented 2 months ago

@GermanJack Sorry you're experiencing problems. It sounds like you've gotten past the DllNotFound exception if you're getting the 'expected 520 bytes' exception. Please refer to the new Publishing Guide. You can find it in the Photino.Samples repo in the Debug branch. It should contain all of the info you need to get this working. If this doesn't solve your problem, please share a repo with your code so we can try it out and help you troubleshoot.

GermanJack commented 2 months ago

@MikeYeager Wow, this is guide is very interesting but also on a very secret place. I followed the description as exact as possible with the publishPhotino project. I have created the single file app "PublishPhotino" by using this command: dotnet publish -r linux-x64 --self-contained. (I am developing on Windows with VS2022) After copy the single file app to Debian on my virtual machine (and install net8), I was able to run the app. Unfortunately I still get the "Unable to load shared library 'Photino.Native' or one of its dependencies." error. Same with "dotnet publish -r linux-arm64 --self-contained" and started on my Raspi. The single app on Windows "dotnet publish -r win-x64 --self-contained" is running without problems.

Where is my mistake?

imessagewall commented 2 months ago

I'm getting the same error. However, when I replaced the nuget package with: AZ.Photino.NET.UnOfficial, the error was resolved. It seems that there is still a bit of a problem with the compatibility of the official version.

philippjbauer commented 2 months ago

@MikeYeager Wow, this is guide is very interesting but also on a very secret place. I followed the description as exact as possible with the publishPhotino project. I have created the single file app "PublishPhotino" by using this command: dotnet publish -r linux-x64 --self-contained. (I am developing on Windows with VS2022) After copy the single file app to Debian on my virtual machine (and install net8), I was able to run the app. Unfortunately I still get the "Unable to load shared library 'Photino.Native' or one of its dependencies." error. Same with "dotnet publish -r linux-arm64 --self-contained" and started on my Raspi. The single app on Windows "dotnet publish -r win-x64 --self-contained" is running without problems.

Where is my mistake?

@GermanJack You will have to look at the included publishing script in the ./publish/publish.sh folder to create a Debian package to have it install missing dependencies on your systems. You will have to modify the variables regarding your project name, etc.

GermanJack commented 2 months ago

Thanks for all the answers. I already had a look into the dependencies inside the deploy script. The Raspberry Linux does not have so much packages by default and I don't get it working. Also, to make a single file deployment ist not so easy with my project. Hope you will again make it possible in future to simply deploy the release folder of the project. To have a quick fix, I will downgrade to 2.1.11 and deploy my self compiled Linux ARM 32Bit version.

philippjbauer commented 2 months ago

I was able to install an internally used Photino application using the *.deb package created by the publish script on my Raspberry Pi 3 with the latest Raspian OS using sudo apt install ./my-photino-app.deb.

You should be able to modify the publish script provided in the example to account for apps that are not single-file deployments.