Author Topic: FS2_Launcher OS X 3.0  (Read 118412 times)

0 Members and 1 Guest are viewing this topic.

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
Quote
OK, here's a big feature request (of course after your exams).  Mod.ini support.  This would take a fair amount of code, but I know it can be done.  If you wanted help with this, I know Objective-C and am familiar with the Cocoa APIs.

Actually, I would firstly need a tutorial on mod.ini. Where can I find one?

PS. Everything can be done, don't worry. I just need to know how FS2_Open handles things.

EDIT:
I've been reading the documentation on mod.ini but I must admit I don't quite understand that feature request.

The way I see it, mod.ini is a file which is handled by FS2_Open (or is it the Launcher?), if it exists in the same folder as the mod. It may contain:

- a set of custom flags specific for the mod
- a set of custom mods that may be used in conjunction with this one

I already have a small parser ready that can probably handle this file (wow, I never thought that stuff I was implementing in frameworks long ago would come useful now) but I need a reference as to what types of data may be found there. So, it can be done with some effort.

However, I assume you are aware that the Launcher as it is now contains a feature that allows the user to put multiple mods in a text field and load them all? So what more can the mod.ini file offer? (of course I will implement it since there are more people asking for this thing but I need to know its use :)) I remember people telling me about mod.ini long before I released version 3.0, but I didn't pay attention because I thought they missed an already-existing feature. Seems this is not the case.

Please, enlighten me :)
« Last Edit: May 11, 2008, 05:17:07 am by Soulstorm »
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
Mod.ini is supposed to be handled by the launcher.  Basically it makes things easier for the user, so that if the mod.ini file points to other mods, they will be selected automatically.  Lets take the example of Into the Depths of Hell chapter 3.  This requires chapter 2 to work, and I'm sure you want the MediaVPs with it too.  So instead of having to remember to type in "ITDOH3,ITDOH2,mediavps" every time you want to select it as a mod, you can just type "ITDOH3" and the launcher will read the Mod.ini file and automatically select ITDOH2 and mediavps.

I have found no official documentation on what a mod.ini file should contain, but from looking through a few of them, it might look something like this:

Code: [Select]
[launcher]
image255x112 = BannerImage.bmp;
infotext     = Insert Mod Description Here.;
website      = http://mywebsite.com/mymod/;
forum        = http://mywebsite.com/forum/;

[multimod]
primarylist  = ;
SecondryList = mediavps, nebulae;

[settings]
flags = -flag1, -flag2;

I'm not quite sure what the difference between primarylist and secondarylist are, as I have never seen primarylist used at all, but from what the wiki says, it should come before secondarylist.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FS2_Launcher OS X 3.0
Mod.inis don't replace multimod. They simply act as an interface for it so that the end user never has to worry about it. They also have a few neat minor effects.

The main feature is the secondarylist option. The reason for having that (in the Windows launcher at least) is because of the Select Mod button we have to choose which mod we want to play. The advantage of having a mod.ini is that as soon as you select a mod (say FSPort) the launcher checks the mod.ini and appends any folders mentioned therein to the command line. The user no longer has to know which mods are required for the selected one to work any more.

Primarylist works similarly but anything on that list is placed in front of the selected mod so the commandline reads -mod primarylist, mod name, secondarylist. Thus far there's never been much call for the primarylist option. I can only think of a couple of times I've ever used it and both have been in fairly odd situations.

The other useful features are all in the [launcher] section and are fairly self explanatory. They allow the mod.ini to provide a bitmap image for each mod, a few paragraphs of text explaining what it's about and links to the mods forum and website.

Ignore the setting custom flags option as this is deprecated and was never implemented properly in the first place anyway.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
...Mod.ini support.  This would take a fair amount of code, but I know it can be done.  If you wanted help with this, I know Objective-C and am familiar with the Cocoa APIs.

It's allright, thank you, but I have already made a decent parser for mod.ini, and it seems to be able to also handle arbitrary arguments. All I need to do is to implement the parser inside a user interface.

I have thought of this so far:
I could provide a function in the top menu that would say "mods..." or something like that. By enabling this button, I could display a window with a table view, an image view and a text field. The tableView will display all available mod folders (folders that contain custom non-standalone mods and exist in the same folder as the selected application). The imageView will display the custom image for the selected mod (taken directly from mod.ini file) and the textfield will display the additional info for the mod (if any).

The user will also be able to select one non-standalone mod to run, and by selecting that, the Launcher will read the mod.ini file (if any) and will process any additional data accordingly.

