mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-02 09:34:58 -05:00
Add support for nightly builds to release tool
This commit is contained in:
parent
bed921c593
commit
3e2443a861
@ -40,6 +40,8 @@ option(WITH_ASAN "Enable address sanitizer checks (Linux / macOS only)" OFF)
|
|||||||
option(WITH_COVERAGE "Use to build with coverage tests (GCC only)." OFF)
|
option(WITH_COVERAGE "Use to build with coverage tests (GCC only)." OFF)
|
||||||
option(WITH_APP_BUNDLE "Enable Application Bundle for macOS" ON)
|
option(WITH_APP_BUNDLE "Enable Application Bundle for macOS" ON)
|
||||||
|
|
||||||
|
set(WITH_XC_ALL OFF CACHE BOOLEAN "Build in all available plugins")
|
||||||
|
|
||||||
option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
|
option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
|
||||||
option(WITH_XC_NETWORKING "Include networking code (e.g. for downlading website icons)." OFF)
|
option(WITH_XC_NETWORKING "Include networking code (e.g. for downlading website icons)." OFF)
|
||||||
option(WITH_XC_BROWSER "Include browser integration with keepassxc-browser." OFF)
|
option(WITH_XC_BROWSER "Include browser integration with keepassxc-browser." OFF)
|
||||||
@ -53,14 +55,31 @@ if(WITH_XC_HTTP)
|
|||||||
set(WITH_XC_NETWORKING ON CACHE BOOL "Include networking code (e.g. for downlading website icons)." FORCE)
|
set(WITH_XC_NETWORKING ON CACHE BOOL "Include networking code (e.g. for downlading website icons)." FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_XC_ALL)
|
||||||
|
# Enable all options
|
||||||
|
set(WITH_XC_AUTOTYPE ON)
|
||||||
|
set(WITH_XC_NETWORKING ON)
|
||||||
|
set(WITH_XC_BROWSER ON)
|
||||||
|
set(WITH_XC_HTTP ON) # Deprecated
|
||||||
|
set(WITH_XC_YUBIKEY ON)
|
||||||
|
set(WITH_XC_SSHAGENT ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Process ui files automatically from source files
|
# Process ui files automatically from source files
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
set(KEEPASSXC_VERSION_MAJOR "2")
|
set(KEEPASSXC_VERSION_MAJOR "2")
|
||||||
set(KEEPASSXC_VERSION_MINOR "2")
|
set(KEEPASSXC_VERSION_MINOR "3")
|
||||||
set(KEEPASSXC_VERSION_PATCH "4")
|
set(KEEPASSXC_VERSION_PATCH "0")
|
||||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
||||||
|
|
||||||
|
set(KEEPASSXC_RELEASE_BUILD OFF CACHE BOOLEAN "Remove stability warnings")
|
||||||
|
if(NOT KEEPASSXC_RELEASE_BUILD)
|
||||||
|
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION}-snapshot")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Setting up build for KeePassXC v${KEEPASSXC_VERSION}\n")
|
||||||
|
|
||||||
# Distribution info
|
# Distribution info
|
||||||
set(KEEPASSXC_DIST True)
|
set(KEEPASSXC_DIST True)
|
||||||
set(KEEPASSXC_DIST_TYPE "Other" CACHE STRING "KeePassXC Distribution type")
|
set(KEEPASSXC_DIST_TYPE "Other" CACHE STRING "KeePassXC Distribution type")
|
||||||
|
@ -38,6 +38,7 @@ RUN set -x \
|
|||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
cmake3 \
|
cmake3 \
|
||||||
g++ \
|
g++ \
|
||||||
|
git \
|
||||||
libgcrypt20-18-dev \
|
libgcrypt20-18-dev \
|
||||||
libargon2-0-dev \
|
libargon2-0-dev \
|
||||||
libsodium-dev \
|
libsodium-dev \
|
||||||
|
@ -18,7 +18,7 @@ if (MINGW)
|
|||||||
# find static library on Windows, and redefine used symbols to
|
# find static library on Windows, and redefine used symbols to
|
||||||
# avoid definition name conflicts with libsodium
|
# avoid definition name conflicts with libsodium
|
||||||
find_library(ARGON2_SYS_LIBRARIES libargon2.a)
|
find_library(ARGON2_SYS_LIBRARIES libargon2.a)
|
||||||
message(STATUS "Patching libargon2...")
|
message(STATUS "Patching libargon2...\n")
|
||||||
execute_process(COMMAND objcopy
|
execute_process(COMMAND objcopy
|
||||||
--redefine-sym argon2_hash=libargon2_argon2_hash
|
--redefine-sym argon2_hash=libargon2_argon2_hash
|
||||||
--redefine-sym argon2_error_message=libargon2_argon2_error_message
|
--redefine-sym argon2_error_message=libargon2_argon2_error_message
|
||||||
|
44
release-tool
44
release-tool
@ -37,9 +37,10 @@ DOCKER_CONTAINER_NAME="keepassxc-build-container"
|
|||||||
CMAKE_OPTIONS=""
|
CMAKE_OPTIONS=""
|
||||||
COMPILER="g++"
|
COMPILER="g++"
|
||||||
MAKE_OPTIONS="-j8"
|
MAKE_OPTIONS="-j8"
|
||||||
BUILD_PLUGINS="autotype http yubikey"
|
BUILD_PLUGINS="all"
|
||||||
INSTALL_PREFIX="/usr/local"
|
INSTALL_PREFIX="/usr/local"
|
||||||
BUILD_SOURCE_TARBALL=true
|
BUILD_SOURCE_TARBALL=true
|
||||||
|
BUILD_SNAPSHOT=false
|
||||||
ORIG_BRANCH=""
|
ORIG_BRANCH=""
|
||||||
ORIG_CWD="$(pwd)"
|
ORIG_CWD="$(pwd)"
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ Options:
|
|||||||
-i, --install-prefix Install prefix (default: '${INSTALL_PREFIX}')
|
-i, --install-prefix Install prefix (default: '${INSTALL_PREFIX}')
|
||||||
-p, --plugins Space-separated list of plugins to build
|
-p, --plugins Space-separated list of plugins to build
|
||||||
(default: ${BUILD_PLUGINS})
|
(default: ${BUILD_PLUGINS})
|
||||||
|
--snapshot Don't checkout the release tag
|
||||||
-n, --no-source-tarball Don't build source tarball
|
-n, --no-source-tarball Don't build source tarball
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
EOF
|
EOF
|
||||||
@ -310,6 +312,13 @@ checkOsslsigncodeCommandExists() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkSigntoolCommandExists() {
|
||||||
|
command -v signtool > /dev/null
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "signtool command not found on the PATH! Add the Windows SDK binary folder to your PATH."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
checkCodesignCommandExists() {
|
checkCodesignCommandExists() {
|
||||||
command -v codesign > /dev/null
|
command -v codesign > /dev/null
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
@ -556,6 +565,9 @@ build() {
|
|||||||
|
|
||||||
-n|--no-source-tarball)
|
-n|--no-source-tarball)
|
||||||
BUILD_SOURCE_TARBALL=false ;;
|
BUILD_SOURCE_TARBALL=false ;;
|
||||||
|
|
||||||
|
--snapshot)
|
||||||
|
BUILD_SNAPSHOT=true ;;
|
||||||
|
|
||||||
-h|--help)
|
-h|--help)
|
||||||
printUsage "build"
|
printUsage "build"
|
||||||
@ -574,8 +586,16 @@ build() {
|
|||||||
|
|
||||||
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
||||||
|
|
||||||
logInfo "Checking out release tag '${TAG_NAME}'..."
|
if $BUILD_SNAPSHOT; then
|
||||||
git checkout "$TAG_NAME"
|
TAG_NAME="HEAD"
|
||||||
|
local branch=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
logInfo "Using current branch ${branch} to build..."
|
||||||
|
RELEASE_NAME="${RELEASE_NAME}-snapshot"
|
||||||
|
else
|
||||||
|
logInfo "Checking out release tag '${TAG_NAME}'..."
|
||||||
|
git checkout "$TAG_NAME"
|
||||||
|
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DKEEPASSXC_RELEASE_BUILD=ON"
|
||||||
|
fi
|
||||||
|
|
||||||
logInfo "Creating output directory..."
|
logInfo "Creating output directory..."
|
||||||
mkdir -p "$OUTPUT_DIR"
|
mkdir -p "$OUTPUT_DIR"
|
||||||
@ -866,10 +886,10 @@ appsign() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
for f in "${sign_files[@]}"; do
|
for f in "${sign_files[@]}"; do
|
||||||
if [[ ${f: -4} == '.exe' ]]; then
|
if [[ ${f: -4} == ".exe" ]]; then
|
||||||
logInfo "Signing file '${f}' using osslsigncode..."
|
logInfo "Signing file '${f}' using osslsigncode..."
|
||||||
# output a signed exe; we have to use a different name due to osslsigntool limitations
|
# output a signed exe; we have to use a different name due to osslsigntool limitations
|
||||||
osslsigncode sign -pkcs12 "${signtool_key}" -pass "${password}" \
|
osslsigncode sign -pkcs12 "${signtool_key}" -pass "${password}" -n "KeePassXC" \
|
||||||
-t "http://timestamp.comodoca.com/authenticode" -in "${f}" -out "${f}.signed"
|
-t "http://timestamp.comodoca.com/authenticode" -in "${f}" -out "${f}.signed"
|
||||||
|
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
@ -879,8 +899,20 @@ appsign() {
|
|||||||
|
|
||||||
# overwrite the original exe with the signed exe
|
# overwrite the original exe with the signed exe
|
||||||
mv -f "${f}.signed" "${f}"
|
mv -f "${f}.signed" "${f}"
|
||||||
|
elif [[ ${f: -4} == ".msi" ]]; then
|
||||||
|
# Make sure we can find the signtool
|
||||||
|
checkSigntoolCommandExists
|
||||||
|
|
||||||
|
# osslsigncode does not succeed at signing MSI files at this time...
|
||||||
|
logInfo "Signing file '${f}' using Microsoft signtool..."
|
||||||
|
signtool sign -f "${signtool_key}" -p "${password}" -d "KeePassXC" \
|
||||||
|
-t "http://timestamp.comodoca.com/authenticode" "${f}"
|
||||||
|
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Signing failed!"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
logInfo "Skipping non-EXE file '${f}'..."
|
logInfo "Skipping non-executable file '${f}'..."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ file(GLOB TRANSLATION_FILES *.ts)
|
|||||||
get_filename_component(TRANSLATION_EN_ABS keepassx_en.ts ABSOLUTE)
|
get_filename_component(TRANSLATION_EN_ABS keepassx_en.ts ABSOLUTE)
|
||||||
list(REMOVE_ITEM TRANSLATION_FILES keepassx_en.ts)
|
list(REMOVE_ITEM TRANSLATION_FILES keepassx_en.ts)
|
||||||
list(REMOVE_ITEM TRANSLATION_FILES ${TRANSLATION_EN_ABS})
|
list(REMOVE_ITEM TRANSLATION_FILES ${TRANSLATION_EN_ABS})
|
||||||
message(STATUS "${TRANSLATION_FILES}")
|
message(STATUS "Including translations...\n")
|
||||||
|
|
||||||
qt5_add_translation(QM_FILES ${TRANSLATION_FILES})
|
qt5_add_translation(QM_FILES ${TRANSLATION_FILES})
|
||||||
|
|
||||||
|
@ -345,11 +345,13 @@ if(MINGW)
|
|||||||
"${CMAKE_SOURCE_DIR}/LICENSE.GPL-2"
|
"${CMAKE_SOURCE_DIR}/LICENSE.GPL-2"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
"${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
||||||
|
|
||||||
|
string(REGEX REPLACE "-snapshot$" "" KEEPASSXC_VERSION_CLEAN ${KEEPASSXC_VERSION})
|
||||||
|
|
||||||
set(CPACK_GENERATOR "ZIP;NSIS")
|
set(CPACK_GENERATOR "ZIP;NSIS")
|
||||||
set(CPACK_STRIP_FILES ON)
|
set(CPACK_STRIP_FILES ON)
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
||||||
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION})
|
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION_CLEAN})
|
||||||
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
||||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
||||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#cmakedefine KEEPASSXC_DIST_SNAP
|
#cmakedefine KEEPASSXC_DIST_SNAP
|
||||||
#cmakedefine KEEPASSXC_DIST_APPIMAGE
|
#cmakedefine KEEPASSXC_DIST_APPIMAGE
|
||||||
|
|
||||||
|
#cmakedefine KEEPASSXC_RELEASE_BUILD
|
||||||
|
|
||||||
#cmakedefine HAVE_PR_SET_DUMPABLE 1
|
#cmakedefine HAVE_PR_SET_DUMPABLE 1
|
||||||
#cmakedefine HAVE_RLIMIT_CORE 1
|
#cmakedefine HAVE_RLIMIT_CORE 1
|
||||||
#cmakedefine HAVE_PT_DENY_ATTACH 1
|
#cmakedefine HAVE_PT_DENY_ATTACH 1
|
||||||
|
@ -54,6 +54,9 @@ AboutDialog::AboutDialog(QWidget* parent)
|
|||||||
|
|
||||||
QString debugInfo = "KeePassXC - ";
|
QString debugInfo = "KeePassXC - ";
|
||||||
debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION));
|
debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION));
|
||||||
|
#ifndef KEEPASSXC_RELEASE_BUILD
|
||||||
|
debugInfo.append(tr("Build Type: Snapshot\n"));
|
||||||
|
#endif
|
||||||
if (!commitHash.isEmpty()) {
|
if (!commitHash.isEmpty()) {
|
||||||
debugInfo.append(tr("Revision: %1").arg(commitHash.left(7)).append("\n"));
|
debugInfo.append(tr("Revision: %1").arg(commitHash.left(7)).append("\n"));
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,8 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
|
|||||||
} else {
|
} else {
|
||||||
dbStruct.dbWidget->switchToOpenDatabase(dbStruct.fileInfo.absoluteFilePath());
|
dbStruct.dbWidget->switchToOpenDatabase(dbStruct.fileInfo.absoluteFilePath());
|
||||||
}
|
}
|
||||||
emit messageDismissGlobal();
|
|
||||||
|
emit messageDismissTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseTabWidget::importCsv()
|
void DatabaseTabWidget::importCsv()
|
||||||
|
@ -424,6 +424,13 @@ MainWindow::MainWindow()
|
|||||||
connect(m_ui->tabWidget, SIGNAL(messageDismissGlobal()), this, SLOT(showKeePassHTTPDeprecationNotice()));
|
connect(m_ui->tabWidget, SIGNAL(messageDismissGlobal()), this, SLOT(showKeePassHTTPDeprecationNotice()));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef KEEPASSXC_RELEASE_BUILD
|
||||||
|
m_ui->globalMessageWidget->showMessage(tr("WARNING: You are using an unstable build of KeePassXC!\n"
|
||||||
|
"There is a high risk of corruption, maintain a backup of your databases.\n"
|
||||||
|
"This version is not meant for production use."),
|
||||||
|
MessageWidget::Warning, -1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user