Removed the tiny_autoconf, it's still enabled by default, and instead
added the disable_autoconf qmake configuration feature.
This change was made to follow name and logic convention of another
qmake configuration options.
- updated docs
The tiny_autoconf and tiny_dotenv qmake CONFIG were added in the TinyORM
v0.34.0. These new features allow to auto-configure TinyORM, and with
their help, the conf.pri files can be skipped entirely. The
tiny_autoconf is designed to find the vcpkg installation and tiny_dotenv
to include the .env and .env.$$QMAKE_PLATFORM files in the project's
root folder. They can be configured using qmake and environment
variables, and they also contain some guessing logic if these variables
are not defined.
These are qmake and environment variables that affect the
auto-configuration feature:
- TINY_VCPKG_ROOT - path to the vcpkg installation folder (if not
defined then it tries to use the VCPKG_ROOT environment variable)
- TINY_VCPKG_TRIPLET - vcpkg triplet to use
(vcpkg/installed/$$TINY_VCPKG_TRIPLET/); if not defined then it tries
to guess the vcpkg triplet on the base of the current compiler and OS
(QMAKESPEC)
- TINY_MYSQL_ROOT - path to the MySQL installation folder (if not
defined then it tries to guess the MySQL installation folder:
$$(ProgramFiles)/MySQL/MySQL Server (8.1|8.0|5.7)/)
You can set these variables in the .env or .conf files (recommended), in
the qmake file (or wherever you want), or as environment variables.
These variables are set after the auto-configuration is done:
- TINY_VCPKG_INCLUDE - path to vcpkg include folder
(vcpkg/installed/<triplet>/include/)
- TINY_MYSQL_INCLUDE - path to the MySQL include folder (MySQL Server
8.1/include/)
- TINY_MYSQL_LIB - path to the MySQL lib folder (MySQL Server
8.1/include/)
The TINY_MYSQL_INCLUDE and TINY_MYSQL_LIB are only set on win32 except
mingw.
Be able to build with clang-cl with MSVC 2019/2022 but only with
inline constants.
- supported by both CMake and qmake 🎉
- updated docs support compilers
qmake specific:
- enhanced and fixed tiny_toolchain_requirement
- added clang-cl min. required version to tiny_toolchain_requirement
- enhanced winconf.pri
- updated conf.pri.examples
- added a new feature file the tiny_system_headers.prf, it unifies
tagging system headers
cmake specific:
- also added clang-cl min. required version as minReqClangClVersion
- for clang-cl set the INLINE_CONSTANTS to ON and don't show this
CMake option
This command is very similar to the make:migration command except
the --create and --table command-line parameters. It provides the same
functionality but for seeders.
- updated docs TINYTOM_SEEDERS_DIR macro and TOM_SEEDERS_DIR for cmake
Renamed cmake option and macro from the TINY/TOM_MIGRATIONS_PATH to the
TINY/TOM_MIGRATIONS_DIR.
- updated documentation
- extracted init. code for the TINYTOM_MIGRATIONS_DIR to the own cmake
macro
User can provide a custom migrations path for the make:migration
command.
Default path is at database/migrations relative to the tom example
executable.
This allows to use the tom example as a real migration application and
the user doesn't have to create his own migration project.
Using:
- TomApplication::migrationsPath()
- TINYTOM_MIGRATIONS_PATH preprocessor macro, will be stringified
- TOM_MIGRATIONS_PATH CMake PATH option
- removed hard-coded dependencies
- user specific includes or libraries can be defined in the conf.pri
- tests have it's own conf.pri
- qmake related pri files moved to the qmake/ folder