Oni Central Forum

A forum for the Oni community

You are not logged in.

#51 01/10/08 11:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Also, geyser, are you going to take the lines out of the xedition scripts that require input before starting?  I could script a workaround that sends an [Enter key] event to the Terminal, but it's a kludge.

It looks like the best solution to getting mono installed is using fink, but "fink" on the command line has to be installed, and installing that is probably beyonds the bounds of something this Installer should be doing.  The AEI could, however, say "Mono is not installed.  Please install it using FinkCommander, which is found at: http://www.finkproject.org/download/index.php."  There's detailed instructions there for installing fink.  If fink is installed, however, we could add to the script the command "fink install mono", but it might require the Administrator password.  We can build a dialog for that input too, but again, perhaps we should just be directing the user to do that part himself.  Then at least we're getting them going in the right direction.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#52 01/10/08 11:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

Iritiscen: I noticed that this version does not copy over the intro and outro files (Though I'm sure geyser will add it in the next version).

Is there a way to prevent AEI from quiting after running the scripts?
It will be nice for it to give a message that it finished the command.

I guess if a message with the URL to the mono program is included, it will give the user the "right direction"
(I think once this is added, I'll start email some others to try it out.

Thanks for your efforts.

Offline

#53 01/10/08 11:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

If the AEI is not copying the movies, then there is something wrong.  This should be the code used to compile the app (attached).  Note the "cp" commands used with both the Full Install and Update Install options.  Although it's true that geyser will add this later, so I won't fret about that part too much.  I might just take it out altogether if it's not working.  Are the "cp" commands showing up in the Terminal at all?

I will have to look into the not-quitting-after-running-scripts part.  It might be a simple fix.  But, keep in mind that I cannot include a success-or-failure message without geyser's cooperation, so the message will simply be that the process is done.

Definitely will add the mono message with URL tonight when working on the other things.  Keep in mind, its fink that has to be installed first, so the message will be pointing the user to fink's page.  mono may or may not have a page, but it can be easily installed from the GUI FinkCommander, so I think we'll just have the AEI tell the user something like "Install fink from [here], then install mono using FC."


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#54 01/10/08 16:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

I'm sure I was able to install mono without fink, I don't remember installing fink beforehand... must be getting old... smile
Here's the direct link to mono:
ftp://www.go-mono.com/archive/1.2.6/mac … versal.dmg.

The cp command did not show up in the terminal window. It seems the AEI quits before issuing the cp command.

You could just use "display dialog" that states the update, install, uninstall, etc has been completed.

Last edited by EdT (01/10/08 20:01)

Offline

#55 01/10/08 20:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

I found a bug.  Sometimes, when you uninstall, GameDataFolderZero is placed inside the GameDataFolder.
Very strange, I was able to repeat the bug twice.

Offline

#56 01/11/08 09:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Sorry, no updates on the AEI today, I had zero time yesterday.  Definitely after the weekend, though.  But I can still respond to your posts...

I'm sure I was able to install mono without fink, I don't remember installing fink beforehand... must be getting old... smile
Here's the direct link to mono:
ftp://www.go-mono.com/archive/1.2.6/mac … versal.dmg.

Okay, I was making things too complicated, wasn't I?  The only reason fink is needed is to install packages from the command line, but you could just download mono yourself as an image with an installer, as you point out.  If the AEI isn't going to use a shell script to install mono, it doesn't need to care about fink.  So, yes, I will use that link in the message the AEI gives the user.  Screw fink.

The cp command did not show up in the terminal window. It seems the AEI quits before issuing the cp command.

Okay, I will definitely have to figure out why it's so eager to quit.  It looks like I won't be able to get around reading from the Terminal, something I was working on already.  At the very least it's necessary in order to report that the installation/whatever is done, and it may be necessary here in order to know when the installation command has finished, before sending the cp commands for the cutscene movies.

I found a bug.  Sometimes, when you uninstall, GameDataFolderZero is placed inside the GameDataFolder.

Hmm!  That indicates to me that the first command, "move the GDF to the Trash", is failing, thus the folder stays in place.  If so, that would cause the second command to be interpreted as "move the GDFZero folder to inside the GDF folder" when it's supposed to mean "rename the GDFZero folder to GDF".  This reminds me of the xedition bug that moved the IGMD folder inside the IGMD folder.  Interesting.  It could be a privileges issue.  It's also partly the fault of "mv" for being the command to both move and rename files.

Something else to research this weekend.  You might try making sure that the GDF/Zero folders have you as the owner with read/write permissions.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#57 01/12/08 05:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

"It's also partly the fault of "mv" for being the command to both move and rename files."
Well, you can always check for the non-existence of the target before renaming.

"You might try making sure that the GDF/Zero folders have you as the owner with read/write permissions."
Actually, I would chmod the Zero folder so that it's read-only and can't be messed up accidentally, ever.
Then the moment you want to move/rename it around, you'd explicitly/exceptionally chmod it back.

@ copying cutscene movies: the final Anniverary release will be copying them anyway, by public request tongue


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#58 01/14/08 09:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

I fixed some bugs in AEI over the weekend but forgot to add the link for mono, so if it's all the same I'm going to hold off on posting it here until I do that little bit tonight.  But I fixed the stupid bug that caused Uninstall to fail, and I fixed the movie copying.  And I added a nice little "Installation [or whatever] Done!" message after each operation finishes (the solution turned out to be elegant and simple, but keep in mind it only waits for the Unix operation to finish, it doesn't know success from failure).  I will post it tomorrow.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#59 01/14/08 11:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

That's great news!  Once that is available, I'll start informing others about it. 
The notice about the operation is finished is all we need.
Do you think we should include a link to Edition itself?

Now how are you with Codewarrior?  With Edition, Mac users can hack the data files using a hex editor and then recompile the files with AEI.  But one thing we can't do is export and import the TXMP.  (I mean export and import in terms of a graphic file) It was possible with OniTools: http://oni.bungie.org/res/utilities.html  Its only for OS9, but the source code is available... We don't need all the features, just the part for TXMP. Food for thought...

Last edited by EdT (01/14/08 11:01)

Offline

#60 01/14/08 12:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Hmm... I have downloaded that but never thought of porting the source code for OS X.  I will take the code home and look at it.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#61 01/14/08 14:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

Awesome!
Here is a link to the latest version I have:
http://edt.oni2.net/tools/OniTools1.5.1.sit
(forgot to include it in the previous post)

Offline

#62 01/15/08 10:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Okay, first things first, here's the latest AEI (attached).  It has the fixes I described earlier.  I am not 100% sure, though, that the movie copying works.  I won't worry about that since geyser will be doing that part soon, and at that point the code in AEI to do it should probably be removed anyway.  Note: AEI now works from the Oni folder, not the edition folder.

Next, I looked at OniTools.  It's written in procedural C, using some techniques that I never learned properly back in school, but I could do a little reading and figure it out.  There's a couple options for bringing this program into the modern Mac environment.  One is Carbonizing it, which is mostly straightforward.  The other is rewriting it in Cocoa.  That requires changing out all the interface code, drawing code, and variables for new shiny object-oriented methods and objects but in a way this is the environment I know better and can debug better.  I would almost be tempted to do that, but perhaps the simplest route is the best one.

First, I have to ask, what about the original author?  What is he up to?  Has he considered porting it to OS X himself?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#63 01/15/08 11:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

Iritscen: Thanks. I found another bug.  I did a recompile and another version of AEI started up with the opening dialog box.  After I quit the 2nd version, then I got an error message saying "Can't continue activate" from the first one. This happened also with the Full and Update Install.

Regarding OniTools, I emailed the author Ian Patterson about updating it to OSX , here are his words:

Sorry, I don't have a machine capable of effectively running MacOS X any more.

The code is open source, and included with the executable package, so pretty much any other programmer should be able to get a Carbon compile going. I'd be happy to answer questions about the code design to help with that process.

Offline

#64 01/15/08 11:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

Ed, is Magma's Myrd dead or something? I thought he told you he felt like adapting OniTools for OS X.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#65 01/15/08 11:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

He started, but lost interest.

Offline

#66 01/15/08 12:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Iritscen: Thanks. I found another bug.  I did a recompile and another version of AEI started up with the opening dialog box.  After I quit the 2nd version, then I got an error message saying "Can't continue activate" from the first one. This happened also with the Full and Update Install.

To that I respond with a hearty, "Oh #$%!."  Actually, I think I know what the problem is.  Trash all other versions of the program, at least ones that are named "Anniversary Edition Installer(.app)".  There's new code in the app ("tell "Anniversary Edition Installer" activate") that brings itself back up to deliver the "finished" messages after switching to the Terminal.  AppleScript tries very hard to be smart in knowing what app you mean, so it looks at your hard drive for an app with that name instead of simply looking for an open app with that name.  In a case like this it's being too smart (or it's not smart enough to know I mean the "AEI" already open).

Regarding OniTools, I emailed the author Ian Patterson about updating it to OSX , here are his words:

Sorry, I don't have a machine capable of effectively running MacOS X any more.

The code is open source, and included with the executable package, so pretty much any other programmer should be able to get a Carbon compile going. I'd be happy to answer questions about the code design to help with that process.

Okay, it sounds like he isn't using Macintosh anymore sad  Well, it's good to know that I can contact him with questions.  As he mentions, I should probably shoot for a simple Carbon compile.  Can you send me his email address, EdT?  Before I even contact him, though, I will need to do some more reading on classes in C, because my formal (but quirky) education in C programming left off at that point, unfortunately.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#67 01/15/08 12:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

"I will need to do some more reading on classes in C, because my formal (but quirky) education in C programming left off at that point" neutral Classes. in C. of course smile

Last edited by geyser (01/15/08 12:01)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#68 01/15/08 12:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

I need to learn about the private/public kind of classes, not the "sitting in the classroom" kind of classes. smile


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#69 01/15/08 12:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

"I need to learn about the private/public kind of classes"
Well, good luck with that, because there are none in C smile

Last edited by geyser (01/15/08 12:01)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#70 01/15/08 13:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Fine, C++ then, Mr. Pedant smile  The class was in C++ but we never had it explained to us what the difference was between C and C++ and we spent most of our time on C stuff until the last week or two.  I took a year of Computer Science after that but it had nothing to do with C.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#71 01/15/08 13:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

Sorry for the pedantism, and have fun with C++.
However, note that OniSplit will do textures soon.
They're experimental features, but they're there.
(exporting meshes/textures to popular formats)
(and hopefully importing them back into Oni)

Last edited by geyser (01/15/08 13:01)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#72 01/15/08 13:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Yeah, OniSplit is cool, as is OniUnPacker, but they're .exes!  It would be nice to have an actual Mac app to do these things.

Right now it's hard to estimate how involved it will be to Carbonize it.  It might be very simple.  I will investigate some more.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#73 01/15/08 13:01

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: Mac programming

"It would be nice to have an actual Mac app to do these things."
Maybe, but that would mean double work for you or whoever neutral
OniSplit is not as portable as if it was written in C++, but it works.
My opinion is that all we need is a GUI for OniSplit, as an add-on.

Last edited by geyser (01/15/08 13:01)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#74 01/15/08 13:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Mac programming

Iritscen: You nailed it!  Trashed the other version which was still inside the edition folder.  Now works fine.
I emailed you Ian's address.

They're experimental features, but they're there.

geyser: Can you share how to get at the textures with OniSplit?

Offline

#75 01/15/08 14:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Mac programming

Great to hear that it worked, EdT.  Please note (I'm looking at geyser as I say this) that it STILL DOES NOT WORK WITH THE XEDITION SCRIPTS UNLESS YOU REMOVE THE READ/ECHO LINES FROM THEM.

It sounds like geyser has a differing opinion on OniTools vs. OniSplit.  I'm not sure exactly how to go about writing a GUI for OniSplit... mainly because I'm unfamiliar with OniSplit.  How does OniSplit display a certain kind of data from Oni?  Does it show hex values onscreen, or does it only export the data to a file?  And when it comes to graphics -- I mean, you can't display a TXMP on the command line... so is it just exporting that as well?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

Board footer

Powered by FluxBB