VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-23 23:49:51 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-24 00:10:27 +0200
commit692e2c3455eba3d2d0ba19b18502bbc8221b5f78 (patch)
tree41b7255ee360223539a2b21467d7e61ed61e7357
parent2b65a143010cbb4413c70dbbfd2e1db3d4b5f3b2 (diff)
downloadVeraCrypt-692e2c3455eba3d2d0ba19b18502bbc8221b5f78.tar.gz
VeraCrypt-692e2c3455eba3d2d0ba19b18502bbc8221b5f78.zip
Linux: set version explicitly in CMakeLists.txt instead of relying on parsing of Tcdefs.h which can be erroneous
-rw-r--r--src/Build/CMakeLists.txt20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt
index 1a34e3fe..d8011ef4 100644
--- a/src/Build/CMakeLists.txt
+++ b/src/Build/CMakeLists.txt
@@ -10,6 +10,11 @@ elseif ( NOT DEFINED NOGUI )
MESSAGE(FATAL_ERROR "NOGUI variable MUST BE set to TRUE if building 'Console' version, 'FALSE' otherwise")
endif()
+# - Set version of the package
+set( FULL_VERSION "1.24" )
+set( VERSION "1.24.6" )
+set( RELEASE "1" )
+
# - Set PROJECT_NAME and CONFLICT_PACKAGE values
if (NOGUI)
set( PROJECT_NAME "veracrypt-console" )
@@ -206,21 +211,6 @@ set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging) # creates the Packaging directory under build directory when CMake generates the build system
-# - We excute 'grep VERSION_STRING ../../Common/Tcdefs.h | head -n 1' to get the line which include 'VERSION_STRING'
-# Then we delete all first characters from the beginning of the line until the first '"' to get the version in the format : "X.YYY..."
-# Then, we remove the leading and trailing '"' characters
-# Then, we retrieve the 'version' and the 'release'
-# Finally, we replace '-' in the release if it exists with a '.' because CPack does not like '-' in the release
-execute_process(COMMAND grep VERSION_STRING "$ENV{SOURCEPATH}/Common/Tcdefs.h"
- COMMAND head -n 1
- OUTPUT_VARIABLE FULL_VERSION_LINE OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(REGEX REPLACE "^[^\"]+" "" FULL_VERSION ${FULL_VERSION_LINE})
-string(REGEX REPLACE "\"" "" FULL_VERSION ${FULL_VERSION})
-string(REPLACE "." ";" FULL_VERSION_LIST ${FULL_VERSION})
-list(GET FULL_VERSION_LIST 0 VERSION)
-list(GET FULL_VERSION_LIST 1 RELEASE)
-string(REPLACE "-" "." RELEASE ${RELEASE})
-
set( VENDOR "IDRIX" )
set( LICENSE "VeraCrypt License" )
set( CONTACT "VeraCrypt Team <veracrypt@idrix.fr>" )