0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Prepare for release. Add rc-files and read version info from file

This commit is contained in:
Sergey Yagovtsev 2016-11-16 23:58:47 +03:00
parent 5c4904756f
commit 46b295c67b
8 changed files with 87 additions and 107 deletions

View File

@ -8,6 +8,27 @@ set(
${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}
) )
file (STRINGS ${ROOT}/version.info PRODUCT_VERSION_STRING)
string(REPLACE "." ";" VERSION_LIST ${PRODUCT_VERSION_STRING})
list(GET VERSION_LIST 0 PROGRAM_VERSION_MAJOR)
list(GET VERSION_LIST 1 PROGRAM_VERSION_MINOR)
list(GET VERSION_LIST 2 PROGRAM_VERSION_PATCH)
message(STATUS "PROGRAM_VERSION_MAJOR: ${PROGRAM_VERSION_MAJOR}")
message(STATUS "PROGRAM_VERSION_MINOR: ${PROGRAM_VERSION_MINOR}")
message(STATUS "PROGRAM_VERSION_PATCH: ${PROGRAM_VERSION_PATCH}")
# EasyProfiler version
add_definitions(
-DEASY_VERSION_MAJOR=${PROGRAM_VERSION_MAJOR}
-DEASY_VERSION_MINOR=${PROGRAM_VERSION_MINOR}
-DEASY_VERSION_REV=${PROGRAM_VERSION_PATCH}
-DPRODUCT_VERSION=\"v${PRODUCT_VERSION_STRING}\"
)
# EasyProfiler version
set(OUTPUT_DIR set(OUTPUT_DIR
${ROOT}/bin ${ROOT}/bin
) )
@ -43,50 +64,3 @@ add_subdirectory(src)
add_subdirectory(sample) add_subdirectory(sample)
add_subdirectory(reader) add_subdirectory(reader)
add_subdirectory(profiler_gui) add_subdirectory(profiler_gui)
install(FILES
LICENSE.APACHE
LICENSE.GPL3
DESTINATION .
)
set(CPACK_PACKAGE_NAME "easy_profiler")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "Easy Profiler Team")
set(CPACK_PACKAGE_VENDOR "Easy Profiler Team")
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(PLATFORM_SUFFIX x64)
else()
set(PLATFORM_SUFFIX x86)
endif(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
if(UNIX)
execute_process( COMMAND ldd --version
OUTPUT_VARIABLE LDD_OUT )
if(LDD_OUT)
string( REGEX MATCH "^ldd.*[0-9][.][0-9][0-9]?" LDD_VERSION_STRING ${LDD_OUT} )
endif(LDD_OUT)
if( LDD_VERSION_STRING )
string( REGEX MATCH "[0-9][.][0-9][0-9]?" LIBC_VERSION ${LDD_VERSION_STRING} )
endif( LDD_VERSION_STRING )
if(LIBC_VERSION)
set(CPACK_SYSTEM_NAME "linux_${PLATFORM_SUFFIX}-libc_${LIBC_VERSION}")
endif(LIBC_VERSION)
set(CPACK_GENERATOR "TGZ")
else()
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "TRUE")
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR "ZIP")
endif(UNIX)
set(CPACK_PACKAGE_VERSION "v1.0.0")
include(CPack)

View File

@ -48,24 +48,3 @@ if(UNIX)
endif(UNIX) endif(UNIX)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Network easy_profiler ${SPECIAL_LIB}) target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Network easy_profiler ${SPECIAL_LIB})
install(TARGETS ${PROJECT_NAME}
DESTINATION bin
COMPONENT binaries
)
get_target_property(QtCore_location Qt5::Core LOCATION)
get_target_property(QtWidgets_location Qt5::Widgets LOCATION)
get_target_property(QtNetwork_location Qt5::Network LOCATION)
get_target_property(QtGui_location Qt5::Gui LOCATION)
get_target_property(QtSvg_location Qt5::Svg LOCATION)
install(FILES
${QtCore_location}
${QtWidgets_location}
${QtNetwork_location}
${QtGui_location}
${QtSvg_location}
DESTINATION bin
COMPONENT binaries
)

View File

@ -47,9 +47,9 @@
#include "easy/reader.h" #include "easy/reader.h"
//#ifdef _WIN32 #if defined(_WIN32) && defined (_BUILD_RELEASE_)
//#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup") #pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
//#endif #endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {

View File

@ -1 +1,25 @@
IDI_ICON1 ICON DISCARDABLE "icons/logo.ico" IDI_ICON1 ICON DISCARDABLE "icons/logo.ico"
1 VERSIONINFO
FILEVERSION EASY_VERSION_MAJOR, EASY_VERSION_MINOR, EASY_VERSION_REV
PRODUCTVERSION EASY_VERSION_MAJOR, EASY_VERSION_MINOR, EASY_VERSION_REV
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", "EasyProfiler Team"
VALUE "FileDescription", "Gui application for reading easy_profiler capturings"
VALUE "InternalName", "profiler_gui"
VALUE "LegalCopyright", "Copyright 2016 Victor Zarubkin, Sergey Yagovtsev"
VALUE "LegalTrademarks1", "All Rights Reserved"
VALUE "LegalTrademarks2", "All Rights Reserved"
VALUE "OriginalFilename", "profiler_gui.exe"
VALUE "ProductName", "easy_profiler gui application"
VALUE "ProductVersion", PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END

View File

@ -1,13 +1,5 @@
project(easy_profiler) project(easy_profiler)
# EasyProfiler version
add_definitions(
-DEASY_VERSION_MAJOR=1
-DEASY_VERSION_MINOR=0
-DEASY_VERSION_REV=0
)
# EasyProfiler version
set(CPP_FILES set(CPP_FILES
block.cpp block.cpp
profile_manager.cpp profile_manager.cpp
@ -42,22 +34,10 @@ add_definitions(
) )
endif(WIN32) endif(WIN32)
add_library(${PROJECT_NAME} SHARED ${SOURCES} resources.rc)
add_library(${PROJECT_NAME} SHARED ${SOURCES})
if(UNIX) if(UNIX)
set(PLATFORM_LIBS pthread) set(PLATFORM_LIBS pthread)
endif(UNIX) endif(UNIX)
target_link_libraries(${PROJECT_NAME} ${PLATFORM_LIBS}) target_link_libraries(${PROJECT_NAME} ${PLATFORM_LIBS})
install(TARGETS ${PROJECT_NAME}
DESTINATION bin
COMPONENT sdk
)
install(DIRECTORY ${ROOT}/include/easy
DESTINATION include/
COMPONENT sdk
FILES_MATCHING PATTERN "*.h"
)

22
src/resources.rc Normal file
View File

@ -0,0 +1,22 @@
1 VERSIONINFO
FILEVERSION EASY_VERSION_MAJOR, EASY_VERSION_MINOR, EASY_VERSION_REV
PRODUCTVERSION EASY_VERSION_MAJOR, EASY_VERSION_MINOR, EASY_VERSION_REV
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", "EasyProfiler Team"
VALUE "FileDescription", "Lightweight profiler library for c++"
VALUE "LegalCopyright", "Copyright 2016 Victor Zarubkin, Sergey Yagovtsev"
VALUE "LegalTrademarks1", "All Rights Reserved"
VALUE "LegalTrademarks2", "All Rights Reserved"
VALUE "ProductName", "easy_profiler lib"
VALUE "ProductVersion", PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END

1
version.info Normal file
View File

@ -0,0 +1 @@
1.0.0