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
3f2d1269f5
commit
75d37ae901
19
Makefile
19
Makefile
@ -145,6 +145,7 @@ install-internal: downloads
|
||||
|
||||
install: install-internal
|
||||
mkdir -p $(STEAM_DIR)/compatibilitytools.d/
|
||||
rm -rf $(STEAM_DIR)/compatibilitytools.d/$(_build_name)/files/ #remove proton's internal files, but preserve user_settings etc from top-level
|
||||
cp -Rf --no-dereference --preserve=mode,links vagrant_share/compatibilitytools.d/$(_build_name) $(STEAM_DIR)/compatibilitytools.d/
|
||||
echo "Proton installed to your local Steam installation"
|
||||
|
||||
@ -182,8 +183,8 @@ dxvk: | vagrant_share/dxvk/lib64/wine/dxvk
|
||||
dxvk: private SHELL := $(VAGRANT_SHELL)
|
||||
dxvk: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
|
||||
|
||||
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib/wine/nvapi
|
||||
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib64/wine/nvapi
|
||||
@ -198,31 +199,31 @@ vkd3d-proton: | vagrant_share/vkd3d-proton/lib64/wine/vkd3d-proton
|
||||
vkd3d-proton: private SHELL := $(VAGRANT_SHELL)
|
||||
vkd3d-proton: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vkd3d-proton && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||
|
||||
lsteamclient: | vagrant_share/lsteamclient/lib/wine
|
||||
lsteamclient: | vagrant_share/lsteamclient/lib64/wine
|
||||
lsteamclient: private SHELL := $(VAGRANT_SHELL)
|
||||
lsteamclient: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) lsteamclient && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
|
||||
|
||||
vrclient: | vagrant_share/vrclient/lib/wine
|
||||
vrclient: | vagrant_share/vrclient/lib64/wine
|
||||
vrclient: private SHELL := $(VAGRANT_SHELL)
|
||||
vrclient: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vrclient && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
|
||||
|
||||
wineopenxr: | vagrant_share/wineopenxr/lib/wine
|
||||
wineopenxr: | vagrant_share/wineopenxr/lib64/wine
|
||||
wineopenxr: private SHELL := $(VAGRANT_SHELL)
|
||||
wineopenxr: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) wineopenxr && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
|
||||
|
||||
battleye: | vagrant_share/battleye/v1/lib/wine
|
||||
battleye: | vagrant_share/battleye/v1/lib64/wine
|
||||
|
@ -143,7 +143,7 @@ endif
|
||||
##
|
||||
|
||||
DST_BASE := $(OBJ)/dist
|
||||
DST_DIR := $(DST_BASE)/dist
|
||||
DST_DIR := $(DST_BASE)/files
|
||||
DST_LIBDIR32 := $(DST_DIR)/lib
|
||||
DST_LIBDIR64 := $(DST_DIR)/lib64
|
||||
DEPLOY_DIR := ./deploy
|
||||
@ -271,7 +271,7 @@ DIST_TARGETS := $(DIST_COPY_TARGETS) $(DIST_OVR32) $(DIST_OVR64) \
|
||||
$(DIST_GECKO32) $(DIST_GECKO64) $(DIST_WINEMONO) \
|
||||
$(DIST_COMPAT_MANIFEST) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DIST_FONTS)
|
||||
|
||||
DEPLOY_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE)
|
||||
DEPLOY_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DST_DIR)
|
||||
REDIST_COPY_TARGETS := $(DEPLOY_COPY_TARGETS) $(DIST_COMPAT_MANIFEST)
|
||||
|
||||
$(DIST_LICENSE): $(LICENSE)
|
||||
@ -364,24 +364,19 @@ dist: $(DIST_TARGETS) all-dist dist_wineopenxr | $(DST_DIR)
|
||||
echo `date '+%s'` `GIT_DIR=$(abspath $(SRCDIR)/.git) git describe --tags` > $(DIST_VERSION)
|
||||
|
||||
deploy: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
mkdir -p $(DEPLOY_DIR) && \
|
||||
cp -a $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR) && \
|
||||
tar -C $(DST_DIR) -c . > $(DEPLOY_DIR)/proton_dist.tar
|
||||
@echo "Created deployment archive at "$(DEPLOY_DIR)"/proton_dist.tar"
|
||||
mkdir -p $(DEPLOY_DIR)
|
||||
cp -af --no-dereference --preserve=mode,links $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR)
|
||||
|
||||
install: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
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)
|
||||
cp -rf --no-dereference --preserve=mode,links $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||
cp -f $(DIST_VERSION) $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)/dist/
|
||||
cp -af --no-dereference --preserve=mode,links $(DST_BASE)/* $(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"
|
||||
|
||||
redist: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
mkdir -p $(REDIST_DIR)
|
||||
cp -a $(REDIST_COPY_TARGETS) $(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"
|
||||
cp -af --no-dereference --preserve=mode,links $(REDIST_COPY_TARGETS) $(REDIST_DIR)
|
||||
|
||||
.PHONY: module32 module64 module
|
||||
|
||||
|
45
proton
45
proton
@ -280,14 +280,14 @@ def set_dir_casefold_bit(dir_path):
|
||||
class Proton:
|
||||
def __init__(self, base_dir):
|
||||
self.base_dir = base_dir + "/"
|
||||
self.dist_dir = self.path("dist/")
|
||||
self.bin_dir = self.path("dist/bin/")
|
||||
self.lib_dir = self.path("dist/lib/")
|
||||
self.lib64_dir = self.path("dist/lib64/")
|
||||
self.fonts_dir = self.path("dist/share/fonts/")
|
||||
self.wine_fonts_dir = self.path("dist/share/wine/fonts/")
|
||||
self.dist_dir = self.path("files/")
|
||||
self.bin_dir = self.path("files/bin/")
|
||||
self.lib_dir = self.path("files/lib/")
|
||||
self.lib64_dir = self.path("files/lib64/")
|
||||
self.fonts_dir = self.path("files/share/fonts/")
|
||||
self.wine_fonts_dir = self.path("files/share/wine/fonts/")
|
||||
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.wine_bin = self.bin_dir + "wine"
|
||||
self.wine64_bin = self.bin_dir + "wine64"
|
||||
@ -297,28 +297,12 @@ class Proton:
|
||||
def path(self, d):
|
||||
return self.base_dir + d
|
||||
|
||||
def need_tarball_extraction(self):
|
||||
'''Checks if the proton_dist tarball archive must be extracted. Returns true if extraction is needed, false otherwise'''
|
||||
return not os.path.exists(self.dist_dir) or \
|
||||
not os.path.exists(self.path("dist/version")) or \
|
||||
not filecmp.cmp(self.version_file, self.path("dist/version"))
|
||||
|
||||
def extract_tarball(self):
|
||||
with self.dist_lock:
|
||||
if self.need_tarball_extraction():
|
||||
if os.path.exists(self.dist_dir):
|
||||
shutil.rmtree(self.dist_dir)
|
||||
tar = None
|
||||
for sf in ["", ".xz", ".bz2", ".gz"]:
|
||||
if os.path.exists(self.path("proton_dist.tar" + sf)):
|
||||
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 cleanup_legacy_dist(self):
|
||||
old_dist_dir = self.path("dist/")
|
||||
if os.path.exists(old_dist_dir):
|
||||
with self.dist_lock:
|
||||
if os.path.exists(old_dist_dir):
|
||||
shutil.rmtree(old_dist_dir)
|
||||
|
||||
def missing_default_prefix(self):
|
||||
'''Check if the default prefix dir is missing. Returns true if missing, false if present'''
|
||||
@ -1273,8 +1257,7 @@ if __name__ == "__main__":
|
||||
|
||||
g_proton = Proton(os.path.dirname(sys.argv[0]))
|
||||
|
||||
if g_proton.need_tarball_extraction():
|
||||
g_proton.extract_tarball()
|
||||
g_proton.cleanup_legacy_dist()
|
||||
|
||||
g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user