Skip to content

Commit

Permalink
Merge branch 'main' of github.com:nevenko/xca
Browse files Browse the repository at this point in the history
  • Loading branch information
nevenko committed Oct 4, 2024
2 parents c1de583 + e035241 commit cf8cdd1
Show file tree
Hide file tree
Showing 17 changed files with 1,298 additions and 1,071 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ find_package(${QT} REQUIRED COMPONENTS Core Widgets Sql Help LinguistTools)
find_package(${QT} QUIET COMPONENTS Test)

include(cmake/openssl_v_err.cmake)
if (${QT_VERSION} VERSION_LESS 5.10.0)
message(FATAL_ERROR "Qt-${QT_VERSION} not supported, please use at least Qt-5.10.1")
endif()
message(STATUS "Using ${QT} with version ${QT_VERSION}")

get_target_property(qmake_executable ${QT}::qmake IMPORTED_LOCATION)
Expand Down Expand Up @@ -157,6 +160,11 @@ if (APPLE)
elseif(WIN32)

set(RUNTIME_DEST ${CMAKE_PROJECT_NAME}-portable-${PROJECT_VERSION})
if (${QT_VERSION} VERSION_LESS 6.7.0)
set(WINDOWSSTYLE "windowsvistastyle")
else()
set(WINDOWSSTYLE "modernwindowsstyle")
endif()

else()

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This application is documented in the *Help* menu and here:
To build XCA you need:
- a toolchain
- cmake: https://cmake.org
- Qt5 or Qt6: https://www.qt.io
- Qt5 or Qt6: https://www.qt.io (5.10.1 or higher)
- OpenSSL: https://www.openssl.org (1.1.1 or higher)
or libressl-3.6.x
- Sphinx-Build: https://www.sphinx-doc.org
Expand Down
5 changes: 5 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* Close #593: App freezes/crashes when trying to export certain keys
* Close #306 #537: Allow Database-driver options in config file
* Close #537: macos: Compile mariadb-connector and qsqlmysql
* Close #152: How can we specify the Cryptographic Service Provider
* Close #590: MacOS OpenSSL legacy provider not loaded
* Close #199: Templates and Key Identifiers
* Close #239: Check existing Name Constraints
* Add OpenSSL PURPOSE and validation results
Expand Down
32 changes: 28 additions & 4 deletions doc/rst/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,44 @@ Apple macos
- **ODBC**: It requires the /usr/local/opt/libiodbc/lib/libiodbc.2.dylib.
When installing unixodbc via brew the library must be symlinked from
/opt/homebrew/Cellar/libiodbc/3.52.16/lib/libiodbc.2.dylib
- **MariaDB**: Probably via ODBC ?
- **MariaDB**: Since XCA-2.8.0 the MariaDB plugin is included in the
xca.app bundle. No additional installation is required.

Windows
.......

- **PostgreSQL**: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
(Commandline tools are sufficient). Add the bin directory of the Postgres
(Commandline tools are sufficient). Add the *bin* directory of the Postgres
installation directory to your PATH (C:\\Program Files\\PostgreSQL\\16)
- **ODBC**: Use the *ODBC Datasources 64bit* app to configure the SQL Server
If the data source is configured completel, only the matching DSN
- **ODBC**: Use the *ODBC Datasources 64bit* app to configure the SQL Server.
If the data source is configured completel, only the matching DSN is required
in the XCA connection settings.
- **MariaDB (MySQL)**: Install the Plugin from here:
https://github.com/thecodemonkey86/qt_mysql_driver. Select the MinGW variant
and install it as documented.

Driver specific configurations
..............................

Additional options for the database connection can be set in configuration files.
They must be put in the XCA configuration directory, which is displayed in the about dialog.
If there is already a file called *dbhistory* then you know you are in the right place.
The options-file must be named after the database driver, e.g. *QPSQL*, *QMYSQL* or *QODBC*
optionally followed by a dash and the database-hostname (exactly as used in the connection settings
including an optional port number) and a *.options* extension.

Examples:

- QMYSQL-192.168.12.13.options
- QPSQL.options

Also the environment variable XCA_<driver-name>_OPTIONS may be used to set the options.

The file must contain the options as ; separated key=value pairs. The recognized options depend
on the database driver. See:
https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS for PostgreSQL and
https://doc.qt.io/qt-6/sql-driver.html#connection-options for MySQL and
https://doc.qt.io/qt-6/sql-driver.html#odbc-unicode-support for ODBC.

.. _extracting-items:

Expand Down
2 changes: 1 addition & 1 deletion doc/xca.1.tail
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Outputs the commandline arguments in man-page nroff, sphinx rst or as
oneline list for command-completion to automatically update the documentation
if new arguments are added.
.TP
.B QPSQL_OPTIONS QMYSQL_OPTIONS QODBC_OPTIONS
.B XCA_QPSQL_OPTIONS XCA_QMYSQL_OPTIONS XCA_QODBC_OPTIONS
Additional connection options for the SQL database drivers as described in
https://doc.qt.io/qt-5/qsqldatabase.html#setConnectOptions like
\fIQPSQL_OPTIONS=requiressl=1\fR
Expand Down
8 changes: 6 additions & 2 deletions lang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ string(APPEND WIX_LANG_CONTENT
)

WixFile(${D}/language.wxs ${WIX_LANG_CONTENT})
if (${QT_VERSION} VERSION_LESS 6.0.0 )
qt5_add_translation(QM_FILES ${TS_FILES} OPTIONS -silent)
if (${QT_VERSION} VERSION_LESS 6.0.0)
if (${QT_VERSION} VERSION_LESS 5.12.0)
qt5_add_translation(QM_FILES ${TS_FILES})
else()
qt5_add_translation(QM_FILES ${TS_FILES} OPTIONS -silent)
endif()
message(STATUS "Updating translations from source with 'lupdate' only supprted with QT6")
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${QM_FILES})
else()
Expand Down
Loading

0 comments on commit cf8cdd1

Please sign in to comment.