Mac Wine Default Install Directory

2021. 5. 29. 03:59카테고리 없음



How to Run Windows Programs on a Mac With Wine Chris Hoffman @chrisbhoffman Updated July 3, 2017, 10:31pm EDT Wine is an open source program for running Windows software on non-Windows operating systems. Jul 05, 2018  Where Homebrew Packages Are Installed on Mac OS: the Homebrew Installation Path. By default, Homebrew will install all packages into the following directory in all versions of Mac OS: /usr/local/Cellar/ Additionally, Homebrew places symlinks into the following directory path: /usr/local/opt/.

This tutorial is for intermediate users who want to install and useWine on their computer running macOS.You should already know the basics of how to use the command line.If you don't, read this tutorial first.

What is Wine?

  • This FAQ, or Frequently Asked Questions, covers general topics about Wine.For questions related to Wine software development, see the Developer FAQ. Quick links: running a program in Wine, running Wine from a terminal, running program as root, uninstalling an application, getting a debugging log, using a wineprefix, creating a 32 bit wineprefix.
  • Nov 16, 2011 Leave the default destination directory. StarCraft will install. When installation is complete, click Exit Installer. Open the Wine menu in the menubar and click Configuration. Under the Graphics tab, uncheck Allow the window manager to control the windows.
  • Wine has a root directory.wine in your home directory. The windows-drive letters (e.g.: C: D:.) can be mapped with the winecfg program. Depending on what drive letter you installed MS office you find the files somewhere under the.wine directory.

Wine is awesome.No, I'm not talking about the kind you drink,I mean the kind that lets you run Windows apps without theWindows operating system.It's kind of Zen, when you think about it.Oh, and did I mention it's completely free, legal, and open source?

Nowadays, Windows and Mac play nicely together.You can install Windows and Mac side by side and switch between them usingBoot Camp, but that requiresa reboot every time, and you can only use one operating system at a time.You can also use a tool likeParallels Desktop orVMware Fusionto virtualize Windows and run it together with Mac,but virtualization is slow and it takes up a lot of memory.(Your physical computer creates an imaginary 'virtual' computer within itself,and runs Windows on that. That takes a lot of resources!)On top of that, all of these solutions require you to own a legal copyof Windows, which isn't cheap!

Wine is different. When any program runs, it requests resourceslike memory and disk space from the operating system.All that Wine does is make sure that those requests get answered so thatthe program can run correctly. As far as the program knows, everythingis going smoothly because it has everything it needs.It never even realizes that it's not running on Windows!It's simpler than emulating a whole new computer, so it's faster.Since it's just translating requests, you don't need a copy ofthe actual Windows operating system. Plus, Wine is open source,which means people are continually improving it and adding new features.And you can't beat the price!

Will My Program Work With Wine?

A lot of people discover Wine because they have one specific Windows programthat they need to use, and it's the last thing preventing them from switchingto a different operating system. So, the big question is, will it work?The short answer is: probably, but it's worth checking.

The Wine project maintains a database called theAppDB that hasuser reviews of how well specific Windows programs work under Wine.Search for your program and find out! (If it's not listed, that doesn'tnecessarily mean that it won't work — only that you're apparently tryingto use a very obscure program!)

Requirements

To install Wine on your Mac, you will need the following:

  • macOS 10.10 (Yosemite) or above (but 10.15 Catalina is not recommended)
  • Access to an Admin account, with password
  • An internet connection

To check what version of macOS you're running,click on the Apple logo on the far left side of the toolbar,select 'About This Mac', and look at your versionnumber under the big 'macOS' or 'OS X'. If it's 10.10 or higher, you're all set.

Note that Wine does not work well with macOS 10.15 Catalina. Apple removed 32-bit supportin Catalina, which is a critical part of the macOS system that almost all of Wine relies on.You can run 64-bit applications through Wine on Catalina, but very few applications for Windowsare 64-bit. If you need to use Wine, you should not upgrade to Catalina.

You need an Admin account on your Mac because only Admins can install software.You will need to be logged in to this Admin account during the installation.If there is only one account on your computer, it is an Admin account.The account must have a password: if the account has no password,the sudo utility will fail. To set or change your password,go to the Accounts section in System Preferences.

Part 1: Install Homebrew

Homebrew is a package manager that makes installingopen source programs much easier. In particular, trying to installa large program like Wine without the help of a package manager would betremendously difficult.Fortunately, Homebrew itself is simple to install: just open up theTerminal and run this command:

