Add portwine_run_scripts directory

This commit is contained in:
Castro-Fidel 2019-11-25 20:37:19 +03:00
commit 675269aa3d
27 changed files with 23073 additions and 0 deletions

64
portwine_run_scripts/debug Executable file

@ -0,0 +1,64 @@
#!/bin/bash
# Author: Tergoev M.A.
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "PortWINE version:" >> "${PORT_WINE_PATH}/${portname}.log"
read install_ver < "${config_path}/${portname}_ver"
echo ${install_ver} >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Date and time of start debug for ${portname}" >> "${PORT_WINE_PATH}/${portname}.log"
date >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "The installation path of the ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$link" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Operating system" >> "${PORT_WINE_PATH}/${portname}.log"
lsb_release -d | sed s/Description/ОС/g >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Desktop Environment" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$DESKTOP_SESSION" >> "${PORT_WINE_PATH}/${portname}.log"
echo "${XDG_CURRENT_DESKTOP}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Kernel" >> "${PORT_WINE_PATH}/${portname}.log"
uname -r >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "CPU" >> "${PORT_WINE_PATH}/${portname}.log"
cat /proc/cpuinfo | grep "model name" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "RAM" >> "${PORT_WINE_PATH}/${portname}.log"
free -m >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Graphic cards" >> "${PORT_WINE_PATH}/${portname}.log"
lspci | grep VGA >> "${PORT_WINE_PATH}/${portname}.log"
if [ -x "`which glxinfo 2>/dev/null`" ]
then
glxinfo | grep OpenGL >> "${PORT_WINE_PATH}/${portname}.log"
else
echo "!!!glxinfo not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
"$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE" >> "${PORT_WINE_PATH}/${portname}.log"
export WINEDEBUG="fixme-all,+vulkan,-trace"
export VK_LOADER_DEBUG=-all
export DXVK_LOG_LEVEL=debug
"${optirun_on}" "${WINELOADER}" "${gamestart}" "${launch_parameters}" 2>> "${PORT_WINE_PATH}/${portname}.log"
sleep 5
while [ $(pgrep wineserver)>'0' ]
do
sleep 3
done
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
echo "$deb_text" | zenity --text-info --editable \
--width=800 --height=600 \
--title="${portname}.log"
#xdg-open "${PORT_WINE_PATH}/${portname}.log"

@ -0,0 +1,178 @@
#!/bin/bash
# figure out where we are
basedir=`dirname "$(readlink -f $0)"`
# figure out which action to perform
action="$1"
case "$action" in
install)
;;
uninstall)
;;
*)
echo "Unrecognized action: $action"
echo "Usage: $0 [install|uninstall] [--without-dxgi] [--symlink]"
exit 1
esac
# process arguments
shift
with_dxgi=1
file_cmd="cp"
while [ $# -gt 0 ]; do
case "$1" in
"--without-dxgi")
with_dxgi=0
;;
"--symlink")
file_cmd="ln -s"
;;
esac
shift
done
# check wine prefix before invoking wine, so that we
# don't accidentally create one if the user screws up
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
exit 1
fi
# find wine executable
export WINEDEBUG=-all
if [ -z "$wine" ]; then
wine="wine"
fi
wine64="${wine}64"
wineboot="${wine}boot"
# resolve 32-bit and 64-bit system32 path
winever=`$wine --version | grep wine`
if [ -z "$winever" ]; then
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
exit 1
fi
# ensure wine placeholder dlls are recreated
# if they are missing
$wineboot -u
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
echo 'Failed to resolve C:\windows\system32.' >&2
exit 1
fi
# create native dll override
overrideDll() {
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "Failed to add override for $1"
exit 1
fi
}
# remove dll override
restoreDll() {
$wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /f > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to remove override for $1"
fi
}
# copy or link dxvk dll, back up original file
installFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if [ -n "$1" ]; then
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
if ! [ -f "${dstfile}.old" ]; then
mv "${dstfile}" "${dstfile}.old"
else
rm "${dstfile}"
fi
$file_cmd "${srcfile}" "${dstfile}"
else
echo "${dstfile}: File not found in wine prefix" >&2
return 1
fi
fi
return 0
}
# remove dxvk dll, restore original file
uninstallFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
echo "${dstfile}: File not found. Skipping." >&2
return 1
fi
if [ -f "${dstfile}.old" ]; then
rm "${dstfile}"
mv "${dstfile}.old" "${dstfile}"
return 0
else
return 1
fi
}
install() {
installFile "$win32_sys_path" "x32" "$1"
inst32_ret="$?"
installFile "$win64_sys_path" "x64" "$1"
inst64_ret="$?"
if [ "$inst32_ret" -eq 0 ] || [ "$inst64_ret" -eq 0 ]; then
overrideDll "$1"
fi
}
uninstall() {
uninstallFile "$win32_sys_path" "x32" "$1"
uninst32_ret="$?"
uninstallFile "$win64_sys_path" "x64" "$1"
uninst64_ret="$?"
if [ "$uninst32_ret" -eq 0 ] || [ "$uninst64_ret" -eq 0 ]; then
restoreDll "$1"
fi
}
# skip dxgi during install if not explicitly
# enabled, but always try to uninstall it
if [ $with_dxgi -ne 0 ] || [ "$action" == "uninstall" ]; then
$action dxgi
fi
$action d3d10
$action d3d10_1
$action d3d10core
$action d3d11

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

