From 0442f684902d0cbdb5c4259752f8bda42f6f87f4 Mon Sep 17 00:00:00 2001 From: rui2015 <15705566+rui2015@users.noreply.github.com> Date: Mon, 13 Sep 2021 21:25:59 +0100 Subject: [PATCH 1/3] Markdown lint was screaming at me --- README.md | 2 +- template/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2f4a0bc..02d2785 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ A template for creating Beat Saber mods for the Oculus Quest. This template take This template is set up for downloading dependencies using QPM. You can find more info about getting started with Quest modding [here](https://github.com/danrouse/beatsaber-quest-modding-guide). -Created by [Lauriethefish](https://github.com/Lauriethefish) and [danrouse](https://github.com/danrouse). \ No newline at end of file +Created by [Lauriethefish](https://github.com/Lauriethefish) and [danrouse](https://github.com/danrouse). diff --git a/template/README.md b/template/README.md index dfffdb2..93ac47b 100644 --- a/template/README.md +++ b/template/README.md @@ -5,5 +5,5 @@ ## Credits * [zoller27osu](https://github.com/zoller27osu), [Sc2ad](https://github.com/Sc2ad) and [jakibaki](https://github.com/jakibaki) - [beatsaber-hook](https://github.com/sc2ad/beatsaber-hook) -* [raftario](https://github.com/raftario) -* [Lauriethefish](https://github.com/Lauriethefish) and [danrouse](https://github.com/danrouse) for [this template](https://github.com/Lauriethefish/quest-mod-template) \ No newline at end of file +* [raftario](https://github.com/raftario) +* [Lauriethefish](https://github.com/Lauriethefish) and [danrouse](https://github.com/danrouse) for [this template](https://github.com/Lauriethefish/quest-mod-template) From 67de6605cae181c83d87e5c585ac7bb0a5a8a3b2 Mon Sep 17 00:00:00 2001 From: rui2015 <15705566+rui2015@users.noreply.github.com> Date: Mon, 13 Sep 2021 21:27:14 +0100 Subject: [PATCH 2/3] Update version and bshook to Beat Saber 1.17.1 --- template/Android.mk | 6 +++--- template/buildQMOD.ps1 | 2 +- template/mod.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/template/Android.mk b/template/Android.mk index 9058db7..e2eb42a 100644 --- a/template/Android.mk +++ b/template/Android.mk @@ -27,9 +27,9 @@ include $(PREBUILT_SHARED_LIBRARY) # Build the beatsaber-hook shared library, SPECIFICALLY VERSIONED! include $(CLEAR_VARS) -LOCAL_MODULE := beatsaber-hook_1_2_4 +LOCAL_MODULE := beatsaber-hook_2_3_0 LOCAL_EXPORT_C_INCLUDES := extern/beatsaber-hook -LOCAL_SRC_FILES := extern/libbeatsaber-hook_1_2_4.so +LOCAL_SRC_FILES := extern/libbeatsaber-hook_2_3_0.so LOCAL_CPP_FEATURES += exceptions include $(PREBUILT_SHARED_LIBRARY) @@ -39,7 +39,7 @@ LOCAL_SRC_FILES += $(call rwildcard,src/,*.cpp) LOCAL_SRC_FILES += $(call rwildcard,extern/beatsaber-hook/src/inline-hook,*.cpp) LOCAL_SRC_FILES += $(call rwildcard,extern/beatsaber-hook/src/inline-hook,*.c) LOCAL_SHARED_LIBRARIES += modloader -LOCAL_SHARED_LIBRARIES += beatsaber-hook_1_2_4 +LOCAL_SHARED_LIBRARIES += beatsaber-hook_2_3_0 LOCAL_LDLIBS += -llog LOCAL_CFLAGS += -I'extern/libil2cpp/il2cpp/libil2cpp' -DID='"#{id}"' -DVERSION='"0.1.0"' -I'./shared' -I'./extern' -isystem'extern/codegen/include' LOCAL_CPPFLAGS += -std=c++2a diff --git a/template/buildQMOD.ps1 b/template/buildQMOD.ps1 index 4048f82..4d8e1c5 100644 --- a/template/buildQMOD.ps1 +++ b/template/buildQMOD.ps1 @@ -10,5 +10,5 @@ $ArchiveName = "#{id}_v0.1.0.qmod" $TempArchiveName = "#{id}_v0.1.0.qmod.zip" & $buildScript NDK_PROJECT_PATH=$PSScriptRoot APP_BUILD_SCRIPT=$PSScriptRoot/Android.mk NDK_APPLICATION_MK=$PSScriptRoot/Application.mk -Compress-Archive -Path "./libs/arm64-v8a/lib#{id}.so", "./libs/arm64-v8a/libbeatsaber-hook_1_2_4.so", "./mod.json" -DestinationPath $TempArchiveName -Force +Compress-Archive -Path "./libs/arm64-v8a/lib#{id}.so", "./libs/arm64-v8a/libbeatsaber-hook_2_3_0.so", "./mod.json" -DestinationPath $TempArchiveName -Force Move-Item $TempArchiveName $ArchiveName -Force \ No newline at end of file diff --git a/template/mod.json b/template/mod.json index 283e5da..322c30f 100644 --- a/template/mod.json +++ b/template/mod.json @@ -6,12 +6,12 @@ "author": "#{author}", "version": "0.1.0", "packageId": "com.beatgames.beatsaber", - "packageVersion": "1.14.0", + "packageVersion": "1.17.1", "description": "#{description}", "modFiles": [ "lib#{id}.so" ], "libraryFiles": [ - "libbeatsaber-hook_1_2_4.so" + "libbeatsaber-hook_2_3_0.so" ] } \ No newline at end of file From e6aa1a59de5af2a5d4fe31633c5b794b150a0df6 Mon Sep 17 00:00:00 2001 From: rui2015 <15705566+rui2015@users.noreply.github.com> Date: Mon, 13 Sep 2021 21:27:58 +0100 Subject: [PATCH 3/3] Add hooking macros --- template/include/main.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/template/include/main.hpp b/template/include/main.hpp index 4e95dab..ba3f93c 100644 --- a/template/include/main.hpp +++ b/template/include/main.hpp @@ -8,6 +8,7 @@ #include "beatsaber-hook/shared/utils/logging.hpp" #include "beatsaber-hook/shared/config/config-utils.hpp" #include "beatsaber-hook/shared/utils/il2cpp-functions.hpp" +#include "beatsaber-hook/shared/utils/hooking.hpp" // Define these functions here so that we can easily read configuration and log information from other files Configuration& getConfig();