Commit 3fe80df3 authored by Mikhail Tergoev's avatar Mikhail Tergoev

major changes for create_shortcut scripts

parent bed2eba9
......@@ -154,6 +154,13 @@ class CompatData:
def upgrade_pfx(self, old_ver):
if old_ver == CURRENT_PREFIX_VERSION:
return
#replace broken .NET installations with wine-mono support
if os.path.exists(self.prefix_dir + "/drive_c/windows/Microsoft.NET/NETFXRepair.exe") and \
file_is_wine_fake_dll(self.prefix_dir + "/drive_c/windows/system32/mscoree.dll"):
log("Broken .NET installation detected, switching to wine-mono.")
#deleting this directory allows wine-mono to work
shutil.rmtree(self.prefix_dir + "/drive_c/windows/Microsoft.NET")
def copy_pfx(self):
with open(self.tracked_files_file, "w") as tracked_files:
......@@ -348,6 +355,8 @@ class Session:
self.check_environment("PW_OLD_GL_STRING", "oldglstr")
self.check_environment("PW_USE_SECCOMP", "seccomp")
self.check_environment("PW_NO_VR", "novrclient")
self.check_environment("PW_NO_WINEMFPLAY", "nomfplay")
self.check_environment("PW_NO_WRITE_WATCH", "nowritewatch")
if not "noesync" in self.compat_config:
self.env["WINEESYNC"] = "1"
......@@ -387,6 +396,12 @@ class Session:
self.dlloverrides["vrclient_x64"] = ""
self.dlloverrides["openvr_api_dxvk"] = ""
if "nomfplay" in self.compat_config:
self.dlloverrides["mfplay"] = "n"
if "nowritewatch" in self.compat_config:
self.env["WINE_DISABLE_WRITE_WATCH"] = "1"
s = ""
for dll in self.dlloverrides:
setting = self.dlloverrides[dll]
......
......@@ -2,31 +2,30 @@
# Author: PortWINE-Linux.ru
. "$(dirname $(readlink -f "$0"))/runlib"
########################################################################
PORTPROTON_NAME=$(zenity --entry --text "Введите название ярлыка:")
PORTPROTON_NAME=$(zenity --entry --text "${sc_name}")
if [ $? -eq 1 ];then exit 1; fi
PORTPROTON_EXE=$(zenity --file-selection --file-filter=""*.exe" "*.bat"" --title="Создаем ярлык. Выберите файл запуска..." --filename="${PORT_WINE_PATH}/data/pfx/drive_c/")
PORTPROTON_EXE=$(zenity --file-selection --file-filter=""*.exe" "*.bat"" \
--title="${sc_path}" --filename="${PORT_WINE_PATH}/data/pfx/drive_c/")
if [ $? -eq 1 ];then exit 1; fi
PORTPROTON_IMG=$(zenity --file-selection --file-filter=*.png --title="Создаем ярлык. Выберите иконку PNG формата..." --filename="${HOME}/")
PORTPROTON_PATH="$(dirname "$(readlink -f "${PORTPROTON_EXE}")")"
if [ -x "`which wrestool 2>/dev/null`" ]; then
wrestool -x --output="${PORT_WINE_PATH}/data/img/" -t14 "${PORTPROTON_EXE}"
fi
PORTPROTON_IMG=$(zenity --file-selection --file-filter=""*.png" "*.ico"" \
--title="${sc_img}" --filename="${PORT_WINE_PATH}/data/img/")
if [ $? -eq 1 ];then exit 1; fi
########################################################################
cp -f "${PORTPROTON_IMG}" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" \
> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" \
>> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec="sh \"${PORT_WINE_PATH}/data/scripts/start\" \"${PORTPROTON_EXE}\""" \
>> "${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/${PORTPROTON_NAME}.png"" \
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec="export PATH_TO_GAME=\""$PORTPROTON_PATH"\" \&\& sh \"${PORT_WINE_PATH}/data/scripts/start\" \"${PORTPROTON_EXE}\""" \
>> "${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="${PORTPROTON_IMG}"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
########################################################################
`zenity --info --title "Успешно." --text "Ярлык создан в корневом каталоге порта." --no-wrap ` > /dev/null 2>&1
......@@ -70,6 +70,10 @@ then
export hud_compiler="активность шейдерного компилятора"
export hud_samplers="текущее количество используемых пар сэмплеров (только для D3D9)"
export sc_name="Введите название будущего ярлыка:"
export sc_path="Создаем ярлык. Выберите файл запуска..."
export sc_img="Создаем ярлык. Выберите иконку ICO, или PNG формата..."
elif [ "${update_loc}" = "ENG" ]
then
......@@ -136,5 +140,9 @@ then
export hud_compiler="Shows shader compiler activity"
export hud_samplers="Shows the current number of sampler pairs used [D3D9 Only]"
export sc_name="Name shortcut:"
export sc_path="Select the .exe file..."
export sc_img="Select the .ICO or .PNG file..."
fi
......@@ -7,21 +7,21 @@ export gamename=
export gamedir=
if [ ! -z ${gamedir} ]; then
export PATH_TO_GAME="${PORT_WINE_PATH}/data/pfx/drive_c/Program Files (x86)/${gamedir}"
else
export PATH_TO_GAME="${PORT_WINE_PATH}/data/pfx/drive_c/Program Files (x86)/"
fi
export gamestart="${PATH_TO_GAME}/.exe"
export porturl="http://portwine-linux.ru/"
########################################################################
#export MESA_GL_VERSION_OVERRIDE=4.4COMPAT
export STAGING_SHARED_MEMORY=1
export PW_FORCE_LARGE_ADDRESS_AWARE=1
export PW_USE_SECCOMP=1
export WINEDLLOVERRIDES="winemenubuilder.exe=d"
export PW_LOG=0
export PW_ACO=1
export PW_NO_VR=1
export PW_FILELOCK=1
export PW_USE_SECCOMP=1
export PW_NO_WINEMFPLAY=1
export PW_NO_WRITE_WATCH=1
export PW_FORCE_LARGE_ADDRESS_AWARE=1
########################################################################
ADD_IN_START_PORTWINE ()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment