mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-02-04 17:50:42 +03:00
Build and use a default prefix
This commit is contained in:
parent
c162f4bd00
commit
72eb9aa791
@ -107,6 +107,12 @@ PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" winebuild --dll --fa
|
|||||||
cp -a vrclient.dll.so "$DST_DIR"/lib/wine/
|
cp -a vrclient.dll.so "$DST_DIR"/lib/wine/
|
||||||
cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll
|
cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll
|
||||||
|
|
||||||
|
echo "Creating default wine prefix..."
|
||||||
|
cd "$TOP"
|
||||||
|
rm -rf "$DST_DIR"/share/default_pfx
|
||||||
|
WINEPREFIX="$DST_DIR"/share/default_pfx "$RUNTIME_PATH/shell-amd64.sh" "$DST_DIR/bin/wine64" wineboot
|
||||||
|
WINEPREFIX="$DST_DIR"/share/default_pfx "$RUNTIME_PATH/shell-amd64.sh" "$DST_DIR/bin/wineserver" -w
|
||||||
|
|
||||||
echo "Packaging..."
|
echo "Packaging..."
|
||||||
cd "$TOP"
|
cd "$TOP"
|
||||||
|
|
||||||
|
42
proton
42
proton
@ -41,7 +41,7 @@ if not os.path.exists(basedir + "/dist") or \
|
|||||||
tar.close()
|
tar.close()
|
||||||
shutil.copy(basedir + "/version", basedir + "/dist/")
|
shutil.copy(basedir + "/version", basedir + "/dist/")
|
||||||
|
|
||||||
prefix = os.environ["STEAM_COMPAT_DATA_PATH"]
|
prefix = os.environ["STEAM_COMPAT_DATA_PATH"] + "/pfx/"
|
||||||
|
|
||||||
env = dict(os.environ)
|
env = dict(os.environ)
|
||||||
|
|
||||||
@ -67,28 +67,30 @@ else:
|
|||||||
if "STEAM_COMPAT_CONFIG" in os.environ:
|
if "STEAM_COMPAT_CONFIG" in os.environ:
|
||||||
config = os.environ["STEAM_COMPAT_CONFIG"]
|
config = os.environ["STEAM_COMPAT_CONFIG"]
|
||||||
|
|
||||||
if not os.path.isdir(prefix + "/drive_c"):
|
if not os.path.isdir(prefix):
|
||||||
#create prefix
|
#copy default prefix into place
|
||||||
run_wine([wine_path, "wineboot"])
|
shutil.copytree(basedir + "/dist/share/default_pfx", prefix, symlinks=True)
|
||||||
|
|
||||||
#copy steam files into place
|
#copy steam files into place
|
||||||
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
|
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
|
||||||
dst = prefix + "/drive_c/Program Files (x86)/"
|
dst = prefix + "/drive_c/Program Files (x86)/"
|
||||||
if not os.path.isdir(dst):
|
try:
|
||||||
dst = prefix + "/drive_c/Program Files/"
|
|
||||||
os.mkdir(dst + "Steam")
|
os.mkdir(dst + "Steam")
|
||||||
filestocopy = ["steamclient.dll",
|
except:
|
||||||
"steamclient64.dll",
|
#already exists
|
||||||
"Steam.dll"]
|
pass
|
||||||
for f in filestocopy:
|
filestocopy = ["steamclient.dll",
|
||||||
if os.path.isfile(steamdir + f):
|
"steamclient64.dll",
|
||||||
shutil.copy(steamdir + f, dst + "Steam/" + f)
|
"Steam.dll"]
|
||||||
|
for f in filestocopy:
|
||||||
|
if os.path.isfile(steamdir + f):
|
||||||
|
shutil.copy(steamdir + f, dst + "Steam/" + f)
|
||||||
|
|
||||||
#copy openvr files into place
|
#copy openvr files into place
|
||||||
dst = prefix + "/drive_c/vrclient/bin/"
|
dst = prefix + "/drive_c/vrclient/bin/"
|
||||||
os.makedirs(dst)
|
os.makedirs(dst)
|
||||||
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
|
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
|
||||||
shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst)
|
shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst)
|
||||||
|
|
||||||
#parse linux openvr config and present it in win32 format to the app.
|
#parse linux openvr config and present it in win32 format to the app.
|
||||||
#logic from openvr's CVRPathRegistry_Public::GetPaths
|
#logic from openvr's CVRPathRegistry_Public::GetPaths
|
||||||
|
Loading…
x
Reference in New Issue
Block a user