Skip to content

Commit

Permalink
- Documentation added: How to create Release Setups.
Browse files Browse the repository at this point in the history
  Comprising also a Documentation of the Versioning System.
- PLUGIN_VERSION_IDENTIFIERS to distinguish between release and other versions.
  • Loading branch information
ItomBuild committed Apr 4, 2024
1 parent 4d78663 commit 40d46af
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 54 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ version_from_git(

# define cmake project and version number
project(itom VERSION ${GIT_VERSION})
set(itom_VERSION_IDENTIFIERS ${GIT_IDENTIFIERS})

message(
STATUS "------------------- Version = ${itom_VERSION} -----------------------\n")
Expand Down
13 changes: 7 additions & 6 deletions Qitom/global.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
#include <qsharedpointer.h>

/* definition and macros */
#define ITOM_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define ITOM_VERSION_MINOR ${itom_VERSION_MINOR}
#define ITOM_VERSION_PATCH ${itom_VERSION_PATCH}
#define ITOM_VERSION CREATEVERSION(ITOM_VERSION_MAJOR ,ITOM_VERSION_MINOR,ITOM_VERSION_PATCH) //ITOM_VERSION is (major << 16) + (minor << 8) + patch
#define ITOM_VERSION_STR "${itom_VERSION}"
#define ITOM_RELEASE_STR "${itom_VERSION}"
#define ITOM_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define ITOM_VERSION_MINOR ${itom_VERSION_MINOR}
#define ITOM_VERSION_PATCH ${itom_VERSION_PATCH}
#define ITOM_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define ITOM_VERSION CREATEVERSION(ITOM_VERSION_MAJOR ,ITOM_VERSION_MINOR,ITOM_VERSION_PATCH) //ITOM_VERSION is (major << 16) + (minor << 8) + patch
#define ITOM_VERSION_STR "${itom_VERSION}"
#define ITOM_RELEASE_STR "${itom_VERSION}"

#ifdef USEPCL
#define ITOM_POINTCLOUDLIBRARY 1
Expand Down
13 changes: 7 additions & 6 deletions Qitom/itom_sdk.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@

//this file is copied to the SDK/include folder.

#define ITOM_MAJOR_VERSION ${itom_VERSION_MAJOR}
#define ITOM_MINOR_VERSION ${itom_VERSION_MINOR}
#define ITOM_PATCH_VERSION ${itom_VERSION_PATCH}
#define ITOM_VERSION_STRING "${itom_VERSION}"
#define INTERFACE_VERSION "${ITOM_VERSION_STRING_WITH_API}"
#define ITOM_APP_NAME "itom - ito measurement software"
#define ITOM_MAJOR_VERSION ${itom_VERSION_MAJOR}
#define ITOM_MINOR_VERSION ${itom_VERSION_MINOR}
#define ITOM_PATCH_VERSION ${itom_VERSION_PATCH}
#define ITOM_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define ITOM_VERSION_STRING "${itom_VERSION}"
#define INTERFACE_VERSION "${ITOM_VERSION_STRING_WITH_API}"
#define ITOM_APP_NAME "itom - ito measurement software"

#define CREATE_VERSION(major,minor,patch) ((major<<16)|(minor<<8)|(patch))
#define CREATE_VERSION_STRING(major,minor,patch) #major"."#minor"."#patch
Expand Down
18 changes: 11 additions & 7 deletions cmake/VersionFromGit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#
#=============================================================================

# This code was derived form Theo Willows' Mukei project at Github:
# https://github.com/Itom
# and further adopted for the needs of Itom

cmake_minimum_required(VERSION 3.12...3.24)

include( CMakeParseArguments )
Expand Down Expand Up @@ -59,7 +63,7 @@ function( version_from_git )
# Find Git or bail out
find_package( Git )
if( NOT GIT_FOUND )
message( FATAL_ERROR "[MunkeiVersionFromGit] Git not found" )
message( FATAL_ERROR "[ItomVersionFromGit] Git not found" )
endif( NOT GIT_FOUND )
endif()

Expand All @@ -75,7 +79,7 @@ function( version_from_git )
)
if( NOT git_result EQUAL 0 )
message( FATAL_ERROR
"[MunkeiVersionFromGit] Failed to execute Git: ${git_error}"
"[ItomVersionFromGit] Failed to execute Git: ${git_error}"
)
endif()

