[SOLVED!] CGoban Stone Click Sound—OS X

Comments, questions, rants, etc, that are specifically about KGS go here.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Bonobo, thanks so much. I'm perfectly happy with the ./kgs command line, but an icon would be a nice bonus. :)
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by xed_over »

I have such an app (although I don't know how to make one from scratch, it shouldn't be too difficult to do). It simply runs a script to start the CGoban jar. And I can associate .sgf files so that I can just click on them to auto start the application and load the game.

For a while, it worked pretty well with the jnlp and java webstart (in order to keep the cgoban.jar auto updating from the server), but occasionally the javaws cache would get corrupted, so I just point the script to a jar instead.

I got it from a former forum member (and I can't recall his name at the moment). I searched the posts, and no luck yet. It may have been on the old forum, godiscussions.


original (/Applications/CGoban_script.app/Contents/Resources/script)

Code: Select all

#!/bin/bash

if [ "$2" ]; then
       javaws -Xnosplash -open "$2" http://files.gokgs.com/javaBin/cgoban.jnlp
else
       javaws -Xnosplash http://files.gokgs.com/javaBin/cgoban.jnlp
fi


I think I added the "open" sgf option to his original script (I don't recall anymore)


or alternately just the jar that you download and save locally yourself.

Code: Select all

#!/bin/bash

if [ "$2" ]; then
        java -jar /Users/xedover/cgoban/cgoban.jar "$2"
else
        java -jar /Users/xedover/cgoban/cgoban.jar
fi



I even added logging to my script to help with debugging when things go wrong (not shown here)
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by xed_over »

Adrian Petrescu is who I was thinking of. He used a different nick on GoDiscussions
User avatar
fireproof
Lives with ko
Posts: 172
Joined: Sat Apr 20, 2013 8:22 am
GD Posts: 0
Universal go server handle: fireproof
Location: Santa Barbara, CA
Has thanked: 235 times
Been thanked: 77 times

Re:

Post by fireproof »

EdLee wrote:Bonobo, thanks so much. I'm perfectly happy with the ./kgs command line, but an icon would be a nice bonus. :)


Hey Ed, if you don't mind making the script into an app in order to get the icon "appify.sh" might suit you:

http://mathiasbynens.be/notes/shell-script-mac-apps
ondraonway
Beginner
Posts: 2
Joined: Tue Sep 10, 2013 7:37 am
GD Posts: 0
Has thanked: 1 time

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by ondraonway »

I upgraded to osx Maveric and it seems that it does not work any more. I downloaded and installed both jre and jdk(terminal required it) version 7.45. Any observations?
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by wineandgolover »

ondraonway wrote:I upgraded to osx Maveric and it seems that it does not work any more. I downloaded and installed both jre and jdk(terminal required it) version 7.45. Any observations?

I have the same problem. I upgraded to Maverick also. Tried to run "java -jar cgoban-nfa.jar" in terminal. Installed the jdk, as per terminal request. The app ran, but no sound.

Any ideas, all you clever people?
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by xed_over »

There are different versions of Java. By default, your OS wants to use the latest version. But different versions of Java can live happily alongside each other -- so you don't have to downgrade to use an older version -- you have have and use multiple versions.

to see which version you are using (assuming you know where you installed it)
$ /path/to/my/copy/java -version

KGS doesn't like java version 7. Use version 6 or older.
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by wineandgolover »

xed_over wrote:There are different versions of Java. By default, your OS wants to use the latest version. But different versions of Java can live happily alongside each other -- so you don't have to downgrade to use an older version -- you have have and use multiple versions.

to see which version you are using (assuming you know where you installed it)
$ /path/to/my/copy/java -version

KGS doesn't like java version 7. Use version 6 or older.

xed_over, you are well above me here. I need Mac KGS for non-techies.

So, how do I find old versions of java? Assuming there are multiple versions, which one should I used? And how do I make KGS use the older version? And how do I make sure that only KGS uses it, assuming there are safety issues?

How do I find where my current version is installed? I used the default and spotlight isn't helping. It doesn't seem to be in applications or utilities folders. Anyway, I am confident it is 7, because there are no clicks. So does it matter?

And if you don't have the inclination to answer these, that is completely understandable. Thanks anyway.
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: [SOLVED!] CGoban Stone Click Sound—OS X

Post by xed_over »

have you already tried the solutions posted in this thread?
viewtopic.php?f=24&t=4570&p=76925
Post Reply