mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-26 14:45:48 +03:00
Don't ship proton dist files in a tarball anymore
This commit is contained in:
parent
ab1db897be
commit
3d5022de71
29
Makefile
29
Makefile
@ -129,6 +129,7 @@ proton: configure
|
|||||||
echo "Proton built locally. Use 'install', 'deploy' or 'redist' targets."
|
echo "Proton built locally. Use 'install', 'deploy' or 'redist' targets."
|
||||||
|
|
||||||
install: configure
|
install: configure
|
||||||
|
rm -rf $(STEAM_DIR)/compatibilitytools.d/$(_build_name)/files/ #remove proton's internal files, but preserve user_settings etc from top-level
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) install
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) install
|
||||||
echo "Proton installed to your local Steam installation"
|
echo "Proton installed to your local Steam installation"
|
||||||
|
|
||||||
@ -169,8 +170,8 @@ any $(CONTAINERGOALS): configure
|
|||||||
dxvk: | $(BUILD_ROOT)/dxvk/lib/wine/dxvk
|
dxvk: | $(BUILD_ROOT)/dxvk/lib/wine/dxvk
|
||||||
dxvk: | $(BUILD_ROOT)/dxvk/lib64/wine/dxvk
|
dxvk: | $(BUILD_ROOT)/dxvk/lib64/wine/dxvk
|
||||||
dxvk: any
|
dxvk: any
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib/wine/dxvk/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib/wine/dxvk/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib64/wine/dxvk/
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib64/wine/dxvk/
|
||||||
|
|
||||||
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib/wine/nvapi
|
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib/wine/nvapi
|
||||||
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib64/wine/nvapi
|
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib64/wine/nvapi
|
||||||
@ -181,34 +182,34 @@ dxvk-nvapi: any
|
|||||||
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton
|
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton
|
||||||
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton
|
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton
|
||||||
vkd3d-proton: any
|
vkd3d-proton: any
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton/
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||||
|
|
||||||
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows
|
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows
|
||||||
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix
|
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix
|
||||||
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows
|
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows
|
||||||
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix
|
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix
|
||||||
lsteamclient: any
|
lsteamclient: any
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/i386-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/i386-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix/
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix/
|
||||||
|
|
||||||
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-windows
|
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-windows
|
||||||
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-unix
|
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-unix
|
||||||
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows
|
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows
|
||||||
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix
|
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix
|
||||||
vrclient: any
|
vrclient: any
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/i386-windows/vrclient.dll $(BUILD_ROOT)/vrclient/lib/wine/i386-windows/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-windows/vrclient.dll $(BUILD_ROOT)/vrclient/lib/wine/i386-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/i386-unix/vrclient.dll.so $(BUILD_ROOT)/vrclient/lib/wine/i386-unix/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-unix/vrclient.dll.so $(BUILD_ROOT)/vrclient/lib/wine/i386-unix/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-windows/vrclient_x64.dll $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/vrclient_x64.dll $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-unix/vrclient_x64.dll.so $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix/
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/vrclient_x64.dll.so $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix/
|
||||||
|
|
||||||
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows
|
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows
|
||||||
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix
|
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix
|
||||||
wineopenxr: any
|
wineopenxr: any
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-windows/wineopenxr.dll $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows/ && \
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/wineopenxr.dll $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/x86_64-unix/wineopenxr.dll.so $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix/
|
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/wineopenxr.dll.so $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix/
|
||||||
|
|
||||||
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-windows
|
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-windows
|
||||||
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-unix
|
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-unix
|
||||||
|
11
Makefile.in
11
Makefile.in
@ -31,7 +31,7 @@ ifeq ($(SRCDIR),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
DST_BASE := $(OBJ)/dist
|
DST_BASE := $(OBJ)/dist
|
||||||
DST_DIR := $(DST_BASE)/dist
|
DST_DIR := $(DST_BASE)/files
|
||||||
DST_LIBDIR32 := $(DST_DIR)/lib
|
DST_LIBDIR32 := $(DST_DIR)/lib
|
||||||
DST_LIBDIR64 := $(DST_DIR)/lib64
|
DST_LIBDIR64 := $(DST_DIR)/lib64
|
||||||
DIST_PREFIX := $(DST_DIR)/share/default_pfx/
|
DIST_PREFIX := $(DST_DIR)/share/default_pfx/
|
||||||
@ -1087,9 +1087,7 @@ all-dist:
|
|||||||
.PHONY: deploy
|
.PHONY: deploy
|
||||||
deploy: all
|
deploy: all
|
||||||
mkdir -p $(DEPLOY_DIR) && \
|
mkdir -p $(DEPLOY_DIR) && \
|
||||||
rsync --delete --exclude dist --exclude compatibilitytool.vdf -arx $(DST_BASE)/ $(DEPLOY_DIR)
|
rsync --delete --exclude compatibilitytool.vdf -arx $(DST_BASE)/ $(DEPLOY_DIR)
|
||||||
tar -C $(DST_DIR) -c . > $(DEPLOY_DIR)/proton_dist.tar
|
|
||||||
@echo "Created deployment archive at "$(DEPLOY_DIR)"/proton_dist.tar"
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -1099,9 +1097,7 @@ deploy: all
|
|||||||
.PHONY: redist
|
.PHONY: redist
|
||||||
redist: all
|
redist: all
|
||||||
mkdir -p $(REDIST_DIR)
|
mkdir -p $(REDIST_DIR)
|
||||||
rsync --delete --exclude dist -arx $(DST_BASE)/ $(REDIST_DIR)
|
rsync --delete -arx $(DST_BASE)/ $(REDIST_DIR)
|
||||||
tar -C $(DST_DIR) -c . | gzip -c -1 > $(REDIST_DIR)/proton_dist.tar.gz
|
|
||||||
@echo "Created redistribution tarball at "$(REDIST_DIR)"/proton_dist.tar.gz"
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -1169,7 +1165,6 @@ install: all
|
|||||||
if [ ! -d $(STEAM_DIR) ]; then echo >&2 "!! "$(STEAM_DIR)" does not exist, cannot install"; return 1; fi
|
if [ ! -d $(STEAM_DIR) ]; then echo >&2 "!! "$(STEAM_DIR)" does not exist, cannot install"; return 1; fi
|
||||||
mkdir -p $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
mkdir -p $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||||
rsync --delete -arx $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
rsync --delete -arx $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||||
cp -f $(DIST_VERSION) $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)/dist/
|
|
||||||
@echo "Installed Proton to "$(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
@echo "Installed Proton to "$(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||||
@echo "You may need to restart Steam to select this tool"
|
@echo "You may need to restart Steam to select this tool"
|
||||||
|
|
||||||
|
47
proton
47
proton
@ -410,15 +410,15 @@ def set_dir_casefold_bit(dir_path):
|
|||||||
class Proton:
|
class Proton:
|
||||||
def __init__(self, base_dir):
|
def __init__(self, base_dir):
|
||||||
self.base_dir = base_dir + "/"
|
self.base_dir = base_dir + "/"
|
||||||
self.dist_dir = self.path("dist/")
|
self.dist_dir = self.path("files/")
|
||||||
self.bin_dir = self.path("dist/bin/")
|
self.bin_dir = self.path("files/bin/")
|
||||||
self.lib_dir = self.path("dist/lib/")
|
self.lib_dir = self.path("files/lib/")
|
||||||
self.lib64_dir = self.path("dist/lib64/")
|
self.lib64_dir = self.path("files/lib64/")
|
||||||
self.fonts_dir = self.path("dist/share/fonts/")
|
self.fonts_dir = self.path("files/share/fonts/")
|
||||||
self.wine_fonts_dir = self.path("dist/share/wine/fonts/")
|
self.wine_fonts_dir = self.path("files/share/wine/fonts/")
|
||||||
self.wine_inf = self.path("dist/share/wine/wine.inf")
|
self.wine_inf = self.path("files/share/wine/wine.inf")
|
||||||
self.version_file = self.path("version")
|
self.version_file = self.path("version")
|
||||||
self.default_pfx_dir = self.path("dist/share/default_pfx/")
|
self.default_pfx_dir = self.path("files/share/default_pfx/")
|
||||||
self.user_settings_file = self.path("user_settings.py")
|
self.user_settings_file = self.path("user_settings.py")
|
||||||
self.wine_bin = self.bin_dir + "wine"
|
self.wine_bin = self.bin_dir + "wine"
|
||||||
self.wine64_bin = self.bin_dir + "wine64"
|
self.wine64_bin = self.bin_dir + "wine64"
|
||||||
@ -428,28 +428,12 @@ class Proton:
|
|||||||
def path(self, d):
|
def path(self, d):
|
||||||
return self.base_dir + d
|
return self.base_dir + d
|
||||||
|
|
||||||
def need_tarball_extraction(self):
|
def cleanup_legacy_dist(self):
|
||||||
'''Checks if the proton_dist tarball archive must be extracted. Returns true if extraction is needed, false otherwise'''
|
old_dist_dir = self.path("dist/")
|
||||||
return not file_exists(self.dist_dir, follow_symlinks=True) or \
|
if file_exists(old_dist_dir, follow_symlinks=True):
|
||||||
not file_exists(self.path("dist/version"), follow_symlinks=True) or \
|
with self.dist_lock:
|
||||||
not filecmp.cmp(self.version_file, self.path("dist/version"))
|
if file_exists(old_dist_dir, follow_symlinks=True):
|
||||||
|
shutil.rmtree(old_dist_dir)
|
||||||
def extract_tarball(self):
|
|
||||||
with self.dist_lock:
|
|
||||||
if self.need_tarball_extraction():
|
|
||||||
if file_exists(self.dist_dir, follow_symlinks=True):
|
|
||||||
shutil.rmtree(self.dist_dir)
|
|
||||||
tar = None
|
|
||||||
for sf in ["", ".xz", ".bz2", ".gz"]:
|
|
||||||
if file_exists(self.path("proton_dist.tar" + sf), follow_symlinks=True):
|
|
||||||
tar = tarfile.open(self.path("proton_dist.tar" + sf), mode="r:*")
|
|
||||||
break
|
|
||||||
if not tar:
|
|
||||||
log("No proton_dist tarball??")
|
|
||||||
sys.exit(1)
|
|
||||||
tar.extractall(path=self.dist_dir)
|
|
||||||
tar.close()
|
|
||||||
try_copy(self.version_file, self.dist_dir)
|
|
||||||
|
|
||||||
def missing_default_prefix(self):
|
def missing_default_prefix(self):
|
||||||
'''Check if the default prefix dir is missing. Returns true if missing, false if present'''
|
'''Check if the default prefix dir is missing. Returns true if missing, false if present'''
|
||||||
@ -1563,8 +1547,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
g_proton = Proton(os.path.dirname(sys.argv[0]))
|
g_proton = Proton(os.path.dirname(sys.argv[0]))
|
||||||
|
|
||||||
if g_proton.need_tarball_extraction():
|
g_proton.cleanup_legacy_dist()
|
||||||
g_proton.extract_tarball()
|
|
||||||
|
|
||||||
g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])
|
g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ static BOOL validate_proton_dist(const char* src)
|
|||||||
snprintf(buffer, ARRAYSIZE(buffer), "%s/%s", src, "version");
|
snprintf(buffer, ARRAYSIZE(buffer), "%s/%s", src, "version");
|
||||||
allgood = stat(buffer, &st) == 0 && (st.st_mode & S_IFMT) == S_IFREG;
|
allgood = stat(buffer, &st) == 0 && (st.st_mode & S_IFMT) == S_IFREG;
|
||||||
|
|
||||||
snprintf(buffer, ARRAYSIZE(buffer), "%s/%s", src, "dist");
|
snprintf(buffer, ARRAYSIZE(buffer), "%s/%s", src, "files");
|
||||||
allgood = allgood && stat(buffer, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR;
|
allgood = allgood && stat(buffer, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR;
|
||||||
|
|
||||||
return allgood;
|
return allgood;
|
||||||
|
Loading…
Reference in New Issue
Block a user