Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
horar committed Aug 28, 2016
2 parents e48e35d + fd26924 commit 856b615
Show file tree
Hide file tree
Showing 15 changed files with 300 additions and 276 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
History of user-visible changes.

## [v1.4.1](https://github.com/openconnect/openconnect-gui/tree/v1.4/1) (unreleased)
- Flushing Route Breaks OpenConnect-GUI (#113)
- building from source code snapshots fixed (i.e. without cloning the repo)

[Full Changelog](https://github.com/openconnect/openconnect-gui/compare/v1.4.0...v1.4.1)


## [v1.4.0](https://github.com/openconnect/openconnect-gui/tree/v1.4.0) (2016-08-10)
- updated gnutls(3.4.14), stoken (0.90), gmp(6.1.0), nettle(3.2), p11-kit(0.23.2), zlib (1.2.8), libxml2 (2.9.3)
- updated TAP-windows(9.21.2), Qt(5.6)
Expand Down
73 changes: 73 additions & 0 deletions CMake/Includes/git_revision_generate.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#create a pretty commit id using git
#uses 'git describe --tags', so tags are required in the repo
#create a tag with 'git tag <name>' and 'git push --tags'

if(IS_DIRECTORY ${GIT_ROOT_DIR}/.git)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty
WORKING_DIRECTORY ${GIT_ROOT_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_ID
)
if(NOT ${res_var} EQUAL 0)
set(GIT_COMMIT_ID "?.?.?-unknown")
message(WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info.")
endif()
string(REGEX REPLACE "\n$" "" GIT_COMMIT_ID ${GIT_COM_ID})
string(REGEX REPLACE "^v" "" GIT_COMMIT_ID ${GIT_COMMIT_ID})

# check number of digits in version string
string(REPLACE "." ";" GIT_COMMIT_ID_VLIST ${GIT_COMMIT_ID})
list(LENGTH GIT_COMMIT_ID_VLIST GIT_COMMIT_ID_VLIST_COUNT)

# no.: major
string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_COMMIT_ID}")
# no.: minor
string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_COMMIT_ID}")

if(${GIT_COMMIT_ID_VLIST_COUNT} STREQUAL "2")
# no. patch
set(VERSION_PATCH "0")
# SHA1 string + git 'dirty' flag
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+(.*)" "\\1" VERSION_SHA1 "${GIT_COMMIT_ID}")
else()
# no. patch
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_COMMIT_ID}")
# SHA1 string + git 'dirty' flag
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" VERSION_SHA1 "${GIT_COMMIT_ID}")
endif()

set(PROJECT_VERSION "${GIT_COMMIT_ID}")
#string(APPEND PROJECT_VERSION " (git)")
message(STATUS "Version: ${PROJECT_VERSION} [git]")
else()
message(STATUS "Version: ${PROJECT_VERSION} [cmake]")
endif()

if(NOT APPLE)
if(PROJ_UAC_ON)
set(UAC_FLAG "")
else()
set(UAC_FLAG "//")
endif()

message(STATUS "Processing resource file...")
file(READ ${INPUT_DIR}/${PROJECT_NAME}.rc.in rc_temporary)
string(CONFIGURE ${rc_temporary} rc_updated)
file(WRITE ${OUTPUT_DIR}/${PROJECT_NAME}.rc.tmp ${rc_updated})
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${OUTPUT_DIR}/${PROJECT_NAME}.rc.tmp ${OUTPUT_DIR}/${PROJECT_NAME}.rc
)
else()
message(FATAL_ERROR " === ERROR ===")
endif()

message(STATUS "Processing app info file...")
file(READ ${INPUT_DIR}/${PROJECT_NAME}.cpp.in cpp_temporary)
string(CONFIGURE "${cpp_temporary}" cpp_updated @ONLY)
file(WRITE ${OUTPUT_DIR}/${PROJECT_NAME}.cpp.tmp "${cpp_updated}")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${OUTPUT_DIR}/${PROJECT_NAME}.cpp.tmp ${OUTPUT_DIR}/${PROJECT_NAME}.cpp
)
39 changes: 39 additions & 0 deletions CMake/Includes/git_revision_main.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generate version string via Git description

if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/.git)
find_package(Git 2.7 REQUIRED)
endif()

add_custom_target(git_revision ALL)
add_custom_command(
TARGET git_revision
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src

COMMAND ${CMAKE_COMMAND}
-DGIT_ROOT_DIR=${CMAKE_SOURCE_DIR}
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}

-DINPUT_DIR=${CMAKE_CURRENT_SOURCE_DIR}/src
-DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}/src

-DPROJECT_NAME=${PROJECT_NAME}
-DPROJECT_VERSION=${PROJECT_VERSION}
-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}
-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}
-DPROJECT_VERSION_TWEAK=${PROJECT_VERSION_TWEAK}

-DPRODUCT_NAME_COMPANY=${PRODUCT_NAME_COMPANY}
-DPRODUCT_NAME_SHORT=${PRODUCT_NAME_SHORT}
-DPRODUCT_NAME_LONG=${PRODUCT_NAME_LONG}
-DPRODUCT_NAME_COPYRIGHT=${PRODUCT_NAME_COPYRIGHT}
-DPRODUCT_NAME_COMPANY_DOMAIN=${PRODUCT_NAME_COMPANY_DOMAIN}

-DPROJ_UAC_ON=${PROJ_UAC_ON}

-DAPPLE=${APPLE}
-P ${CMAKE_SOURCE_DIR}/CMake/Includes/git_revision_generate.cmake
COMMENT "Analyzing Git revision/tag changes..." VERBATIM
)

add_dependencies(${PROJECT_NAME} git_revision)
16 changes: 0 additions & 16 deletions CMake/Includes/scm-generate_resource.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions CMake/Includes/scm-generate_source.cmake

This file was deleted.

41 changes: 0 additions & 41 deletions CMake/Includes/scm-generate_version.cmake

This file was deleted.

63 changes: 0 additions & 63 deletions CMake/Includes/scm.cmake

This file was deleted.

Loading

0 comments on commit 856b615

Please sign in to comment.