Hi everyone.
I spent many hours to get Penelope working on Linux, and it also fixed a problem a few users had on the Mac version as well.
So, maybe this could be useful to share how I made it. I'm not a linux expert, others may add some more points, but it works.
Let's talk quickly about NW.js 12:
★ - Exported games work out of the box if your game is very light on Mac and Linux. Are you making a flappy bird clone? Congrats, you don't need to read this!
★ - if your game is a bit heavy, you'll get the red loading bar of death. And there is nothing you can do, we'll come back to this later.
Please note this is very inconsistent, there is no precise limit about the number of files involved. From my experience, around 400 files and it crashes.
-----------------------------------------------------------------------------------------------
- HOW TO / LINUX -
So, back to our old pal, Node Webkit 10.5. (don't know how to revert? the link below explains it)
1 - Export your game the classic way.
2 - Use the well known libudev.so.0 to libudev.so.1 trick so it can run on the last Ubuntu distribs.
( More on this: )
Note: if your game is light enough, just use NW.js 12, it now supports both libudev libs.
3 - THEN, and this is new stuff to me, you have to edit your package.json and add the " --file-descriptor-limit<10000> " argument.
This only works on Node Webkit 10.5, it has no effect on newer versions.
This tag will allow to load a game correctly. Again, doesn't work on NW.js 12.
You can also add the good old "--ignore-gpu-blacklist", it will increase your game compatibility, but it will mean some users with low hardware will play your game, even if their machine is not powerful enough.
4 - and as always, once on a Linux system, right click on the app, and allow it to be launched as an executable.
That's it! Now you can share your game on Linux.
- HOW TO / MAC -
Same as linux, but forget about the libudev.so.0 to libudev.so.1 trick. Instead, be sure none of your PNG is fully transparent, as it would turn the loading bar to red on Mac using the NW export.
-----------------------------------------------------------------------------------------------
★ A note about this "too many cooks/files" problem:
You'll read it's fixed for a long time on the NW forums. It's absolutely not, on Node Webkit 10.5 AND on NW.js 12
You'll also read "maybe if your game has more than 1024 files..". No, even with around 400 some of your users will get this error depending of their hardware.
The fun part being it happens randomly, and how the loading bar turns red at different % from one launch to another.
Sometimes you'll think you're making progress finding the cause, you're not.
Also, for Mac export, some of your users can AND have the game working at first launch, then being stuck with the red loading bar the next day.
I guess it explains why it's difficult for them to provide a fix.
★ A note about Dropbox and Mac builds
Exported Mac builds works alright until you use Dropbox or this kind or services. The file properties can vanish (very often).
Compress your game in an archive before transfer (if possible, not only as a ZIP, as Dropbox handles it as a regular folder now. Changing the extension like a fancy .ZOP will assure Dropbox don't mess with your game)