Skip to content

Commit

Permalink
Add version to banner and create first release
Browse files Browse the repository at this point in the history
  • Loading branch information
pbatard committed Mar 20, 2024
1 parent 9a83938 commit cacca81
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ env:
jobs:
Linux-EDK2-Build:
runs-on: ubuntu-latest
permissions:
contents: write

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion Md5SumPkg.inf
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang

[BuildOptions]
RELEASE_*_*_CC_FLAGS = -O2 -DMDEPKG_NDEBUG -DNDEBUG
RELEASE_*_*_CC_FLAGS = -O2 -DMDEPKG_NDEBUG -DNDEBUG -DVERSION_STRING=$(VERSION_STRING)
15 changes: 13 additions & 2 deletions src/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@

#include "boot.h"

/* Stringification macros */
#define _TO_WSTRING(s) L ## #s
#define TO_WSTRING(s) _TO_WSTRING(s)

/* Setup a version string */
#if defined(VERSION_STRING)
#define WVERSION_STRING TO_WSTRING(VERSION_STRING)
#else
#define WVERSION_STRING L"[DEV]"
#endif

/* Dimensions of the UEFI text console */
CONSOLE_DIMENSIONS gConsole = { COLS_MIN, ROWS_MIN };

Expand Down Expand Up @@ -65,9 +76,9 @@ VOID InitConsole(VOID)
EmptyLine[i] = L' ';
EmptyLine[i] = L'\0';

// Print the reference URL of this application
// Print the version and reference URL of this application
SetText(TEXT_DARKGRAY);
PrintCentered(L"https://md5.akeo.ie", 0);
PrintCentered(L"md5sum " WVERSION_STRING L" <https://md5.akeo.ie>", 0);
DefText();
}

Expand Down

0 comments on commit cacca81

Please sign in to comment.