Skip to content

Commit

Permalink
Appveyor (#210)
Browse files Browse the repository at this point in the history
* Fix broken openssl library names on appveyor builds
  • Loading branch information
pkittenis authored Jan 12, 2025
1 parent 2929075 commit 46088cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ install:

build_script:
- dir %OPENSSL_DIR%\lib\VC\x64\MD\
- for %%I in (%PYTHONVERS%) do cp %OPENSSL_DIR%/lib/VC/x64/MD/libcrypto.lib %%I/libs/libcrypto64MD.lib
- for %%I in (%PYTHONVERS%) do cp %OPENSSL_DIR%/lib/VC/x64/MD/libssl.lib %%I/libs/libssl64MD.lib
- ci\\appveyor\\build_zlib.bat
- for %%I in (%PYTHONVERS%) do cp C:/zlib/lib/zlibstatic.lib %%I/libs/
- for %%I in (%PYTHONVERS%) do ls %%I/libs/
- ci\\appveyor\\build_ssh2.bat
- for %%I in (%PYTHONVERS%) do cp build_dir/src/libssh2.lib %%I/libs/ || cp build_dir/src/Release/libssh2.lib %%I/libs/
- for %%I in (%PYTHONVERS%) do cp build_dir/src/Release/libssh2.lib %%I/libs/
- for %%I in (%PYTHONVERS%) do ls %%I/libs/
- rm -f ssh2/*.c

Expand Down
2 changes: 0 additions & 2 deletions ci/appveyor/build_package.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
IF NOT "%APPVEYOR_REPO_TAG%" == "true" (exit 0)

dir ssh2/

for %%I in (%PYTHONVERS%) do %%I\python.exe -V
Expand Down
12 changes: 8 additions & 4 deletions ci/appveyor/build_ssh2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ cmake ..\libssh2 -G "NMake Makefiles" ^
-DENABLE_MAC_NONE=ON ^
-DZLIB_LIBRARY=C:/zlib/lib/zlib.lib ^
-DZLIB_INCLUDE_DIR=C:/zlib/include ^
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR%
)
-DBUILD_EXAMPLES=OFF ^
-DBUILD_TESTING=OFF ^
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR% ^
-DOPENSSL_LIBRARIES=%OPENSSL_DIR%/lib/VC/x64/MD

cp %OPENSSL_DIR%\lib\VC\x64\MD\libcrypto*.lib %APPVEYOR_BUILD_FOLDER%
cp %OPENSSL_DIR%\lib\VC\x64\MD\libssl*.lib %APPVEYOR_BUILD_FOLDER%

dir %OPENSSL_DIR%\lib\VC\x64\MD\
cp %OPENSSL_DIR%\lib\VC\x64\MD\libcrypto.lib %APPVEYOR_BUILD_FOLDER%\libcrypto64MD.lib
cp %OPENSSL_DIR%\lib\VC\x64\MD\libssl.lib %APPVEYOR_BUILD_FOLDER%\libssl64MD.lib

dir %APPVEYOR_BUILD_FOLDER%\

Expand Down
4 changes: 3 additions & 1 deletion ci/appveyor/fix_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import json
import sys


def get_describe_tag():
return subprocess.check_output(['git', 'describe', '--tags']).strip().decode('utf-8')
return subprocess.check_output(['git', 'describe', '--tags']).strip().decode('utf-8').split('-')[0]


def make_version_file(basedir):
rev = os.environ.get('APPVEYOR_REPO_COMMIT',
Expand Down

0 comments on commit 46088cc

Please sign in to comment.