mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-28 15:45:50 +03:00
build: Remove unnecessary pefixup.py script.
This commit is contained in:
parent
88064f86ee
commit
82b5301d55
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import stat
|
|
||||||
import pefile
|
|
||||||
|
|
||||||
for path in sys.argv[1:]:
|
|
||||||
pe = pefile.PE(path)
|
|
||||||
|
|
||||||
for section in pe.sections:
|
|
||||||
if section.Name.decode("utf-8")[0:5] == ".text":
|
|
||||||
assert not (section.Characteristics & pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA'])
|
|
||||||
assert not (section.Characteristics & pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK'])
|
|
||||||
|
|
||||||
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
|
|
||||||
|
|
||||||
perm = stat.S_IMODE(os.stat(path).st_mode)
|
|
||||||
if (perm & stat.S_IWUSR) == 0:
|
|
||||||
os.chmod(path, perm | stat.S_IWUSR)
|
|
||||||
|
|
||||||
pe.write(path)
|
|
||||||
|
|
||||||
if (perm & stat.S_IWUSR) == 0:
|
|
||||||
os.chmod(path, perm)
|
|
@ -64,9 +64,6 @@ $$(OBJ)/.$(1)-dist$(3):
|
|||||||
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
|
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
|
||||||
-printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
|
-printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
|
||||||
xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
|
xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
|
||||||
cd $$($(2)_LIBDIR$(3)) && find -type f \( -name '*.dll' -o -name '*.drv' \) \
|
|
||||||
-printf '$$(DST_LIBDIR$(3))/%p\0' | \
|
|
||||||
xargs $(--verbose?) -0 -r -P$$(J) -n1 $$(SRC)/make/pefixup.py
|
|
||||||
touch $$@
|
touch $$@
|
||||||
else
|
else
|
||||||
$$(OBJ)/.$(1)-dist$(3):
|
$$(OBJ)/.$(1)-dist$(3):
|
||||||
@ -79,9 +76,6 @@ $$(OBJ)/.$(1)-dist$(3):
|
|||||||
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
|
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
|
||||||
-printf '--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
|
-printf '--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
|
||||||
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
|
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
|
||||||
cd $$($(2)_LIBDIR$(3)) && find -type f \( -name '*.dll' -o -name '*.drv' \) \
|
|
||||||
-printf '$$(DST_LIBDIR$(3))/%p\0' | \
|
|
||||||
xargs $(--verbose?) -0 -r -P$$(J) -n1 $$(SRC)/make/pefixup.py
|
|
||||||
touch $$@
|
touch $$@
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user