Properly strip Windows binaries.
This commit is contained in:
parent
51f9d9aa4d
commit
64296f0223
3 changed files with 15 additions and 0 deletions
|
@ -27,6 +27,9 @@ set PACKAGES_DIR=%APPVEYOR_BUILD_FOLDER%\webcamoid-packages
|
|||
|
||||
git clone https://github.com/webcamoid/DeployTools.git
|
||||
|
||||
C:\msys64\mingw32\bin\strip.exe "%INSTALL_PREFIX%"\x86\*
|
||||
C:\msys64\mingw64\bin\strip.exe "%INSTALL_PREFIX%"\x64\*
|
||||
|
||||
set PYTHONPATH=%cd%\DeployTools
|
||||
set BUILD_PATH=%cd%\build-x64
|
||||
%PYTHON_PATH%\python.exe DeployTools\deploy.py ^
|
||||
|
|
|
@ -30,6 +30,8 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
|
|||
make ^
|
||||
pkg-config ^
|
||||
python3 ^
|
||||
mingw-w64-x86_64-binutils ^
|
||||
mingw-w64-i686-binutils ^
|
||||
mingw-w64-x86_64-cmake ^
|
||||
mingw-w64-i686-cmake ^
|
||||
mingw-w64-x86_64-pkg-config ^
|
||||
|
|
|
@ -30,6 +30,11 @@ if [ "${TRAVIS_OS_NAME}" = linux ]; then
|
|||
sudo mount --bind root.x86_64 root.x86_64
|
||||
sudo mount --bind $HOME root.x86_64/$HOME
|
||||
|
||||
cat << EOF > package_info_strip.conf
|
||||
[System]
|
||||
stripCmd = x86_64-w64-mingw32-strip
|
||||
EOF
|
||||
|
||||
cat << EOF > ${DEPLOYSCRIPT}
|
||||
#!/bin/sh
|
||||
|
||||
|
@ -57,9 +62,14 @@ cd ..
|
|||
cd build-x86
|
||||
cmake --build . --target install
|
||||
cd ..
|
||||
|
||||
i686-w64-mingw32-strip \${INSTALL_PREFIX}/x86/*
|
||||
x86_64-w64-mingw32-strip \${INSTALL_PREFIX}/x64/*
|
||||
|
||||
python ./DeployTools/deploy.py \
|
||||
-d "\${INSTALL_PREFIX}" \
|
||||
-c "\${BUILD_PATH}/package_info.conf" \
|
||||
-c "./package_info_strip.conf" \
|
||||
-o "\${PACKAGES_DIR}"
|
||||
EOF
|
||||
chmod +x ${DEPLOYSCRIPT}
|
||||
|
|
Loading…
Reference in a new issue