Install wine on Mac OS

Source: Internet
Author: User

Install xcode on Mac OS before installation

1. First you need to download the macports tool, http://www.macports.org/install.php

2. To use macports, you must first set it to work properly.

Open the terminal and copy and paste the following statement, excluding the ($) symbol at the beginning of the statement.

 

$ Echo export Path =/opt/local/bin:/opt/local/sbin:/$ PATH $ '/N' export manpath =/opt/local/man: /$ manpath | sudo tee-A/etc/profile

 

This command requires you to enter the Administrator account password

If the command runs correctly, the terminal displays

 

 

export PATH=/opt/local/bin:/opt/local/sbin:$PATHexport MANPATH=/opt/local/man:$MANPATH
Run
$ if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi
If you have a snow leopard running on a newer computer, ghost will respond to "+ universal ". If you have an old computer, the hacker will respond to "not 64bit capable"
3. Use macports and enter the following command to install wine.
$ sudo port install wine
If an error message is displayed C compiler cannot create executablesOrFailed to locate 'make' should have forgotten to install xcode
4. Download the Windows Installer, find the installer path, and run
$ wine $INSTALLER.exe
$Installer.exe is the name of the installer.
5. Open the terminal and go to your Program Files folder.
$ cd ~/.wine/drive_c/Program/ Files/
Find the executable file to run
$ wine $PROGRAM.exe
In this example, program program.exe is an executable file name.

6 many want to run Windows programs like running other Mac OS, and click the icon in the dock. Wine does not support this method, but it can be implemented through a small trick.

To load a Windows program through the dock, We need to write an applescript and put it in the dock. There is a program in the system that can help you write this script. If you are
For Mac OS 10.4 or 10.5, there is a program called "applescript Editor". If you are 10.6, you can
Find the Script Editor.
Open the Script Editor and write the following code:
tell application "Terminal"    do script "/opt/local/bin/wine ~/.wine/drive_c/Program// Files/$PATH_TO_PROGRAM.exe"end tell
Replace $ path_to_program with your program path. Compile and run the script to open the windows program and save the script. And select the Save format as appliction.
Open the finder and drag the script to the dock.
7. You can use macports to keep wine updated and enter
 sudo port selfupdate && sudo port upgrade outdated
8. Uninstall macports and wine
Enter
$ sudo port uninstall wine
Deleting wine does not delete its dependent projects.
If you want to delete a dependency project, you can delete macports.
$ sudo rm -rf /opt ~/.wine /Applications/MacPorts

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.