- moved LicenseChecker from App to Lib project - added MessageDispatchWhenLicenseValid. This message takes another message as an argument which is dispatched once the LicenseChecher confirms the current license key or (if the key is invalid) once the user entered a valid key. This message is used when messages are sent that should not be working when no license key has been entered (LoadProject or ActivateTokenLocation via the IDE communication). - added MessageShowStartScreen which makes the MainView display this screen. This message is also sent via the MessageDispatchWhenLicenseValid. - removed startup project from appsettings.
22 lines
827 B
CMake
22 lines
827 B
CMake
# searching for public key file of the Coati version in setup/RSA_keys
|
|
# if found the file will be put into a const string into the PubicKeh.h file
|
|
|
|
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_VERSION_NUMBER}")
|
|
message(STATUS "Get Public Key for Coati version: ${VERSION_MAJOR}")
|
|
|
|
set(pubKeyFile "${CMAKE_SOURCE_DIR}/setup/RSA_keys/public-${VERSION_MAJOR}.pem")
|
|
# message(STATUS "file: ${pubKeyFile}")
|
|
|
|
if(EXISTS ${pubKeyFile})
|
|
file(READ ${pubKeyFile} KEY)
|
|
STRING(REGEX REPLACE "\"" "\\\\\"" KEY "${KEY}")
|
|
STRING(REGEX REPLACE "\n" "\\\\n\"\n\t\"" KEY "${KEY}")
|
|
# message(STATUS "key: ${KEY}")
|
|
else()
|
|
message(WARNING "public keyfile for this version of Coati")
|
|
endif()
|
|
|
|
configure_file(
|
|
${CMAKE_SOURCE_DIR}/cmake/PublicKey.h.in
|
|
${CMAKE_SOURCE_DIR}/build/src/lib_license/PublicKey.h
|
|
) |