File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def _detect_arch(path):
8383 """Возвращает 'arm64', 'x86_64' или 'unknown' по заголовку бинаря."""
8484 try :
8585 with open (path , "rb" ) as f :
86- hdr = f .read (8 )
86+ hdr = f .read (64 )
8787 if len (hdr ) < 8 :
8888 return "unknown"
8989 magic = hdr [:4 ]
@@ -95,6 +95,20 @@ def _detect_arch(path):
9595 return "x86_64"
9696 elif hdr [:2 ] == b"MZ" : # Windows PE → всегда x86_64
9797 return "x86_64"
98+ elif magic == b"\x7f ELF" : # Linux ELF
99+ if len (hdr ) >= 20 :
100+ endian = hdr [5 ]
101+ if endian == 1 : # Little Endian
102+ machine = struct .unpack_from ("<H" , hdr , 18 )[0 ]
103+ elif endian == 2 : # Big Endian
104+ machine = struct .unpack_from (">H" , hdr , 18 )[0 ]
105+ else :
106+ return "unknown"
107+
108+ if machine == 62 : # EM_X86_64
109+ return "x86_64"
110+ elif machine == 183 : # EM_AARCH64 (ARM64)
111+ return "arm64"
98112 except OSError :
99113 pass
100114 return "unknown"
Original file line number Diff line number Diff line change 11import re
22from packaging .version import Version
33
4- VERSION = "1.2.2 "
4+ VERSION = "1.2.3 "
55MIN_AG_VERSION = "2.1.1"
66MIN_ANTIGRAVITY_VERSION = "2.2.1"
77AUTH_PATCH_SWITCH_VERSION = Version ("1.23" )
Original file line number Diff line number Diff line change 11VSVersionInfo(
22 ffi=FixedFileInfo(
3- filevers=(1, 2, 2 , 0),
4- prodvers=(1, 2, 2 , 0),
3+ filevers=(1, 2, 3 , 0),
4+ prodvers=(1, 2, 3 , 0),
55 mask=0x3f,
66 flags=0x0,
77 OS=0x40004,
@@ -15,12 +15,12 @@ VSVersionInfo(
1515 '040904B0',
1616 [StringStruct('CompanyName', 'avencores'),
1717 StringStruct('FileDescription', 'Open AG Patcher'),
18- StringStruct('FileVersion', '1.2.2 '),
18+ StringStruct('FileVersion', '1.2.3 '),
1919 StringStruct('InternalName', 'open_ag_patcher'),
2020 StringStruct('LegalCopyright', '© 2026'),
2121 StringStruct('OriginalFilename', 'Open_AG_Patcher_Windows.exe'),
2222 StringStruct('ProductName', 'Open AG Patcher'),
23- StringStruct('ProductVersion', '1.2.2 ')])
23+ StringStruct('ProductVersion', '1.2.3 ')])
2424 ]),
2525 VarFileInfo([VarStruct('Translation', [1033, 1200])])
2626 ]
You can’t perform that action at this time.
0 commit comments