mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
feat: initial conan support and build process refactoring (#2260)
* feat: initial conan support * feat: add awg-go and awg-apple recipes * feat: macos full feature conan build, except ss and cloak * feat: conan android initial support * fix: android libssh fixes * conan: android additional recipes and fixes * feat: openvpn add support android * fix: awg android connection establish * conan: apple full-featured support * chore: bump min macos version * chore: get rid of manual deploy recursive copying * conan: beautify makefile-based recipes * conan: add geosite.dat and geoip.dat * conan: use lib linking instead of QT_EXTRA_LIBS for OVPN * conan: address lack of SONAME of libck-ovpn-plugin.so correctly * conan: windows initial support * conan: make awg-windows and wintun be interpret as exes * conan: fix version for v2ray-rules-dat * feat: conan and platform bootstrap rework in cmake * feat: 16kb support for Android * chore(conan): recipes cleanup * feat: support of drivers for windows * feat: support full-featured cmake install * chore: exclude qtkeychain from the target build * fix: install for apple systems * fix: provide flags for cloak plugin for openvpn-pt-android * chore: bump android deps for 16kb support * feat(conan): patch cloak to properly provide env for golang * chore: remove redundant hint from conan find * feat: linux <-> conan features * feat: linux initial packaging support * feat: linux cpack support * feat: cpack windows full-featured build * feat: productbuild cpack support * feat: rework CI/CD for macos * feat: rework CI/CD for Linux * fix: libncap automake args * fix: CI/CD correct QT paths * fix: windows rework CI/CD * fix: windows artifact upload * chore: remove MacOS-old from build targets * feat: add conan to all mobile and NE builds * feat: support default amnezia conan remote * fix: use Release instead of release on Android * feat: get rid of 3rd-prebuilt * feat: conan CI/CD upload * fix: CI/CD change windows toolset versions * fix: remove MSVC version from CI/CD * feat: conan CI/CD add Release and Debug build types * feat: add multiple xcode versions for conan CI/CD * fix: correct conan CI/CD clang versions * feat: separate prebuilt baking, and add some for NE * feat: rework keychain on ios/macos even more * fix: add desktop Qt for iOS * feat: add QT_HOST_PATH to build.sh * fix: add deploy definition to cmake * fix: android adjustments for toolchains and CI/CD * fix: add needs for Android CI/CD * fix: Android CI/CD use android-28 * fix: modernize translations, and CI/CD fixes * fix: gradle min sdk compilation error * fix: CI/CD add installers to all jobs * fix: parse android platform more precisely * fix: adjust aab path in CI/CD * feat: CI/CD do not execute artifact build if there is nothing changed * fix: CI/CD use common jobs even if previous were failed * fix: Apple CI/CD use set-key-partition-list for keychains * fix: Apple CI/CD do not specify any keychain (use default) * fix: build aab as a different step in build script * chore: beautify build.sh script * feat: CI/CD build separate APKs per ABI * fix: Android CI/CD upload artifact in separate steps * chore: recipes cleanup * feat: add hints for conan on MacOS * fix: add main.cpp and tests back to CMakeLists.txt * chore: xrayProtocol codestyle changes * fix: openssl set proper X509 request version * fix: make openvpn protocol rely only on client while configuring * chore: get rid of old scripts * chore: readme update describing build process more precisely * feat: windows build script add multiprocessing capabilities * chore: bump Qt version in README * feat: add generator option and use Ninja by default in CI/CD for linux/macos --------- Co-authored-by: NickVs2015 <nv@amnezia.org>
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../LICENSE
|
||||
@@ -1 +0,0 @@
|
||||
../../client/3rd-prebuilt/deploy-prebuilt/
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=AmneziaVPN
|
||||
Version=1.0
|
||||
Comment=Client of your self-hosted VPN
|
||||
Exec=AmneziaVPN
|
||||
Icon=/usr/share/pixmaps/AmneziaVPN.png
|
||||
Categories=Network;Qt;Security;
|
||||
Terminal=false
|
||||
@@ -7,8 +7,7 @@ StartLimitIntervalSec=0
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
ExecStart=/opt/AmneziaVPN/service/AmneziaVPN-service.sh
|
||||
Environment=LD_LIBRARY_PATH=/opt/AmneziaVPN/client/lib
|
||||
ExecStart=/opt/AmneziaVPN/bin/AmneziaVPN-service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is default bat run script of The CQtDeployer project.
|
||||
# This file contains key word that will replaced after deploy project.
|
||||
#
|
||||
# ####################################################################
|
||||
#
|
||||
# LIB_PATH - are relative path to libraries of a deployed distribution.
|
||||
# QML_PATH - are relative path to qml libraries of a deployed distribution.
|
||||
# PLUGIN_PATH - are relative path to qt plugins of a deployed distribution.
|
||||
# BIN_PATH - are relative path to targets of a deployed distribution.
|
||||
|
||||
# SYSTEM_LIB_PATH - are relative path to system libraries of a deployed distribution.
|
||||
# BASE_NAME - are base name of the executable that will be launched after run this script.
|
||||
# CUSTOM_SCRIPT_BLOCK - This is code from the customScript option
|
||||
# RUN_COMMAND - This is command for run application. Required BASE_DIR variable.
|
||||
#
|
||||
# ####################################################################
|
||||
|
||||
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||
export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH
|
||||
export QML_IMPORT_PATH="$BASE_DIR"/qml/:$QML_IMPORT_PATH
|
||||
export QML2_IMPORT_PATH="$BASE_DIR"/qml/:$QML2_IMPORT_PATH
|
||||
export QT_PLUGIN_PATH="$BASE_DIR"/plugins/:$QT_PLUGIN_PATH
|
||||
export QTWEBENGINEPROCESS_PATH="$BASE_DIR"/bin//QtWebEngineProcess
|
||||
export QTDIR="$BASE_DIR"
|
||||
export CQT_PKG_ROOT="$BASE_DIR"
|
||||
export CQT_RUN_FILE="$BASE_DIR/AmneziaVPN.sh"
|
||||
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"/plugins//platforms:$QT_QPA_PLATFORM_PLUGIN_PATH
|
||||
|
||||
|
||||
|
||||
"$BASE_DIR/bin/AmneziaVPN" "$@"
|
||||
@@ -1,7 +0,0 @@
|
||||
[Paths]
|
||||
Prefix= ./../
|
||||
Libraries= ./lib/
|
||||
Plugins= ./plugins/
|
||||
Imports= ./qml/
|
||||
Translations= ./translations/
|
||||
Qml2Imports= ./qml/
|
||||
@@ -36,9 +36,8 @@ sudo cp $APP_PATH/$APP_NAME.service /etc/systemd/system/ >> $LOG_FILE
|
||||
|
||||
sudo systemctl start $APP_NAME >> $LOG_FILE
|
||||
sudo systemctl enable $APP_NAME >> $LOG_FILE
|
||||
sudo chmod 555 $APP_PATH/client/$APP_NAME.sh >> $LOG_FILE
|
||||
sudo ln -s $APP_PATH/client/$APP_NAME.sh /usr/local/sbin/$APP_NAME >> $LOG_FILE
|
||||
sudo ln -s $APP_PATH/client/$APP_NAME.sh /usr/local/bin/$APP_NAME >> $LOG_FILE
|
||||
sudo ln -sf $APP_PATH/bin/$APP_NAME /usr/local/sbin/$APP_NAME >> $LOG_FILE
|
||||
sudo ln -sf $APP_PATH/bin/$APP_NAME /usr/local/bin/$APP_NAME >> $LOG_FILE
|
||||
|
||||
echo "user desktop creation loop started" >> $LOG_FILE
|
||||
sudo cp $APP_PATH/$APP_NAME.desktop /usr/share/applications/ >> $LOG_FILE
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is default bat run script of The CQtDeployer project.
|
||||
# This file contains key word that will replaced after deploy project.
|
||||
#
|
||||
# ####################################################################
|
||||
#
|
||||
# LIB_PATH - are relative path to libraries of a deployed distribution.
|
||||
# QML_PATH - are relative path to qml libraries of a deployed distribution.
|
||||
# PLUGIN_PATH - are relative path to qt plugins of a deployed distribution.
|
||||
# BIN_PATH - are relative path to targets of a deployed distribution.
|
||||
|
||||
# SYSTEM_LIB_PATH - are relative path to system libraries of a deployed distribution.
|
||||
# BASE_NAME - are base name of the executable that will be launched after run this script.
|
||||
# CUSTOM_SCRIPT_BLOCK - This is code from the customScript option
|
||||
# RUN_COMMAND - This is command for run application. Required BASE_DIR variable.
|
||||
#
|
||||
# ####################################################################
|
||||
|
||||
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||
export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH
|
||||
export QML_IMPORT_PATH="$BASE_DIR"/qml/:$QML_IMPORT_PATH
|
||||
export QML2_IMPORT_PATH="$BASE_DIR"/qml/:$QML2_IMPORT_PATH
|
||||
export QT_PLUGIN_PATH="$BASE_DIR"/plugins/:$QT_PLUGIN_PATH
|
||||
export QTWEBENGINEPROCESS_PATH="$BASE_DIR"/bin//QtWebEngineProcess
|
||||
export QTDIR="$BASE_DIR"
|
||||
export CQT_PKG_ROOT="$BASE_DIR"
|
||||
export CQT_RUN_FILE="$BASE_DIR/AmneziaVPN-service.sh"
|
||||
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"/plugins//platforms:$QT_QPA_PLATFORM_PLUGIN_PATH
|
||||
|
||||
|
||||
|
||||
"$BASE_DIR/bin/AmneziaVPN-service" "$@"
|
||||
@@ -1,7 +0,0 @@
|
||||
[Paths]
|
||||
Prefix= ./../
|
||||
Libraries= ./lib/
|
||||
Plugins= ./plugins/
|
||||
Imports= ./qml/
|
||||
Translations= ./translations/
|
||||
Qml2Imports= ./qml/
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<installer-gui-script minSpecVersion="1.0">
|
||||
<title>@CPACK_PACKAGE_NAME@</title>
|
||||
<license file="@CPACK_RESOURCE_FILE_LICENSE_NOPATH@"/>
|
||||
@CPACK_APPLE_PKG_INSTALLER_CONTENT@
|
||||
</installer-gui-script>
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -d "/Applications/AmneziaVPN.app" ] || pgrep -x "AmneziaVPN-service" >/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -d "/Applications/AmneziaVPN.app" ] || pgrep -x "AmneziaVPN-service" >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>AmneziaVPN Installer</title>
|
||||
<license file="LICENSE"/>
|
||||
<choices-outline>
|
||||
<line choice="install"/>
|
||||
<line choice="uninstall"/>
|
||||
</choices-outline>
|
||||
<choice id="install" title="Install AmneziaVPN" start_selected="true">
|
||||
<pkg-ref id="org.amneziavpn.package"/>
|
||||
</choice>
|
||||
<choice id="uninstall" title="Uninstall AmneziaVPN" start_selected="false">
|
||||
<pkg-ref id="org.amneziavpn.uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="org.amneziavpn.package" auth="Root" install-check="scripts/check_install.sh">AmneziaVPN_install.pkg</pkg-ref>
|
||||
<pkg-ref id="org.amneziavpn.uninstall" auth="Root" install-check="scripts/check_uninstall.sh">AmneziaVPN_uninstall_component.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
||||
@@ -1,13 +0,0 @@
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>Uninstall AmneziaVPN</title>
|
||||
<options customize-install-button="always"/>
|
||||
<welcome file="uninstall_welcome.html"/>
|
||||
<conclusion file="uninstall_conclusion.html"/>
|
||||
<choices-outline>
|
||||
<line choice="uninstall"/>
|
||||
</choices-outline>
|
||||
<choice id="uninstall" title="Uninstall AmneziaVPN" start_selected="true">
|
||||
<pkg-ref id="org.amneziavpn.uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="org.amneziavpn.uninstall" auth="Root">AmneziaVPN_uninstall_component.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
||||
@@ -1,7 +0,0 @@
|
||||
<html>
|
||||
<head><title>Uninstall Complete</title></head>
|
||||
<body>
|
||||
<h1>AmneziaVPN has been uninstalled</h1>
|
||||
<p>Thank you for using AmneziaVPN. The application and its components have been removed.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
<html>
|
||||
<head><title>Uninstall AmneziaVPN</title></head>
|
||||
<body>
|
||||
<h1>Uninstall AmneziaVPN</h1>
|
||||
<p>This process will remove AmneziaVPN from your system. Click Continue to proceed.</p>
|
||||
</body>
|
||||
</html>
|
||||
+32
-32
@@ -1,32 +1,32 @@
|
||||
set AmneziaPath=%~dp0
|
||||
echo %AmneziaPath%
|
||||
|
||||
rem Define directories for logs
|
||||
set "ORG_DIR=%AppData%\AmneziaVPN.ORG"
|
||||
set "USER_APP_DIR=%ORG_DIR%\AmneziaVPN"
|
||||
set "USER_LOG_DIR=%USER_APP_DIR%\log"
|
||||
set "SYS_APP_DIR=%ProgramData%\AmneziaVPN"
|
||||
set "SYS_LOG_DIR=%SYS_APP_DIR%\log"
|
||||
set "SYS_LOG_FILE=%SYS_LOG_DIR%\AmneziaVPN-service.log"
|
||||
|
||||
timeout /t 1
|
||||
sc stop AmneziaVPN-service
|
||||
sc delete AmneziaVPN-service
|
||||
sc stop AmneziaWGTunnel$AmneziaVPN
|
||||
sc delete AmneziaWGTunnel$AmneziaVPN
|
||||
taskkill /IM "AmneziaVPN-service.exe" /F
|
||||
taskkill /IM "AmneziaVPN.exe" /F
|
||||
|
||||
rem Delete the service log file under ProgramData
|
||||
if exist "%SYS_LOG_FILE%" del /F /Q "%SYS_LOG_FILE%"
|
||||
if exist "%SYS_LOG_DIR%" rmdir /S /Q "%SYS_LOG_DIR%"
|
||||
rem Try to remove application dir if empty
|
||||
rd "%SYS_APP_DIR%" 2>nul
|
||||
|
||||
rem Delete client logs under current user's AppData\Roaming (Organization\Application)
|
||||
if exist "%USER_LOG_DIR%" rmdir /S /Q "%USER_LOG_DIR%"
|
||||
rem Try to remove app and org directories if empty
|
||||
rd "%USER_APP_DIR%" 2>nul
|
||||
rd "%ORG_DIR%" 2>nul
|
||||
|
||||
exit /b 0
|
||||
set AmneziaPath=%~dp0
|
||||
echo %AmneziaPath%
|
||||
|
||||
rem Define directories for logs
|
||||
set "ORG_DIR=%AppData%\AmneziaVPN.ORG"
|
||||
set "USER_APP_DIR=%ORG_DIR%\AmneziaVPN"
|
||||
set "USER_LOG_DIR=%USER_APP_DIR%\log"
|
||||
set "SYS_APP_DIR=%ProgramData%\AmneziaVPN"
|
||||
set "SYS_LOG_DIR=%SYS_APP_DIR%\log"
|
||||
set "SYS_LOG_FILE=%SYS_LOG_DIR%\AmneziaVPN-service.log"
|
||||
|
||||
timeout /t 1
|
||||
sc stop AmneziaVPN-service
|
||||
sc delete AmneziaVPN-service
|
||||
sc stop AmneziaWGTunnel$AmneziaVPN
|
||||
sc delete AmneziaWGTunnel$AmneziaVPN
|
||||
taskkill /IM "AmneziaVPN-service.exe" /F
|
||||
taskkill /IM "AmneziaVPN.exe" /F
|
||||
|
||||
rem Delete the service log file under ProgramData
|
||||
if exist "%SYS_LOG_FILE%" del /F /Q "%SYS_LOG_FILE%"
|
||||
if exist "%SYS_LOG_DIR%" rmdir /S /Q "%SYS_LOG_DIR%"
|
||||
rem Try to remove application dir if empty
|
||||
rd "%SYS_APP_DIR%" 2>nul
|
||||
|
||||
rem Delete client logs under current user's AppData\Roaming (Organization\Application)
|
||||
if exist "%USER_LOG_DIR%" rmdir /S /Q "%USER_LOG_DIR%"
|
||||
rem Try to remove app and org directories if empty
|
||||
rd "%USER_APP_DIR%" 2>nul
|
||||
rd "%ORG_DIR%" 2>nul
|
||||
|
||||
exit /b 0
|
||||
@@ -1,5 +0,0 @@
|
||||
sc stop AmneziaWGTunnel$AmneziaVPN
|
||||
sc delete AmneziaWGTunnel$AmneziaVPN
|
||||
taskkill /IM "AmneziaVPN-service.exe" /F
|
||||
taskkill /IM "AmneziaVPN.exe" /F
|
||||
exit /b 0
|
||||
@@ -1,32 +0,0 @@
|
||||
set AmneziaPath=%~dp0
|
||||
echo %AmneziaPath%
|
||||
|
||||
rem Define directories for logs
|
||||
set "ORG_DIR=%AppData%\AmneziaVPN.ORG"
|
||||
set "USER_APP_DIR=%ORG_DIR%\AmneziaVPN"
|
||||
set "USER_LOG_DIR=%USER_APP_DIR%\log"
|
||||
set "SYS_APP_DIR=%ProgramData%\AmneziaVPN"
|
||||
set "SYS_LOG_DIR=%SYS_APP_DIR%\log"
|
||||
set "SYS_LOG_FILE=%SYS_LOG_DIR%\AmneziaVPN-service.log"
|
||||
|
||||
timeout /t 1
|
||||
sc stop AmneziaVPN-service
|
||||
sc delete AmneziaVPN-service
|
||||
sc stop AmneziaWGTunnel$AmneziaVPN
|
||||
sc delete AmneziaWGTunnel$AmneziaVPN
|
||||
taskkill /IM "AmneziaVPN-service.exe" /F
|
||||
taskkill /IM "AmneziaVPN.exe" /F
|
||||
|
||||
rem Delete the service log file under ProgramData
|
||||
if exist "%SYS_LOG_FILE%" del /F /Q "%SYS_LOG_FILE%"
|
||||
if exist "%SYS_LOG_DIR%" rmdir /S /Q "%SYS_LOG_DIR%"
|
||||
rem Try to remove application dir if empty
|
||||
rd "%SYS_APP_DIR%" 2>nul
|
||||
|
||||
rem Delete client logs under current user's AppData\Roaming (Organization\Application)
|
||||
if exist "%USER_LOG_DIR%" rmdir /S /Q "%USER_LOG_DIR%"
|
||||
rem Try to remove app and org directories if empty
|
||||
rd "%USER_APP_DIR%" 2>nul
|
||||
rd "%ORG_DIR%" 2>nul
|
||||
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user