mirror of
https://github.com/wiiu-env/USBSerialLoggingModule.git
synced 2025-02-17 10:26:25 +01:00
Logs the current application version on each start
This commit is contained in:
parent
1e64ee9bf1
commit
2d4d5c64e5
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -18,6 +18,13 @@ jobs:
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: create version.h
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||
cat <<EOF > ./source/version.h
|
||||
#pragma once
|
||||
#define MOUDLE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -26,6 +26,13 @@ jobs:
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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 MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "kernel.h"
|
||||
#include "logger.h"
|
||||
#include "version.h"
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/ios.h>
|
||||
#include <kernel/kernel.h>
|
||||
@ -10,6 +11,8 @@ WUMS_MODULE_EXPORT_NAME("homebrew_usbseriallogging");
|
||||
WUMS_MODULE_SKIP_INIT_FINI();
|
||||
WUMS_DEPENDS_ON(homebrew_kernel);
|
||||
|
||||
#define MODULE_VERSION "v0.1"
|
||||
|
||||
extern "C" void SC_0x51();
|
||||
|
||||
WUMS_INITIALIZE() {
|
||||
@ -46,6 +49,7 @@ WUMS_INITIALIZE() {
|
||||
#define IopShell_CreateThread ((void (*)(void))(0x101C400 + 0x19504))
|
||||
|
||||
WUMS_APPLICATION_STARTS() {
|
||||
OSReport("Running USBSerialLoggingModule " MODULE_VERSION MODULE_VERSION_EXTRA "\n");
|
||||
initLogging();
|
||||
DEBUG_FUNCTION_LINE("Register IopShell_UserCallback");
|
||||
IopShell_RegisterCallback(IopShell_UserCallback, 0x100978f8, 0x10097900, 0x10097c40);
|
||||
|
2
source/version.h
Normal file
2
source/version.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA ""
|
Loading…
x
Reference in New Issue
Block a user