Skip to content

Commit

Permalink
dll resources and version metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Nov 15, 2023
1 parent ae7c4bf commit e42067e
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lib_jtag_core/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ endif
ifeq ($(TARGET), mingw32)
CC=i686-w64-mingw32-gcc
RESC=i686-w64-mingw32-windres
LDFLAGS += -static-libgcc -lws2_32 ./win32/libjtagcore/libjtagcore/libjtagcore.def
LDFLAGS += -static-libgcc -lws2_32 ../src/os_interface/win32/libjtagcore.def
EXEC=libjtagcore.dll
endif

ifeq ($(TARGET), mingw64)
CC=x86_64-w64-mingw32-gcc
RESC=x86_64-w64-mingw32-windres
LDFLAGS += -static-libgcc -lws2_32 ./win32/libjtagcore/libjtagcore/libjtagcore.def
LDFLAGS += -static-libgcc -lws2_32 ../src/os_interface/win32/libjtagcore.def
EXEC=libjtagcore.dll
endif

Expand Down Expand Up @@ -76,10 +76,13 @@ libjtagcore.so: $(LIB_JTAG_CORE) $(PROTOCOLS_DRIVERS) $(PROBES_DRIVERS) $(NATSOR
$(CC) -o $@ $^ $(LDFLAGS)
cp $@ ../../build

libjtagcore.dll: $(LIB_JTAG_CORE) $(PROTOCOLS_DRIVERS) $(PROBES_DRIVERS) $(NATSORT)
libjtagcore.dll: win32_libjtagcore_res.o $(LIB_JTAG_CORE) $(PROTOCOLS_DRIVERS) $(PROBES_DRIVERS) $(NATSORT)
$(CC) -o $@ $^ $(LDFLAGS)
cp $@ ../../build

win32_libjtagcore_res.o: $(BASEDIR)/os_interface/win32/libjtagcore.rc
$(RESC) $< $@

jtag_core.o: $(BASEDIR)/jtag_core.c
$(CC) -o $@ -c $< $(CFLAGS)

Expand Down
1 change: 1 addition & 0 deletions lib_jtag_core/src/jtag_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "drivers/drv_loader.h"
#include "jtag_core_internal.h"
#include "jtag_core.h"
#include "version.h"

#include "script/env.h"

Expand Down
2 changes: 0 additions & 2 deletions lib_jtag_core/src/jtag_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ typedef void jtag_emu;
#define _jtag_emu_
#endif

#define LIB_JTAG_CORE_VERSION "0.9.6.1"

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Functions Error / return codes

Expand Down
107 changes: 107 additions & 0 deletions lib_jtag_core/src/os_interface/win32/libjtagcore.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
//Microsoft Developer Studio generated resource script.
//
#include "../../version.h"

#define FILE_VERSION VDIG1,VDIG2,VDIG3,VDIG4
#define STR_FILE_VERSION vxstr(VDIG1) "." vxstr(VDIG2) "." vxstr(VDIG3) "." vxstr(VDIG4)

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Language resources

#if !defined(AFX_RESOURCE_DLL)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END

3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION FILE_VERSION
PRODUCTVERSION FILE_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "Comments", "lib jtag core " STR_FILE_VERSION " Release : " STR_DATE " Build : " __DATE__ " " __TIME__ "\0"
VALUE "CompanyName", "(c) Viveris\0"
VALUE "FileDescription", "jtag boundary scanner core\0"
VALUE "FileVersion", STR_FILE_VERSION "\0"
VALUE "InternalName", "libjtagcore.dll\0"
VALUE "LegalCopyright", "Copyright � 2023\0"
VALUE "LegalTrademarks", "(c) Viveris\0"
VALUE "OriginalFilename", "libjtagcore.dll\0"
VALUE "ProductName", "jtag-boundary-scanner\0"
VALUE "ProductVersion", STR_FILE_VERSION "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END

#endif // !_MAC

#endif
/////////////////////////////////////////////////////////////////////////////

#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//

/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

1 change: 1 addition & 0 deletions lib_jtag_core/src/script/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "../jtag_core_internal.h"
#include "script.h"
#include "../jtag_core.h"
#include "../version.h"

#include "../bsdl_parser/bsdl_loader.h"
#include "../os_interface/os_interface.h"
Expand Down
13 changes: 13 additions & 0 deletions lib_jtag_core/src/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#define VDIG1 0
#define VDIG2 9
#define VDIG3 6
#define VDIG4 1

#define STR_DATE "20 Aug 2023"

#define vxstr(s) vstr(s)
#define vstr(s) #s

#define LIB_JTAG_CORE_VERSION vxstr(VDIG1) "." vxstr(VDIG2) "." vxstr(VDIG3) "." vxstr(VDIG4)


0 comments on commit e42067e

Please sign in to comment.