Display the version in the menu

This commit is contained in:
Maschell 2022-07-28 14:33:27 +02:00
parent a53b47f2b8
commit d6e6b9165d
4 changed files with 20 additions and 3 deletions

View File

@ -18,6 +18,13 @@ jobs:
needs: clang-format needs: clang-format
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: create version.h
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
cat <<EOF > ./source/version.h
#pragma once
#define VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary - name: build binary
run: | run: |
docker build . -t builder docker build . -t builder

View File

@ -26,6 +26,13 @@ jobs:
needs: clang-format needs: clang-format
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: create version.h
run: |
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
cat <<EOF > ./source/version.h
#pragma once
#define VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary - name: build binary
run: | run: |
docker build . -t builder docker build . -t builder

View File

@ -4,6 +4,7 @@
#include "input/Input.h" #include "input/Input.h"
#include "utils/ScreenUtils.h" #include "utils/ScreenUtils.h"
#include "utils/WiiUScreen.h" #include "utils/WiiUScreen.h"
#include "version.h"
#include <stdint.h> #include <stdint.h>
class ApplicationState { class ApplicationState {
@ -55,7 +56,7 @@ public:
} }
virtual void printHeader() { virtual void printHeader() {
WiiUScreen::drawLine("WUDD - Wii U Disc Dumper"); WiiUScreen::drawLine("WUDD - Wii U Disc Dumper v1.1.0" VERSION_EXTRA);
WiiUScreen::drawLine("=================="); WiiUScreen::drawLine("==================");
WiiUScreen::drawLine(""); WiiUScreen::drawLine("");
} }

2
source/version.h Normal file
View File

@ -0,0 +1,2 @@
#pragma once
#define VERSION_EXTRA ""