Oni Central Forum

A forum for the Oni community

You are not logged in.

#26 6/3/16 12:28

3371-Alpha
Member

Re: AE support for PowerPC Macs

My OpenJDK is actually installed in /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home due to the fact that some applications can detect it in this location (such as NetBeans). It has sym-links in /usr/local/bin. So I can invoke it like this: /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/java -Djava.awt.headless=false -jar /Applications/Oni/AE/bin/AEInstaller2.jar.
Or: /usr/local/bin/java -Djava.awt.headless=false -jar /Applications/Oni/AE/bin/AEInstaller2.jar.
I of course typically choose the latter due to convenience. The "-Djava.awt.headless=false" argument you see is because OpenJDK prefers to run in CLI mode by default so I have to force it to run graphically (X11).
Any attempts to launch it in Java 5 (double clicking it in Finder) return a java class error, which from my understanding are usually caused by using the wrong Java version.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#27 6/3/16 13:06

Iritscen
Moderator

Re: AE support for PowerPC Macs

Okay.  For the sake of caution, I'll just mention that you're missing a path component to the AE Installer; it's in Oni/AE/AEInstaller/bin/AEInstaller2.jar, but that was probably just a typo in your post.

When I click on the .jar directly, with Java 6 installed as the default Java, it does open the AEI, but I get the error about .NET missing, because it requires the addition of Mono's directory to PATH while calling "java -jar".  I'm frankly not sure why, since /usr/local/bin is in my PATH variable when I'm on the command line.  But it seems that (regardless of where Mono is installed) you do need that PATH code when launching the AEI.  So, with your Mono at /usr/bin/, that would be:

export PATH=/usr/bin:${PATH};/path/to/java -jar /path/to/Oni/AE/AEInstaller/bin/AEInstaller2.jar

...plus your command to force it to use X11, of course.

I'm just not clear on whether you've specifically tried the above method of launching, so that's why I'm repeating it (plus I now know where your mono is).  But if this doesn't work, can you send me any log files that are in AEInstaller/, or post their contents here if they're small?  I think you'll just have one, aei_output.log, and it may be blank, but Alloc and I are curious if it says anything.


byproducts are fine, but where's the beef?

Offline

#28 6/3/16 13:24

3371-Alpha
Member

Re: AE support for PowerPC Macs

Actually seems I was missing that path component. When I unpacked the original installer script, I simply dragged the AEInstaller2Updater.jar to /Applications/Oni/AE. Was that wrong?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#29 6/3/16 13:38

Iritscen
Moderator

Re: AE support for PowerPC Macs

Oh, well it's not where it normally goes.  The AE Setup script that you couldn't run would normally create an AEInstaller folder inside the AE folder.  I think that's my fault for not mentioning that earlier.  That wouldn't affect the AEI's ability to find Mono, but it would affect its ability to work with Oni's game data once you're able to run it.  The paths are supposed to look like this:

Oni/
---AE/
------AEInstaller/
---------AEInstaller2Updater.jar
---------bin/
------------AEInstaller2.jar
------GameDataFolder
------Oni.app


byproducts are fine, but where's the beef?

Offline

#30 6/3/16 13:46

3371-Alpha
Member

Re: AE support for PowerPC Macs

So do both the Oni.app & it's data folder go in the AE folder?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#31 6/3/16 13:52

Iritscen
Moderator

Re: AE support for PowerPC Macs

Yes, but the AEI places those there when it performs initialization, so I guess you wouldn't see those yet.  Are you getting any log files when the AEI attempts to launch and warns you about .NET?


byproducts are fine, but where's the beef?

Offline

#32 6/3/16 14:00

3371-Alpha
Member

Re: AE support for PowerPC Macs

Both are blank. Also, one final question, was I suppose to rename "Oni f" to "Oni" when I first installed the game? The "f" looked like an OS9 character so I didn't think it was suppose to be there.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#33 6/3/16 14:11

Iritscen
Moderator

Re: AE support for PowerPC Macs

