
* Add prebuilt submodule * Remove Android native library * Add links for Android prebuilt library * Update OpenSSL to prebuilt binaries * Setup links for prebuilt OpenSSL * Set correct OpenSSL header dir * Update prebuilt submodule * Use static OpenSSL for linux build * Use prebuilt binary from 3rd-prebuilt for Win installer * Use prebuilt binary from 3rd-prebuilt for Linux installer * Use prebuilt binary from 3rd-prebuilt for MacOS installer * Use Android prebuilt openvpn libs * Cleanup some unneeded code * Add new maven repo for gradle-versions-plugin * Use jitpack version of jsocks * Fix some unnecessary header copy * Fix issue with package name of original WG libs * Change submodule path to https (3rd-prebuilt) * Fix windows installer * MacOS deploy fixes * NetworkChange detection for OpenVPN protocol (#256) * NetworkChange detection for OpenVPN protocol * Update android native libs * Always on VPN mode for OpenVPN, Cloak+OpenVPN * Set foregroundService type * Android 14 require to set foregroundServiceType * Remove unused code and cleanup submodules * Cleanup gradle build script * Fix start button status * Pull OpenSSL prebuilt for MacOS, iOS * Update links for OpenSSL MacOS, iOS prebuilt * Update OpenSSL binaries path * Refactor some OpenSSL includes * Update MacOS OpenVPN binary with statically linked dependency * Use prebilt for LibSSH * Android resources cleanup * Set static runtime linux * Use shared LibSSH for Android * Update SS Android lib name * Fix Linux install path and file permissions * Feature/iOS GitHub actions (#265) * Move Android cpp code to openvpn-pt-android repo * Remove unused OpenVPN2 Android Libs * Cleanup Gemfile --------- Co-authored-by: Mazay B <pokamest@gmail.com>
88 lines
2.3 KiB
Bash
Executable file
88 lines
2.3 KiB
Bash
Executable file
#!/bin/bash
|
|
echo "Build script started ..."
|
|
|
|
set -o errexit -o nounset
|
|
|
|
|
|
# Hold on to current directory
|
|
PROJECT_DIR=$(pwd)
|
|
DEPLOY_DIR=$PROJECT_DIR/deploy
|
|
|
|
mkdir -p $DEPLOY_DIR/build
|
|
BUILD_DIR=$DEPLOY_DIR/build
|
|
|
|
APP_DIR=$DEPLOY_DIR/AppDir
|
|
mkdir -p $APP_DIR
|
|
|
|
TOOLS_DIR=$DEPLOY_DIR/Tools
|
|
mkdir -p $TOOLS_DIR
|
|
|
|
CQTDEPLOYER_DIR=$TOOLS_DIR/cqtdeployer
|
|
mkdir -p $CQTDEPLOYER_DIR
|
|
|
|
echo "Project dir: ${PROJECT_DIR}"
|
|
echo "Build dir: ${BUILD_DIR}"
|
|
|
|
APP_NAME=AmneziaVPN
|
|
APP_FILENAME=$APP_NAME.app
|
|
APP_DOMAIN=org.amneziavpn.package
|
|
|
|
DEPLOY_DATA_DIR=$PROJECT_DIR/deploy/data/linux
|
|
PREBUILT_DEPLOY_DATA_DIR=$PROJECT_DIR/client/3rd-prebuilt/deploy-prebuilt/linux/client/bin
|
|
INSTALLER_DATA_DIR=$PROJECT_DIR/deploy/installer/packages/$APP_DOMAIN/data
|
|
|
|
PRO_FILE_PATH=$PROJECT_DIR/$APP_NAME.pro
|
|
QMAKE_STASH_FILE=$PROJECT_DIR/.qmake_stash
|
|
|
|
# Search Qt
|
|
if [ -z "${QT_VERSION+x}" ]; then
|
|
QT_VERSION=5.15.2
|
|
if [ -f /opt/Qt/$QT_VERSION/gcc_64/bin/qmake ]; then
|
|
QT_BIN_DIR=/opt/Qt/$QT_VERSION/gcc_64/bin
|
|
elif [ -f $HOME/Qt/$QT_VERSION/gcc_64/bin/qmake ]; then
|
|
QT_BIN_DIR=$HOME/Qt/$QT_VERSION/gcc_64/bin
|
|
fi
|
|
fi
|
|
|
|
echo "Using Qt in $QT_BIN_DIR"
|
|
|
|
|
|
# Checking env
|
|
$QT_BIN_DIR/qt-cmake --version
|
|
gcc -v
|
|
|
|
# Build App
|
|
echo "Building App..."
|
|
cd $BUILD_DIR
|
|
|
|
$QT_BIN_DIR/qt-cmake -S $PROJECT_DIR
|
|
cmake --build . --config release
|
|
|
|
# Build and run tests here
|
|
|
|
#echo "............Deploy.................."
|
|
|
|
cp -r $DEPLOY_DATA_DIR/* $APP_DIR
|
|
cp -r $PREBUILT_DEPLOY_DATA_DIR $APP_DIR/client
|
|
|
|
if [ ! -f $CQTDEPLOYER_DIR/cqtdeployer.sh ]; then
|
|
wget -O $TOOLS_DIR/CQtDeployer.zip https://github.com/QuasarApp/CQtDeployer/releases/download/v1.5.4.17/CQtDeployer_1.5.4.17_Linux_x86_64.zip
|
|
unzip -o $TOOLS_DIR/CQtDeployer.zip -d $CQTDEPLOYER_DIR/
|
|
chmod +x -R $CQTDEPLOYER_DIR
|
|
fi
|
|
|
|
|
|
$CQTDEPLOYER_DIR/cqtdeployer.sh -bin $BUILD_DIR/client/AmneziaVPN -qmake $QT_BIN_DIR/qmake -qmlDir $PROJECT_DIR/client/ui/qml/ -targetDir $APP_DIR/client/
|
|
$CQTDEPLOYER_DIR/cqtdeployer.sh -bin $BUILD_DIR/service/server/AmneziaVPN-service -qmake $QT_BIN_DIR/qmake -targetDir $APP_DIR/service/
|
|
|
|
rm -f $INSTALLER_DATA_DIR/data.7z
|
|
|
|
7z a $INSTALLER_DATA_DIR/data.7z $APP_DIR/*
|
|
|
|
ldd $CQTDEPLOYER_DIR/bin/binarycreator
|
|
|
|
cp -r $PROJECT_DIR/deploy/installer $BUILD_DIR
|
|
|
|
$CQTDEPLOYER_DIR/binarycreator.sh --offline-only -v -c $BUILD_DIR/installer/config/linux.xml -p $BUILD_DIR/installer/packages -f $PROJECT_DIR/deploy/AmneziaVPN_Linux_Installer
|
|
|
|
|