/*
 * Copyright (c) 2003-2024 Rony Shapiro <ronys@pwsafe.org>.
 * All rights reserved. Use of the code is allowed under the
 * Artistic License 2.0 terms, as specified in the LICENSE file
 * distributed with this code, or available from
 * http://www.opensource.org/licenses/artistic-license-2.0.php
 */

#ifndef _VERSION_H_
#define _VERSION_H_

// version.h is created in the source tree from version.in via
// pre_build.vbs (deprecated - build via cmake is the main build path)
//
// version.h is also created in the specified build directory
// by cmake using version.in as the template
//
// In both cases, the version information is retrieved from the toplevel version.mfc file.
//
// When building via cmake in the build directory, make sure version.h
// is *not* in the source tree.

// Format: Major, Minor, Revision
//   Revision  = 0 for all Formally Released versions
//   Revision != 0 for all Intermediate versions
// Full information shown in AboutBox; only Major & Minor are displayed in initial dialog

// Following for PWSversion
#define PWS_VERSION_MAJOR @pwsafe_VERSION_MAJOR@
#define PWS_VERSION_MINOR @pwsafe_VERSION_MINOR@
#define PWS_REVISION @pwsafe_REVISION@
#ifdef _DEBUG
#cmakedefine PWS_SPECIALBUILD L"@pwsafe_SPECIALBUILD@ [D]"
#else
#cmakedefine PWS_SPECIALBUILD L"@pwsafe_SPECIALBUILD@"
#endif
#define PWS_VERSTRING L"@pwsafe_VERSTRING@"

// Following for resource file / properties
#define PWS_PRODUCTVER      @PWS_PRODUCTVER@

#ifdef _DEBUG
#define PWS_PRODUCTVER_STR  "@PWS_PRODUCTVER_STR@ (Debug)"
#else
#define PWS_PRODUCTVER_STR  "@PWS_PRODUCTVER_STR@"
#endif

#define PWS_FILEVER         @PWS_FILEVER@
#define PWS_FILEVER_STR     "@PWS_FILEVER_STR@"

#cmakedefine PWS_PRIVATEBUILD_STR   "@PWS_PRIVATEBUILD_STR@"
#cmakedefine PWS_SPECIALBUILD_STR   "@PWS_SPECIALBUILD_STR@"

#define PWS_DESCRIBE_STR    "@PWS_DESCRIBE_STR@"

#cmakedefine PWS_TIMESTAMP_STR  "@PWS_TIMESTAMP_STR@"
#cmakedefine PWS_REPO_URL_STR   "@PWS_REPO_URL_STR@"

#endif // _VERSION_H_
