Set version to 3.10

Now it's consistent with the __Pawn constant (0x030A == 3.10).
This commit is contained in:
Zeex 2015-04-12 20:39:15 +06:00
parent add2c2b7e7
commit 9191803370
6 changed files with 30 additions and 44 deletions

View File

@ -11,5 +11,5 @@ build_script:
- cmake --build . --config %CONFIGURATION% --target package
artifacts:
- path: pawnc-*-win32.zip
- path: pawnc-*-windows.zip
name: Binary package

View File

@ -3,6 +3,19 @@ cmake_minimum_required(VERSION 2.8)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
set(VERSION_MAJOR 3)
set(VERSION_MINOR 10)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION_STR ${VERSION}.samp)
math(EXPR VERSION_INT "${VERSION_MAJOR} << 8 | ${VERSION_MINOR}")
# Append git commit hash to the version string
include(GetGitRevisionDescription)
git_describe(GIT_COMMIT --always)
if(GIT_COMMIT)
set(VERSION_STR ${VERSION_STR}.${GIT_COMMIT})
endif()
# check for optional include files
include(CheckIncludeFile)
check_include_file("unistd.h" HAVE_UNISTD_H)
@ -43,15 +56,7 @@ if(UNIX)
link_libraries(pthread)
endif()
# Append git commit hash to the version string
include(GetGitRevisionDescription)
git_describe(GIT_COMMIT --always)
if(GIT_COMMIT)
set(GIT_COMMIT_SUFFIX ".${GIT_COMMIT}")
else()
set(GIT_COMMIT_SUFFIX "")
endif()
configure_file(svnrev.h.in svnrev.h)
configure_file(version.h.in version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# The Pawn compiler shared library
@ -143,12 +148,10 @@ if(MSVC)
endif()
# Generate a binary package with CPack
if(CMAKE_SYSTEM_NAME)
string(TOLOWER "${CMAKE_SYSTEM_NAME}" SYSTEM_NAME_LOWER)
set(SYSTEM_NAME_SUFFIX -${SYSTEM_NAME_LOWER})
endif()
if(GIT_COMMIT)
set(GIT_COMMIT_SUFFIX -${GIT_COMMIT})
endif()
set(CPACK_PACKAGE_FILE_NAME pawnc${GIT_COMMIT_SUFFIX}${SYSTEM_NAME_SUFFIX})
string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_LOWER)
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION ${VERSION_STR})
set(CPACK_PACKAGE_FILE_NAME pawnc-${VERSION_STR}-${SYSTEM_NAME_LOWER})
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/../../license.txt)
include(CPack)

View File

@ -4,7 +4,7 @@
#else
# include <ver.h>
#endif
#include "svnrev.h"
#include "version.h"
AppIcon ICON "../bin/pawn.ico"
@ -13,10 +13,7 @@ AppIcon ICON "../bin/pawn.ico"
* All strings MUST have an explicit \0. See the Windows SDK documentation
* for details on version information and the VERSIONINFO structure.
*/
#define VERSION 3
#define REVISION 2
#define BUILD SVN_REV
#define VERSIONSTR "3.2." SVN_REVSTR "\0"
#define VERSIONSTR VERSION_STR "\0"
#if defined STAND_ALONE
#define VERSIONNAME "pawncc.exe\0"
#define VERSIONDESCRIPTION "Pawn Compiler\0"
@ -30,8 +27,8 @@ AppIcon ICON "../bin/pawn.ico"
#define VERSIONCOPYRIGHT "Copyright \251 1998-2006 ITB CompuPhase\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION, REVISION, BUILD, 0
PRODUCTVERSION VERSION, REVISION, BUILD, 0
FILEVERSION VERSION_MAJOR, VERSION_MINOR, 0, 0
PRODUCTVERSION VERSION_MAJOR, VERSION_MINOR, 0, 0
FILEFLAGSMASK 0x0000003FL
FILEFLAGS 0
#if defined(WIN32)

View File

@ -70,9 +70,7 @@
#include "lstring.h"
#include "sc.h"
#include "svnrev.h"
#define VERSION_STR "3.2." SVN_REVSTR
#define VERSION_INT 0x030A
#include "version.h"
static void resetglobals(void);
static void initglobals(void);

View File

@ -1,16 +0,0 @@
/* This file was generated by the "svnrev" utility.
* You should not modify it manually, as it may be re-generated.
*
* $Revision: 3664$
* $Date: 2006-11-08$
*/
#ifndef SVNREH_H
#define SVNREV_H
#define SVN_REV 3664
#define SVN_REVSTR "3664.samp@GIT_COMMIT_SUFFIX@"
#define SVN_REVDATE "2006-11-08"
#define SVN_REVSTAMP 20061108L
#endif /* SVNREV_H */

View File

@ -0,0 +1,4 @@
#define VERSION_MINOR @VERSION_MINOR@
#define VERSION_MAJOR @VERSION_MAJOR@
#define VERSION_STR "@VERSION_STR@"
#define VERSION_INT @VERSION_INT@