drop unused dev scripts

This commit is contained in:
Dag Heyman 2018-11-05 09:39:23 +01:00
parent 8e032ebae9
commit 28e399a885
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338
4 changed files with 0 additions and 147 deletions

View File

@ -1,64 +0,0 @@
#!/bin/bash
# Exit on error
set -e
# Add qmake to PATH
export PATH="/usr/local/opt/qt/bin:$PATH"
PY_VERSION="3.6.3"
APP_DIR=yubioath-desktop.app
VERSION=${TRAVIS_BRANCH:-$(python3 compute-version.py yubioath-desktop-)}
qmake
make
mkdir -p deploy/
# Exctract all user facing strings and create a textfile with them for deployment.
lupdate yubioath-desktop.pro -ts yubioath-desktop.ts
cp yubioath-desktop.ts deploy/yubioath-desktop-$VERSION-strings.xml
macdeployqt "${APP_DIR}"/ -qmldir=qml/
# Copy needed dylibs
find /usr/local/Cellar/json-c/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/ykpers/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/libyubikey/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/hidapi/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/libu2f-host/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/libusb/ -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
find /usr/local/Cellar/openssl/1.0.2m -name '*.dylib' -exec cp '{}' "${APP_DIR}"/Contents/Frameworks/ ';'
# Copy Python framework
cp -an ~/.pyenv/versions/$PY_VERSION/Python.framework "${APP_DIR}"/Contents/Frameworks/
find "${APP_DIR}"/Contents/Frameworks/Python.framework -name '*.pyc' -delete
find "${APP_DIR}"/Contents/Frameworks/Python.framework -name '__pycache__' -delete
# Move pymodules from app bundle to site-packages, to be accepted by codesign
mv "${APP_DIR}"/Contents/MacOS/pymodules/* "${APP_DIR}"/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ || echo 'Failure, but continuing anyway...'
rm -rf "${APP_DIR}"/Contents/MacOS/pymodules
# Fix Python library path (macdeployqtfix fails to do this when running locally)
install_name_tool -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/Python @executable_path/../Frameworks/Python.framework/Versions/3.6/Python "${APP_DIR}"/Contents/PlugIns/quick/libpyothersideplugin.dylib
# Fix dylib writable permissions
find "${APP_DIR}" -name '*.dylib' -exec chmod u+w {} \;
# Fix stuff that macdeployqt does incorrectly.
python macdeployqtfix/macdeployqtfix.py "${APP_DIR}"/Contents/MacOS/yubioath-desktop /usr/local
#python macdeployqtfix/macdeployqtfix.py "${APP_DIR}"/Contents/MacOS/ykman-gui /usr/local/Cellar/python3/$PY_VERSION/Frameworks
#python macdeployqtfix/macdeployqtfix.py "${APP_DIR}"/Contents/MacOS/ykman /usr/local/Cellar/python3/$PY_VERSION/Frameworks
# Fix linking for PyOtherSide
install_name_tool -change ~/.pyenv/versions/$PY_VERSION/Python.framework/Versions/3.6/Python @executable_path/../Frameworks/Python.framework/Versions/3.6/Python "${APP_DIR}"/Contents/Resources/qml/io/thp/pyotherside/libpyothersideplugin.dylib
# Fix linking for Python _ssl
install_name_tool -change /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib @executable_path/../Frameworks/libcrypto.1.0.0.dylib "${APP_DIR}"/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so
install_name_tool -change /usr/local/opt/openssl/lib/libssl.1.0.0.dylib @executable_path/../Frameworks/libssl.1.0.0.dylib "${APP_DIR}"/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so
# Fix linking for Python _hashlib
install_name_tool -change /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib @executable_path/../Frameworks/libcrypto.1.0.0.dylib "${APP_DIR}"/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_hashlib.cpython-36m-darwin.so
install_name_tool -change /usr/local/opt/openssl/lib/libssl.1.0.0.dylib @executable_path/../Frameworks/libssl.1.0.0.dylib "${APP_DIR}"/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_hashlib.cpython-36m-darwin.so
# Copy .app to deploy dir
tar -czf deploy/yubioath-desktop-$VERSION.app.tar "${APP_DIR}"

View File

@ -1,17 +0,0 @@
#!/bin/bash
# Generate `VERSION` file and run `../scripts/make-ppa`
#
# Command line arguments are passed through to `make-ppa`.
die() {
echo "Error occurred - exiting!" >&2
cleanup
exit 1
}
python3 compute-version.py yubioath-desktop- > VERSION
echo "Version:"
cat VERSION
../scripts/make-ppa "$@"

View File

@ -1,35 +0,0 @@
#!/bin/bash
# Exit on error
set -e
PROJECT_NAME='yubioath-desktop'
APP_NAME='Yubico Authenticator'
APP_DIR_IN_TAR="."
version=$(python3 compute-version.py "${PROJECT_NAME}"-)
echo "Building release: ${version}"
rm -rf "deploy/unpacked"
mkdir -p deploy/unpacked
cd deploy/unpacked
tar xf "../${PROJECT_NAME}-${version}.app.tar"
cd "${APP_DIR_IN_TAR}"
mv "${PROJECT_NAME}.app" "${APP_NAME}.app"
echo "Running codesign..."
codesign --deep --verify --verbose --sign 'Developer ID Application' "${APP_NAME}.app"
echo "Running productbuild..."
productbuild --sign 'Developer ID Installer' --component "${APP_NAME}.app" /Applications/ "${PROJECT_NAME}-${version}-mac.pkg"
echo "Checking package signature..."
if pkgutil --check-signature "${PROJECT_NAME}-${version}-mac.pkg"; then
echo "Package is signed - generating PGP signature"
gpg --detach-sign "${PROJECT_NAME}-${version}-mac.pkg"
else
echo "Package is NOT signed!"
fi

View File

@ -1,31 +0,0 @@
# Exit on error
set -e
PY_VERSION="3.6.2"
export MACOSX_DEPLOYMENT_TARGET=10.9
brew update
# Patch PyOtherSide to not be built with debug output
echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> vendor/pyotherside/src/src.pro
pip3 install --upgrade pip
git clone https://github.com/aurelien-rainone/macdeployqtfix.git
brew install qt5 swig ykpers libyubikey hidapi libu2f-host libusb pyenv
# Add qmake to PATH
export PATH="/usr/local/opt/qt/bin:$PATH"
# Build Python 3 with --enable-framework, to be able to distribute it in a .app bundle
brew upgrade pyenv
eval "$(pyenv init -)"
env PYTHON_CONFIGURE_OPTS="--enable-framework CC=clang" pyenv install $PY_VERSION
pyenv global system $PY_VERSION
pip3 install --upgrade pip
# Build and install PyOtherside
cd vendor/pyotherside
qmake
make
sudo make install
cd ../../
qmake