The Terminal will tell you what it's about to do, and ask youif you want to proceed: press Enter to do so.The Terminal may then ask for a password: this is the passwordto the Admin account on your computer. As a security measure,the Terminal does not display anything as you type, not evenasterisks (*). Type your password anyway, and press Enter. If you get somekind of error, it might be because the Admin account doesn't have apassword set. Setting a password is required.

Installing Homebrew should only take a few seconds or minutes(depending on the speed of your internet connection). When it's done,the Terminal will say that the installation was successful, and ask you torun brew doctor. Do as it suggests:

This will make Homebrew inspect your system and make sure that everythingis set up correctly. If the Terminal informs you of any issues, you'll needto fix them yourself, and then run brew doctor again to verify that youfixed them correctly. When everything is set up correctly, you'll see themessage Your system is ready to brew, and you can move on to the next partof the tutorial.

Note: If Homebrew tells you that you need to agree to the Xcode license,you can do that by running:

The Terminal window will fill up with the Xcode license:read it, type agree and hit enter to agree to the license.

Part 2: Install Wine Using Homebrew

Now we get to actually install Wine! We'll let Homebrew do all the work,all you have to do is tell it what you want with this command:

Let's break down this command into parts. brew refers to Homebrew, whichyou just installed. cask refers toHomebrew Cask,an extension to Homebrew that is used to install GUI application on yourcomputer. (GUI stands for 'Graphical User Interface'. A GUI application isan app that you can see running, as opposed to invisibly runningin the background.) install refers to the fact that you're askingHomebrew Cask to install something on your computer, and wine-stableis the name of the thing that you want it to install. Wine has a 'stable' versionand a 'devel' version: you probably want stable, since it should have fewer bugs.

When you run this command, Homebrew will start automatically downloadingand installing software onto your computer. It might start by installingsoftware that has a totally different name: that's fine! Like most complexapplications, Wine doesn't work alone -- it relies on several other pieces of software torun correctly. These are called 'dependencies', and Homebrew is smart enoughto install them for you automatically when necessary.

While it's working, Homebrew will display messages and progress bars on the Terminal to let you know what it's doing. When it's done installing Wine, it will stop displaying messages and wait for you to type in a new command. When that happens, move on to the next step!

Part 3: Install Windows Programs Using Wine

To install a Windows program, first download the installer file:it should end with .exe. Remember the location you put it, and open upthe Terminal again. cd to the location, and use ls to make sure you cansee the installer file. (Note: if you do not know what cd and ls are,you should learn how to use the command linebefore using Wine.)

Once you are in the correct directory, run the installer through Wineby running the following command in the Terminal:

Where $INSTALLER is the name of the installer file. For example,if the installer file is named setup.exe, you would run:

A window will pop up with a regular graphical Windows installer.Click through it, and you're done!

Part 4: Run Windows Programs Using Wine

Open up the Terminal and run this to get to your Program Files folder:

