-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnet.azurewebsites.pathos.pathos.sh
More file actions
42 lines (39 loc) · 1.04 KB
/
net.azurewebsites.pathos.pathos.sh
File metadata and controls
42 lines (39 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env -S bash
FLATPAK_ID='net.azurewebsites.pathos.pathos'
INSTALL_DIR="$(dirname $(realpath "${0}"))"
FIFO_FILE=/tmp/setup.fifo
test -e "${FIFO_FILE}" && rm "${FIFO_FILE}"
mkfifo "${FIFO_FILE}"
source "${INSTALL_DIR}/${FLATPAK_ID}.common.sh"
if [ $? -ne 0 ] ; then
echo "Failed to load ${FLATPAK_ID}.common.sh"
exit 2
fi
############
### MAIN ###
############
echo "Paramters: ${@}"
if [ "${1}" == 'shell' ] ; then
/bin/bash
exit $?
fi
if [ ! -d "${WINEPREFIX}" ] || [ "${1}" == 'wine-reinstall' ] ; then
test -d "${WINEPREFIX}" && rm -Rf "${WINEPREFIX}"
setup_wine
if [ $? -eq 0 ] ; then
echo "wine_setup successfull"
else
echo "wine_setup failed" 1>&2
exit 2
fi
fi
if [ ! -e "${PATHOS_WINE_EXE}" ] ; then
install_pathos
if [[ $? != 0 ]] ; then
echo "Pathos Installation failed, abort."
exit 1
fi
fi
WINEDLLOVERRIDES_RUN_DEFAULT='*d3d9,*d3d10,*d3d10_1,*d3d10core,*d3d11,*dxgi=b'
WINEDLLOVERRIDES="${WINEDLLOVERRIDES_RUN:-$WINEDLLOVERRIDES_RUN_DEFAULT}" wine "${PATHOS_WIN_EXE}" 'windowed-mode'
exit $?