Expand All @@ -91,7 +95,7 @@ function( version_from_git )
)
if( NOT git_result EQUAL 0 )
message( FATAL_ERROR
"[MunkeiVersionFromGit] Failed to execute Git: ${git_error}"
"[ItomVersionFromGit] Failed to execute Git: ${git_error}"
)
endif()

Expand All @@ -103,7 +107,7 @@ function( version_from_git )
set( metadata "${CMAKE_MATCH_5}" )
else()
message( FATAL_ERROR
"[MunkeiVersionFromGit] Git tag isn't valid semantic version: [${git_tag}]"
"[ItomVersionFromGit] Git tag isn't valid semantic version: [${git_tag}]"
)
endif()

Expand Down Expand Up @@ -158,7 +162,7 @@ function( version_from_git )
# Log the results
if( ARG_LOG )
message( STATUS
"[MunkeiVersionFromGit] Version: ${version}
"[ItomVersionFromGit] Version: ${version}
Git tag: [${git_tag}]
Git hash: [${git_hash}]
Decorated: [${git_describe}]
Expand All @@ -169,12 +173,12 @@ function( version_from_git )
endif( ARG_LOG )

# Set parent scope variables
set( GIT_TAG ${git_tag} PARENT_SCOPE )
set( GIT_TAG ${git_tag} PARENT_SCOPE )
set( GIT_SEMVER ${semver} PARENT_SCOPE )
set( GIT_VERSION ${version} PARENT_SCOPE )
set( GIT_VERSION_MAJOR ${version_major} PARENT_SCOPE )
set( GIT_VERSION_MINOR ${version_minor} PARENT_SCOPE )
set( GIT_VERSION_PATCH ${version_patch} PARENT_SCOPE )
set( GIT_IDENTIFIERS ${identifiers} PARENT_SCOPE )
set( GIT_IDENTIFIERS ${identifiers} PARENT_SCOPE )

endfunction( version_from_git )
1 change: 1 addition & 0 deletions docs/userDoc/source/02_installation/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ In this section we want to show you how to get and install |itom| on your comput
install_min_system_requirements.rst
install_installation_from_setup.rst
install_build_from_source.rst
install_setup_creation.rst
install_plugins_designer-plugins.rst
install_all-in-one_development_setup.rst
install_all-in-one_development_setup_creation.rst
Expand Down
67 changes: 67 additions & 0 deletions docs/userDoc/source/02_installation/install_setup_creation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.. include:: ../include/global.inc

.. |star| unicode:: U+002A

Setup creation
**************

Responsible for Setup Releases and maintanance of the versioning system is
the [ITOM Release-Team](https://github.com/orgs/itom-project/teams/itom-release/).

Version Management in ITOM
--------------------------

ITOM version numbers are assigned and maintained via Git-Tags.
For each Release a specific GIT Tag is created with regards to
the central **itomProject** repository and it's correspondand
submodules (e.g. **itom**, **plugins** and **designerPlugins**).

Git TAG are assigned according to the principa of [semantic versioning](https://semver.org)
according to the syntax:

**v\<MAJOR\>.\<MINOR\>.\<PATCH\>[-\<IDENTIFIERS\>]**

1. \<MAJOR\> numeric value changes when new Release in incompatible with previous API
2. \<MINOR\> numeric value changes backward compatibile functionality is added
3. \<PATCH\> numeric value changes backward compatibile bug fixes are made
4. \<IDENTIFIERS\> additional string designator to highlight non-release Tags not intended
for official releases and official distributions


CMake automatically detects the latest Tag number in a series of derived branches.
It sets version number for the following files in the build directory:

- itom\Qitom\global.h
- itom\Qitom\version.rc
- itom\itomWidgets\global.h
- itom\SDK.h
- plugins\<PluginName>\pluginVersion.h
- designerplugins\<PluginName>\pluginVersion.h

> Note: It is possible for Developers to combine different versions of Itom, Plugins and
Designerplugins, by checking out different set of Git-Tags.
This is not intended for regular releases, whereby the version number should be
unified throughout all Repositories.

Besides this the Itom-Release team checks the manually assigned Version Number
for the Interface modules in the files **addInInterfaceVersion.h** and
**designerPluginInterfaceVersion.h**. They are not related to the Itom Versioning
system.


Create Documentation in ITOM
----------------------------

1. run doxygen with \Build\itom\docs\doxygen\itom_doxygen.dox
2. start itom \build\Qiom\qitom.exe
3. run in python the file "create_doc.py" in the \Build\itom\docs\userDoc folder start the Itom Help moudle
4. run in python the file "create_all_plugin_docs.py" in the \Build\itom\docs\pluginDoc
choose the build folder of the avilable Plugin to start the Itom Help module


Create Setup for Windows
------------------------

Download the latest [InnoSetupCompiler](https://jrsoftware.org/isdl.php).
To create a Windows Setup install open the file build\itom\setup\win64\itom_setup_win64.iss in the InnoSetupCompiler
and run it accordingly.
17 changes: 9 additions & 8 deletions itomWidgets/itomWidgetsVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@

#include <itom_sdk.h>

#define ITOM_WIDGETS_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define ITOM_WIDGETS_VERSION_MINOR ${itom_VERSION_MINOR}
#define ITOM_WIDGETS_VERSION_PATCH ${itom_VERSION_PATCH}
#define ITOM_WIDGETS_VERSION CREATE_VERSION(ITOM_WIDGETS_VERSION_MAJOR,ITOM_WIDGETS_VERSION_MINOR,ITOM_WIDGETS_VERSION_PATCH)
#define ITOM_WIDGETS_VERSION_STRING CREATE_VERSION_STRING(ITOM_WIDGETS_VERSION_MAJOR,ITOM_WIDGETS_VERSION_MINOR,ITOM_WIDGETS_VERSION_PATCH)
#define ITOM_WIDGETS_COMPANY "Institut fuer Technische Optik, University of Stuttgart"
#define ITOM_WIDGETS_COPYRIGHT "(C) 2023, ITO, University of Stuttgart"
#define ITOM_WIDGETS_NAME "itomWidgets"
#define ITOM_WIDGETS_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define ITOM_WIDGETS_VERSION_MINOR ${itom_VERSION_MINOR}
#define ITOM_WIDGETS_VERSION_PATCH ${itom_VERSION_PATCH}
#define ITOM_WIDGETS_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define ITOM_WIDGETS_VERSION CREATE_VERSION(ITOM_WIDGETS_VERSION_MAJOR,ITOM_WIDGETS_VERSION_MINOR,ITOM_WIDGETS_VERSION_PATCH)
#define ITOM_WIDGETS_VERSION_STRING CREATE_VERSION_STRING(ITOM_WIDGETS_VERSION_MAJOR,ITOM_WIDGETS_VERSION_MINOR,ITOM_WIDGETS_VERSION_PATCH)
#define ITOM_WIDGETS_COMPANY "Institut fuer Technische Optik, University of Stuttgart"
#define ITOM_WIDGETS_COPYRIGHT "(C) 2023, ITO, University of Stuttgart"
#define ITOM_WIDGETS_NAME "itomWidgets"


#endif // WIDGETVERSION_H
Expand Down
19 changes: 10 additions & 9 deletions pluginTemplates/actuator/pluginVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
#include "itom_sdk.h"

//Change ${itom_VERSION_MAJOR} etc. to your project definition (eg. itom_designerPlugin_VERSION_MAJOR)
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "MyActuator"
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "MyActuator"

//----------------------------------------------------------------------------------------------------------------------------------

Expand Down
19 changes: 10 additions & 9 deletions pluginTemplates/algorithm/pluginVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
#include "itom_sdk.h"

//Change ${itom_VERSION_MAJOR} etc. to your project definition (eg. itom_designerPlugin_VERSION_MAJOR)
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "AlgoPlugin"
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "AlgoPlugin"

//----------------------------------------------------------------------------------------------------------------------------------

Expand Down
19 changes: 10 additions & 9 deletions pluginTemplates/grabber/pluginVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
#include "itom_sdk.h"

//Change ${itom_VERSION_MAJOR} etc. to your project definition (eg. itom_designerPlugin_VERSION_MAJOR)
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "MyGrabber"
#define PLUGIN_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define PLUGIN_VERSION_MINOR ${itom_VERSION_MINOR}
#define PLUGIN_VERSION_PATCH ${itom_VERSION_PATCH}
#define PLUGIN__VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define PLUGIN_VERSION CREATE_VERSION(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_VERSION_STRING CREATE_VERSION_STRING(PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_PATCH)
#define PLUGIN_COMPANY "Your Company Name"
#define PLUGIN_AUTHOR "AuthorName"
#define PLUGIN_COPYRIGHT "Your Copyright"
#define PLUGIN_NAME "MyGrabber"

//----------------------------------------------------------------------------------------------------------------------------------

Expand Down

0 comments on commit 40d46af

Please sign in to comment.