Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17173

Change windows agent build scripts to support building directly from git sources

XMLWordPrintable

    • Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020)
    • 0.25

      Because version information is inserted when making dist archive it's impossible to build windows agent directly from cloned git repository without editing resource/include files. With minimal changes we could support optional version numbers with resource flags:

      diff --git a/build/win32/project/Makefile_common.inc b/build/win32/project/Makefile_common.inc
      index ecd276a5a7..9987782fa0 100644
      --- a/build/win32/project/Makefile_common.inc
      +++ b/build/win32/project/Makefile_common.inc
      @@ -30,4 +30,4 @@ CPPFLAGS = $(INCS) $(ADD_CFLAGS) $(COMMON_FLAGS) /TP
       LFLAGS = /NOLOGO $(ADD_LFLAGS) /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:"$(TARGETNAME).$(TARGETEXT).manifest" \
       	/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DYNAMICBASE:NO /PDB:$(TARGETDIR)\$(TARGETNAME).pdb
       
      -RFLAGS = $(ADD_RFLAGS) /d _WINDOWS
      +RFLAGS = $(RFLAGS) $(ADD_RFLAGS) /d _WINDOWS
      diff --git a/include/version.h b/include/version.h
      index a78a483b8a..beb6d34db0 100644
      --- a/include/version.h
      +++ b/include/version.h
      @@ -28,9 +28,13 @@
       #define ZABBIX_VERSION_MAJOR	5
       #define ZABBIX_VERSION_MINOR	0
       #define ZABBIX_VERSION_PATCH	0
      -#define ZABBIX_VERSION_REVISION	{ZABBIX_REVISION}
      +#ifndef ZABBIX_VERSION_REVISION
      +#	define ZABBIX_VERSION_REVISION	{ZABBIX_REVISION}
      +#endif
       #ifdef _WINDOWS
      -#	define ZABBIX_VERSION_RC_NUM	{ZABBIX_RC_NUM}
      +#	ifndef ZABBIX_VERSION_RC_NUM
      +#		define ZABBIX_VERSION_RC_NUM	{ZABBIX_RC_NUM}
      +#	endif
       #endif
       #define ZABBIX_VERSION_RC	"alpha1"
       #define ZABBIX_VERSION		ZBX_STR(ZABBIX_VERSION_MAJOR) "." ZBX_STR(ZABBIX_VERSION_MINOR) "." \
      

      With this agent could be built by:

      set RFLAGS=/d ZABBIX_VERSION_RC_NUM=0 /d ZABBIX_VERSION_REVISION=0
      nmake PCREINCDIR=.... PCRELIBDIR=...
      

            yurii Jurijs Klopovskis
            wiper Andris Zeila
            Team I
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: