1

我将 PlayOnlinux 用于一些旧的 Win 游戏。我通常在新的 X 窗口中启动非常旧的。

#!/bin/bash

xinit  '/home/deckoff/.PlayOnLinux/shortcuts/heroes.sh' -- :1 -ac -depth 16

这是实际 sh 文件的内容,主要由 PlayOnLinux 创建

#!/bin/bash

xrandr -s 800x600

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/deckoff/.PlayOnLinux//wineprefix/HOMM3"
export WINEDEBUG="-all"
cd "/home/deckoff/.PlayOnLinux//wineprefix/HOMM3/drive_c/./Program Files/GOG.com/Heroes of Might and Magic 3 Complete"
POL_Wine "Heroes3.exe"  "$@"

有没有办法将两个脚本合二为一,我试过分叉,但有点失败

4

1 回答 1

1

你可以试试这个:

#!/bin/bash
xinit -- :1 -ac -depth 16 <<EOF

xrandr -s 800x600

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/deckoff/.PlayOnLinux//wineprefix/HOMM3"
export WINEDEBUG="-all"
cd "/home/deckoff/.PlayOnLinux//wineprefix/HOMM3/drive_c/./Program Files/GOG.com/Heroes of Might and Magic 3 Complete"
POL_Wine "Heroes3.exe"  "$@"
EOF

如果这不起作用,请尝试将xinit行更改为其中任何一个以查看它们是否有效:

xinit - -- :1 -ac -depth 16 <<EOF

或者

xinit /dev/stdin -- :1 -ac -depth 16 <<EOF
于 2012-05-26T00:55:00.753 回答