mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 20:11:17 +00:00
Merge pull request #449 from csware/include-win-version-information
Include windows version information in git2.dll
This commit is contained in:
commit
92e2081f40
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@ msvc/Release/
|
|||||||
*.vc*proj*
|
*.vc*proj*
|
||||||
*.sdf
|
*.sdf
|
||||||
*.opensdf
|
*.opensdf
|
||||||
|
*.aps
|
||||||
CMake*
|
CMake*
|
||||||
*.cmake
|
*.cmake
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
PROJECT(libgit2 C)
|
PROJECT(libgit2 C)
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
|
|
||||||
FILE(STRINGS "include/git2.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
|
FILE(STRINGS "include/git2/version.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
|
||||||
|
|
||||||
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}")
|
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}")
|
||||||
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}")
|
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}")
|
||||||
@ -91,8 +91,8 @@ FILE(GLOB SRC_H include/git2/*.h)
|
|||||||
|
|
||||||
# On Windows use specific platform sources
|
# On Windows use specific platform sources
|
||||||
IF (WIN32 AND NOT CYGWIN)
|
IF (WIN32 AND NOT CYGWIN)
|
||||||
ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_LIB)
|
ADD_DEFINITIONS(-DWIN32 -D_DEBUG)
|
||||||
FILE(GLOB SRC src/*.c src/win32/*.c)
|
FILE(GLOB SRC src/*.c src/win32/*.c src/win32/git2.rc)
|
||||||
ELSE()
|
ELSE()
|
||||||
FILE(GLOB SRC src/*.c src/unix/*.c)
|
FILE(GLOB SRC src/*.c src/unix/*.c)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
@ -8,10 +8,7 @@
|
|||||||
#ifndef INCLUDE_git_git_h__
|
#ifndef INCLUDE_git_git_h__
|
||||||
#define INCLUDE_git_git_h__
|
#define INCLUDE_git_git_h__
|
||||||
|
|
||||||
#define LIBGIT2_VERSION "0.15.0"
|
#include "git2/version.h"
|
||||||
#define LIBGIT2_VER_MAJOR 0
|
|
||||||
#define LIBGIT2_VER_MINOR 15
|
|
||||||
#define LIBGIT2_VER_REVISION 0
|
|
||||||
|
|
||||||
#include "git2/common.h"
|
#include "git2/common.h"
|
||||||
#include "git2/errors.h"
|
#include "git2/errors.h"
|
||||||
|
15
include/git2/version.h
Normal file
15
include/git2/version.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2009-2011 the libgit2 contributors
|
||||||
|
*
|
||||||
|
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
||||||
|
* a Linking Exception. For full terms see the included COPYING file.
|
||||||
|
*/
|
||||||
|
#ifndef INCLUDE_git_version_h__
|
||||||
|
#define INCLUDE_git_version_h__
|
||||||
|
|
||||||
|
#define LIBGIT2_VERSION "0.15.0"
|
||||||
|
#define LIBGIT2_VER_MAJOR 0
|
||||||
|
#define LIBGIT2_VER_MINOR 15
|
||||||
|
#define LIBGIT2_VER_REVISION 0
|
||||||
|
|
||||||
|
#endif
|
42
src/win32/git2.rc
Normal file
42
src/win32/git2.rc
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#include <winver.h>
|
||||||
|
#include "../../include/git2/version.h"
|
||||||
|
|
||||||
|
#ifndef INCLUDE_LIB
|
||||||
|
#define LIBGIT2_FILENAME "git2.dll"
|
||||||
|
#else
|
||||||
|
#define LIBGIT2_FILENAME "libgit2.dll"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||||
|
FILEVERSION LIBGIT2_VER_MAJOR,LIBGIT2_VER_MINOR,LIBGIT2_VER_REVISION,0
|
||||||
|
PRODUCTVERSION LIBGIT2_VER_MAJOR,LIBGIT2_VER_MINOR,LIBGIT2_VER_REVISION,0
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 1
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0
|
||||||
|
#endif
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE 0 // not used
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904E4"
|
||||||
|
//language ID = U.S. English, char set = Windows, Multilingual
|
||||||
|
BEGIN
|
||||||
|
VALUE "FileDescription", "libgit2 - the Git linkable library\0"
|
||||||
|
VALUE "FileVersion", LIBGIT2_VERSION "\0"
|
||||||
|
VALUE "InternalName", LIBGIT2_FILENAME "\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2009-2011 the libgit2 contributors\0"
|
||||||
|
VALUE "OriginalFilename", LIBGIT2_FILENAME "\0"
|
||||||
|
VALUE "ProductName", "libgit2\0"
|
||||||
|
VALUE "ProductVersion", LIBGIT2_VERSION "\0"
|
||||||
|
VALUE "Comments", "For more information visit http://libgit2.github.com/\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0409, 1252
|
||||||
|
END
|
||||||
|
END
|
Loading…
Reference in New Issue
Block a user