ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > OSX Desktop Icons And Shortcuts? Goto page Previous  1, 2
OSX Desktop Icons And Shortcuts?
  Author    Thread Reply to topic
clone2727
Retired


Joined: 09 Jun 2006
Posts: 1592
Location: NJ, USA
 

Forum Rule 12 (English, Please)

 Reply with quote  
Post Thu Oct 23, 2008 8:29 pm 
 View user's profile Send private message
md5
ScummVM Developer


Joined: 03 Nov 2005
Posts: 2256
Location: Athens, Greece
 

quote:
Originally posted by criezy
thill2708, here is the solution I propose:
1) Create a text file containing the following text:


code:
--------------------------------------------------------------------------------
#!/bin/sh
/Applications/ScummVM/ScummVM.app/Contents/MacOS/scummvm monkey1
--------------------------------------------------------------------------------



This is a shell script. You might need to change the path to the ScummVM application depending where you have install it.

2) You need to tell the OS to open this file with the Terminal application (show the info of the file and in the Open with section select Terminal.app) and you can change the icon at the same occasion using the way described by clone.

 Reply with quote  
Post Fri Oct 24, 2008 3:40 pm 
 View user's profile Send private message
dr.zeissler



Joined: 01 Jan 2007
Posts: 18
 

quote:
Originally posted by md5
quote:
Originally posted by criezy
thill2708, here is the solution I propose:
1) Create a text file containing the following text:


code:
--------------------------------------------------------------------------------
#!/bin/sh
/Applications/ScummVM/ScummVM.app/Contents/MacOS/scummvm monkey1
--------------------------------------------------------------------------------

This is a shell script. You might need to change the path to the ScummVM application depending where you have install it.

2) You need to tell the OS to open this file with the Terminal application (show the info of the file and in the Open with section select Terminal.app) and you can change the icon at the same occasion using the way described by clone.



thx,

i'll try it.

Doc
 Reply with quote  
Post Fri Oct 24, 2008 8:59 pm 
 View user's profile Send private message
yehoodig



Joined: 01 Oct 2009
Posts: 1
Here's a solution 

After trying Boxer for my Dos games I wanted something like this too. I think what I came up with is pretty decent, so I thought I would share.

Type this into AppleScript:

code:
tell application "Finder" to get (path to me) as Unicode text
set workingDir to POSIX path of result
set ScriptToRun to "open -a scummvm --args --path=\"" & workingDir & "Contents/Resources/game/\" NAMEOFGAME"
do shell script ScriptToRun




Save this as an application, and then make a "game" folder under the application resources where you put all the game files. You can also replace the "applet.icns" file if you want a non-default icon.

There, you never have to run ScummVM to play your game again.

However, if you want to edit the script later DO NOT navigate to the script file! If you do, the "workingDir" variable will return the location of the script file, not the location of the application. Instead you should open the application from within AppleScript.
 Reply with quote  
Post Thu Oct 01, 2009 1:43 pm 
 View user's profile Send private message
mikemoore99



Joined: 14 Feb 2012
Posts: 1
Here's how I did it.... 

So this post was helpful to me, but I'm pretty savvy with copying what the greats describe, so for anyone else out there who's always wanted to do this, I think this is the best way. I tried to make it simple, so anyone who isn't super great on computers may still be able to do it. Good luck!

