English French (fr_FR)
Know how to crossref:advanced-networking[advanced-networking,set up a network connection].
Know how to crossref:ports[ports,install additional third-party software].
WINE Overview & Concepts
WINE is a complex system, so before running it on a FreeBSD system it is worth gaining an understanding of what it is and how it works.
What is WINE?
As mentioned in the <<wine-synopsis,Synopsis>> for this chapter, WINE is a compatibility layer that allows Windows(R) applications to run on other operating systems. In theory, it means these programs should run on systems like FreeBSD, macOS, and Android.
When WINE runs a Windows(R) executable, two things occur:
Firstly, WINE implements an environment that mimics that of various versions of Windows(R). For example, if an application requests access to a resource such as RAM, WINE has a memory interface that looks and acts (as far as the application is concerned) like Windows(R).
Then, once that application makes use of that interface, WINE takes the incoming request for space in memory and translates it to something compatible with the host system. In the same way when the application retrieves that data, WINE facilitates fetching it from the host system and passing it back to the Windows(R) application.
WINE and the FreeBSD System
Installing WINE on a FreeBSD system will entail a few different components:
FreeBSD applications for tasks such as running the Windows(R) executables, configuring the WINE sub-system, or compiling programs with WINE support.
A large number of libraries that implement the core functions of Windows(R) (for example [.filename]#/lib/wine/api-ms-core-memory-l1-1-1.dll.so#, which is part of the aforementioned memory interface).
A number of Windows(R) executables, which are (or mimic) common utilities (such as [.filename]#/lib/wine/notepad.exe.so#, which provides the standard Windows(R) text editor).
Additional Windows(R) assets, in particular fonts (like the Tahoma font, which is stored in [.filename]#share/wine/fonts/tahoma.ttf# in the install root).
Graphical Versus Text Mode/Terminal Programs in WINE
As an operating system where terminal utilities are "first-class citizens," it is natural to assume that WINE will contain extensive support for text-mode program. However, the majority of applications for Windows(R), especially the most popular ones, are designed with a graphical user interface (GUI) in mind. Therefore, WINE's utilities are designed by default to launch graphical programs.
However, there are three methods available to run these so-called Console User Interface (CUI) programs:
The _Bare Streams_ approach will display the output directly to standard output.
The _wineconsole_ utility can be used with either the _user_ or _curses_ backed to utilize some of the enhancements the WINE system provides for CUI applications.