Skip to content

Commit

Permalink
Windows fix part2
Browse files Browse the repository at this point in the history
Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk committed Nov 4, 2024
1 parent 5b6c1b3 commit 271482f
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 114 deletions.
13 changes: 7 additions & 6 deletions cmake/dependencies/openssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ ELSE()

# Ref: https://github.com/openssl/openssl/blob/398011848468c7e8e481b295f7904afc30934217/INSTALL.md?plain=1#L1847-L1858

IF(RV_TARGET_LINUX)
RV_VFX_SET_VARIABLE(_dot_version CY2023 ".1.1" CY2024 ".3")
RV_VFX_SET_VARIABLE(_dot_version CY2023 ".1.1" CY2024 ".3")
RV_VFX_SET_VARIABLE(_underscore_version CY2023 "1_1" CY2024 "3")

IF(RV_TARGET_LINUX)
SET(_crypto_lib_name
${CMAKE_SHARED_LIBRARY_PREFIX}crypto${CMAKE_SHARED_LIBRARY_SUFFIX}${_dot_version}
)
Expand All @@ -144,17 +145,17 @@ ELSE()
ELSEIF(RV_TARGET_WINDOWS)
# As stated in the openssl documentation, the names are libcrypto-1_1-x64 and libssl-1_1-x64 when OpenSSL is build with MSVC.
SET(_crypto_lib_name
libcrypto-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
libcrypto-${_underscore_version}-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
)
SET(_ssl_lib_name
libssl-1_1-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
libssl-${_underscore_version}-x64${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ELSE()
SET(_crypto_lib_name
${CMAKE_SHARED_LIBRARY_PREFIX}crypto.1.1${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_SHARED_LIBRARY_PREFIX}crypto${_dot_version}${CMAKE_SHARED_LIBRARY_SUFFIX}
)
SET(_ssl_lib_name
${CMAKE_SHARED_LIBRARY_PREFIX}ssl.1.1${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_SHARED_LIBRARY_PREFIX}ssl${_dot_version}${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ENDIF()

Expand Down
6 changes: 3 additions & 3 deletions cmake/dependencies/patch/python.3.11.get_externals.bat.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index b4362a5a25..5deb59828f 100644
index b4362a5a259..2b17da6ae5e 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -53,7 +53,7 @@ echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.8
if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.4.4
-if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.0.13
+if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1u
+if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.4.0
set libraries=%libraries% sqlite-3.45.1.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.12.1
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.12.1
Expand All @@ -16,7 +16,7 @@ index b4362a5a25..5deb59828f 100644
set binaries=
if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4
-if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.13
+if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1u
+if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.4.0
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.12.1
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06

6 changes: 3 additions & 3 deletions cmake/dependencies/patch/python.3.11.python.props.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/PCbuild/python.props b/PCbuild/python.props
index d85fe4ab2a..ff2224251f 100644
index d85fe4ab2a3..977cf19e57f 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -74,8 +74,8 @@
Expand All @@ -8,8 +8,8 @@ index d85fe4ab2a..ff2224251f 100644
<libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.13\</opensslDir>
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.13\$(ArchName)\</opensslOutDir>
+ <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-1.1.1u\</opensslDir>
+ <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-1.1.1u\$(ArchName)\</opensslOutDir>
+ <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.4.0\</opensslDir>
+ <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.4.0\$(ArchName)\</opensslOutDir>
<opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
17 changes: 0 additions & 17 deletions cmake/dependencies/python3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,6 @@ SET(_requirements_install_command
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
)

IF(RV_TARGET_WINDOWS)
SET(_patch_python3_11_command
"patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.openssl.props.patch &&\
patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.python.props.patch &&\
patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/python.3.11.get_externals.bat.patch"
)

RV_VFX_SET_VARIABLE(_patch_command CY2023 "" CY2024 "${_patch_python3_11_command}")
# Split the command into a semi-colon separated list.
SEPARATE_ARGUMENTS(_patch_command)
STRING(
REGEX
REPLACE ";+" ";" _patch_command "${_patch_command}"
)
ENDIF()

EXTERNALPROJECT_ADD(
${_python3_target}
DOWNLOAD_NAME ${_python3_target}_${_python3_version}.zip
Expand All @@ -282,7 +266,6 @@ EXTERNALPROJECT_ADD(
URL ${_python3_download_url}
URL_MD5 ${_python3_download_hash}
DEPENDS OpenSSL::Crypto OpenSSL::SSL
PATCH_COMMAND "${_patch_command}"
CONFIGURE_COMMAND ${_python3_make_command} --configure
BUILD_COMMAND ${_python3_make_command} --build
INSTALL_COMMAND ${_python3_make_command} --install
Expand Down
9 changes: 6 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
pyyaml # License: MIT License (MIT)
requests # License: Apache Software License (Apache 2.0)
wheel # License: MIT License (MIT)
pyzstd==0.15.9; python_version <= '3.10' # License: BSD License (BSD-3-Clause)
pyzstd; python_version > '3.10' # License: BSD License (BSD-3-Clause)
py7zr==0.22.0 # License: GNU Lesser General Public License v2 or later (LGPLv2+) (LGPL-2.1-or-later)
pyzstd==0.15.9; python_version <= '3.8' # License: BSD License (BSD-3-Clause)
pyzstd; python_version > '3.8' # License: BSD License (BSD-3-Clause)
py7zr==0.22.0; python_version <= '3.8' # License: GNU Lesser General Public License v2 or later (LGPLv2+) (LGPL-2.1-or-later)
py7zr; python_version > '3.8' # License: GNU Lesser General Public License v2 or later (LGPLv2+) (LGPL-2.1-or-later)
dohq-artifactory # License: MIT License (MIT License)
pre-commit
Loading

0 comments on commit 271482f

Please sign in to comment.