mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
732f2d8cde
* Update deps scripts for macOS * Update deps * Update appbundle_embed_python.sh * Use cutter-deps for macOS * Remove qt from Brewfile * Fix .travis.yml * Disable Homebrew update * Fix llvm for macOS * Fix regex in update_deps.py * Fix PYTHON_FRAMEWORK_DIR * Some debug output in travis * Enable Python Bindings for cmake on macOS * QMake debug * Update deps * Hopefully fix pkg-config * QMake hack for shiboken2 and pyside2 * Deploy on deps-test * Update deps * Fix call to appbundle_embed_python.sh * Update deps * Fix Python for cmake on macOS * Update deps * Fix appbundle_embed_python.sh * Copy pyside libs in appbundle_embed_python.sh * Fix includes for CMake on macOS * Copy PySide2 and Shiboke2 libs to Frameworks dir * Manually deploy QtDBus and QtPrintSupport * Print plugins dir * Fix appbundle_embed_python.sh * Update deps * Remove some debug output * Use last release of linuxdeployqt
159 lines
6.9 KiB
YAML
159 lines
6.9 KiB
YAML
language: cpp
|
|
|
|
cache: ccache
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- debug
|
|
- /^v\d.*$/
|
|
- deploy-test
|
|
- deps-test
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
|
- os: linux
|
|
env: BUILD_SYSTEM=cmake
|
|
- os: osx
|
|
osx_image: xcode10.1
|
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
|
- os: osx
|
|
osx_image: xcode10.1
|
|
env: BUILD_SYSTEM=cmake
|
|
|
|
sudo: required
|
|
dist: xenial
|
|
|
|
addons:
|
|
homebrew:
|
|
brewfile: scripts/Brewfile
|
|
|
|
install:
|
|
- scripts/fetch_deps.sh
|
|
- source cutter-deps/env.sh
|
|
- python3 -m pip install -r scripts/pip_requirements.txt
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=/usr/local/opt/llvm/bin:$PATH; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LD_LIBRARY_PATH="`llvm-config --libdir`:$LD_LIBRARY_PATH"; fi
|
|
|
|
before_script:
|
|
- git submodule init ; git submodule update
|
|
- cd radare2
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
INSTALL_TARGET=install sys/install.sh;
|
|
else
|
|
LDFLAGS=-headerpad_max_install_names INSTALL_TARGET=install sys/install.sh;
|
|
fi
|
|
- cd ..
|
|
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
|
qmake
|
|
CUTTER_ENABLE_PYTHON=true
|
|
CUTTER_ENABLE_PYTHON_BINDINGS=true
|
|
CUTTER_ENABLE_JUPYTER=true
|
|
CUTTER_ENABLE_QTWEBENGINE=false
|
|
PREFIX=/usr
|
|
APPIMAGE=1
|
|
../src &&
|
|
make -j4;
|
|
elif [[ "$BUILD_SYSTEM" == "cmake" ]]; then
|
|
cmake
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
-DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.so.1.0"
|
|
-DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m"
|
|
-DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3"
|
|
-DCUTTER_ENABLE_PYTHON=ON
|
|
-DCUTTER_ENABLE_PYTHON_BINDINGS=ON
|
|
-DCUTTER_ENABLE_JUPYTER=ON
|
|
-DCUTTER_ENABLE_QTWEBENGINE=OFF
|
|
../src &&
|
|
make -j4;
|
|
fi
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
|
qmake
|
|
CUTTER_ENABLE_PYTHON=true
|
|
CUTTER_ENABLE_PYTHON_BINDINGS=true
|
|
CUTTER_ENABLE_JUPYTER=true
|
|
CUTTER_ENABLE_QTWEBENGINE=false
|
|
CUTTER_BUNDLE_R2_APPBUNDLE=true
|
|
PYTHON_FRAMEWORK_DIR=$CUTTER_DEPS_PYTHON_FRAMEWORK_DIR
|
|
../src &&
|
|
make -j4;
|
|
elif [[ "$BUILD_SYSTEM" == "cmake" ]]; then
|
|
cmake
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
-DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.dylib"
|
|
-DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m"
|
|
-DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3"
|
|
-DCUTTER_ENABLE_PYTHON=ON
|
|
-DCUTTER_ENABLE_PYTHON_BINDINGS=ON
|
|
-DCUTTER_ENABLE_JUPYTER=ON
|
|
-DCUTTER_ENABLE_QTWEBENGINE=OFF
|
|
../src &&
|
|
make -j4;
|
|
fi
|
|
fi
|
|
|
|
after_success:
|
|
- export CUTTER_VERSION=$(python ../scripts/get_version.py)
|
|
- lrelease ../src/Cutter.pro
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
mkdir -p Cutter.app/Contents/Resources/translations &&
|
|
cp ../src/translations/*.qm Cutter.app/Contents/Resources/translations/ &&
|
|
macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
|
|
macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
|
|
cp -a "$QTDIR/lib/QtDBus.framework" "$QTDIR/lib/QtPrintSupport.framework" Cutter.app/Contents/Frameworks &&
|
|
"$TRAVIS_BUILD_DIR/scripts/appbundle_embed_python.sh" "$CUTTER_DEPS_PYTHON_FRAMEWORK_DIR/Python.framework" Cutter.app Cutter.app/Contents/MacOS/Cutter &&
|
|
mkdir -p Cutter.app/Contents/Resources/r2/share &&
|
|
cp -a /usr/local/share/radare2 Cutter.app/Contents/Resources/r2/share/ &&
|
|
mkdir image && cp -a Cutter.app image/ &&
|
|
export VOL_NAME="Cutter v${CUTTER_VERSION}" &&
|
|
export DMG_TMP_FILE="Cutter-v$CUTTER_VERSION-x64.macOS-tmp.dmg" &&
|
|
export DMG_FILE="Cutter-v$CUTTER_VERSION-x64.macOS.dmg" &&
|
|
export SIZE=`du -sh "image" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'` &&
|
|
export SIZE=`echo "${SIZE} + 10.0" | bc | awk '{print int($1+0.5)}'` &&
|
|
hdiutil create -srcfolder image -volname "${VOL_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "$DMG_TMP_FILE" &&
|
|
export DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP_FILE}" | egrep '^/dev/' | sed 1q | awk '{print $1}') &&
|
|
sleep 2 &&
|
|
../scripts/prepare_package_ui_macos.sh "Cutter" "${PWD}/../src/macos/cutter_mac_app.png" "${VOL_NAME}" &&
|
|
hdiutil detach "${DEVICE}" &&
|
|
hdiutil convert "${DMG_TMP_FILE}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FILE}" &&
|
|
export FILE_TO_UPLOAD="$DMG_FILE"
|
|
; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
make INSTALL_ROOT=appdir install &&
|
|
cp -r /usr/share/radare2 appdir/usr/share/ &&
|
|
mkdir -p appdir/usr/bin/translations &&
|
|
cp ../src/translations/*.qm appdir/usr/bin/translations/ &&
|
|
"$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" appdir &&
|
|
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage" &&
|
|
chmod a+x linuxdeployqt*.AppImage &&
|
|
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
|
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
|
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq &&
|
|
export APPIMAGE_FILE="Cutter-v$CUTTER_VERSION-x64.Linux.AppImage" &&
|
|
mv Cutter-*-x86_64.AppImage "$APPIMAGE_FILE" &&
|
|
export FILE_TO_UPLOAD="$APPIMAGE_FILE"
|
|
; fi
|
|
|
|
deploy:
|
|
skip_cleanup: true
|
|
provider: releases
|
|
draft: false
|
|
prerelease: true
|
|
tag_name: $TRAVIS_TAG
|
|
api_key:
|
|
secure: ZXuSX8JXyL0HlJvSIda3ftMkvYsrxoWDcWm2LxO+f0uNFghCHNnISuH/btdipn2mjCBaBQl6/1IK5cg/AZ5OSkiaVsJJqY8kkPsZvR8K+k4oarsr2ApetlLZiZWtydC3J+UyNhsgCt4iuYPsvusANFPZBpVmqT+A5CHS7aPIqP00awbkJYG1uOENe2XVZ0vyotBqU0E7A9f8UO5ps0+qysS8W+NDB+CGLgKLeBfCk3U+IYKGYXcv66xCmSSZ5f7IVIXEjG4voFHGp9XLRY2R/iJgiKQKDbu519vUB3iKPzmLTB/Q9bNz4VMZCREa4SHaLDen730fMHbfm6ZhGZDzXg1DgZoh6RHptWf0WjcHTr1ch8ajpnBMxh/qmoRpaS00FJQMraMT3Il38ekYd+hOhsP58Bj1Db2vjBKopGEHGmVyFQZKuynrdKmpmY+kRNUT3QerIsiAHwHV2QXnMARHYXJrM0T7LNACa2mhiwQD2vNIqLRieIbHbSWgDUrTVTDeII23AAHCzD0YxcCAjSExjun/rc9dJjevgCoBpTM/NHPLCW4big1myx+vRQGPNdlf+dI7igm6bPVWB7znp5uXlI8q5irvqTVtRSvKbcaeDWOz/ki7QgOzaxmGFtaw30hxeY0wFlnSMXc8m42udWLkp/l0b4L0hcoaMTc1TvVU0i4=
|
|
file:
|
|
- "${FILE_TO_UPLOAD}"
|
|
on:
|
|
tags: true
|
|
condition: $DEPLOY = 1
|
|
|