View Full Version : Installing HW2 mods on Mac OS X
Xaander
23rd Aug 07, 3:54 PM
It has probably been asked before, but all of my searches turned up moot.
How does one install HW2 mods on Mac OS X? Some of these look simply AMAZING. I would hate to miss out on all of them.
Thanks in advance for any help I might get!
:wave:
XcaliberCrusade
23rd Aug 07, 4:11 PM
Unless I'm mistaken its exactly the same as you would on a PC. just drop the .big into your homeworld 2 data dir and add -mod ModName.big to the shortcut (target path, after the ""s) you want to use.
If this doesn't work then I don't know what you need to do.
Xaander
23rd Aug 07, 4:17 PM
Macs don't normally use shortcuts...
And those that it does use aren't editable like that.
And I can't edit the application in such a way.
Phoo. I know mac mods are supported, but the question is how?
Dim@
23rd Aug 07, 10:50 PM
This is a thread on the PDS forum that explains how to install PDS on a mac, and since mods are usually all installed in the same manner, it should help with other mods as well.
http://www.pds.hwaccess.net/forum/viewthread.php?forum_id=27&thread_id=28
I haven't actually read it, but i hope it helps you
Le Sun Tzu
24th Aug 07, 2:26 AM
Xaander, there are several ways to launch a mod in OS X. They are explained on the PDS forums. For further reference you may also have a look at the macologist.org forums. They have a downloadable app and a script as well. There are also several threads about that in this forum iirc. Take the time to understand how it works and post if you can't get any method work.
Don't get overenthusiastic because many mods don't run on a mac due to issues with the mac version. Sometimes there is a way around because it is related to the way the mod script is made; sometimes there isn't, because the issue is in the OSX version of the HW2 application.
There is a list of mac compatible mods on the macologist forum. I don't know if it was kept updated.
Xaander
24th Aug 07, 9:05 AM
Thank you very much!
Pity about mac compatibility, though.
scarbrow
1st Sep 07, 5:35 PM
Using this bit of code from Macologist that was made a while ago for macs, I can effectively 'double click' launch HW2 mods that are contained within a single .big file.
All the instructions on how to launch the code using a .big file are at the start.
Global Launcher Code for Homeworld 2 .big mods
for creating a launcher in Applescript
based on the ut2k4/bf1942 global launcher code
Here is a launcher for Homeworld 2 mods. HW2 mods come in two varities, either as 1) a single xxxx.big file, or 2) a set of folders.
This launcher only works for 1). The .big file should go into the Homeworld 2/data/ folder, and the launcher will work.
Instructions are included in the script but basically:
1) OPEN SCRIPT EDITOR (found in /Applications/Applescript), and paste ALL of this code into a new document
2) EDIT 3 VARIABLES IN CONFIGURATION AREA. (modname should be exactly the same as the .big file. In other words "HW2EX" for HW2EX.big not "Homeworld 2 EX"
3) File-->Save as (and check "Application" and "Run Only" and uncheck "Startup Screen". That's all!
--COPY AND PASTE EVERYTHING BELOW THIS LINE INTO SCRIPT EDITOR
--HOMEWORLD 2 MOD LAUNCHER #1: FOR XXXX.BIG MODS ONLY.
--by Santaduck & ScvWebFire & Adamward and the rest of the Macologist Team, with special thanks to Slugmanand HeroPsychoDreamer for the Homeworld 2 version.
--Based on SWF's "EZ-edit"Launcher for ut2k4 mods for use in Homeworld 2, based on original script by Santaduck
--Note adaptation to homeworld2 uses (user/preferences) for the storage of the path to homeworld2
--INSTRUCTIONS
--1) OPEN SCRIPT EDITOR (found in /Applications/Utilities), and past ALL of this code into a new document
--2) EDIT 3 VARIABLES BELOW. (modname should be exactly the same as the .big file. In other words "HW2EX" for HW2EX.big not "Homeworld 2 EX"
--3) File-->Save as (and check "Application" and "Run Only" and uncheck "Startup Screen". That's all!
--************************************************** ******************************
--***********************Edit the following Three variables********************************
--************************************************** ******************************
--************************************************** ******************************
--modname should be the file name of the .big file that is in the Homeworld 2/Data/ folder, for example HW2EX for HW2EX.big
set modname to "HW2EX" --<----- replace HW2EX with the mod name********
--modtitle is any name you want to show in the dialog boxes to the user.
set modtitle to "Homeworld 2 EX" --<----- replace Homeworld 2 EX with the mod name********
--minversion is the minimum version of Homeworld 2 the mod will need
set minversion to 1.10 as number --<---- ignore this if you don't know. Also: Version check currently disabled.********
--************************************************** **********************************
--************************************************** **********************************
--******************Leave the rest below as it is *********************************************
--*****Then File-->Save as (and check "Application" and "Run Only" and uncheck "Startup Screen"**********
--************************************************** **********************************
--************************************************** **********************************
try --Note this path is to the userhome/library/Preferences/, and not application support.
set homeworld2pathini to POSIX path of (path to "dlib" from user domain as string) & "Preferences/homeworld2path.ini" -- this is the file where the path to homeworld2 is stored
end try
-------------------------------
try -- tries to read previously saved path from the file homeworld2path.ini into variable "thePath"
set homeworld2path to gethomeworld2path(homeworld2pathini)
if homeworld2path = "" then
display dialog "Path to Homeworld 2 not set. Quitting now." buttons {"OK"} default button 1
return
quit
set anonexistentvariable to quittingnow
end if
end try
------------------------------
--Start of version check
--Get current version
set f to homeworld2path
set curversion to short version of (info for POSIX file f)
--VERSION CHECK DISABLED FOR HOMEWORLD 2 UNTIL WE LEARN MORE
--try
--check if the minimum version is high enough, if not quit
-- if minversion > curversion then
-- display dialog "Version " & minversion & " or higher of Homeworld 2 not found. Current version is " & curversion & " This version of homeworld2 is incompatible with " & modtitle & ". Please upgrade. Quitting now." buttons {"OK"} default button 1
-- return
-- quit
-- set anonexistentvariable to quittingnow
-- end if
--end try
try
do shell script "" & quoted form of homeworld2path & "Contents/MacOS/'Homeworld 2' -mod " & modname & ".big " & "&"
on error -- if there's an error, I assume it was a faulty path. Therefore ask user again where homeworld 2 is.
set answer to button returned of (display dialog "Homeworld 2 Startup Error. Either " & modtitle & " is not installed or the Homeworld 2 installation is corrupted. Quitting now." with icon 1 buttons {"Quit"} default button 1)
end try
on gethomeworld2path(homeworld2pathini)
set againmsg to ""
set finishedflag to 0
set homeworld2path to ""
repeat while finishedflag = 0
--if homeworld2pathini exists, then get a path--
try
set homeworld2path to do shell script "tail -1 " & quoted form of homeworld2pathini
end try
if homeworld2path = "" then --if homeworld2pathini does not exist, then skip validation attempt. finishedflag will remain 0.
else
try --validate Note validation using binary of Homeworld 2.
do shell script "wc -l " & quoted form of (homeworld2path & "Contents/MacOS/Homeworld 2") -- if this returns an error, then the Homeworld 2 binary does not exist
set finishedflag to 1 --exit if validation successfull
try --write path to .ini if validation successful
do shell script "echo " & quoted form of homeworld2path & " > " & quoted form of homeworld2pathini --write path to file
on error --error writing path to .ini, but can continue
activate
display dialog "ERROR: Can't save path to " & homeworld2pathini & " . OK to continue."
end try
on error --finishedflag remains 0
set againmsg to "Invalid path. "
end try
end if --if validation successful, then finishedflag =1 . If unsuccessful, it remains, 0 and the againmsg has been set.
if finishedflag = 0 then --if file does not exist, or path is not valid
try
activate
set answer to button returned of (display dialog againmsg & "Please locate the application ''Homeworld 2''" buttons {"Quit", "OK"} default button 2)
if answer = "Quit" then
set homeworld2path to ""
set finishedflag to 1
else
set homeworld2path to POSIX path of (choose file with prompt "Please locate the application ''Homeworld 2''") --GUI file browser
end if
end try
end if
end repeat
return homeworld2path
end gethomeworld2path
on checkexistfile(filename) --1 exist 0 not
try
do shell script "wc -l " & quoted form of filename
set flag to 1
on error
set flag to 0
end try
return flag
end checkexistfile
scarbrow: For some reason, when I pasted the edited script into the Terminal, it did not work. There were quite a few errors that cropped up, with the most frequent one being 'bash:end:command not found' or something like that.
Le Sun Tzu
4th Sep 07, 11:55 PM
Either you use Terminal or a script. Don't mix both!
To use Terminal:
- open the Terminal window
- locate the Homeworld 2 icon, open it with 'show package contents' (right click or option click), and locate the Homeworld 2 app within the package
- drag the app icon onto the Terminal window, which then displays the full path to the app
- add the relevant commandline (either -overrideBigFile for the mods that are not packaged in a big file or -mod NameOfMod where NameOfMod is the exact name of the mod .big file)
- hit the return/enter key to launch the mod
To use the macologist script:
- open Script Editor
- copy-paste the script into a new Script Editor window
- edit the script to insert the proper commandline
- save the script
- doubleclick the script icon will launch the mod
Le Sun Tzu: Sorry, I'm horrible at this technical stuff.
Mantaray
5th Sep 07, 7:14 AM
@blah, ive read the art of war and i dont recall Sun Tzu ever saying that...
scarbrow
5th Sep 07, 8:38 AM
I'll boil it right down for you Blah.
You need to open up an Application called Script Editor.
Depending on which version of OSX you have, Script Editor is either located in:
1) Applications Folder --> Utilities Folder --> Script Editor
2) Applications Folder --> Applescript Folder --> Script Editor
Once you open up Script Editor, do as what I posted above says from this line:
--COPY AND PASTE EVERYTHING BELOW THIS LINE INTO SCRIPT EDITOR
You only have to edit two of the three variables within the copied text.
Say you wanted to run the pirates mod and you renamed the big file to piratesV030.big
You will need to replace the HW2EX with piratesV030.
Then you will need to replace Homeworld 2 EX with Pirates Mod, or something along those lines.
Now you have to save the file. Just go:
"Save as", then check "Application" and "Run Only" and uncheck "Startup Screen"
Once you do that, you are good to go. Just double click on the "script" which now acts like an application.
One last thing. Make sure you place the .big file within HW2's data folder.
vBulletin v3.0.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.