CrossOver Support - Community Forums

Important Information These are community forums and not official technical support. If you need official support: Contact Us

CrossOver Mac
Discussion about CrossOver Mac

The following comments are owned by whoever posted them. We are not responsible for them in any way.

Back to Threads Reply to Thread

I just want a runnable Icon that can mount the disk image and start the game all in one.

I want just a little general information from one of the experts. I use boxer, and it will, after installing, import a disk image of my CD. This creates a game which, all i have to do is click and it runs without my having to put in a CD.

I would like functionality like this in crossover games. That is, I would like some kind of BAT file or the like that would automatically mount my disk image and tell wine it is a cd (the cd). I can mount an image then run the game no problem. I just want a runnable Icon that can mount the disk image and start the game all in one.

Is it possible to write a script that runs inside the bottle (like an old BAT file) that would run and mount an image in the same folder with the BAT file? Something that could be used time and again by just editing the name of the image file? (and maybe the path to the exe)? Any old dos wizards out there able to write this thing for us? (if I knew it would work i would dust off one of my old dos manuals and craft one, but I don't know enough about wine to know.)

This is working for me. I changed the script's icon to the game's icon using the finder, and made an application out of the script using the apple script editor. I got this from hints.macworld.com/article.php?story=20040905112951299... the only editing that it requires is the properties need setting correctly (not as elegant as I had hopped)

Here are the explanations of the variables:

* diskname: should be the name you see under the icon for the disk image on your desktop.  
* diskpath: should be the full path to the disk image file on your hard disk. Get this by selecting the file, press Command-I for Get Information, and combine the "Where" string with the "Name and extension" string.  
* itemname: should be the full path of the application program that the script should run.  
* appname: should be the name of the application itself (without the path). 

property diskname : "Baldur's Gate"
property diskpath : "Macintosh HD:Users:User'sName:Library:CrossOver Games:Bottles:Baldur_s Gate:E Baldur's Gate.iso"
property itemname : "Baldur's Gate:Autorun.exe"
property appname : "CrossOver Games"

on run
tell application "Finder"
if not (exists the disk diskname) then
do shell script ("hdiutil attach " & quoted form of ¬
POSIX path of (diskpath as string) & " -mount required")
repeat until name of every disk contains diskname
delay 1
end repeat
end if
open item itemname
end tell
delay 5
end run
-- remainder based on hint by puffyn at macosxhints.com:
-- hint named "Quick Applescript to Mount Disk Image"
-- shell script to get devname by Dale Mox with fixes by jbc
on idle
set devname to do shell script "mount | grep " & diskname & ¬
" | cut -f1-1 -d \" \" | cut -f3-3 -d \"/\""
tell application "Finder"
if not (exists the disk diskname) then
return
else
set x to the name of every process
if appname is not in x then
do shell script ("hdiutil unmount /Volumes/" & diskname & " -force")
do shell script ("hdiutil detach " & devname & " -force")
tell me to quit
end if
end if
end tell
return 2
end idle

Get the appname from the Activity Monitor

Please Note: This Forum is for non-application specific questions relating to installation/configuration of CrossOver. All application-specific posts to this Forum will be moved to their appropriate Compatibility Center Forum.

CrossOver Forums: the place to discuss running Windows applications on Mac and Linux

CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi01LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzE1NzEwMjQ4LCJjc3JmX3Rva2VuIjoiOENRQk55QTRXWThzczhrQSIsImdkcHIiOjB9