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
|
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 PYTHONPATH=%cd%\DeployTools
|
||||||
set BUILD_PATH=%cd%\build-x64
|
set BUILD_PATH=%cd%\build-x64
|
||||||
%PYTHON_PATH%\python.exe DeployTools\deploy.py ^
|
%PYTHON_PATH%\python.exe DeployTools\deploy.py ^
|
||||||
|
|
|
@ -30,6 +30,8 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
|
||||||
make ^
|
make ^
|
||||||
pkg-config ^
|
pkg-config ^
|
||||||
python3 ^
|
python3 ^
|
||||||
|
mingw-w64-x86_64-binutils ^
|
||||||
|
mingw-w64-i686-binutils ^
|
||||||
mingw-w64-x86_64-cmake ^
|
mingw-w64-x86_64-cmake ^
|
||||||
mingw-w64-i686-cmake ^
|
mingw-w64-i686-cmake ^
|
||||||
mingw-w64-x86_64-pkg-config ^
|
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 root.x86_64 root.x86_64
|
||||||
sudo mount --bind $HOME root.x86_64/$HOME
|
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}
|
cat << EOF > ${DEPLOYSCRIPT}
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
@ -57,9 +62,14 @@ cd ..
|
||||||
cd build-x86
|
cd build-x86
|
||||||
cmake --build . --target install
|
cmake --build . --target install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
i686-w64-mingw32-strip \${INSTALL_PREFIX}/x86/*
|
||||||
|
x86_64-w64-mingw32-strip \${INSTALL_PREFIX}/x64/*
|
||||||
|
|
||||||
python ./DeployTools/deploy.py \
|
python ./DeployTools/deploy.py \
|
||||||
-d "\${INSTALL_PREFIX}" \
|
-d "\${INSTALL_PREFIX}" \
|
||||||
-c "\${BUILD_PATH}/package_info.conf" \
|
-c "\${BUILD_PATH}/package_info.conf" \
|
||||||
|
-c "./package_info_strip.conf" \
|
||||||
-o "\${PACKAGES_DIR}"
|
-o "\${PACKAGES_DIR}"
|
||||||
EOF
|
EOF
|
||||||
chmod +x ${DEPLOYSCRIPT}
|
chmod +x ${DEPLOYSCRIPT}
|
||||||
|
|
Loading…
Reference in a new issue