Wine で 32bit 専用環境を構築する

OS が 64bit だと Wine の構造も 64bit になります。
通常はそれでも問題ないと思うのですが、敢えて 32bit 専用環境を構築してみました。

環境

PC 環境
CPU Celeron Processor 847 (2M Cache, 1.10 GHz)
MEM 8GB
HDD 80GB
OS Lubuntu 16.04.4 LTS x64

Wine 構造

Lubuntu が 64bit版なので、Windows 同様に「Program Files」は 32bit・64bit の2つに分かれています。

$ tree -L 2 /home/{username}/.wine
/home/{username}/.wine
├── dosdevices
│   ├── c: -> ../drive_c
│   └── z: -> /
├── drive_c
│   ├── Program Files
│   ├── Program Files (x86)
│   ├── users
│   └── windows
├── system.reg
├── user.reg
└── userdef.reg

※ Wine の導入方法については「Wine 3.0 が安定版になっていた」をご参照ください。

32bit 専用環境の構築

いつもお世話になっている ArchWiki を参考にしました。

base on Wine - ArchWiki

デフォルトでは、Wine の設定ファイルとインストールされた Windows のプログラムは ~/.wine に置かれます
Windows プログラムを動かしたり、Wine を設定するための winecfg を動かすと自動的にフォルダが作成されます

WINEARCH の使用
Wine はデフォルトで 64 ビットの環境を作ります。この挙動は WINEARCH 環境変数を使うことで変更できます。
あなたの ~/.wine ディレクトリの名前を変更して新しい wine 環境を作って下さい: $ WINEARCH=win32 winecfg。これで 32 ビットの wine 環境が作られます。
WINEARCH を設定しないときは 64 ビット環境が作られます。

WINEPREFIX を使うことで win32 環境と win64 環境を分割することができます:

$ WINEARCH=win32 WINEPREFIX=~/win32 winecfg 
$ WINEPREFIX=~/win64 winecfg

実作業

.wineディレクトリが存在すると、重複エラーになるので削除します。
なお、手間でなければ事前にインストール済みWindowsアプリは削除しておいたほうが無難です。

$ rm -rf /home/{username}/.wine
$ ls -d /home/{username}/.wine
ls: '/home/{username}/.wine' にアクセスできません: そのようなファイルやディレクトリはありません

$ WINEARCH=win32 wineboot
wine: created the configuration directory '/home/{username}/.wine'
fixme:storage:create_storagefile Storage share mode not implemented.
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
fixme:storage:create_storagefile Storage share mode not implemented.
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
fixme:iphlpapi:NotifyAddrChange (Handle 0x10ee8a0, overlapped 0x10ee8ac): stub
wine: configuration in '/home/{username}/.wine' has been updated.
変数・引数 説明
WINEARCH 環境変数
win32 32bit環境専用
wineboot .wineディレクトリ作成処理

.wineディレクトリ作成

上記、ArchWiki の説明で、.wineディレクトリは「Windows プログラムを動かしたり、Wine を設定するための winecfg を動かすと自動的にフォルダが作成されます」とあるので、winecfg を起動します。
なお、コマンド「winecfg」は「Wine設定」を指します([Wine]-[Wine設定])。

以下のメッセージが表示され、作成処理が終わると消えます。

  • /home/{username}/.wine にある Wine 設定を更新しています。しばらくお待ちください ...

確認すると、ディレクトリが作成されています。

$ ls -d /home/{username}/.wine
/home/{username}/.wine

Wine 構造 (32bit 専用)

32bit 専用なので「Program Files」が1つになっています。

$ tree -L 2 /home/{username}/.wine
/home/{username}/.wine
├── dosdevices
│   ├── c: -> ../drive_c
│   └── z: -> /
├── drive_c
│   ├── Program Files
│   ├── users
│   └── windows
├── system.reg
├── user.reg
└── userdef.reg

「Wine で 32bit 専用環境を構築する」への1件のフィードバック

コメントは受け付けていません。