This topic has been locked
Jim Bond 25 Jan, 2013 @ 1:46pm
Half-Life 1 for Mac Released!!!
THe original HL 1 (gold source) is available for mac!! All rejoice!!! Thank you VALVE!!!!!!!!!!!!!
< >
Showing 1-15 of 19 comments
Jim Bond 25 Jan, 2013 @ 2:00pm 
And Counter Stike Gold Source!!!!!!!! YAY!!!!!!!!!
Jim Bond 25 Jan, 2013 @ 2:07pm 
References to many (or all) of the other gold source titles (blue shift, opposing forces, ricochet, etc.) can be found in the Half-Life folder. I'd say that means they're all coming soon!!!!!!!
Jim Bond 25 Jan, 2013 @ 3:12pm 
And now a 7 MB update just broke Half-life 1!!! Nooooooooooooo!!!!!
DJFUSION_82 [UK] 25 Jan, 2013 @ 3:26pm 
does not work, when i select new game it just boots out to the main menu :(
Jim Bond 25 Jan, 2013 @ 4:52pm 
218.8 MB update downloading, hopefully this will fix this...
Ludichrist 25 Jan, 2013 @ 4:55pm 
If it doesn't fix it, it's pretty easy to fix.

The shell script is missing some quotes.

Open Terminal.

Run this: open "$HOME/Library/Application Support/Steam/steamapps/common/Half-Life/"

Find the file "hl.sh"

Open it in a text editor and change the line that looks like:
GAMEROOT=$(cd ${0%/*} && echo $PWD)

Make it look like this:
GAMEROOT=$(cd "${0%/*}" && echo "$PWD")

The game will launch.
Jim Bond 25 Jan, 2013 @ 4:56pm 
i'll have to try this
Last edited by Jim Bond; 25 Jan, 2013 @ 4:56pm
Jim Bond 25 Jan, 2013 @ 6:05pm 
Originally posted by Ludichrist:
If it doesn't fix it, it's pretty easy to fix.

The shell script is missing some quotes.

Open Terminal.

Run this: open "$HOME/Library/Application Support/Steam/steamapps/common/Half-Life/"

Find the file "hl.sh"

Open it in a text editor and change the line that looks like:
GAMEROOT=$(cd ${0%/*} && echo $PWD)

Make it look like this:
GAMEROOT=$(cd "${0%/*}" && echo "$PWD")

The game will launch.

It worked! But what exactly did I change and why did it stop working?
Ludichrist 25 Jan, 2013 @ 6:27pm 
GAMEROOT is a variable the script uses. It points to the directory where halflife is installed.

The trouble comes from the fact that unix systems really really have a psychological allergy to directory names with spaces in them. This is because on the command line a space is what separates arguments and when directories have spaces, end looks like multiple args to the shell interpreter (you probably already don't care).

So, since the directory name has a space in it, you need to quote it. Otherwise it treats it as 2 args. Quoted properly it translates to a single argument.

The stuff between $() is executed in a subshell. Think of it like math. The parens execute first. So "cd" stands for 'change directory'. It tries to change directories into $HOME/Library Application in the first case. That directory doesn't exist, the command fails and the script exits. The double & is a logical operator. The second command only executes if on preceding it works. Since the 'change directory' failed, GAMEROOT was never set and the rest of the script peed its pants and ran off into the bushes.

In the second case, it tries to change to the directory called "$HOME/Library/Application Support/Steam/steamapps/common/Half-Life/". Since that directory exists (as evidenced by Finder opening it), the command works and the rest of the script works.

There's a bunch of other crap that the rest of the script does does, and the valve dev who didn't quote his paths gets no cookie, but that's the long and short of it.

I've been doing unix related work for the past 20 years so this stuff is old hat. In general you as a steam user aren't supposed to care about this stuff and really, i'm sure they'll patch it. It's just an oops. I found it by running steam in the terminal and just reading the errors. No biggie.
Ludichrist 25 Jan, 2013 @ 6:31pm 
So yeah, there's a couple gramatical errors in that, but i chalk it up to the beer. Glad it worked out for you, cheers!
Ludichrist 25 Jan, 2013 @ 6:41pm 
oh, and this is in case valve reads this.


[cynic@Malediction ~]$ cat ./Library/Application\ Support/x.sh
#!/bin/bash
ME=$(dirname "$0")
echo "I am in $ME"

[cynic@Malediction ~]$ ./Library/Application\ Support/x.sh
I am in ./Library/Application Support

That ${0%/*} crap reads like a train wreck. Use basename and dirname as appropriate. The commands exist on linux and osx, most bsd systems and even slowlaris.
Jim Bond 25 Jan, 2013 @ 8:31pm 
Originally posted by Ludichrist:
GAMEROOT is a variable the script uses. It points to the directory where halflife is installed.

The trouble comes from the fact that unix systems really really have a psychological allergy to directory names with spaces in them. This is because on the command line a space is what separates arguments and when directories have spaces, end looks like multiple args to the shell interpreter (you probably already don't care).

So, since the directory name has a space in it, you need to quote it. Otherwise it treats it as 2 args. Quoted properly it translates to a single argument.

The stuff between $() is executed in a subshell. Think of it like math. The parens execute first. So "cd" stands for 'change directory'. It tries to change directories into $HOME/Library Application in the first case. That directory doesn't exist, the command fails and the script exits. The double & is a logical operator. The second command only executes if on preceding it works. Since the 'change directory' failed, GAMEROOT was never set and the rest of the script peed its pants and ran off into the bushes.

In the second case, it tries to change to the directory called "$HOME/Library/Application Support/Steam/steamapps/common/Half-Life/". Since that directory exists (as evidenced by Finder opening it), the command works and the rest of the script works.

There's a bunch of other crap that the rest of the script does does, and the valve dev who didn't quote his paths gets no cookie, but that's the long and short of it.

I've been doing unix related work for the past 20 years so this stuff is old hat. In general you as a steam user aren't supposed to care about this stuff and really, i'm sure they'll patch it. It's just an oops. I found it by running steam in the terminal and just reading the errors. No biggie.
Thanks for the thorough explanation. So presumably those quotes were in place in the script earlier today but were accidentally removed when that 7 MB patch hit? Or did the patch replace the working script with a broken script? Funny thing is that Counter Strike was still working without adding the quotes and it runs out of the same half-life folder. Any theories why that may be?
Ludichrist 26 Jan, 2013 @ 5:11am 
No idea. The easiest way to tell is to look at the launch scripts. I don't have CS installed, or the HL script before the patch. But I do have l4d and it's wrapper script looks like what I posted. Beta stuff has bugs, it happens :)
Captain L 26 Jan, 2013 @ 2:03pm 
I could buy the original version...or I could hope for an eventual Mac release of Black Mesa. Hell, it's taking long enough to get the PC version on Steam.
Jim Bond 26 Jan, 2013 @ 4:28pm 
Originally posted by Captain L:
I could buy the original version...or I could hope for an eventual Mac release of Black Mesa. Hell, it's taking long enough to get the PC version on Steam.
Your implying that both games are comparable. No offense to the Black Mesa devs, but they kind of missed the forest through the trees; for what it is , it's awesome but it's no HL1.
< >
Showing 1-15 of 19 comments
Per page: 1530 50