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,9 +18,16 @@ jobs:
needs: clang-format
steps:
- 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
run: |
docker build . -t builder
docker build . -t builder
docker run --rm -v ${PWD}:/project builder make
- uses: actions/upload-artifact@master
with:

View File

@ -26,9 +26,16 @@ jobs:
needs: clang-format
steps:
- 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
run: |
docker build . -t builder
docker build . -t builder
docker run --rm -v ${PWD}:/project builder make
- uses: actions/upload-artifact@master
with:

View File

@ -4,6 +4,7 @@
#include "input/Input.h"
#include "utils/ScreenUtils.h"
#include "utils/WiiUScreen.h"
#include "version.h"
#include <stdint.h>
class ApplicationState {
@ -55,7 +56,7 @@ public:
}
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("");
}

2
source/version.h Normal file
View File

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