Skip to content
Snippets Groups Projects
script-osx.sh 756 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/bash
    # Build with Travis CI.
    
    set -e -x
    
    root=$PWD
    mkdir -p build
    cd build
    
    
    qt_bin="/usr/local/opt/qt5/bin"
    
    
    hluk's avatar
    hluk committed
    "$qt_bin/qmake" CONFIG+=release CONFIG+=tests ..
    
    hluk's avatar
    hluk committed
    make
    make package_plugins
    make package_translations
    
    # Create "CopyQ.app/"
    "$qt_bin/macdeployqt" CopyQ.app -verbose=2 -always-overwrite
    
    hluk's avatar
    hluk committed
    
    executable="CopyQ.app/Contents/MacOS/copyq"
    
    
    # Fix paths for included Qt libraries.
    
    hluk's avatar
    hluk committed
    git clone https://github.com/iltommi/macdeployqtfix.git
    python macdeployqtfix/macdeployqtfix.py "$executable" /usr/local/Cellar/qt5
    
    
    # Test the app before deployment.
    
    hluk's avatar
    hluk committed
    "$executable" --help
    "$executable" --version
    
    hluk's avatar
    hluk committed
    "$executable" --info
    
    hluk's avatar
    hluk committed
    # Run tests.
    "$executable" tests -silent
    
    
    # Create "CopyQ.dmg".
    "$qt_bin/macdeployqt" CopyQ.app -verbose=2 -dmg -no-plugins
    
    
    cd "$root"