98
portwine_run_scripts/lang Executable file

@ -0,0 +1,98 @@
#!/bin/bash
# Author: Tergoev M.A.
read "update_loc" < "${config_path}/${portname}_loc"
export update_loc=${update_loc}
if [ "${update_loc}" = "RUS" ]
then
export inst_set="Выбор"
export inst_set_top="Установка PortWINE"
export inst_set_vid1="Какая у вас видеокарта?"
export inst_set_vid2="Видеокарта"
export inst_set_vid3="Объем памяти вашей видеокарты?"
export inst_set_vid4="Видео память (Мб)"
export inst_succ="Установка завершена успешно!"
export port_upd1="Обновление PortWINE"
export port_upd2="На сайте portwine-linux.ru вышло обновление для ${portname}\n"
export port_upd3="Действие:"
export port_upd4="Перейти на сайт"
export port_upd5="Напомнить позже"
export port_upd6="Больше не напоминать"
export port_del1="Удаление $portname"
export port_del2="Вы действительно хотите удалить $portname,\nс установленным в него клиентом?\n"
export port_del3="Удалить?!"
export port_del4="Нет, не удалять!"
export port_del5="Да, удалить!"
export port_del6="был удален."
export port_deb1="PortWINE был запущен в режиме создания ${portname}.log и он успешно сохранен в корне каталога порта"
export port_deb2="Для диагностики проблем, скопируйте ВЕСЬ лог в комментарии к игре на сайте portwine-linux.ru"
export port_start1="Запуск PortWINE"
export port_start2="В каком режиме вы хотите запустить PortWINE?"
export port_start3="Режим:"
export port_start4="Обычный"
export port_start5="Отдельной X-сессии"
export port_start6="Создать ЛОГ-файл"
export port_start7="Запустить winetricks"
export port_start8="DXVK"
export port_time1="Информация"
export port_time2="Ты думаешь что помочь автору развивать проект это сложно? Нет!\nДостаточно, что бы именно ты пожертвовал сколько считаешь нужным,\nну или хотя бы 50 рублей."
export port_time3="Действие:"
export port_time4="Перейти на сайт и помочь развитию проекта"
export port_time5="Мне жалко потратить даже 50 рублей на проект"
export port_time6="Я молодец и уже сделал вклад в будущее проекта"
elif [ "${update_loc}" = "ENG" ]
then
export inst_set="Sett..."
export inst_set_top="PortWINE setting"
export inst_set_vid1="Select your video card."
export inst_set_vid2="Video card:"
export inst_set_vid3="Memory size your video card?"
export inst_set_vid4="VRAM:"
export inst_succ="The installation was successful."
export port_upd1="New update PortWINE"
export port_upd2="On portwine-linux.ru site published an update to the ${portname}\n"
export port_upd3="Action:"
export port_upd4="Go to the website"
export port_upd5="Remind me later"
export port_upd6="Do not remind me"
export port_del1="Remove $portname"
export port_del2="Are you sure you want to delete the ${portname}?\n"
export port_del3="Remove?!"
export port_del4="No!"
export port_del5="Yes!"
export port_del6="was deleted."
export port_deb1="PortWINE was launched in creation mode ${portname}.log and it is successfully stored in the root directory of the port"
export port_deb2="To diagnose the problem, copy ALL of the log in comments to the game on the site portwine-linux.ru"
export port_start1="Starting the PortWINE"
export port_start2="In what mode you want to start the PortWINE?"
export port_start3="Mode:"
export port_start4="Normal"
export port_start5="Individual X-Session"
export port_start6="Create LOG-file"
export port_start7="Run winetricks"
export port_start8="DXVK"
export port_time1="Information"
export port_time2="Do you think that it is difficult to help the author develop the project? No! It is enough that you would sacrifice what you think is necessary, well, or at least 1$."
export port_time3="Action:"
export port_time4="Go to the site and help develop the project"
export port_time5="I do not want to help the project"
export port_time6="I'm well done and have already contributed to the future of the project"
fi

