LoginSignup
40
49

More than 3 years have passed since last update.

macOS Catalinaでwine

Last updated at Posted at 2020-03-29

macにwineをインストールしてみたのでメモしてみました。

実行環境

PC: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
OS: Darwin 19.3.0 (macOS Catalina 10.15.3 (19D76))
wine: wine-5.5 (githubからそのままcloneしました。)
*インストールした時点でのstableなバージョンは公式サイト(winehq.org)では5.0でした。

公式サイトでwineのインストールに必要なもののバージョン
bison: bison (GNU Bison) 3.5
XQuartz: XQuartz 2.7.11 (xorg-server 1.18.4)
flex: flex 2.5.35 Apple(flex-32)
pkgconfig: 0.29.2
mingw-w64: 7.0.0_2

インストール方法(2020-03-29時点)

githubからwineをclone

ターミナルで下のコマンドを実行してください。
git clone https://github.com/wine-mirror/wine.git
cd wine

ディレクトリの移動はもちろんcloneが終わってからです。

configureファイルを実行

ディレクトリを移動せずにターミナルで、下のコマンドを実行してください。
./configure --enable-win64
不備がなければ、エラーは何も吐かれません。

makeコマンドの実行

ディレクトリを移動せずに、
make
と入力するとビルドされます。configureファイルでエラーが何もなければ、問題なくビルドされます。私の環境だと、少し時間がかかったので気長に待ってください。パス通しなど各自でお願いします。

注意事項

公式サイトでは必要なものがxquartz, bison, flex, mingw-w64, pkgconfigになっていました。入っていない方は各自で入れてください。公式サイトではHomebrewを使って補えるとありました。

The following would cover basic requirements;
brew cask install xquartz
brew install bison flex mingw-w64 pkgconfig

https://wiki.winehq.org/MacOS/Building

公式サイトのMac用のインストールガイドに従ってconfigureファイルを実行する時に以下のエラーが吐かれます。

Cannot build a 32-bit program, you need to install 32-bit development libraries.
./configureの実行結果

macOSがCatalinaになってから32-bitsプログラムはつかえないため(少なくとも私はまだ知りません...)wine64を入れましょう。また、Homebrewでcaskをつかてwine-stableをインストールすると

zsh: bad CPU type in executable: ./wine
./wine の実行結果

とエラーが吐かれます。同じように、32bitのプログラムになるので、ソースからビルドするか、オプションを与えてください。公式サイトにも

As homebrew no longer provides universal dylibs anything outside of XQuartz provided files and the basic build dependencies would need to be built from source
https://wiki.winehq.org/MacOS/Building

とあるのでソースから、ビルドしたほうがいいと思います。

参考

https://wiki.winehq.org/MacOS/Building
https://wiki.winehq.org/Building_Wine

追記 (2020-04-03 更新)

インストールするプログラムによってはうまく動かないみたいです。notepad++を試しに入れてみたら問題なく動きましたが、MT5をインストールさせようとしたら、実行時にエラーを吐いていました。アップデートで改善されるか、改善策を見つけた場合更新します。

40
49
11

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
40
49