(#20610) Fix 7zip when compiling in C++17/20

* Fix 7zip when compiling in C++17/20

* Add 7zip 23.01
This commit is contained in:
Ahajha
2023-10-19 10:16:08 -04:00
committed by GitHub
parent 5f49e80ae3
commit 5975070af4
3 changed files with 13 additions and 0 deletions

View File

@@ -1,4 +1,9 @@
sources:
"23.01":
url:
- https://www.7-zip.org/a/7z2301-src.tar.xz
- https://sourceforge.net/projects/sevenzip/files/7-Zip/23.01/7z2301-src.tar.xz
sha256: "356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74"
"22.01":
url:
- https://www.7-zip.org/a/7z2201-src.tar.xz

View File

@@ -90,6 +90,12 @@ class SevenZipConan(ConanFile):
os.chmod(fn, 0o644)
replace_in_file(self, fn, "-MT", f"-{self.settings.compiler.runtime}")
replace_in_file(self, fn, "-MD", f"-{self.settings.compiler.runtime}")
if self.version < Version("23.01"):
replace_in_file(self, fn, "-WX", "")
pfc = os.path.join(self.source_folder, "CPP", "7zip", "UI", "FileManager", "PanelFolderChange.cpp")
os.chmod(pfc, 0o644)
replace_in_file(self, pfc, r'L"\\"', r'static_cast<UString>(L"\\")')
def build(self):
self._patch_sources()

View File

@@ -1,4 +1,6 @@
versions:
"23.01":
folder: "19.00"
"22.01":
folder: "19.00"
"19.00":