Closed probonopd closed 5 years ago
我之前为了调试preloaderhook.c,所以让preloaderhook.c输出了一些信息,但可能会影响其余程序的工作。 将preloaderhook.c中的printf函数调用都删掉,就可以工作了。
I used to debug preloaderhook.c, so let preloaderhook.c output some information, but it may affect the work of other programs. Delete the printf function call in preloaderhook.c and it will work.
preloaderhook.c : https://github.com/Hackerl/Wine_Appimage/blob/master/preloaderhook.c
me@host:~$ wget "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
me@host:~$ WINEPREFIX=$(readlink -f wineprefix) bash winetricks -q ie7 riched20 msctf vcrun2005 cjkfonts
------------------------------------------------------
wineserver not found!
------------------------------------------------------
me@host:~$ sudo touch /usr/bin/wineserver
me@host:~$ WINEPREFIX=$(readlink -f wineprefix) bash winetricks -q ie7 riched20 msctf vcrun2005 cjkfonts
------------------------------------------------------
wineserver not found!
------------------------------------------------------
me@host:~$ sudo chmod +x /usr/bin/wineserver
me@host:~$ WINEPREFIX=$(readlink -f wineprefix) bash winetricks -q ie7 riched20 msctf vcrun2005 cjkfonts
Using winetricks 20181203-next - sha256sum:
...
wget "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
sudo touch /usr/bin/wineserver
sudo chmod +x /usr/bin/wineserver
rm -rf wineprefix/
WINEPREFIX=$(readlink -f wineprefix) bash winetricks -q ie7
WINEPREFIX=$(readlink -f wineprefix) "wine" 'C:\Program Files\\Internet Explorer\\iexplore'
# Crash
是不是因为上面的sudo touch /usr/bin/wineserver
技巧?
Can it be due to the sudo touch /usr/bin/wineserver
trick above?
如果只是需要运行环境,暴露出wine程序已经足够了。如果想使用别的程序,例如wineserver,需要修改一下脚本。
If you just need to runing time, it is enough to expose the wine program. If you want to use another program, such as wineserver, you need to modify the script. AppRun:
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH="$HERE/usr/lib":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/lib":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/lib/i386-linux-gnu":$LD_LIBRARY_PATH
#Sound Library
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu/pulseaudio":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu/alsa-lib":$LD_LIBRARY_PATH
#LD
export WINELDLIBRARY="$HERE/lib/ld-linux.so.2"
while getopts "a:c:" arg
do
case $arg in
a)
Args="$OPTARG"
;;
c)
Command="$OPTARG"
echo "Run Command: $Command"
;;
?)
echo "unkonw argument"
exit 1
;;
esac
done
if [ -n "$Command" ] ; then
if [ -n "$Args" ] ; then
LD_PRELOAD="$HERE/bin/libhookexecv.so" "$WINELDLIBRARY" "$HERE/bin/$Command" "$Args" | cat
else
LD_PRELOAD="$HERE/bin/libhookexecv.so" "$WINELDLIBRARY" "$HERE/bin/$Command" | cat
fi
else
LD_PRELOAD="$HERE/bin/libhookexecv.so" "$WINELDLIBRARY" "$HERE/bin/wine" "$@" | cat
fi
/usr/bin/wineserver :
#!/bin/bash
wine -c wineserver -a "$@"
winetricks 工作正常,如果不能运行,或许是wine本身导致的。 以上只是一个示范,你可以做更加细致的修改。
The winetricks work fine, and if it doesn't work, it may be caused by wine itself. The above is just a demonstration, you can make more detailed modifications.
Ie8 runs successfully.
winetricks ie8
wine 'C:\Program Files\Internet Explorer\iexplore.exe
/usr/bin/winecmd -> AppRun:
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH="$HERE/usr/lib":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/lib":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/lib/i386-linux-gnu":$LD_LIBRARY_PATH
#Sound Library
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu/pulseaudio":$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu/alsa-lib":$LD_LIBRARY_PATH
#LD
export WINELDLIBRARY="$HERE/lib/ld-linux.so.2"
if [ -n "$*" ] ; then
LD_PRELOAD="$HERE/bin/libhookexecv.so" "$WINELDLIBRARY" "$HERE/bin/$@" | cat
fi
/usr/bin/wine:
winecmd wine "$@"
/usr/bin/wineserver:
winecmd wineserver "$@"
你能让
winetricks
去工作吗? Can you getwinetricks
to work?