Log the WUMSLoader version on each application start

This commit is contained in:
Maschell 2022-10-09 16:16:24 +02:00
parent 33faeb03a5
commit 861fea59a6
4 changed files with 21 additions and 0 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 > ./wumsloader/src/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 > ./wumsloader/src/version.h
#pragma once
#define VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary
run: |
docker build . -t builder

View File

@ -8,10 +8,13 @@
#include "utils/dynamic.h"
#include "utils/hooks.h"
#include "utils/logger.h"
#include "version.h"
#include <coreinit/debug.h>
#include <coreinit/memexpheap.h>
#include <cstdint>
#define VERSION "v0.1"
void CallInitHooksForModule(const std::shared_ptr<ModuleData> &curModule);
std::vector<std::shared_ptr<ModuleData>> OrderModulesByDependencies(const std::vector<std::shared_ptr<ModuleData>> &loadedModules);
@ -62,6 +65,8 @@ void doStart(int argc, char **argv) {
init_wut();
initLogging();
OSReport("Running WUMSLoader " VERSION VERSION_EXTRA "\n");
gUsedRPLs.clear();
// If an allocated rpl was not released properly (e.g. if something else calls OSDynload_Acquire without releasing it)
// memory gets leaked. Let's clean this up!

2
wumsloader/src/version.h Normal file
View File

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