Skip to content

Commit

Permalink
Add modloader dependency for android
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Oct 29, 2023
1 parent f08d130 commit f3d41a2
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 10 deletions.
23 changes: 15 additions & 8 deletions qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,25 @@
"overrideSoName": "libpaperlog.so"
}
},
"dependencies": [
{
"id": "fmt",
"versionRange": "^10.0.0",
"additionalData": {}
}
],
"workspace": {
"scripts": {
"build": [
"pwsh ./build.ps1"
]
}
}
},
"dependencies": [
{
"id": "fmt",
"versionRange": "^10.0.0",
"additionalData": {}
},
{
"id": "modloader",
"versionRange": "^1.2.3",
"additionalData": {
"private": true
}
}
]
}
70 changes: 69 additions & 1 deletion qpm.shared.json
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
{"config":{"sharedDir":"shared","dependenciesDir":"extern","info":{"name":"Paper","id":"paper","version":"1.2.14","url":"https://github.com/Fernthedev/paperlog","additionalData":{"overrideSoName":"libpaperlog.so","branchName":"version/v1_2_14","soLink":"https://github.com/Fernthedev/paperlog/releases/download/v1.2.14/libpaperlog.so","debugSoLink":"https://github.com/Fernthedev/paperlog/releases/download/v1.2.14/debug_libpaperlog.so","modLink":"https://github.com/Fernthedev/paperlog/releases/download/v1.2.14/paperlog.qmod"}},"dependencies":[{"id":"fmt","versionRange":"^10.0.0","additionalData":{}}],"workspace":{"scripts":{"build":["pwsh ./build.ps1"]}}},"restoredDependencies":[{"dependency":{"id":"fmt","versionRange":"=10.0.0","additionalData":{"headersOnly":true,"branchName":"version/v10_0_0","compileOptions":{"systemIncludes":["fmt/include/"],"cppFlags":["-DFMT_HEADER_ONLY"]}}},"version":"10.0.0"}]}
{
"config": {
"sharedDir": "shared",
"dependenciesDir": "extern",
"info": {
"name": "Paper",
"id": "paper",
"version": "1.2.9",
"url": "https://github.com/Fernthedev/paperlog",
"additionalData": {
"overrideSoName": "libpaperlog.so"
}
},
"workspace": {
"scripts": {
"build": [
"pwsh ./build.ps1"
]
}
},
"dependencies": [
{
"id": "fmt",
"versionRange": "^10.0.0",
"additionalData": {}
},
{
"id": "modloader",
"versionRange": "^1.2.3",
"additionalData": {
"private": true
}
}
]
},
"restoredDependencies": [
{
"dependency": {
"id": "modloader",
"versionRange": "=1.2.3",
"additionalData": {
"soLink": "https://github.com/sc2ad/QuestLoader/releases/download/v1.2.3/libmodloader64.so",
"overrideSoName": "libmodloader.so",
"branchName": "version-v1.2.3"
}
},
"version": "1.2.3"
},
{
"dependency": {
"id": "fmt",
"versionRange": "=10.0.0",
"additionalData": {
"headersOnly": true,
"branchName": "version/v10_0_0",
"compileOptions": {
"systemIncludes": [
"fmt/include/"
],
"cppFlags": [
"-DFMT_HEADER_ONLY"
]
}
}
},
"version": "10.0.0"
}
]
}
2 changes: 1 addition & 1 deletion shared/_config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if __has_include("modloader/shared/modloader.hpp")
#if __has_include("modloader/shared/modloader.hpp") && defined(ANDROID)
#define PAPER_QUEST_MODLOADER
#endif

Expand Down
1 change: 1 addition & 0 deletions src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ namespace Paper::Logger {

// TODO: Fix constructor memory crash
#ifdef PAPER_NO_INIT

#warning Using dlopen for initializing thread
void __attribute__((constructor(200))) dlopen_initialize() {
WriteStdOut(ANDROID_LOG_INFO, "PAPERLOG", "DLOpen initializing");
Expand Down

0 comments on commit f3d41a2

Please sign in to comment.