Install Wine On Mac

/ Comments off
  1. Install Wine On Mac Os High Sierra
  2. Install Wine On Mac Youtube
  3. Install Wine On Mac Os
  4. Install Wine On Macbook

Installing Wine on Apple Mac. This tutorial explains how to install Wine application on Apple Mac. This application allows to run Embird (native Windows application) on Apple Mac computer. The XQuartz appplication must be installed before installing Wine. Note: Please note, that applications XQuartz and Wine for Apple Mac are not developed nor. To make this easier, let’s walk through the process of installing Wine and then installing and running a Windows application with the tool. I will demonstrate the process on Elementary OS Freya and install the latest version of Wine. If you are running an Ubuntu derivative, you’ll find Wine located in the Software Center.

This semester, I am taking a class on assembly programming using Kip Irvine’sbook “Assembly Language for Intel-Based Computers.” Unfortunately, the bookshould really be called “Assembly Language for Intel-Based WindowsComputers,” as it is written for Microsoft Macro Assembler (MASM). It mentionsthat the programs in the book could be converted to TASM assembly fairlyeasily, but they will not run out of the box.

I could run MASM on a Windows virtual machine, but that would be fairly heavyto have running whenever I want to work on assembly. Instead, I wanted to seeif I could run MASM with little overhead using Wine.It turns out that this is fairly easy to do!

Install Wine

Good instructions for installing Wine on Mac are availablehere. Instructions forUbuntu are available here. The installprocess for other distros should be fairly straightforward as well.

The TL;DR for intsalling on Mac is to install XQuartz and wine via homebrew:

brew install Caskroom/cask/xquartz wine

Create a new wineprefix

