winehq 4.x 編譯方法 Debian 包含分支(於 64-bit OS) [論壇 - Ubuntu 非官方發行版討論]


正在瀏覽:   1 名遊客


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



winehq 4.x 編譯方法 Debian 包含分支(於 64-bit OS)
會員二級
註冊日期:
2017/3/23 10:15
所屬群組:
已註冊使用者
等級: 7
HP : 0 / 164
MP : 25 / 1240
EXP: 59
離線
WINEHQ 4.x Build for Debian

## 編譯 wine 所需依賴
sudo apt-get install gcc-multilib linux-headers-amd64 | linux-headers-686 | linux-headers-generic
sudo apt-get install libxml-simple-perl lzma flex bison quilt gettext sharutils pkg-config dctrl-tools khronos-api unicode-data freebsd-glue icoutils librsvg2-bin imagemagick fontforge-nox
sudo apt-get install libgtk-3-dev libxi-dev libxt-dev libxmu-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxrender-dev libxkbfile-dev libxxf86vm-dev libxxf86dga-dev libxinerama-dev libgl1-mesa-dev libglu1-mesa-dev libxcomposite-dev libpng-dev libssl-dev libxml2-dev libgsm1-dev libjpeg-dev libtiff-dev libpcap-dev libpulse-dev liblcms2-dev libldap2-dev libxslt1-dev unixodbc-dev libcups2-dev libopenal-dev libdbus-1-dev freeglut3-dev libmpg123-dev libasound2-dev libosmesa6-dev libgnutls28-dev libncurses5-dev libgettextpo-dev libfreetype6-dev libfontconfig1-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev ocl-icd-opencl-dev

# lib32 build depends
sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libgstreamer1.0-dev:i386 libgstreamer-plugins-base1.0-dev:i386

## 下載4.x原始碼
wget https://dl.winehq.org/wine/source/4.x/wine-4.17.tar.xz
tar Jxvf wine-*.tar.xz

PKGNAME=wine-4.17
BUILD_DIR=$(pwd)/build
SRCDIR=$(pwd)/$PKGNAME
BUILD_WINE64=$(pwd)/build-wine64
BUILD_WINE32=$(pwd)/build-wine32
mkdir -p $BUILD_WINE64
mkdir -p $BUILD_WINE32

cd $SRCDIR

### 字型設定
sed -i '/MS Shell Dlg 2/i HKLM,%FontSubStr%,MS Shell Dlg,,WenQuanYi Micro Hei' loader/wine.inf.in
sed -i '/MS Shell Dlg 2/i HKLM,%FontSubStr%,FixedSys,,DejaVu Sans Mono' loader/wine.inf.in

sed -i '/MS Shell Dlg 2/a HKLM,%FontSubStr%,System,,DejaVu Sans Mono' loader/wine.inf.in
sed -i '/MS Shell Dlg 2/a HKLM,%FontSubStr%,Tahoma,,WenQuanYi Micro Hei' loader/wine.inf.in
sed -i '/MS Shell Dlg 2/a HKLM,%FontSubStr%,PMingLiU,,WenQuanYi Micro Hei' loader/wine.inf.in

sed -i '/Times New Roman TUR/a HKLM,%FontSubStr%,Tms Rmn,,WenQuanYi Micro Hei' loader/wine.inf.in

sed -i 's/,FixedSys,/,"FixedSys",/g' loader/wine.inf.in
sed -i 's/,MS Shell Dlg,/,"MS Shell Dlg",/g' loader/wine.inf.in
sed -i 's/,Tahoma,/,"Tahoma",/g' loader/wine.inf.in
sed -i 's/,PMingLiU,/,"PMingLiU",/g' loader/wine.inf.in
sed -i 's/,Tms Rmn,/,"Tms Rmn",/g' loader/wine.inf.in
sed -i 's/,System,,DejaVu Sans Mono/,"System",,"DejaVu Sans Mono"/g' loader/wine.inf.in

sed -i 's/,WenQuanYi Micro Hei/,"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/,DejaVu Sans Mono/,"DejaVu Sans Mono"/g' loader/wine.inf.in

sed -i 's/"Arial,186"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Arial,238"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Arial,204"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Arial,161"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Arial,162"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Courier New,186"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Courier New,238"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Courier New,204"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Courier New,161"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Courier New,162"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"MS Sans Serif"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Arial"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Tahoma"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman,186"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman,238"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman,204"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman,161"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in
sed -i 's/"Times New Roman,162"/"WenQuanYi Micro Hei"/g' loader/wine.inf.in

### 語系設定 (繁中0404)
sed -i 's/InstallLanguage",,"0409/InstallLanguage",,"0404/g' loader/wine.inf.in
sed -i 's/Default",,"0409/Default",,"0404/g' loader/wine.inf.in
sed -i 's/,,"00000409/,,"00000404/g' loader/wine.inf.in

### 平滑字型
sed -i '$a [Extra]' loader/wine.inf.in
sed -i '$a HKCU,Control Panel\Desktop,"FontSmoothing",,"2"' loader/wine.inf.in

sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure*

export CFLAGS="${CFLAGS/-fno-plt/}"
export LDFLAGS="${LDFLAGS/,-z,now/}"


## Build amd64
cd $BUILD_WINE64
$SRCDIR/configure \
--prefix=/opt/wine \
--libdir=/opt/wine/lib64 \
--with-x \
--with-gstreamer \
--enable-win64

make -j$(nproc)

make install DESTDIR=$BUILD_DIR/${PKGNAME}-amd64

## Build i386
LIB32=lib/i386-linux-gnu
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/$LIB32/pkgconfig"

cd $BUILD_WINE32
$SRCDIR/configure \
--prefix=/opt/wine \
--libdir=/opt/wine/lib \
--with-x \
--with-gstreamer \
--with-wine64=$BUILD_WINE64

make -j$(nproc)

# Install Lib32
make install DESTDIR=$BUILD_DIR/${PKGNAME}-lib32-i386
rm -r $BUILD_DIR/${PKGNAME}-lib32-i386/opt/wine/share
cd $BUILD_DIR
rm -rf $BUILD_WINE64 $BUILD_WINE32 $SRCDIR

# install
sudo ln -sf /opt/wine/lib/libwine.so.1 /usr/lib/i386-linux-gnu/libwine.so.1
sudo ln -sf /opt/wine/lib64/libwine.so.1 /usr/lib/x86_64-linux-gnu/libwine.so.1

sudo ln -sf /opt/wine/bin/function_grep.pl /usr/bin/function_grep.pl
sudo ln -sf /opt/wine/bin/msidb /usr/bin/msidb
sudo ln -sf /opt/wine/bin/msiexec /usr/bin/msiexec
sudo ln -sf /opt/wine/bin/notepad /usr/bin/notepad
sudo ln -sf /opt/wine/bin/regedit /usr/bin/regedit
sudo ln -sf /opt/wine/bin/regsvr32 /usr/bin/regsvr32
sudo ln -sf /opt/wine/bin/widl /usr/bin/widl
sudo ln -sf /opt/wine/bin/wine64 /usr/bin/wine64
sudo ln -sf /opt/wine/bin/wine64-preloader /usr/bin/wine64-preloader
sudo ln -sf /opt/wine/bin/wine /usr/bin/wine
sudo ln -sf /opt/wine/bin/wine-preloader /usr/bin/wine-preloader
sudo ln -sf /opt/wine/bin/wineboot /usr/bin/wineboot
sudo ln -sf /opt/wine/bin/winebuild /usr/bin/winebuild
sudo ln -sf /opt/wine/bin/winecfg /usr/bin/winecfg
sudo ln -sf /opt/wine/bin/wineconsole /usr/bin/wineconsole
sudo ln -sf /opt/wine/bin/winecpp /usr/bin/winecpp
sudo ln -sf /opt/wine/bin/winedbg /usr/bin/winedbg
sudo ln -sf /opt/wine/bin/winedump /usr/bin/winedump
sudo ln -sf /opt/wine/bin/winefile /usr/bin/winefile
sudo ln -sf /opt/wine/bin/wineg++ /usr/bin/wineg++
sudo ln -sf /opt/wine/bin/winegcc /usr/bin/winegcc
sudo ln -sf /opt/wine/bin/winemaker /usr/bin/winemaker
sudo ln -sf /opt/wine/bin/winemine /usr/bin/winemine
sudo ln -sf /opt/wine/bin/winepath /usr/bin/winepath
sudo ln -sf /opt/wine/bin/wineserver /usr/bin/wineserver
sudo ln -sf /opt/wine/bin/wmc /usr/bin/wmc
sudo ln -sf /opt/wine/bin/wrc /usr/bin/wrc

# remove
sudo rm /usr/lib/i386-linux-gnu/libwine.so.1
sudo rm /usr/lib/x86_64-linux-gnu/libwine.so.1

sudo rm /usr/bin/function_grep.pl
sudo rm /usr/bin/msidb
sudo rm /usr/bin/msiexec
sudo rm /usr/bin/notepad
sudo rm /usr/bin/regedit
sudo rm /usr/bin/regsvr32
sudo rm /usr/bin/widl
sudo rm /usr/bin/wine64
sudo rm /usr/bin/wine64-preloader
sudo rm /usr/bin/wine
sudo rm /usr/bin/wine-preloader
sudo rm /usr/bin/wineboot
sudo rm /usr/bin/winebuild
sudo rm /usr/bin/winecfg
sudo rm /usr/bin/wineconsole
sudo rm /usr/bin/winecpp
sudo rm /usr/bin/winedbg
sudo rm /usr/bin/winedump
sudo rm /usr/bin/winefile
sudo rm /usr/bin/wineg++
sudo rm /usr/bin/winegcc
sudo rm /usr/bin/winemaker
sudo rm /usr/bin/winemine
sudo rm /usr/bin/winepath
sudo rm /usr/bin/wineserver
sudo rm /usr/bin/wmc
sudo rm /usr/bin/wrc

10/9 8:18:06
應用擴展 工具箱


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


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