Build and use a default prefix

This commit is contained in:
Andrew Eikum 2018-01-22 13:59:42 -06:00
parent c162f4bd00
commit 72eb9aa791
2 changed files with 28 additions and 20 deletions

View file

@ -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.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..."
cd "$TOP"

42
proton
View file

@ -41,7 +41,7 @@ if not os.path.exists(basedir + "/dist") or \
tar.close()
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)
@ -67,28 +67,30 @@ else:
if "STEAM_COMPAT_CONFIG" in os.environ:
config = os.environ["STEAM_COMPAT_CONFIG"]
if not os.path.isdir(prefix + "/drive_c"):
#create prefix
run_wine([wine_path, "wineboot"])
if not os.path.isdir(prefix):
#copy default prefix into place
shutil.copytree(basedir + "/dist/share/default_pfx", prefix, symlinks=True)
#copy steam files into place
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
dst = prefix + "/drive_c/Program Files (x86)/"
if not os.path.isdir(dst):
dst = prefix + "/drive_c/Program Files/"
#copy steam files into place
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
dst = prefix + "/drive_c/Program Files (x86)/"
try:
os.mkdir(dst + "Steam")
filestocopy = ["steamclient.dll",
"steamclient64.dll",
"Steam.dll"]
for f in filestocopy:
if os.path.isfile(steamdir + f):
shutil.copy(steamdir + f, dst + "Steam/" + f)
except:
#already exists
pass
filestocopy = ["steamclient.dll",
"steamclient64.dll",
"Steam.dll"]
for f in filestocopy:
if os.path.isfile(steamdir + f):
shutil.copy(steamdir + f, dst + "Steam/" + f)
#copy openvr files into place
dst = prefix + "/drive_c/vrclient/bin/"
os.makedirs(dst)
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst)
#copy openvr files into place
dst = prefix + "/drive_c/vrclient/bin/"
os.makedirs(dst)
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.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.
#logic from openvr's CVRPathRegistry_Public::GetPaths