Ubuntu 16.10 安裝編譯 wine 2.x 的方法! [論壇 - Ubuntu安裝問題]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



Ubuntu 16.10 安裝編譯 wine 2.x 的方法!
會員三級
註冊日期:
2008/5/28 2:32
所屬群組:
已註冊使用者
等級: 15
HP : 0 / 362
MP : 91 / 10039
EXP: 48
離線
說明:升級 Ubuntu 16.10 發現 wine 快速安裝的快樂時光竟沒有了!從 Wine 1.8.0 發布以來,Ubuntu Wine PPA 一直沒有更新自己的 PPA 存儲庫,而且現今的 PPA 只能給你 Wine 1.8 版本,所以 wine 2.0 版本目前只能用編譯的方式來製作。雖然可以啟動本身 notepad.exe 但是測試安裝 Windows 應用程式結果非常糟糕,每一個軟體安裝都會失敗,所以……目前沒用!

步驟1:
--------------------------------------------------------------------------------------------
Official Wine builds (DEPRECATED)
============================================================================================

Adding this PPA to your system

You can update your system with unsupported packages from this untrusted PPA
by adding ppa:wine/wine-builds to your system's Software Sources. (Read about installing)

sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update

or ubuntu 16.10 [yakkety]

deb http://ppa.launchpad.net/wine/wine-builds/ubuntu yakkety main
deb-src http://ppa.launchpad.net/wine/wine-builds/ubuntu yakkety main

步驟2:
--------------------------------------------------------------------------------------------
獲取最新版本的 Wine(即現在為2.0)的方法是使用以下命令從源碼庫編譯 tarball 建構 wine。
============================================================================================
(1)安裝 Ubuntu 12.04 LTS 舊版函式庫
AMD64:
http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_amd64.deb
http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal-dev_0.5.14-8_amd64.deb

I386:
http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_i386.deb
http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal-dev_0.5.14-8_i386.deb

(2)安裝 Ubuntu 16.10 函式庫
$ sudo apt-get install gnome-devel
$ sudo apt-get install libx11-dev:i386
$ sudo apt-get install flex bison qt4-qmake
$ sudo apt-get install libjpeg-dev libxslt1-dev
$ sudo apt-get install libglu1-mesa-dev
$ sudo apt-get install freeglut3-dev
$ sudo apt-get install prelink
$ sudo apt-get install libasound2-dev
$ sudo apt-get install libfreetype6-dev
$ sudo apt-get install libpng-dev libxml2-dev
$ sudo apt-get install libxrender-dev
$ sudo apt-get install libgl1-mesa-dev
$ sudo apt-get install libgphoto2-dev
$ sudo apt-get install libmpg123-dev
$ sudo apt-get install libtiff-dev
$ sudo apt-get install libpulse-dev
$ sudo apt-get install liblcms2-dev
$ sudo apt-get install libcapi20-dev
$ sudo apt-get install libldap-dev
$ sudo apt-get install libopenal-dev
$ sudo apt-get install libv4l-dev
$ sudo apt-get install libsane-dev
$ sudo apt-get install libcups2-dev
$ sudo apt-get install libgsm1-dev
$ sudo apt-get install libosmesa6-dev
$ sudo apt-get install libgnutls28-dev
$ sudo apt-get install libpcap0.8-dev
$ sudo apt-get install oss4-dev
$ sudo apt-get install libcdk5-dev
$ sudo apt-get install libgstreamer-plugins-base1.0-dev
$ sudo apt-get install libarrayfire-opencl-dev

註:總整理→
$ sudo apt-get install gnome-devel
$ sudo apt-get install libx11-dev:i386
$ sudo apt-get install flex bison qt4-qmake libfreetype6-dev libjpeg-dev libpng-dev libxslt1-dev libxml2-dev libxrender-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev prelink libasound2-dev libgphoto2-dev libmpg123-dev libtiff-dev libpulse-dev liblcms2-dev libcapi20-dev libldap-dev libopenal-dev libv4l-dev libsane-dev libcups2-dev libgsm1-dev libosmesa6-dev libgnutls28-dev libpcap0.8-dev oss4-dev libgstreamer-plugins-base1.0-dev libarrayfire-opencl-dev

以上全部安裝,編譯過程就不會缺以下函式庫的訊息!
......
configure: OpenCL 64-bit development files not found, OpenCL won't be supported.
configure: libhal 64-bit development files not found, no legacy dynamic device support.
configure: lib(n)curses 64-bit development files not found, curses won't be supported.
configure: gstreamer-1.0 base plugins 64-bit development files not found, gstreamer support disabled
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
......

(3)
wine 2.0:
$ wget http://dl.winehq.org/wine/source/2.0/wine-2.0.tar.bz2
$ tar -xvf wine-2.0.tar.bz2
$ sudo mv wine-2.0 /opt
$ cd /opt/wine-2.0
$ sudo ./configure
$ sudo ./configure --enable-win64 [For 64-bit platform]
$ sudo make && sudo make install

wine 2.5:
$ wget http://dl.winehq.org/wine/source/2.x/wine-2.5.tar.xz
$ xz -d wine-2.5.tar.xz
$ tar -xvf wine-2.5.tar
$ sudo mv wine-2.5 /opt
$ cd /opt/wine-2.5
$ sudo ./configure
$ sudo ./configure --enable-win64 [For 64-bit platform]
$ sudo make && sudo make install

現在可以編譯了。運行 make ,等待吧。一個小時候編譯完成。然後執行 make install
或者可以以非root用戶的身份進入tools目錄,執行:
./wineinstall
它會自動編譯並安裝程序,中間會提示輸入管理員密碼。
安裝到了/usr/local/bin目錄下
執行命令檢查版本:
wine64 --version
wine-2.0
然後創建一個 wine 鏈接,否則很多程序不能用, 比如 winecfg。

sudo ln -s /usr/local/bin/wine64 /usr/local/bin/wine

步驟3:
--------------------------------------------------------------------------------------------
Starting Wine 2.0
============================================================================================
要啟動 Wine 程序,您必須提供 .exe 程序的完整路徑。 例如,通過 wine 啟動 notepad.exe 程序。

$ wine notepad.exe

步驟4:
--------------------------------------------------------------------------------------------
安裝 winetricks 套件
============================================================================================
$ sudo apt-get install winehq-devel
$ sudo apt-get install winetricks





附件:



png  winetricks_001.png (13.43 KB)
11219_58e6d0883531b.png 537X242 px

png  winetricks_002.png (13.61 KB)
11219_58e6d091d69d6.png 607X208 px

png  Wine 設定_001.png (23.92 KB)
11219_58e6d09e012e3.png 410X439 px

png  Wine 記事本_002.png (48.26 KB)
11219_58e6d0ad39ac6.png 721X547 px

4/7 7:35:19
應用擴展 工具箱
回覆: Ubuntu 16.10 安裝編譯 wine 2.x 的方法!
管理員
註冊日期:
2012/1/14 18:41
所屬群組:
討論區管理群
等級: 20
HP : 0 / 480
MP : 159 / 8221
EXP: 21
離線
由於ubuntu的multiarch他沒有完成,你如果要再64位元上面編譯32位元的wine,要自己去用chroot或lxc等等的跳到32位元的ubuntu去編譯

個人建議可以使用docker

編譯可以使用apt-get build-dep wine 可以幫助你解決部份的相依性問題

4/14 22:20:38
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.