It's better to remove the 'ƒ', yes.  It's caused problems for our community tools a few times over the years (and it's the reason why my launch script has to set the locale for Java when launching it).

Sorry, I don't know why this isn't working.  I'm still trying to think of other ways to get Mono to be accessible to the AEI.  All of our modding work is based in the CLI tool OniSplit, which is a .NET application, hence the dependency on Mono.


byproducts are fine, but where's the beef?

Offline

#34 6/3/16 15:02

3371-Alpha
Member

Re: AE support for PowerPC Macs

Actually I do have a theory & possible solution. You mentioned earlier that mono's sym-links are in /usr/local/bin in Yosemite due to the system integrity protocol not allowing write access in /usr/bin. What if the AEInstaller is looking for Mono specifically in /usr/local/bin instead of /usr/bin. Couldn't I just sudo mv the sym-links to /usr/local to fix this issue?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#35 6/3/16 17:48

Iritscen
Moderator

Re: AE support for PowerPC Macs

The AEI is actually calling "which mono" to find mono.  Of course, "which mono" works in Terminal, so all I can deduce is that the environment for Java when it runs the AEI is different from the shell and doesn't include /usr/bin/.  This is the same problem I discovered on my own Macs, and this is what the "export PATH" command is supposed to fix.  It's why that command doesn't work that's the mystery to me.


byproducts are fine, but where's the beef?

Offline

#36 6/3/16 17:56

3371-Alpha
Member

Re: AE support for PowerPC Macs

So you also have this issue too now? How'd that happen?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#37 6/3/16 19:55

Iritscen
Moderator

Re: AE support for PowerPC Macs

I first discovered that issue when Mono moved to /usr/local/bin/ recently.  That was when I had to update the Run AE Installer script to use that "export PATH" command.  It puzzled me at first, but I suppose that calling Java from the command line is naturally different from invoking it through AppleScript.  I see now that I can call "java -jar AEInstaller2.jar" directly from Terminal and it will work, because in that case java is a subprocess of bash and it inherits bash's environment variables like $PATH.  Whereas in my AppleScript I am simply using "do shell script" to launch Java, and that runs a Unix command without a shell.

Java should, of course, have some idea of where to look for binaries in a *nix system, so I don't know why it doesn't automatically look in places like /usr/bin/, but this gives me an idea for a possible solution to your problem: making symlinks to the Mono binaries in /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/.  There's no doubt that your Java is at least looking in that bin/ path, if nowhere else, for binaries.  So if there are symlinks there which point to Mono's real location in /Library/Frameworks/, that should do the trick.

I don't know if you need to make a symlink for just the "mono" binary, or all of them, but here's a tip if you want to be really thorough in making symlinks for all of Mono.  If you ever use Pacifist, you know that it allows you to inspect packages including installer packages, which sometimes the Finder does not let you do.  If you use Pacifist to open the installer package for the version of Mono you have installed, and click on the Resources tab, then drill down to mono.pkg/Scripts/postinstall, you'll see that it is a shell script which, among other things, makes symlinks for the mono binaries from the Frameworks location to /usr/[local/]bin/.  It looks like this in current Mono packages:

FW=/Library/Frameworks/Mono.framework
WHITELIST=$(cat "$(dirname "$0")/whitelist.txt")

if [ -d ${FW}/Commands ]; then
    for i in ${WHITELIST}; do
	# Only create a symlink if there isn't a file there
	if test -e "${FW}/Commands/${i}" && test ! -e "/usr/local/bin/${i}"; then
        	echo "${i}"
	        ln -sf "${FW}/Commands/${i}" "/usr/local/bin/${i}"
	fi
    done;
else
    echo "${FW}/Commands does not exist"
    echo "Can not create links to /usr/local/bin."
fi

...and whitelist.txt is also in the Scripts/ folder and contains a list of all the names of the mono binaries.  So if you made the above into a .sh script and put whitelist.txt next to it, it could do the job for you.  I don't know if you need to make this big of a production of it, but I'm sharing this info since I had to learn it when I was reporting bugs to the Mono devs.  Obviously you want to change that destination path /usr/local/bin/ to /Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/.


byproducts are fine, but where's the beef?

Offline

#38 6/3/16 20:56

3371-Alpha
Member

Re: AE support for PowerPC Macs

So do you think there may be a way to permanently solve this issue? Will you have to release an update/fix to the AEInstaller?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#39 6/3/16 21:18

Iritscen
Moderator

Re: AE support for PowerPC Macs

Well, as far as I know, the current launch script works for other Macs besides your own smile  If Alloc (who develops the actual Installer) wants to work on this issue, perhaps he can try to make the app look in the standard locations for Mono when it's running on a Mac (/usr/bin/ and /usr/local/bin/), but normally it has worked fine when relying on its default environmental vars and "which mono", so I think it's just your setup that is irregular.

Incidentally, you may be able to bypass all the trouble of the above scripting work and just copy the existing mono symlinks that are in your /usr/bin/ to your Java's Home/bin/ directory, but I figured that either way you still need to know what they are called.  Although only "mono" is directly invoked by the AEI, "mono" is likely just a central point of access that calls other binaries to actually do the work, so there's no telling which specific ones you need symlinks to.  That's why I'd copy all of them, if I were you.  I can post the whitelist.txt that has the names of the binaries in the latest Mono, but I don't think I should because it's probably different from your older Mono install.  If you can't get the whitelist out of your Mono's installer package, point me to it and I will try to extract the file.


byproducts are fine, but where's the beef?

Offline

#40 6/3/16 21:39

3371-Alpha
Member

Re: AE support for PowerPC Macs

Well if Alloc does decide to help, I do know something that may help him in detecting which OS the computer is running. In all versions of OpenJDK for osx (including intel versions & possible even the now unmaintained SoyLatte project) the runtime actually refers to the os as "Darwin" instead of osx. Not sure why it chooses the name of the kernel instead of the os, but it does. He could program it to recognize "Darwin" as a synonym to osx.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#41 7/3/16 13:26

3371-Alpha
Member

Re: AE support for PowerPC Macs

The whitelist script keeps making sym-links in jdk's home instead of it's bin. Still it's a pretty cool script. Wish I knew about it before. I could have used it to make sym-links for openjdk it's self in /usr/local/bin when I first installed it.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#42 7/3/16 15:38

Iritscen
Moderator

Re: AE support for PowerPC Macs

What path did you supply to the script?  Was it /Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/?  At the least, I guess you just have to move the symlinks to the bin/ directory manually after they're placed in Home/.


byproducts are fine, but where's the beef?

Offline

#43 7/3/16 17:17

3371-Alpha
Member

Re: AE support for PowerPC Macs

What if this whole issue is because AEI can't determine my OS (& in extension my Mono install path). Like I said, OpenJDK for Mac actually refers to the os as "Darwin".


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#44 7/3/16 18:16

Iritscen
Moderator

Re: AE support for PowerPC Macs

It's possible.  For me, with my Java 6, it identifies as "MACOS".  It appears that the AEI was written to look for an OS called "mac*".  Unfortunately since your aei_output.log is empty (mine is often empty too), we can't check it to see how the OS was identified to the AEI.  But if it's "Darwin", that might be the issue.  I'll talk to Alloc some more about this.

Are you going to try copying over those symlinks to the Java bin/ directory?


byproducts are fine, but where's the beef?

Offline

#45 7/3/16 22:08

3371-Alpha
Member

Re: AE support for PowerPC Macs

Iritscen wrote:

Are you going to try copying over those symlinks to the Java bin/ directory?

Yes. I'm just scrutinizing the whitelist, making sym-links to the correct location & doesn't damage anything. Then I'll try to run it again.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#46 11/3/16 16:19

3371-Alpha
Member

Re: AE support for PowerPC Macs

Here's what I've got on the script. Did I edit it correctly?

postflight wrote:

#!/bin/sh -x

FW=/Library/Frameworks/Mono.framework
FW_CURRENT=${FW}/Versions/Current

WHITELIST=$(cat $(dirname $0)/whitelist.txt)

if [ -d ${FW}/Commands ]; then
    for i in ${WHITELIST}; do
    # Only create a symlink if there isn't a file there
    if test -e "${FW}/Commands/${i}" && test ! -e "/System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin${i}"; then
            echo "${i}"
            ln -sf "${FW}/Commands/${i}" "/System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin${i}"
    fi
    done;
else
    echo "${FW}/Commands does not exist"
    echo "Can not create links to /usr/bin."
fi

if [ -d ${FW_CURRENT} ]; then
    cd ${FW_CURRENT}/share/man
    for i in ${WHITELIST}; do
        for j in $(ls man*/${i}.*); do
            if test ! -e "/usr/share/man/${j}"; then
                ln -sf "${FW_CURRENT}/share/man/${j}" "/usr/share/man/${j}"
            fi
        done
    done

    cd ${FW_CURRENT}/etc
    # Make sure we run the files we lay down, and not other stuff installed on the system
    export PATH=${FW_CURRENT}/bin:$PATH
    # gtk+ setup
    gdk-pixbuf-query-loaders > gtk-2.0/gdk-pixbuf.loaders
    # pango setup
    mkdir -p pango
    pango-querymodules >  pango/pango.modules
fi

# Mono framework should be owned by root
chown -R root:admin ${FW}

Oh, yes. Sorry about the 2 day wait for a reply. All this java business not working was giving me a head ache.


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#47 11/3/16 17:28

Iritscen
Moderator

Re: AE support for PowerPC Macs

Well, almost.  You don't want any of the stuff after the "if [ -d ${FW}/Commands ]" block.  Keep in mind that Mono already would have run this script, so the following steps should have already been performed -- installing the man pages, that gtk+ and pango setup stuff, and "chowning" the framework when it was installed in Frameworks/.  Also, when you replaced "/usr/bin/" with your Java Home directory path, you dropped the ending slash both times, which will result in an incorrect path like ".../Home/binmono" instead of "...Home/bin/mono".

So I would suggest just using this (though I haven't tested it, the worst that can happen is that symlinks end up in the wrong place, which won't do any harm):

#!/bin/sh -x

FW=/Library/Frameworks/Mono.framework
FW_CURRENT=${FW}/Versions/Current

WHITELIST=$(cat $(dirname $0)/whitelist.txt)

if [ -d ${FW}/Commands ]; then
    for i in ${WHITELIST}; do
    # Only create a symlink if there isn't a file there
    if test -e "${FW}/Commands/${i}" && test ! -e "/System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/${i}"; then
            echo "Symlinking to ${i}."
            ln -sf "${FW}/Commands/${i}" "/System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/Home/bin/${i}"
    fi
    done;
else
    echo "${FW}/Commands does not exist; cannot create links to it from Java's Home/bin."
fi

byproducts are fine, but where's the beef?

Offline

#48 13/3/16 16:01

3371-Alpha
Member

Re: AE support for PowerPC Macs

Thanks. Doing the commands below "if [ -d ${FW}/Commands ]" shouldn't have damaged my Mono framework, would it?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

#49 13/3/16 17:00

Iritscen
Moderator

Re: AE support for PowerPC Macs

No, I think some of that later code would just fail harmlessly because it might be referencing files you don't have next to the postflight script, but it shouldn't have hurt to run the man page, setup stuff, or "chown" twice.  Any progress to report?


byproducts are fine, but where's the beef?

Offline

#50 13/3/16 19:03

3371-Alpha
Member

Re: AE support for PowerPC Macs

Well the sym-links are in place but it still asks me to install Mono (".NET"). Where the hell is it looking exactly?


PowerMac G5 Dual 2.0GHz 2003 (Model: 7,2)
Mac OS X 10.5.8 (Leopard)
7GB RAM (OWC PC-3200U-30330 DDR SDRAM 400MHz)
ATi Radeon 9600 Pro 64MB (GPU overclocked to 438.75MHz, VRAM to 330.75MHz)

Offline

Board footer

Powered by FluxBB