Add windows DLL resource file

This commit is contained in:
Chord 2016-07-26 18:54:49 -04:00
parent 47a62c6dfd
commit b9b522f12f
2 changed files with 44 additions and 1 deletions

View file

@ -4,6 +4,10 @@ include ../Makefile.inc
SRCS = pscrypto.cpp
OBJS := $(SRCS:.cpp=.o)
ifneq ($(findstring $(OS), cygwin mingw32),)
OBJS += resource.o
endif
#### Artifacts
OUT_NAME=pscrypto
LIB = $(call lib-name,$(OUT_NAME))
@ -41,8 +45,12 @@ test : all $(TEST)
%.o : %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
# For windows, create a resource section
resource.o : resource.rc
$(PREFIX)windres -i $< -o $@
$(LIB) : $(OBJS)
$(CXX) -shared $< -o $(LIB) $(LIB_FLAGS) $(LIBS)
$(CXX) -shared $(OBJS) -o $(LIB) $(LIB_FLAGS) $(LIBS)
ifndef DEBUG
$(STRIP) $(LIB)
endif

35
pscrypto/resource.rc Normal file
View file

@ -0,0 +1,35 @@
#include <windows.h>
// DLL version information.
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG | VS_FF_PRERELEASE
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "PSForever Project"
VALUE "FileDescription", "A PlanetSide crypto library for CryptoPP."
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "pscrypto"
VALUE "LegalCopyright", "(C) 2016 PSForever Project"
VALUE "OriginalFilename", "pscrypto.dll"
VALUE "ProductName", "PlanetSide Crypto"
VALUE "ProductVersion", "1.0.0.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END