Need halp (help) testing native binaries on Mac and Linux

Hello. I am looking for people who happen to have a Mac and/or a Linux computer to test some simple native binaries. I am working on some deployment related stuff like embedding a JRE so people don’t need Java and making our game look more professional with native binaries. This requires some testing, and I’m all out of Linux and Mac computers. If someone could lend me an hour of their times, I could probably figure this out relatively quickly. I’d prefer to work over Skype, but JGO PMs would work too. Please post in this thread if you are interested in helping out and I will PM you my Skype name. All findings will eventually be posted to this forum within a few a days of course.

Thank you for your time.

PS: Apparently “Need help testing native binaries on Mac and Linux” is not an informative subject of a thread. >___>

I have a mac book pro.
my skype name is
String skypeName = “demian.”+ myForumName;

Hi,

I have a late 2012 mac book pro and I’m free all day on Saturday if that’s any good for you.

If you would like me to help then I’ll get a Skype username organised :slight_smile:

If PM is acceptable, I could help out that way (I have a Mac and a Linux machine available).

Out of interest, how are you making them?

Have you looked at binary packaging (mainly .deb) on Linux too? It’s easy enough, and tends to give better OS integration.

I’ve got a range of machines, all currently running Ubuntu. No Skype though! PM me if you need to.

I have a 2010 Mac, but no Skype. If you need any testing feel free to PM me!

I’ve got a Windows 8.1 Machine (Surface Pro 3), a low-range Linux machine (ubuntu), a high-range Linux Machine (ubuntu + i3wm) and possibly a vista machine.
PM me if you’re interested.

Hello, everyone. Sorry for the late reply.

I’ve started an article here for making native binaries for Windows. The next step is OSX and Linux. So far, I am unsure what the best course of action is, as I have very little personal experience with these two operating systems, so before I can get started with testing I need to figure those points out first.

What kind of executables are Linux users used to? Simply making a shell script and not giving it an extension at all and somehow marking it executable (?) seems to be the way to go here. Is it possible to give such a file a custom icon? Is a desktop entry (.desktop) the way to go to get a custom icon?

For Mac I’m even more confused. It seems like the most recommended way of doing this is to create a .app folder which has a specific structure and some configuration files, but in theory shouldn’t the same files as on Linux work?

The preferred method of installation and usage on OSX is to package the whole app as a .app folder and enclose it in a DMG disk image that the user just drags across to their applications folder.

How exactly we go about making an executable is not something I’ve ever done before but it can’t be that hard, surely ;). I imagine it’ll end up similar to Linux version - execute a script that then runs the Jar?

I’m sure your googly skills are far better than mine, but I found a page with info about how the .app folder works and it’s basic structure:
https://mathiasbynens.be/notes/shell-script-mac-apps

Yes, I found the Appify program as well, but since I don’t have a Mac it’s fairly useless for me. >___> Manually composing up a .app folder and packing it to a DMG file seems like the only solution.

I haven’t tried it (I also don’t have a Mac) but packr says it supports .apps.

INTRODUCING JAPPIFY

The brand new solution to all the world’s problems! Just kidding, it’s just a hacked together port of the Appify script.

Jappify source code
Executable jar file (uses command line arguments, see source code)
Test .app generated (JOptionPane hello world, ~40MB due to JRE)

The jar takes in 4 arguments:

  • gamePath: Path to the game’s folder which includes the jar and all resource files.
  • relativeJarPath: Path to the jar relative to the base game folder. If your jar is in a folder called “jar” in your game folder, then specify “jar/.jar”.
  • jrePath: Path to an extracted JRE. It expects the JRE to have the bin/, lib/ and man/ folders along with several files right inside the JRE folder, so you’ll need to do some manual unpacking from the .tar.gz JRE file.
  • appName: Name of the generated app.

If anyone could test the .app I created on OSX and/or possibly check and fix the source code if there’s any problem somewhere I’d really appreciate it. Debugging stuff on the internet is just too time-consuming… x___x

EDIT: May want to change the classpath of the game it runs to the game folder in the shell script it generates…

Sadly it doesn’t handle Oracle JDKs and icons. Good find, though.

Bear something in mind - Linux isn’t an OS - Ubuntu (for example) is an OS. If you want something that’s going to properly integrate with icons, etc. you’re likely going to have to make a package suitable for the OS. I’ve seen a pure-Java RPM builder before, but not sure if there’s a .deb builder. You should be able to make packages very easily in a Linux VM though.

Not sure if you looked at the somewhat hidden link in my reply above - it’s a blog post I wrote on how the Praxis LIVE package is built - Packaging as a .deb

when I first tried to run on my Mac Book Pro I had an error:

./HelloWorld: line 2: jre/bin/javaw: No such file or directory

I modified the HelloWorld to point to jre/bin/java and it gave a beautiful dialog saying HellWorld.

Hmm. Is it reasonable to expect Linux users to be less sensitive to stuff like icons? Do you think the average user would be okay with just a generic no-extension executable file?

Thanks a lot for testing!!! That’s really weird though. Oh, the bin/ folder doesn’t have javaw. -_____- I wonder why that is… Anyway, I’ve fixed that problem.

One more question: Did it pop up a terminal window or did it start silently?

EDIT: Medal for “HellWorld”.
EDIT2: And for helping of course. :slight_smile:

Ok, Actually I first tried clicking the .app and nothing happened.
Then as I told before I went to my terminal and checked the script, fixed it and ran ./HelloWorld from the terminal.

Now I tried again clicking the app (having the script fixed) and still nothing happened :confused:

So clicking it isn’t working? Damn it.

IIRC the working-directory on Mac OS X is the user-dir, not the directory of the double-clicked file / app.

Probably not, but it’s reasonable to expect there’d be less of them! :wink: Know your audience - go with the easiest approach until you know putting extra time in is worth the effort.

Getting it all in a single executable is probably more work than creating the package file. Just stick a folder with a shell launcher in an archive. If you’re clever about it you should be able to use the same launcher and structure for OSX and Linux.

AFAIK javaw is a Windows-only concept. I don’t have OSX to test, but I noticed your app bundle has a somewhat different structure to mine, and I know mine works! :wink: As Praxis LIVE is a NetBeans RCP application, it uses the build process from that, which seems to handle this well. It might be worth having a look at the Praxis LIVE app bundle - IIRC the Contents/MacOS folder just contains a symlink to a folder in Contents/Resources, which has the same structure as the application folder in the zip bundle and .deb package. All use the same shell launch script, which is part of the NetBeans RCP build, and is used for both OSX and Linux.

Also, I wonder if you’re being bitten by issues with working directory, which behaves differently on Windows? That shell launcher script also has logic in it to find absolute paths to resources based on its own location.

Hmm. Any way of overriding that or getting the path of the double-clicked file? Sounds rather useless otherwise.

Ah, yeah, that’s what I meant. Not packing it all up into a single executable, but creating a shell script which boots it all up with the right VM and all.

Sigh. This would be so much easier to figure out if I actually had a Mac… Is there any significant difference between how shell scripts behave on Linux and Mac?