mirror of
https://github.com/wiiu-env/PatchMemoryRelocationsModule.git
synced 2024-11-14 14:05:09 +01:00
Log the module version on each application start
This commit is contained in:
parent
a9eb4312c3
commit
4373b9afe1
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -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
|
||||
|
@ -1,16 +1,23 @@
|
||||
#include <wums.h>
|
||||
|
||||
#include "logger.h"
|
||||
#include "version.h"
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <memory/mappedmemory.h>
|
||||
|
||||
#define VERSION "v0.1"
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_patchmemoryrelocations");
|
||||
WUMS_MODULE_INIT_BEFORE_RELOCATION_DONE_HOOK();
|
||||
WUMS_MODULE_SKIP_INIT_FINI();
|
||||
|
||||
WUMS_APPLICATION_STARTS() {
|
||||
OSReport("Running PatchMemoryRelocationsModule " VERSION VERSION_EXTRA "\n");
|
||||
}
|
||||
|
||||
bool elfLinkOne(char type, size_t offset, int32_t addend, uint32_t destination, uint32_t symbol_addr, relocation_trampoline_entry_t *trampoline_data, uint32_t trampoline_data_length,
|
||||
RelocationType reloc_type);
|
||||
|
||||
|
2
source/version.h
Normal file
2
source/version.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#define VERSION_EXTRA ""
|
Loading…
Reference in New Issue
Block a user