Skip to content

Commit

Permalink
Cleanup version information
Browse files Browse the repository at this point in the history
  • Loading branch information
mturk committed Oct 3, 2024
1 parent 4645987 commit 39b627c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
6 changes: 5 additions & 1 deletion cygwrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,11 @@ static int runprogram(int argc, wchar_t **argv)

static int version(void)
{
fputs(CYGWRUN_NAME " version " CYGWRUN_VERSION_TXT, stdout);
#if CYGWRUN_ISDEV_VERSION
fputs(CYGWRUN_NAME " version " CYGWRUN_VERSION_ALL " (dev)", stdout);
#else
fputs(CYGWRUN_NAME " version " CYGWRUN_VERSION_STR, stdout);
#endif
return 0;
}

Expand Down
18 changes: 4 additions & 14 deletions cygwrun.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@
# define CYGWRUN_VENDOR_SFX ""
#endif

#if CYGWRUN_ISDEV_VERSION
# define CYGWRUN_VERSION_DEV " (dev)"
#else
# define CYGWRUN_VERSION_DEV ""
#endif

/**
* Macro for .rc files using numeric csv representation
*/
Expand All @@ -61,21 +55,17 @@
CYGWRUN_PATCH_VERSION, \
CYGWRUN_MICRO_VERSION

#define CYGWRUN_VERSION_MIN \
#define CYGWRUN_VERSION_STR \
CWR_TOSTR(CYGWRUN_MAJOR_VERSION) "." \
CWR_TOSTR(CYGWRUN_MINOR_VERSION) "." \
CWR_TOSTR(CYGWRUN_PATCH_VERSION) \

#define CYGWRUN_VERSION_STR \
#define CYGWRUN_VERSION_ALL \
CWR_TOSTR(CYGWRUN_MAJOR_VERSION) "." \
CWR_TOSTR(CYGWRUN_MINOR_VERSION) "." \
CWR_TOSTR(CYGWRUN_PATCH_VERSION) "." \
CWR_TOSTR(CYGWRUN_MICRO_VERSION)

#define CYGWRUN_VERSION_TXT \
CYGWRUN_VERSION_MIN \
CYGWRUN_VENDOR_SFX \
CYGWRUN_VERSION_DEV
CWR_TOSTR(CYGWRUN_MICRO_VERSION) \
CYGWRUN_VENDOR_SFX

#define CYGWRUN_NAME "cygwrun"
#define CYGWRUN_COMPANY_NAME "Acme Corporation"
Expand Down
4 changes: 2 additions & 2 deletions cygwrun.rc
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ BEGIN
VALUE "Comments", CYGWRUN_URL
VALUE "CompanyName", CYGWRUN_COMPANY_NAME
VALUE "FileDescription", CYGWRUN_DESCRIPTION
VALUE "FileVersion", CYGWRUN_VERSION_STR CYGWRUN_VENDOR_SFX
VALUE "FileVersion", CYGWRUN_VERSION_ALL
VALUE "InternalName", CYGWRUN_NAME
VALUE "LegalCopyright", CYGWRUN_COPYRIGHT
VALUE "OriginalFilename", CYGWRUN_NAME ".exe"
VALUE "ProductName", CYGWRUN_NAME
VALUE "ProductVersion", CYGWRUN_VERSION_MIN
VALUE "ProductVersion", CYGWRUN_VERSION_STR
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 39b627c

Please sign in to comment.