Display the correct version in the config menu

This commit is contained in:
Maschell 2022-09-19 16:06:38 +02:00
parent c89db187b6
commit a818088f14
5 changed files with 21 additions and 1 deletions

View File

@ -18,6 +18,13 @@ 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

View File

@ -26,6 +26,13 @@ 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

View File

@ -1,12 +1,16 @@
#pragma once
#include "plugin/PluginContainer.h"
#include "utils/ConfigUtils.h"
#include "version.h"
#include <forward_list>
#include <memory>
#include <mutex>
#include <vector>
#include <wums/defines/relocation_defines.h>
#define VERSION "v0.1"
#define VERSION_FULL VERSION VERSION_EXTRA
extern StoredBuffer gStoredTVBuffer;
extern StoredBuffer gStoredDRCBuffer;

View File

@ -262,7 +262,7 @@ void ConfigUtils::displayMenu() {
DrawUtils::setFontSize(24);
DrawUtils::print(16, 6 + 24, "Wii U Plugin System Config Menu");
DrawUtils::setFontSize(18);
DrawUtils::print(SCREEN_WIDTH - 16, 8 + 24, "v1.0", true);
DrawUtils::print(SCREEN_WIDTH - 16, 8 + 24, VERSION_FULL, true);
DrawUtils::drawRectFilled(8, 8 + 24 + 4, SCREEN_WIDTH - 8 * 2, 3, COLOR_BLACK);
// draw bottom bar

2
source/version.h Normal file
View File

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