@ -0,0 +1,87 @@
#!/bin/bash
# Author: Tergoev M.A.
if [ ! -f "${config_path}/${portname}_ver" ]
then
echo "10" > "${config_path}/${portname}_ver"
fi
if [ ! -f "${config_path}/update_notifier" ]
then
echo "1" > "${config_path}/update_notifier"
fi
read "update_not" < "${config_path}/update_notifier"
if [ "${update_not}" -eq "1" ]
then
wget -T 2 --output-document="${config_path}/${portname}_cur_ver" "http://portwine-linux.ru/current_version/${portname}_ver"
sleep 1
if [ -f "${config_path}/${portname}_ver" ]
then
read current_ver < "${config_path}/${portname}_cur_ver"
read install_ver < "${config_path}/${portname}_ver"
rm -f "${config_path}/${portname}_cur_ver"
if [ "${current_ver}" -gt "${install_ver}" ]
then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=220 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \
FALSE "${port_upd5}" \
FALSE "${port_upd6}" `
case $xsd in
"${port_upd4}")
$WINESERVER -k
xdg-open $porturl
exit 0 ;;
"${port_upd5}")
echo " " ;;
"${port_upd6}")
echo "0" > "${config_path}/update_notifier" ;;
esac
fi
fi
fi
########################################################################
if [ ! -f "${HOME}/.config/.PortTime" ]
then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ]
then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=240 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? -eq 1 ]
then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
if [ "${update_loc}" = "ENG" ]
then
urlg="https://www.patreon.com/portwinelinux"
fi
if [ ! -z "$(command -v sensible-browser)" ]; then
sensible-browser "$urlg" &
elif [ ! -z "$(command -v xdg-open)" ]; then
xdg-open "$urlg" &
elif [ ! -z "$(command -v gnome-open)" ]; then
gnome-open "$urlg" &
elif [ ! -z "$(command -v python)" ]; then
python -m webbrowser "$urlg"
fi &
echo "90" > "${HOME}/.config/.PortTime"
sleep 5 ;;
"${port_time5}")
echo "30" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "60" > "${HOME}/.config/.PortTime" ;;
esac
fi
fi

20
portwine_run_scripts/remove Executable file

@ -0,0 +1,20 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
xsd=`zenity --title "${port_del1}" --text "${port_del2}" \
--list --radiolist --column="${inst_set}" --column "${port_del3}" \
TRUE "${port_del4}" \
FALSE "${port_del5}" `
if [ $? -eq 1 ];then exit 1; fi
case $xsd in
"${port_del4}")
exit 0 ;;
"${port_del5}")
rm -fR "/home/${USER}/.local/share/applications/${gamename}.desktop"
rm -fR "${PORT_WINE_PATH}"
rm -fR "/home/${USER}/.config/${portname}"
ADD_IN_POST_UNINSTALL
zenity --info --title "PortWINE ${port_del6}!" --text "$portname ${port_del6}!" --no-wrap ;;
esac
exit 0

219
portwine_run_scripts/runlib Normal file

@ -0,0 +1,219 @@
#!/bin/bash
# Author: Tergoev M.A.
[ $(id -u) -eq 0 ] && echo "Do not run the script from the superuser!" && zenity --error --text "Do not run the script from the superuser!" && exit 1
for PROGS in "xterm" "wget" "curl"
do
if [ ! -x "`which "${PROGS}" 2>/dev/null`" ]
then
zenity --info --text "You need to install: ${PROGS}"
fi
done
cd "$(dirname "`readlink -f "$0"`")"
export link="$(pwd)"
cd "${link}/../../"
export PORT_WINE_PATH="$(pwd)"
cd "${link}"
. "${link}"/vars
export config_path="${PORT_WINE_PATH}/data/tmp"
if [ ! -d "${config_path}" ]
then
mkdir -p "${config_path}"
fi
if [ ! -e "${config_path}/${portname}_loc" ]
then
SET_LANG=`zenity --title "Install $portname" --text "Select the language\nВыберите язык" --list --radiolist \
--column="Set (Выбор)" --column "Language (Язык):" \
TRUE "RUS" \
FALSE "ENG" `
echo "${SET_LANG}" > "${config_path}/${portname}_loc"
fi
if [ ! -e "${config_path}/${portname}_ver" ]
then
echo "10" > "${config_path}/${portname}_ver"
fi
if [ "${update_loc}" = "RUS" ]
then
LC_COLLATE_old="${LC_COLLATE}"
LC_CTYPE_old="${LC_CTYPE}"
LC_ALL_old="${LC_ALL}"
export LC_COLLATE=ru_RU.UTF-8
export LC_CTYPE=ru_RU.UTF-8
export LC_ALL=ru_RU.UTF-8
fi
export LD_LIBRARY_PATH_OLD="${LD_LIBRARY_PATH}"
export LD_PRELOAD_OLD="${LD_PRELOAD}"
export PATH_OLD="$PATH"
. "${link}"/lang
########################################################################
if [ ! -d "${PORT_WINE_PATH}/data/wine/lib64" ]
then
export WINEARCH=win32
export WINELOADER="${PORT_WINE_PATH}/data/wine/bin/wine"
export WINEDLLPATH="${PORT_WINE_PATH}"/data/wine/lib/wine
export LD_LIBRARY_PATH="${PORT_WINE_PATH}"/data/wine/lib
else
export WINEARCH=win64
export WINELOADER="${PORT_WINE_PATH}/data/wine/bin/wine64"
export WINEDLLPATH="${PORT_WINE_PATH}"/data/wine/lib64/wine
export LD_LIBRARY_PATH="${PORT_WINE_PATH}"/data/wine/lib:"${PORT_WINE_PATH}"/data/wine/lib64
fi
if [ -d "${PORT_WINE_PATH}/data/wine/include" ]
then
export C_INCLUDE_PATH="${PORT_WINE_PATH}/data/wine/include"
fi
if [ ! -e "${PORT_WINE_PATH}/data/wine/share/wine/smb.conf" ]
then
export us_dir="$USER"
export STAGING_WRITECOPY=1
export STAGING_SHARED_MEMORY=1
else
export us_dir="crossover"
fi
export WINESERVER="${PORT_WINE_PATH}/data/wine/bin/wineserver"
export WINECFG="${PORT_WINE_PATH}/data/wine/bin/winecfg"
export WINEREG="${PORT_WINE_PATH}/data/wine/bin/regedit"
export WINEOPEN="${PORT_WINE_PATH}/data/wine/bin/winefile"
export WINEBOOT="${PORT_WINE_PATH}/data/wine/bin/wineboot"
export WINECMD="${PORT_WINE_PATH}/data/wine/bin/wineconsole"
export WINEPREFIX="${PORT_WINE_PATH}/data/prefix"
export PATH="${PORT_WINE_PATH}/data/wine/bin":${PATH}
export WINESTART="C:\\windows\\command\\start.exe"
export urlg="http://portwine-linux.ru/donate"
#export CORES="$(getconf _NPROCESSORS_ONLN)"
########################################################################
START_PORTWINE ()
{
chown -R "$USER" "$WINEPREFIX/drive_c"
gpu="0"
export DRI_PRIME=1
export optirun_on=env
if [ -x "`which primusrun 2>/dev/null`" ]
then
export optirun_on="primusrun"
gpu="1"
elif [ -x "`which optirun 2>/dev/null`" ]
then
export optirun_on="optirun -b primus"
gpu="1"
fi
if [ -x "`which nvidia-settings 2>/dev/null`" ]
then
nvidia-settings -a [gpu:"${gpu}"]/GPUPowerMizerMode=1 > /dev/null
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
fi
export int_xneur=0
if [ $(pgrep xneur)>'0' ]
then
killall xneur
export int_xneur=1
fi
sh "${link}"/port_update
#rm -f "$WINEPREFIX/dosdevices/z:"
for x in "$WINEPREFIX/drive_c/users/${us_dir}/"*
do
if test -h "$x" && test -d "$x"
then
rm -f "$x"
mkdir -p "$x"
fi
done
for x in "$WINEPREFIX/drive_c/users/${us_dir}/Desktop/"*
do
if test -h "$x" && test -d "$x"
then
rm -f "$x"
mkdir -p "$x"
fi
done
#"$WINE" regedit /d 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{9D20AAE8-0625-44B0-9CA7-71889C2254D9}'
echo disable > "$WINEPREFIX/.update-timestamp"
ADD_IN_START_PORTWINE
}
########################################################################
OPENGL_SET ()
{
if [ -e "${config_path}/dxvk" ]
then
bash "${link}/dxvk/setup_dxvk.sh" "uninstall"
rm -f "${config_path}/dxvk"
else
echo "DXVK is disabled"
fi
}
########################################################################
VULKAN_SET ()
{
if [ -e "${config_path}/dxvk" ]
then
echo "DXVK is enabled"
else
bash "${link}/dxvk/setup_dxvk.sh" "install"
echo "DXVK is enabled" > "${config_path}/dxvk"
fi
}
########################################################################
STOP_PORTWINE ()
{
echo " "
sleep 5
while [ $(pgrep wineserver)>'0' ]
do
sleep 5
done
if [ "$int_xneur" -eq "1" ]
then
xneur &
fi
if [ "${update_loc}" = "RUS" ]
then
export LC_COLLATE="${LC_COLLATE_old}"
export LC_CTYPE="${LC_CTYPE_old}"
export LC_ALL="${LC_ALL_old}"
fi
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH_OLD}"
export LD_PRELOAD="${LD_PRELOAD_OLD}"
export PATH="$PATH_OLD"
if [ -x "`which nvidia-settings 2>/dev/null`" ]
then
nvidia-settings -a [gpu:"${gpu}"]/GPUPowerMizerMode=0 > /dev/null
fi
ADD_IN_STOP_PORTWINE
rm -f "${PORT_WINE_PATH}"/0
rm -f "${link}"/0
exit 0
}

92
portwine_run_scripts/setup Executable file

@ -0,0 +1,92 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
rm -fR "${PORT_WINE_PATH}/Games"
rm -fR "${PORT_WINE_PATH}/Program Files"
#rm -fR "${PORT_WINE_PATH}/data/prefix/drive_c/users/${us}"
#rm -fR "${PORT_WINE_PATH}/data/prefix/drive_c/users/${us_dir}"
rm -fR "${PORT_WINE_PATH}/data/prefix/dosdevices"
rm -f "${PORT_WINE_PATH}/data/prefix/"*".reg"
rm -f "${PORT_WINE_PATH}/data/prefix/.update-timestamp"
rm -f "${PORT_WINE_PATH}/"*".log"
rm -f "${config_path}/update_notifier"
if [ ! -d "/home/${USER}/.local/share/applications" ]
then
mkdir -p "/home/${USER}/.local/share/applications"
fi
name_desktop="${gamename}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec="${PORT_WINE_PATH}/data/scripts/start"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Path="${PORT_WINE_PATH}/data/scripts/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORT_WINE_PATH}/data/img/w.png"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/
name_desktop="readme"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Version=1.0" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Link" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORT_WINE_PATH}/data/img/readme.png"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "URL=${urlg}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
rm -fR "${PORT_WINE_PATH}/Settings"
mkdir -p "${PORT_WINE_PATH}/Settings"
for name_desktop in "winecfg" "winereg" "winefile" "wineboot" "stop" "winecmd"
do
echo ""[Desktop Entry]"
"Name=${name_desktop}"
"Exec="${PORT_WINE_PATH}/data/scripts/${name_desktop}""
"Type=Application"
"Categories=Game"
"StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop"
done
for name_desktop in "remove"
do
echo ""[Desktop Entry]"
"Name=${name_desktop}"
"Exec="${PORT_WINE_PATH}/data/scripts/${name_desktop}""
"Type=Application"
"Categories=Game"
"StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
done
echo ""[Desktop Entry]"
"Name=winetricks"
"Exec="${PORT_WINE_PATH}/data/scripts/winetricks-q-force""
"Type=Application"
"Categories=Game"
"StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/winetricks.desktop"
chmod u+x "${PORT_WINE_PATH}/Settings/winetricks.desktop"
cp -f "${PORT_WINE_PATH}/data/prefix/reg.xuser/"* "${PORT_WINE_PATH}/data/prefix/"
sed -i "s/crossover/$us_dir/g" "${PORT_WINE_PATH}/data/prefix/"*.reg
sed -i "s/xuser/${USER}/g" "${PORT_WINE_PATH}/data/prefix/"*.reg
cp -fR "${PORT_WINE_PATH}/data/prefix/drive_c/users/Public/" "${PORT_WINE_PATH}/data/prefix/drive_c/users/$us_dir/"
#ln -sf "/bin/ping" "${PORT_WINE_PATH}/data/prefix/drive_c/ping.exe"
ln -sf "${PORT_WINE_PATH}/data/prefix/drive_c/" "${PORT_WINE_PATH}/drive_c"
ADD_IN_POST_INSTALL
exit 0

42
portwine_run_scripts/start Executable file

@ -0,0 +1,42 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
xsd=`zenity --title "${port_start1}" --text "${port_start2}" --list --radiolist --height=260 \
--column="${inst_set}" --column "${port_start3}" \
FALSE "${port_start4}" \
TRUE "${port_start8}" \
FALSE "${port_start6} (${port_start4})" \
FALSE "${port_start6} (DXVK)" `
if [ $? -eq 1 ];then exit 1; fi
case $xsd in
"${port_start4}")
START_PORTWINE
WINE_DX_TO_OPENGL
OPENGL_SET
"${optirun_on}" "${WINELOADER}" "${gamestart}" "${launch_parameters}" ;;
"${port_start6} (${port_start4})")
START_PORTWINE
WINE_DX_TO_OPENGL
OPENGL_SET
. "${link}/debug" ;;
"${port_start6} (DXVK)")
START_PORTWINE
WINE_DX_TO_VULKAN
VULKAN_SET
. "${link}/debug" ;;
"${port_start8}")
START_PORTWINE
WINE_DX_TO_VULKAN
VULKAN_SET
"${optirun_on}" "${WINELOADER}" "${gamestart}" "${launch_parameters}" ;;
esac
STOP_PORTWINE

7
portwine_run_scripts/stop Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
"${WINESERVER}" -k
kill $(prgep wineserver)
STOP_PORTWINE

64
portwine_run_scripts/vars Executable file

@ -0,0 +1,64 @@
#!/bin/bash
# Author: Tergoev M.A.
########################################################################
export gamedir=""
export gamename=""
export portname=""
export porturl=""
export gamestart="c:\\Games\\${gamedir}\\.exe"
export PATH_TO_GAME="${PORT_WINE_PATH}/data/prefix/drive_c/!!!/${gamedir}/"
########################################################################
WINE_DX_TO_OPENGL ()
{
export launch_parameters=""
export WINEDLLOVERRIDES="winemenubuilder.exe=d"
}
WINE_DX_TO_VULKAN ()
{
export launch_parameters=""
export WINEDLLOVERRIDES="winemenubuilder.exe=d"
export DXVK_HUD=fps
export VK_LOADER_DEBUG=""
export DXVK_LOG_LEVEL=""
}
###.NVIDIA.###
#export LD_PRELOAD="libpthread.so.0 libGL.so.1"
#export __GL_THREADED_OPTIMIZATIONS=1
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_PATH="${PATH_TO_GAME}"
export __GL_SYNC_TO_VBLANK=0
###.MESA.###
export mesa_glthread="true"
export vblank_mode=0
###.ESYNC and FSYNC.###
export WINEESYNC=0
export WINEFSYNC=1
###.PBA.###
export PBA_DISABLE=1
export __PBA_CB_HEAP=128
export __PBA_GEO_HEAP=512
###.OTHER.###
export WINEDEBUG="-all"
export Xserv=2
#export PULSE_LATENCY_MSEC=60
########################################################################
ADD_IN_START_PORTWINE ()
{
cd "${PATH_TO_GAME}"
}
########################################################################
ADD_IN_STOP_PORTWINE ()
{
echo " "
}
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap `
}
###################################################################
ADD_IN_POST_UNINSTALL ()
{
echo " "
}