Run ls to see what programs you have installed. Pick a program,and enter its directory using cd. (If the folder has a space in it,you must type a before the space. For example, Program Files.If you're having problems, try using tab autocomplete.)There should be a file that ends in .exe: this is the program file.Type this into Terminal:

Where $PROGRAM is the name of the .exe file. For example, if the programfile is named STARCRAFT.EXE, you would run:

The program will pop up in a new window, ready to use!Enjoy using Windows on your Mac, freely and legally!

Making a Dock Icon

Many people want to be able to run Windows programs the same waythey run other programs on the Mac: by clicking an icon in the Dock.Wine isn't specifically designed to support this, but with a little trickery,we can make it do what we want.

Note: Wine prints out error messages in the Terminal when something goes wrong.By launching Windows programs via a Dock icon, you are sidestepping theTerminal, which means that if something does go wrong and Wine has to quit,it will not be able to tell you what the problem was. The first stepto solving a problem is knowing what it is, so without running Winefrom the Terminal, you won't be able to fix it, and neither will anyone else.Running from the Dock is fine as long as your program seems to be workingcorrectly, but if it crashes, the first thing you should try is running itfrom the Terminal instead: it won't prevent the program from crashing,but it will give you some clues on how to fix the problem.

Install

In order to launch a Windows program via the Dock, we're going towrite an AppleScriptthat launches the program for us, and then putthat AppleScript in the Dock. Essentially, we're writing a program ourselves!Don't worry, it's easy enough. There is a program on your computerthat is designed for helping you write AppleScripts:it's called 'Script Editor', and you can find it in the/Applications/Utilities directory of your computer,same as the Terminal itself.

Open up the Script Editor. You should see a window with a large areayou can type in near the top: this is where you write your AppleScript.In that area, type the following text:

You'll need to replace $PATH_TO_PROGRAM with the path from theProgram Files directory to your program executable. You can see thatyou're simply telling the AppleScript to run a line of code in the Terminal:the same line of code that you could run to start your Windows program.

Next, press the Compile button at the top of the window.The text should become colored to indicate that Script Editorunderstands what you wrote. You can also try pressing the Run buttonto run your script: it should open the Windows program successfully.

Lastly, save your script. You can give it whatever name you'd like,but be sure to select File Format: Application in the save options,and leave Startup Screen unchecked.

Open up the Finder, go to where you saved your script, and drag thatfile to your Dock. It should stay there, just like a real application — because it is a real application! However, all it does is runthat launcher command for you, so you can move the application around,rename it, or even delete it, and it won't affect the Windows programthat you're running.

Keeping Wine Up to Date

Wine is an open source program. That means that programmersaround the world are continually improving it, adding new featuresand squashing bugs. If you don't update Wine, though, it will neverget those improvements, so it's generally a good idea to check for updatesevery so often. We can use Homebrew to keep Wine up to date: it's easy!Just run this command:

With this command, Homebrew will first update itself, if any updatesare available. It will then find all the outdated software it knows about(including Wine) and upgrade them all to the latest version.Checking for updates isn't strictly necessary, as Wine runs quite wellcurrently. However, it's a good idea to run this command every few monthsor so.

Uninstalling Wine and Homebrew

If you try Wine and you don't like it, uninstalling it is easy.Just run this command:

And Homebrew will helpfully remove Wine from your computer.However, in order to install Wine, Homebrew also had to install many othersmall programs that Wine relies upon to work correctly.(That's why the install process takes so long!)If you want to remove these as well,run this script:

That script will remove everthing that you installed in this tutorial,including Homebrew, Wine, and all the other programs Homebrew installedto get Wine to work correctly.

Please enable JavaScript to view the comments powered by Disqus.

Winecfg is a GUI configuration tool for Wine, designed to make life a little easier than editing the registry.

The goal of this document is to describe features of winecfg which may be less than intuitive. It should be noted that changes to winecfg have been proposed to increase its overall usability (user friendliness). That said, this document may very well be much shorter in the future.

Tip: Although winecfg is a great configuration tool, some more advanced settings can be only be changed by editing the registry (i.e. with the ['regedit'] tool). You can find some useful registry keys here. As always, one should exercise care when editing the registry.

  • 1Using winecfg
    • 1.3Graphics

Using winecfg

There are two ways you can use winecfg to change settings. You can change settings for all applications ('Default Settings') or you can change settings for a specific application (which overrides the default settings). When you start winecfg, the Applications tab is shown with 'Default Settings' selected. With 'Default Settings' selected, changes made affect all applications.

To change settings only for a specific application:

  1. In the Application tab, click the 'Add application...' button.
  2. Browse to and highlight the application then click the 'Open' button.
  3. With your application's filename still highlighted in the Application tab, changes only (i.e. in other tabs) affect that specific application.

Tip: When editing per application settings, the application name appears in the winecfg title bar.

Windows Version

This setting changes the version reported to applications that ask for it. Generally, this setting does not change Wine's behavior. If an application never asks for this version information, it is likely that changing this setting will have no effect on the application's performance or functioning.

Mac Wine Default Install Directory Download

Applications which ask for version information might do so in order to make decisions about which Windows features it should use. For example, if a feature is only available in newer versions of Windows then the application would want to avoid using that feature if running on older Windows versions. (Note: Better designed applications will try to detect the features in question rather than relying on the operating system's version.)

This setting is provided because some applications will refuse to run if the reported version does not meet their stated system requirements. In some cases, changing this setting may also work around bugs in Wine by causing the application to use different feature sets to get its work done. If changing this setting breaks or “fixes” your application, it may be a bug.

Versions of Windows prior to XP are only available for selection in winecfg in 32 bit wineprefixes. This is because those versions of Windows did not exist in 64 bit. If you are on a 64 bit system, you will have to create a 32 bit wineprefix to be able to set Wine to those versions.

Libraries

In this tab you can override the default way Wine loads DLLs (Dynamic Link Libraries). Sometimes Wine ships with a DLL, which is not fully implemented or contains bugs which haven't yet been worked out. In some cases you can work around these kinds of problems by using a library provided with an application or copied from a Windows installation.

Builtin means: Provided by Wine.

Native means: Not provided by Wine (eg installed by an application or copied from a Windows installation).

Attention:

  • You only need to provide overrides for libraries provided by Wine.
  • Overridable Libraries provided by Wine should be listed in the drop-down list.
  • Although DLL overrides can sometimes solve problems, they can also potentially cause larger problems which prevent Wine and your applications from working altogether. You should override a DLL only if absolutely necessary.
  • Wine HQ cannot provide support for native DLLs. If you use them, you may be on your own. In particular, if you use an override do not submit a bug report based on that configuration. You could potentially waste developer time, have your bug marked as invalid, and be no closer to solving the problem with an improved Wine.
  • The following libraries should never be overridden (If you try, you'll get a dialog box telling you not to--don't do it!):
  • Do not blindly copy files from a Windows installation to a Wine system32 folder and create overrides.

Mac Default Apps

If all of the above didn't scare you off, you can add an override by typing the name of the library or selecting it from the drop down list and then click Add. At this point, the library should now be listed under 'Existing Overrides' and highlighted. Click the 'Edit' button and select how you would like the override to work.

The following load orders (overrides) are selectable:

  • Builtin (Wine) - Use only the library version provided by Wine (fail if not found).
  • Native (Windows) - Use only the native version of the library (fail if not found).
  • Builtin then Native - Try to load the library provided by Wine first, then try native if that fails. (This is the default behavior)
  • Native then Builtin - Try to load a native version first, then try builtin if that fails. (Probably the one you want if you are going to use an override)
  • Disable - If an application tries to load the library, it will fail.

You can prefix the DLL name with an asterisk (*) when entering it in; in that case the override will apply when it is loaded from any directory (instead of just system32). That way, you can force a builtin DLL to be used even if an application ships its own redistributable.

Graphics

Window Settings

The settings in this section are generally best edited on a per application bases. Changing a setting here may fix one application and break another at the same time.

  • Allow the window manager to decorate the windows. -- This setting has to do with the borders and Title bars of windows created by applications. If this option is enabled your Window manager (eg. KDE) will draw them and your applications will look a little more native to your desktop environment.
  • Allow the window manager to control the windows -- When unchecked windows are disconnected from your window manager. They will not show up in the window list (ie in the alt+tab list or on your task bar) and are not decorated.
  • Emulate a virtual desktop -- With this setting enabled, created windows are confined to a single window (the 'virtual' desktop window). You should select a desktop size smaller than what you run X in. Windows within a virtual desktop are not decorated or managed by your window manager.

Screen Resolution (DPI Setting)

It is possible to set this value too high which results in winecfg (amongst other things) being too large to be usable. To edit this value manually create a file named logpixels.reg with the following contents:

Next, import it into the registry with:


Restart winecfg and note the value is now 96.

Note: if winecfg is not run under a virtual desktop and the windows are controlled by your window manager, you may be able to move the window by pressing alt/meta and dragging the mouse any where in the window to move it (thus granting you access to the DPI slider).

Desktop Integration

In this tab you adjust the appearance of applications (Theming) and change some default shell folders. You can, for example, make your Windows applications look more like your favorite KDE or Gnome desktop theme.

Drives

In this tab you can control how Windows drive letters are mapped to Unix paths. Generally you will not need to change anything here unless directed to do so.

Do not change C: to point to an actual Windows installation. Doing so may render your Windows installation unusable. Wine is not designed to interact with a Windows installation; it is designed to be independent of one.

Audio

In this tab you'll find settings related to the configuration of your Sound system. Although Wine supports multiple sound drivers, you should only use ONE at a time. The supported sound drivers are: PULSEAUDIO, ALSA, and OSS.

About

This tab proudly shows the Wine logo, it's version, a URL to Wine HQ, and a GNU LGPL notice.

It also has a couple of text boxes to allow you to set the Owner and Organization. (This feature was added to Wine 1.1.)

See Also

  • Useful Registry Keys -- Useful Registry Keys that can't be changed (yet) with winecfg.
  • regedit -- A tool for editing the registry
Retrieved from 'https://wiki.winehq.org/index.php?title=Winecfg&oldid=3154'