This repository was archived by the owner on Mar 26, 2026. It is now read-only.
forked from ValveSoftware/Proton
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmake-async.sh
More file actions
executable file
·47 lines (33 loc) · 1.74 KB
/
make-async.sh
File metadata and controls
executable file
·47 lines (33 loc) · 1.74 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
43
44
45
46
47
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root with sudo."
exit
fi
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
read -p "Please enter the Proton directory: " protondir
if [ ! -d "$protondir" ]; then
echo "Error: Proton directory not found!"
exit 1
fi
read -p "Please enter the version number (e.g., 10-4): " version_number
if [ -z "$version_number" ]; then
echo "Error: Version number cannot be empty!"
exit 1
fi
FULL_VERSION="Proton-Sarek$version_number-async"
echo "Using version: $FULL_VERSION"
echo "Copying dxvk-async 32-bit files..."
cp -r "$SCRIPT_DIR/patches/dxvk-async/x32/"* "$protondir/files/lib/wine/dxvk/i386-windows/" || { echo "Failed to copy 32-bit dxvk files."; exit 1; }
echo "Copying dxvk-async 64-bit files..."
cp -r "$SCRIPT_DIR/patches/dxvk-async/x64/"* "$protondir/files/lib/wine/dxvk/x86_64-windows/" || { echo "Failed to copy 64-bit dxvk files."; exit 1; }
echo "Updating proton file with version $FULL_VERSION..."
sed "s/CURRENT_PREFIX_VERSION=\"Proton-Sarek\"/CURRENT_PREFIX_VERSION=\"$FULL_VERSION\"/" "$SCRIPT_DIR/patches/proton" > "$protondir/proton" || { echo "Failed to update proton file."; exit 1; }
chmod +x "$protondir/proton" || { echo "Failed to make proton file executable."; exit 1; }
echo "Creating version file with timestamp..."
TIMESTAMP=$(date +%s)
echo "$TIMESTAMP $FULL_VERSION" > "$protondir/version" || { echo "Failed to create version file."; exit 1; }
echo "Updating compatibilitytool.vdf..."
sed -e "s/\"Proton-Sarek\"/\"$FULL_VERSION\"/g" "$SCRIPT_DIR/patches/compatibilitytool.vdf" > "$protondir/compatibilitytool.vdf" || { echo "Failed to update compatibilitytool.vdf."; exit 1; }
echo "All files copied and updated successfully."
echo "Version: $FULL_VERSION"
echo "Timestamp: $TIMESTAMP"