View unanswered posts | View active topics It is currently Sun Jun 16, 2024 8:57 am



Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
 Mac Cortex Command Mod Manager 
Author Message
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Mac Cortex Command Mod Manager
I'm posting here to prevent hijacking SneakyMax's Thread. First, here's all that I've posted there so far:

ss2man44 on Sun Jan 10, 2010 wrote:
Alright, I'll get started then. I just need to re-create the GUI in Qt Designer and convert all the methods from C# to Python.

I may even get it to add installed mods to the Skirmish Waves editor thing automatically.

EDIT: I have most of the main UI finished:

Image

Does that look nice enough? It's the best I could do with Qt.

EDIT2: Now I'm beginning to work on the mod-detection code. It's extremely easy in Python:
Code:
enabledMods = os.listdir(CCDIR)
for directory in enabledMods[:]:
    if not directory.endswith(".rte"):
        enabledMods.remove(directory)

Note that this also works in Mac.

EDIT3: I've gotten some basic mod-detection down now. It reads the mod names from their respective index.ini files and populates the list with them.

Image

ss2man44 on Mon Jan 11, 2010 wrote:
Hyperkultra wrote:
Can you have the manager display both the name of the mod in Inde.ini and the name of the .rte? It would make it easier to identify mods with odd names.


Image

At this point, I've given up on basing it on SneakyMax's code. I can't read C#/.NET worth anything, so I'm pretty much only basing it on the interface (Credits still go to him, though.) I guess now it's more of a multi-platform mod manager based on SneakyMax's. My purpose here is to get the same functionality of his to Mac users. I know I'm doing all this in Windows, but once the Windows version is finished, it takes next to nothing modification to the code in order to port it.

Also, if the mod doesn't have an icon, it gives it the default DRL logo.

ss2man44 on Mon Jan 11, 2010 wrote:
SneakyMax wrote:
It seems like that could get really messy and distracting.


It's really sort of a placeholder while I get stuff like built-in mod separation and protection against files that aren't actual mods but end in .rte implemented (Gotta be prepared for retards.)

I'm thinking more like this to be the default "No Icon" icon:
Image

ss2man44 on Tue Jan 12, 2010 wrote:
I'm almost ready to release a testing version. Right now it tries to find the CC directory from the Windows registry, if it can't, it will present the user with a directory selection dialog. It doesn't store the directory yet, so if it asks you once, it'll always ask you. That will be fixed later.

EDIT:Attached is the testing version. If it crashes, run it from the command line and tell me what it says. Right now it enables and disables mods. If anyone can please try this out and give feedback, it would be appreciated. Also, the command line that opens behind it is only for testing purposes. It won't be there in the final version.

Yes, I know it's 8MB, but it's got the Qt library packed in there. It's like SneakyMax packing .NET 3.5 in his :P


EDIT2: Crap, after some testing, I come to find that the version of PyInstaller I used has problems with XP. So, this won't work on XP right now.

EDIT3: I'm switching over to Mac development because I'm fed up with Microsoft Visual [Insert Language Here] ♥♥♥♥. FED UP. Anyway, here is a slightly modified the Windows version running in Mac:

Image

(I said it was slightly modified because I had to take out the registry-reading code for it to run in Mac. That's it. It ran fine otherwise.)

ss2man44 on Tue Jan 12, 2010 wrote:
Mac version is ready!

Download! (Currently only works in Snow Leopard)

Okay, this one's pretty nifty for you Mac users, considering how wonky it is to mess around with the CC files because of the way Mac tries to hide the files inside .app files.

Things you should know:
* This is completely untested right now and may not work at all.
* Double-click mods to enable/disable them.
* It needs to know where the Cortex Command .app file is for it to mess with the mod files.
-* First it checks the default location (/Applications/Cortex Command.app).
-* If it can't find it, it will present you with a dialog for you to tell it where to find the file.
-* Once you locate and select the file, it will store it and you shouldn't have to change it.
-* If you gave it the wrong file or it moved, there's a button in the Settings tab to change it manually.

My next priority is adding functions for installing/removing mods because those are a pain when done manually in Mac.


Any more info as it comes in will be posted here. Currently, I'm working on getting it working in Leopard.


Wed Jan 13, 2010 10:23 pm
Profile YIM WWW

Joined: Sun Oct 25, 2009 10:16 pm
Posts: 110
Location: Western U.S.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
1/13/10 1:40:44 PM main[10756] main Error
An unexpected error has occurred during execution of the main script

ImportError: dlopen(/Users/Sam/Desktop/CCMMM.app/Contents/Resources/lib/python2.6/lib-dynload/PyQt4/QtGui.so, 2): no suitable image found. Did find:
/Users/Sam/Desktop/CCMMM.app/Contents/Resources/lib/python2.6/lib-dynload/PyQt4/QtGui.so: unknown required load command 0x80000022

:roll:

Clarification: Downloaded it, brought it to the desktop, tried to open it...no go. Have Snow Leopard.


Wed Jan 13, 2010 10:44 pm
Profile
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Hmm. This means it's a problem with the included Qt rather than it simply being incompatible with Leopard.

That's the same error my friend running Leopard got.

EDIT: Okay, since SneakyMax's mod manager is already nice and does its job in Windows, I'm now completely moving over to Mac and now I'm going to use native Cocoa for the GUI. No more frustrating PyQt limitations and bugs, this will be the real deal when it comes to Mac apps. Also, with PyObjC, I get to use my already-written code. I just need to re-do the GUI.

EDIT2: Aaaaand epic fail. In the process of cleaning up Python on my Mac, I somehow managed to delete the built-in distribution of Python. So it's reinstall time. Development will resume when that's taken care of.


Wed Jan 13, 2010 11:08 pm
Profile YIM WWW
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Mac Cortex Command Mod Manager
You're awesome!

This makes testing things so much more easy!
Could use a larger icon for the application, but that's probably a low priority.
I will be watching this thread eagerly, and in the mean time ripping this open to have a good look at the innards.


Thu Jan 14, 2010 3:38 am
Profile
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
You'll be pretty successful at that, too. Apps built with py2app like that one was don't hide the source code in the .app file. All the Python source is in there for public viewing. However, I wouldn't recommend it as the code is very sloppy at the moment. :P

As for the development, I managed to fix my Mac/Python problems and now I just have to figure out the Cocoa API. For the record, Objective-C is my least favorite OOPL.

EDIT: Image

And the development is underway now that I have the art of ObjC programming down.


Thu Jan 14, 2010 1:23 pm
Profile YIM WWW
User avatar

Joined: Thu Apr 30, 2009 9:57 pm
Posts: 67
Location: They've found us! run!
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Have you tried it with older versions of Mac OS X? I have Leopard, but I will probably be switching to Snow Leopard this week, since I can get the installation disk for $30. I am also a Mac developer, but I'm not sure if I can help you, depending on where this project would be going. :\
Also, I'm pretty sure it's not related to the OS, because it's trying to find a file that is differently notated. It's trying to look for "QtGui.so, 2" and the file is "QtGui.so"(exactly the same as freeflow except with Leopard)


Fri Jan 15, 2010 2:41 am
Profile WWW
User avatar

Joined: Mon Aug 17, 2009 3:00 am
Posts: 242
Location: The Great White North
Reply with quote
Post Re: Mac Cortex Command Mod Manager
This is very useful. Thank you.


Fri Jan 15, 2010 3:59 am
Profile
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
8-Bit wrote:
Have you tried it with older versions of Mac OS X? I have Leopard, but I will probably be switching to Snow Leopard this week, since I can get the installation disk for $30. I am also a Mac developer, but I'm not sure if I can help you, depending on where this project would be going. :\
Also, I'm pretty sure it's not related to the OS, because it's trying to find a file that is differently notated. It's trying to look for "QtGui.so, 2" and the file is "QtGui.so"(exactly the same as freeflow except with Leopard)


I know it's a problem with the included Qt in the app. I'm moving over to regular Cocoa now because this app only needs to run on Mac.

If you want, please PM me with your WLM/Yahoo/MSN and I can send you testing versions to see if they work on other Macs.

EDIT: I'm working on building a new interface to be more intuitive for its purpose and to fit more into the Mac interface. Please bear with me as I'm doing things I've never done before.

Here's what it looks like so far:
Image
What do you think? The "Run Cortex Command" button will change according to which app you selected. It should be the default CC Mac icon.

EDIT2: New Icon!

Image
Feedback is appreciated. I may ask a professional to design one for me later.


Fri Jan 15, 2010 6:32 am
Profile YIM WWW
User avatar

Joined: Mon Aug 17, 2009 3:00 am
Posts: 242
Location: The Great White North
Reply with quote
Post Re: Mac Cortex Command Mod Manager
I have a request.
Could you make it possible to adjust some basic settings (glows on/off) from inside the mod manager?
It's just a matter of editing the settings.ini file.
I'm mostly just sick of opening the base.rte up every time I need to do that.

Also: Can the next version have a apple-q shortcut?


Wed Jan 20, 2010 6:10 am
Profile
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Mac Cortex Command Mod Manager
This is getting better and better!
I like the UI, but I don't think the gear logo works as well as the CC logo (or related) would for the "launch CC" button.
That's just me nitpicking a pre-release version though.

If you want to continue developing once you've fleshed it out to a release, I think that a favorites system would be awesome.


Wed Jan 20, 2010 7:07 am
Profile
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Bad news, my MacBook is in the repair shop for a hinge problem so development is halted yet again until it's fixed (around Friday.)

Dr. Evil wrote:
Could you make it possible to adjust some basic settings (glows on/off) from inside the mod manager?
It's just a matter of editing the settings.ini file.
I'm mostly just sick of opening the base.rte up every time I need to do that.


Alright, but I probably won't work on that until the actual mod manager part is finished.

Dr. Evil wrote:
Also: Can the next version have a apple-q shortcut?


Now that it's Cocoa-based, it will have that shortcut automatically programmed in.

PhantomAGN wrote:
This is getting better and better!
I like the UI, but I don't think the gear logo works as well as the CC logo (or related) would for the "launch CC" button.


See above:
ss2man44 wrote:
The "Run Cortex Command" button will change according to which app you selected. It should be the default CC Mac icon.


PhantomAGN wrote:
I think that a favorites system would be awesome.


Favorites?


Wed Jan 20, 2010 1:44 pm
Profile YIM WWW
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Wow, I failed to read that.

I was thinking a favorites system would allow you to assign mods to groups, then enable or disable by group.
For example, a bunch of one-off mods that each give a gun or a tool would make up one group, so rather than combine them at the ini level, you can treat them as one mod. Or you group all the missions played by ronin or <insert faction>.

I already do this with the built-in labels on MacOS, but that method and the mod manager do not go hand in hand.


Wed Jan 20, 2010 6:04 pm
Profile
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Good idea, I think I'll put that in there.

EDIT: I'm typing this on my recently-repaired MacBook. Time to get to work on the backend of the MCCMM.

And if you need to know (nosy), the hinge was defective and they just replaced the display assembly.

EDIT2: After much work, I've finished all the mod-detection and display code, and the app selection and icon-getting code. Here, have a teaser:
Image

No enable/disable code has been ported to Cocoa yet, but I will work on that tomorrow. I have some great plans for this app and I think you Mac users will like it.

Also, if you see this, watch out for a test release of the Cocoa version. I'll get that out as soon as I polish this up a bit.


Wed Jan 20, 2010 10:34 pm
Profile YIM WWW
User avatar

Joined: Fri Dec 08, 2006 2:49 am
Posts: 130
Location: In a house.
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Apologies for the double post, mods, but I really need this bumped for testers. Otherwise, nobody would see this and test it for me.

Attached is the testing version I was talking about. It doesn't enable, disable, install, or uninstall mods yet, but it displays a list of them (excluding the built-in mods) and lets you select the CC app you want to modify. If you run the binary inside the app from Terminal.app, it will give you some basic output on what it's doing. You may decompile the .pyc files in the Resources directory and see the source code if you really want to. I really only remove the source files so some retard doesn't screw up the app by modifying them with a text editor and reporting it as a bug.

Helpful things to do would be to try clicking all the toolbar buttons and seeing if they cause errors, and manually removing and adding mods, then rescanning to see if it detects the changes.

This should work on Snow Leopard (10.6), Leopard (10.5), and Tiger (10.4). (Intel processors only. Sorry, no PPC support.)
However, Tiger users must download and install this: Python 2.5.4


Fun Fact
: The uncompressed app is only 1.5MB and the .zip is only 471KB (less than half a MB).


Attachments:
File comment: Testing Release
CC Mod Manager.zip [457.71 KiB]
Downloaded 345 times
Thu Jan 28, 2010 7:00 am
Profile YIM WWW
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Mac Cortex Command Mod Manager
Works fine for me, on 10.6.2.
I like the changes, and using the built in window components is great.

If you do not have access to a PPC machine, and that is why you cannot build for them, I would like to offer my service as a button pressing monkey with a PPC machine. It's an old g4, running 10.5.8 headlessly. It's set up to be a simple media server, and therefore does not have a lot of dev-related things installed, but I can change that.


Feature Idea:
Level detection. Read through the index, and a mention of a "scenes.ini" adds a tag to the mod when displayed.
Most mods seem to keep to a standard method of defining things, and this would add a lot of appeal.
I suppose that you could also read through for "crafts.ini," but it's more common and therefore less important, and could clutter the display.


Last edited by PhantomAGN on Mon Feb 08, 2010 12:00 am, edited 1 time in total.



Thu Jan 28, 2010 7:06 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.033s | 14 Queries | GZIP : Off ]