(before starting, you may want to find and download Icon Composer and icns2icon. Google them, they're both free apps)

1. Open Script Editor

2. Type the following:
do shell script "//Scumm/ScummVM.app/Contents/MacOS/scummvm [id of game]"
(the beginning part will differ, put the path for scumm. For me, I made a folder called Scumm in my Macintosh HD. The id of the game can be found in ScummVM, click the game, edit button, you'll see the id right there, change it if you want)

3. Save this as an application, run only. Now you'll have a little script thing that will open your game when double-clicked. Now for an icon.

4. Using Apple's Icon Composer that comes with the X Code tool stuff is the best way to get a really slick looking icon. Edit whatever pic you want to use (I usually take screenshots) and when you save it (in your photo editor, I use Photoshop) you have to save it with transparency active. The way I do this is in photoshop, the icon is on one layer, the background is blank/checkers, I save as a tiff with layers, another window pops up that has an option to save transparency, click that and you're done.

5. Open Icon Composer. Take your tiff and just drag and drop it into the 512 box. It'll auto-size the other ones, so now just save it.

6. Find an app called icns2icon, download it. This converts your icns file to a visible icon. Just drag and drop your file into this app. Now all you have to do is click the file, cmd-i, click the little picture in the upper left, cmd-c, find your script file for the game, cmd-i, click upper left, cmd-v, and voila! You now have an icon that will open the Scumm game of your choice.

Hope this helps someone out there. It helped to have the smart guys on here answer first! This is a great way to keep my kids from screwing up my ScummVM list

 Reply with quote  
Post Tue Feb 14, 2012 6:36 am 
 View user's profile Send private message
pbe00



Joined: 26 Feb 2013
Posts: 1
OS X game container and launcher 

First let's create an empty launcher/container for ScummVM games inside your home directory. This will be called ScummVM Launcher.app

These instructions currently assume that ScummVM is located inside /Applications

1. Open Terminal

2. Create the Application folder structure

code:

mkdir -p ~/ScummVM\ Launcher.app/Contents/Resources/Data
mkdir ~/ScummVM\ Launcher.app/Contents/Resources/ScummVM\ Savegames
mkdir ~/ScummVM\ Launcher.app/Contents/MacOS




3. Create PkgInfo file
code:

echo "APPLttxt" | cat > ~/ScummVM\ Launcher.app/Contents/PkgInfo




4.1. Start to fill in the code for our launcher script
code:

cat > ~/ScummVM\ Launcher.app/Contents/MacOS/launcher



4.2. Paste this shell script
code:

#!/usr/bin/env sh

# Todo: auto-detect scummvm location
SCUMMVM=/Applications/ScummVM.app/Contents/MacOS/scummvm

PLIST=${0%/*}/../Info.plist
DATAPATH=${0%/*}/../Resources/Data
SAVEPATH=${0%/*}/../Resources/ScummVM\ Savegames
CONFIGFILE=${0%/*}/../Resources/ScummVM\ Preferences

"$SCUMMVM" --path="$DATAPATH" --config="$CONFIGFILE" --savepath="$SAVEPATH" $(defaults read "$PLIST" ScummVMGameID) &



4.3. Press Ctrl + C on your keyboard to end input

5. Set execution rights to the launcher
code:

chmod a+x ~/ScummVM\ Launcher.app/Contents/MacOS/launcher




6. Copy current ScummVM preferences inside the launcher
code:

cp ~/Library/Preferences/ScummVM\ Preferences ~/ScummVM\ Launcher.app/Contents/Resources/




7. Fill some application information into Info.plist
code:

defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleDevelopmentRegion English
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleDisplayName "ScummVM Launcher"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleExecutable "launcher"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleIdentifier "org.scummvm.launcher"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleInfoDictionaryVersion "6.0"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleName "ScummVM Launcher"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist CFBundleVersion "1.0"
defaults write ~/ScummVM\ Launcher.app/Contents/Info.plist ScummVMGameID ""




At this point we have a general ScummVM container. If you want to explore its contents, right click application in finder and choose Show Package Contents. The structure is like this:
Contents/
-> MacOS/
-> -> launcher (this is the application)
-> Resources/
-> -> Data/ (this folder contains the game)
-> -> ScummVM Savegames (this directory contains the save games)
-> -> ScummVM Preferences (these the preference file)
-> Info.plist (this file contains the application info and game ID)
-> PkgInfo

Now you can make a game container by pasting your game data inside Contents/Resources/Data

As an example, let's make a Police Quest 1 EGA launcher. Start by making a copy of the launcher as Police Quest 1 EGA
code:

cp -a ~/ScummVM\ Launcher.app ~/Police\ Quest\ 1\ EGA.app




Copy Police Quest 1 EGA data inside the container from ~/pq1 directory, replace this with the directory that game data is in:
code:

cp -a ~/pq1/* ~/Police\ Quest\ 1\ EGA.app/Contents/Resources/Data/




To tell ScummVM which game the launcher contains run: defaults write ~/Police\ Quest\ 1\ EGA.app/Contents/Info.plist ScummVMGameID <game identifier>

So for Police Quest 1 for example the code is
code:

defaults write ~/Police\ Quest\ 1\ EGA.app/Contents/Info.plist ScummVMGameID pq1




Now you have a launcher. Easiest way to set the icon:
1. Open an image
2. Select and copy image to clipboard (Cmd + C)
3. Right-click (or Alt+Click) in finder and select Get Info
4. Select the icon in the top left so that it becomes illuminated with blue
5. Paste new icon (Cmd + V)
 Reply with quote  
Post Tue Feb 26, 2013 1:34 pm 
 View user's profile Send private message
almeath



Joined: 14 Mar 2008
Posts: 34
 

Sorry to resurrect an old topic, but I found pbe00's manual method of creating a ScummVM launcher to be very effective, as I like the fact that the preferences and saved games are all contained within the launcher itself.

I would like to suggest a slight tweak to the shell script, for those who would prefer to make the launcher an entirely self-contained app, which can be moved from Mac to Mac without having to keep ScummVM installed in a separate location.

Just use the following line:

SCUMMVM=${0%/*}/../MacOS/scummvm

For this to work, it is necessary to copy the required resources and executables from the ScummVM application to the corresponding locations in the Launcher:

1. "scummvm" executable from Contents/MacOS
2. "Frameworks" folder from Contents (if you are using ScummVM 1.8.1 or higher)
3. Any game-specific support files required for your target game from Contents/Resources

If you use MT-32/CM32L audio then those ROMS need to be moved across to Contents/MacOS as well.

It is a bit fiddly but if you do it once you can keep a master copy of the Launcher ready to receive any particular game that you drop into the Data folder.

Finally, remember to use the "defaults write" command noted above to manually change the game ID to your target game, and you might need to re-copy the preferences file into the Launcher (or manually edit the preferences contained in the Launcher) to suit your particular game settings.

 Reply with quote  
Post Tue Mar 21, 2017 6:05 am 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2


Forum Rules:
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 vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge