OSX and Linux Builds Now "Work"
Hey Folks! Another slog of a day, as I worked on getting the Linux build running.
Most of the morning was spent in a mode similar to my OSX day: chasing phantom errors in the build process which were not really the issue. I couldn't build the game because the lime compile was missing a header file. Chasing down that header file got me further, but then I was missing some Linux libs. After those were installed, I ran into a missing ndll for Linux (we never needed one before on mobile, so it wasn't in the repo).
So then I spent an hour or so trying to build the Linux and Linux64 ndlls for Lime. Except g++ was missing from my Ubuntu. Then some libs for that. Then I found out my lime source code was missing some dependencies from git because they were in their own repos. And syncing to those was giving me missing includes. Then I remembered that using haxelib to install a specific version of lime would give me the binaries for the ndlls and why didn't I do that before?
No matter, still didn't work. Segmentation fault. I'm about ready to cry.
It was at this point that I stepped away to have some lunch. And a bit of research and a full stomach later, I read a thread about how this often happens when haxe was installed improperly. Specifically, when it was installed one way, and then another on top of it, confusing the setup.
So I unrolled everything, uninstalled, blasted the dirs and removed the apt-gets. From a blank slate, I installed the most modern stack of haxe, openfl, lime, flixel, and built a test project. So far, so good.
Then, I set my libs to the repo versions we need for the game, compiled again, reinstalled any libs that were missing, compiled again, and it worked!
Except it crashed immediately upon clicking anything. A lot like OSX did before I un-embedded the audio.
Still, this was good. At least we had parity on OSX and Linux. And switching off embedding similarly got Linux running normally.
That leaves us with one remaining issue. The sound effects used in the game need to be packed or embedded so they don't sit raw in the game dir. Contractual obligation. So I was back to figuring out this old problem.
By some serendipity, I stumbled upon this: PakLibrary. Wouldn't you know it, Lars actually rolled his own asset packer which did 90% of what I needed! Thanks, Lars!
I spent the rest of my afternoon integrating that into the project, packing up the necessary audio assets, and shimmying the PakLibrary loader into the code where sounds get loaded.
The game compiles, runs, and I even get a list of the audio assets out of the pak! But none of the audio is working yet. It seems my conversion from deflated ByteArray into AudioBuffer isn't quite right. I might need to send it raw Bytes instead, or maybe I uncompressed it wrong? Or not enough? Unfortunately, the error is happening inside a non-debug dll, so I can't step through to see. But I have a few more things I can try.
It's almost there, though!