I am using the latest BC3 on Snow Leopard and its working very well. One question I have is how do we use it on the command line? I'd like to use BC3 with some apps and I'm not sure how to do that.
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 am using the latest BC3 on Snow Leopard and its working very well. One question I have is how do we use it on the command line? I'd like to use BC3 with some apps and I'm not sure how to do that.
I'm afraid this is going to be complicated. First, CrossOver.app has to be running, since it hosts the GUI of any Windows program. Second, when it runs Windows programs, CrossOver sets certain environment variables so that Wine can connect to it and find its resources.
When working interactively, you would select Programs > Run Command. In the Run Command dialog, you'd select the bottle, toggle open the Debug Options, and click Open Shell. CrossOver would then open a new Terminal window and configure it with the necessary environment variables. This doesn't work too well for an automated solution.
So, you might use a script such as:
#!/bin/sh
crossover="/Applications/CrossOver.app" # Where you keep CrossOver
bottle="Your Bottle Name Here"
open "$crossover"
export DISPLAY=:`defaults read com.codeweavers.CrossOver Display`
export DYLD_FALLBACK_LIBRARY_PATH="$crossover/Contents/SharedSupport/X11/lib:$HOME/lib:/lib:/usr/lib:/usr/X11/lib"
export FONT_ENCODINGS_DIRECTORY="$crossover/Contents/SharedSupport/X11/lib/X11/fonts/encodings/encodings.dir"
export FONTCONFIG_PATH="$crossover/Contents/SharedSupport/X11/etc/fonts"
export FONTCONFIG_ROOT="$crossover/Contents/SharedSupport/X11"
export VERSIONER_PERL_PREFER_32_BIT=yes
export CX_BOTTLE="$bottle"
export PATH="$crossover/Contents/SharedSupport/CrossOver/bin:$PATH"
# Uncomment this if you need to be in the bottle's C: drive directory
#cd "$HOME/Library/Application Support/CrossOver/Bottles/$bottle/drive_c"
wine YourProgramHere YourArgumentsHere
CrossOver Forums: the place to discuss running Windows applications on Mac and Linux