Commands executed using wine are executed in “Wine prefixes,” which arevirtual Windows environments of sorts. By default, the ~/.wine prefix isused; configuration for this environment is stored in ~/.wine/*.reg files,and the C: file tree is stored in ~/.wine/drive_c.

We could run MASM in the default wine prefix and it would work perfectlyfine. However, we will be setting Windows environment variables that couldpotentially interfere with other programs running on Wine. If you plan on usingWine for anything else, it is best to install MASM in its own Wine prefix. Youcan create a new prefix as follows:

Wine will initialize a new Windows file system tree at ~/wine-masm/drive_cand open a window for you to configure the system. The defaults are fine, soyou can close the Wine Configuration window that appears.

Download and extract MASM32

I downloaded MASM from http://www.masm32.com/. You can download and run theinstaller as follows:

The first steps of the installer are fairly self-explanatory:

After clicking OK, the installer starts assembling/linking some libraries andoutputs its progress in the terminal:

At one point, the installer asks if I want to overwrite msvcrt.exp. I’vetried it with both yes and no, and I don’t think it matters.

A dialog appears asking if you want to create a shortcut to the MASM editor:

We aren’t using the Windows desktop, and we probably won’t even be using theMASM editor (I much prefer Sublime or vim), so click No.

At the end, the MASM editor appears. You can close this, or check it out ifyou’re interested. You can always open it in the future by runningWINEPREFIX=~/wine-masm wine 'C:masm32qeditor.exe'.

At this point, the installation is complete, and you should be able to run theMASM assembler:

Download and extract Irvine’s files (optional)

If you are using Irvine’s textbook, you will want to download his example andinclude files. The files are available on his website athttp://www.kipirvine.com/asm/examples/index.htm. I am using the 5th editiontextbook, so I downloaded the files fromhttp://www.kipirvine.com/asm/examples/IrvineExamplesVS2008.zip:

Irvine provides some scripts that (quite irritatingly/inflexibly) expect thisdownload to be extracted to C:Irvine:

If you are using a newer edition of the book, the example files are packaged ina .msi installer. You can download/extract as follows:

Accept all the default options.

Set environment variables

We need to set the Windows PATH, INCLUDE, and LIB environment variables so thatwhen we are assmebling/linking, we can find the MASM binaries/includes/sharedlibraries more easily. To do this, open regedit:

Browse to HKEY_CURRENT_USER/Environment. Add a new string value (right clickthe right-hand pane, New > String Value) named PATH. Double click this newvalue and enter the following:

Also create an INCLUDE key with value C:masm32include;C:Irvine and aLIB key with value C:masm32lib;C:Irvine. (If you are just trying to runmasm on *nix and aren’t using Irvine’s book, then you can omit the C:Irvineparts of those keys.)

At this point, you can call masm without needing to specify full binary orinclude paths:

Write a bash function to easily assemble/link/run .asm files

At this point, we could be done. However, specifying all the masm flags canbecome a pain, and we could easily write a bash function to take care of this.In my ~/.bash_profile, I have the following:

Feel free to tweak this function as necessary.

Once you “reload” your bash profile (. ~/.bash_profile), you canassemble/link/run .asm files in one command:

Conclusion

Wine is really handy when it works – and it works quite well in this case,without any DLL overrides or fancy configuration or what not. We are able to runMASM and assembled binaries with little overhead, and we can use our host shellsand editors without needing any fancy tricks!

This semester, I am taking a class on assembly programming using Kip Irvine’sbook “Assembly Language for Intel-Based Computers.” Unfortunately, the bookshould really be called “Assembly Language for Intel-Based WindowsComputers,” as it is written for Microsoft Macro Assembler (MASM). It mentionsthat the programs in the book could be converted to TASM assembly fairlyeasily, but they will not run out of the box.

I could run MASM on a Windows virtual machine, but that would be fairly heavyto have running whenever I want to work on assembly. Instead, I wanted to seeif I could run MASM with little overhead using Wine.It turns out that this is fairly easy to do!

Install Wine

Wine

Good instructions for installing Wine on Mac are availablehere. Instructions forUbuntu are available here. The installprocess for other distros should be fairly straightforward as well.

The TL;DR for intsalling on Mac is to install XQuartz and wine via homebrew:

brew install Caskroom/cask/xquartz wine

Create a new wineprefix

Commands executed using wine are executed in “Wine prefixes,” which arevirtual Windows environments of sorts. By default, the ~/.wine prefix isused; configuration for this environment is stored in ~/.wine/*.reg files,and the C: file tree is stored in ~/.wine/drive_c.

We could run MASM in the default wine prefix and it would work perfectlyfine. However, we will be setting Windows environment variables that couldpotentially interfere with other programs running on Wine. If you plan on usingWine for anything else, it is best to install MASM in its own Wine prefix. Youcan create a new prefix as follows:

Wine will initialize a new Windows file system tree at ~/wine-masm/drive_cand open a window for you to configure the system. The defaults are fine, soyou can close the Wine Configuration window that appears.

Download and extract MASM32

I downloaded MASM from http://www.masm32.com/. You can download and run theinstaller as follows:

The first steps of the installer are fairly self-explanatory:

After clicking OK, the installer starts assembling/linking some libraries andoutputs its progress in the terminal:

At one point, the installer asks if I want to overwrite msvcrt.exp. I’vetried it with both yes and no, and I don’t think it matters.

Wine

Install Wine On Mac Os High Sierra

A dialog appears asking if you want to create a shortcut to the MASM editor:

Mac

We aren’t using the Windows desktop, and we probably won’t even be using theMASM editor (I much prefer Sublime or vim), so click No.

At the end, the MASM editor appears. You can close this, or check it out ifyou’re interested. You can always open it in the future by runningWINEPREFIX=~/wine-masm wine 'C:masm32qeditor.exe'.

Install wine on mac m1

At this point, the installation is complete, and you should be able to run theMASM assembler:

Download and extract Irvine’s files (optional)

If you are using Irvine’s textbook, you will want to download his example andinclude files. The files are available on his website athttp://www.kipirvine.com/asm/examples/index.htm. I am using the 5th editiontextbook, so I downloaded the files fromhttp://www.kipirvine.com/asm/examples/IrvineExamplesVS2008.zip:

Irvine provides some scripts that (quite irritatingly/inflexibly) expect thisdownload to be extracted to C:Irvine:

If you are using a newer edition of the book, the example files are packaged ina .msi installer. You can download/extract as follows:

Accept all the default options.

Install Wine On Mac Youtube

Set environment variables

We need to set the Windows PATH, INCLUDE, and LIB environment variables so thatwhen we are assmebling/linking, we can find the MASM binaries/includes/sharedlibraries more easily. To do this, open regedit:

Browse to HKEY_CURRENT_USER/Environment. Add a new string value (right clickthe right-hand pane, New > String Value) named PATH. Double click this newvalue and enter the following:

Also create an INCLUDE key with value C:masm32include;C:Irvine and aLIB key with value C:masm32lib;C:Irvine. (If you are just trying to runmasm on *nix and aren’t using Irvine’s book, then you can omit the C:Irvineparts of those keys.)

Install Wine On Mac Os

At this point, you can call masm without needing to specify full binary orinclude paths:

Write a bash function to easily assemble/link/run .asm files

At this point, we could be done. However, specifying all the masm flags canbecome a pain, and we could easily write a bash function to take care of this.In my ~/.bash_profile, I have the following:

Install Wine On Macbook

Feel free to tweak this function as necessary.

Once you “reload” your bash profile (. ~/.bash_profile), you canassemble/link/run .asm files in one command:

Conclusion

Wine is really handy when it works – and it works quite well in this case,without any DLL overrides or fancy configuration or what not. We are able to runMASM and assembled binaries with little overhead, and we can use our host shellsand editors without needing any fancy tricks!