13
portwine_run_scripts/wineboot Executable file

@ -0,0 +1,13 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname "`readlink -f "$0"`")"/runlib
rm -f ${link}/winetricks
"/usr/bin/xterm" -e wget -T 3 --output-document="${link}/winetricks" https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x "${link}/winetricks"
sed -i '2a . $(dirname $(readlink -f "$0"))/runlib\nSTART_PORTWINE\nexport WINELOADER="${PORT_WINE_PATH}/data/wine/bin/wine" ' "${link}/winetricks"
sleep 1
export WINEDEBUG=""
"/usr/bin/xterm" -e "${WINEBOOT}" -u
rm -f "${config_path}/dxvk"
STOP_PORTWINE

7
portwine_run_scripts/winecfg Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# Author: Tergoev M.A.
runlib_path="$(dirname $(readlink -f "$0"))"/runlib
. "$runlib_path"
START_PORTWINE
"$WINECFG"
STOP_PORTWINE

7
portwine_run_scripts/winecmd Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
START_PORTWINE
"$WINECMD"
STOP_PORTWINE

7
portwine_run_scripts/winefile Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
START_PORTWINE
"/usr/bin/xterm" -e "$WINEOPEN && sleep 10"
STOP_PORTWINE

7
portwine_run_scripts/winereg Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname $(readlink -f "$0"))/runlib"
START_PORTWINE
"$WINEREG"
STOP_PORTWINE

22149
portwine_run_scripts/winetricks Executable file

File diff suppressed because it is too large Load Diff

@ -0,0 +1,12 @@
#!/bin/bash
# Author: Tergoev M.A.
. "$(dirname "`readlink -f "$0"`")"/runlib
rm -f ${link}/winetricks
"/usr/bin/xterm" -e wget -T 3 --output-document="${link}/winetricks" https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x "${link}/winetricks"
sed -i '2a . $(dirname $(readlink -f "$0"))/runlib\nSTART_PORTWINE\nexport WINELOADER="${PORT_WINE_PATH}/data/wine/bin/wine" ' "${link}/winetricks"
sleep 1
export WINEDEBUG=""
"/usr/bin/xterm" -e "sh ${link}/winetricks -q --force"
STOP_PORTWINE