Side Note: I will also release a framework that will accompany the source. It contains hundreds of additional functions for ObjectiveC/C++, and will provide functionality to the Launcher (among my other projects). However, it's not documented, so I am thinking about just implementing its source into the Launcher, forcing compilation of the entire framework each time. That would also result into a more bloated source. I don't know... the idea of a framework package seems more appealing to me, but writing a documentation about this framework will require an enormous amount of work.
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FS2_Launcher OS X 3.0
That's functionality that the Windows launcher doesn't have (not really enough space in the tiny launcher anyway) but which would look really cool in the Mac version. Go for it. :yes:
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
Side Note: I will also release a framework that will accompany the source. It contains hundreds of additional functions for ObjectiveC/C++, and will provide functionality to the Launcher (among my other projects). However, it's not documented, so I am thinking about just implementing its source into the Launcher, forcing compilation of the entire framework each time. That would also result into a more bloated source. I don't know... the idea of a framework package seems more appealing to me, but writing a documentation about this framework will require an enormous amount of work.

Patchy/incomplete documentation would be all right, if people had specific questions, they could just ask you or something ;)

Besides, I really don't know many people here who actually know ObjC (besides you, of course)

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
That's functionality that the Windows launcher doesn't have (not really enough space in the tiny launcher anyway) but which would look really cool in the Mac version. Go for it. :yes:

Remember, development is somewhat delaying because of my exams (and they last one month... grrr). Actually, I must admit I've never used the Windows Launcher. I initially made the Launcher long ago for personal use.

Quote
Besides, I really don't know many people here who actually know ObjC (besides you, of course)
So that's why no one noticed that the source for the latest version is missing from the CVS... ;)
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
So that's why no one noticed that the source for the latest version is missing from the CVS... ;)

The source is available?  Where?

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
It was always available, only that it is not available in the CVS. I had a lot of problems with it, so I was always distributing the source in a .dmg in my server. I had made a promise to give the source to SCP developers, but I just couldn't do it the CVS way. Seems, however, no one saw my posts about the source... :)

The latest available source is here. I have made a lot of changes since then, but it should give an idea of how things work. It is the OS X Launcher v.3.0.2.
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
Thanks.  But that DMG is password protected.

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
damn. try "gimmethesource" (without the quotes). I am not sure if it's that.
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
That seems to be the password, but the disk image still refuses to mount :(

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
Mod.ini support has been implemented. However, I didn't release it yet, since I haven't been able to test it on various machines yet. I didn't use the approach I mentioned previously. I think that what I have done now is more comprehensive and easy. I tested it on my machine with the Transcend mod. Seems to work just fine.

See the screenshot for details.

Download the latest beta here.

I am waiting for feedback on this one.

[attachment deleted by admin]
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
It won't even start for me.

BTW, what exactly is "dependencies"?  Is it updated based on mod.ini?

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
Try it again. I reuploaded it.

I had failed to link the Launcher against some frameworks. Seems I must optimize my frameworks for other builds. I included the files that the application needs separately from the framework, and I got rid of it. I ran the application on an old G4 with 10.4, and it worked.

As far as dependencies goes... yes. The dependencies are the extra mods that are required in order for the mod to run properly.
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: FS2_Launcher OS X 3.0
It still crashes ... but it gets farther through the launch sequence than it did before :(

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
OK. Let's see what's wrong. Delete the preferences of the application. This should be the file named "com.soulstorm.MMST2_3.plist" in your user preferences folder inside your library.

If that fails, please go to the console and post the results of your crash log. That should give me an idea of what's wrong. What exact system version are you using?

Does anyone else have the same problem?
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline Tinman

  • 27
  • Released: WCS mini campaign
Re: FS2_Launcher OS X 3.0
Does anyone else have the same problem?

yes, after deleting the prefs it launches - but it writes new prefs and with the second launch -> crash
after deleting the prefs it launches again

Code: [Select]
Identifier:      com.soulstorm.MMST2_3
Version:         ??? (3.0.5b)
Code Type:       X86 (Native)
Parent Process:  launchd [70]

Date/Time:       2008-05-22 18:58:40.948 +0200
OS Version:      Mac OS X 10.5.2 (9C7010)
Report Version:  6

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'


 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
Damn. Seems I cannot reproduce this bug. I ran the application into 10.5.2 and 10.4.11 and it just works. I will try to spot the bug and fix it in the next few days. If anyone can help (blowfish, tinman, you think you are up to it if I give you the latest source?) tell me so, because it's very difficult to spot a bug I cannot even reproduce!
« Last Edit: May 23, 2008, 04:16:28 am by Soulstorm »
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.

 

Offline Soulstorm

  • 27
  • You really don't want to know!
    • Soulstorm's Personnal Webspace
Re: FS2_Launcher OS X 3.0
Seems other people (in other forums) don't have any problem with this file. Actually, they said everything was working fine. This is a slightly altered version. Can anyone verify this?

I have tested it into many machines (heck, I own 4!) and it runs on every one of them. Also, I saw you posted the crash log. That was helpful, but I think it would also be helpful if you posted the system log, after you have ran the application.
Soulstorm's website -- Articles, Programs, Forums, 3D art, and many more.