Did a bit a fiddling around. I'm no expert in this field so if there are any smarter folks that me, please chime in. I'm just a casual hobbyist trying things through experimentation, trial, error and sheer stubbornness.
Bit of a process to get it to run:
- From the official NWJS website, download the NWJS SDK (nwjs-sdk-v0.49.0-osx-x64.zip).
- Extract the files into a temporary folder.
- Inside the temp folder, select the "nwjs.app" file.
- Control-Click/Right Mouse Click and choose "Show Package Contents".
- In a separate window, go to your deployed "Game.app" file.
- Again, Control-Click/Right Mouse Click and choose "Show Package Contents".
The next part will be replacing various files in your Game.app Package with the files from the downloaded NWJS SDK:
- File: /Contents/MacOS/nwjs
- File: /Contents/Frameworks/nwjs Framework.framework/Versions/86.0.4240.75/nwjs Framework
- Folder: /Contents/Frameworks/nwjs Framework.framework/Versions/86.0.4240.75/Helpers/
- File: /Contents/Frameworks/nwjs Framework.framework/Versions/86.0.4240.75/Internet Plug-Ins/pnacl/pnacl_public_x86_64_ld_nexe
- File: /Contents/Frameworks/nwjs Framework.framework/Versions/86.0.4240.75/Internet Plug-Ins/pnacl/pnacl_public_x86_64_pnacl_llc_nexe
- File: /Contents/Frameworks/nwjs Framework.framework/Versions/86.0.4240.75/Internet Plug-Ins/pnacl/pnacl_public_x86_64_pnacl_sz_nexe
Now the final part.
- Run your "Game.app" file.
- If it crashes, wait a few seconds then try again.
- Get the error message "Please move the Game.app to a different folder."
- Quit the game.
- Move "Game.app" file outside of its current folder.
- Move the same file back to the previous folder.
And that should do it. I walked through the process a couple of times to confirm I had it correct.
After doing this, I was able to get the game to run on my personal Mac (M2 Max, Sonoma 14.4). I copied the updated game folder to two other Macs (M1, Sonoma 14.2) and it ran fine on those, too.
Depending on the security settings of one's Mac, it may not run from the Desktop or Downloads folder. I had to move the game folder to my Documents folder to get it to run. For the two other Macs, I was able to run it from the Downloads folder and a flash drive without issue.
Would recommend running additional tests to ensure there are not any issues that may arise during gameplay. I tested the game launching and if save files would load properly. This was just from the very beginning of the game.
Once all is well, compress that updated Game folder and distribute that instead.
The only thing I can't really answer is why this happened.
Process and Notes
First thing first I had to see what happened without messing with files. So I downloaded the game from the website and launched it as is. Get the system error message "The application “Game.app” can’t be opened.". Okay. Cool.
So, I deployed my game in its current state so I would have something to compare against. Diving into the Package Contents, I noticed certain files in the downloaded game were showing different icons against my deployed game despite being the same exact file (date and size). Like it wasn't be recognized as the file it is suppose to be.
I tried the permission reset on the files in question but that didn't work for me. NWJS would immediately crash. Fun!
My next idea was to replace the files with the original NWJS files. Found out MZ is using v.0.49.0 so downloaded the x64 Mac SDK to match up. Then it was trial and error to see which files needed to be replaced and which didn't until i was able to finally get it running.
Again, no expert here. Just a tinkering who is stubborn to get things to work.