feat(jbhook1): Use sdk-hook and new config api

Summary:

Test Plan:
This commit is contained in:
icex2
2024-08-17 12:51:00 +02:00
parent c03f5d3909
commit f9f930112d
20 changed files with 605 additions and 610 deletions
+37 -1
View File
@@ -1,5 +1,41 @@
@echo off
:: Keep all vars scoped to this script
setlocal
:: Game doesn't work properly when not run with administrator privileges
>nul 2>&1 net session
if %errorlevel% neq 0 (
echo This script requires administrative privileges.
echo Please run the script as an administrator.
pause
exit 1
)
:: Script expects to be located in a subfolder "bemanitools" in the root folder
:: next to the folders data, JAA, JAB, etc.
cd /d %~dp0
inject jbhook1.dll jubeat.exe --config jbhook-01.conf %*
set CONTENT_DIR=%CD%\..
set BEMANITOOLS_DIR=%CONTENT_DIR%\bemanitools
if not exist "%BEMANITOOLS_DIR%" (
echo The bemanitools directory "%BEMANITOOLS_DIR%" does not exist.
pause
exit 1
)
:: Keep that data vanilla, no need to copy these around anymore
:: Just add them to the env PATH so inject can find the libs and game executable
:: Remark: This also requires admin privileges to propage correctly to inject
set PATH=^
%BEMANITOOLS_DIR%;^
%PATH%
:: Current working dir is content dir which contains the exe and the data folder
cd /d %CONTENT_DIR%
%BEMANITOOLS_DIR%\inject.exe^
%BEMANITOOLS_DIR%\inject-01.xml^
%*
+37 -1
View File
@@ -1,7 +1,43 @@
@echo off
:: Keep all vars scoped to this script
setlocal
:: Game doesn't work properly when not run with administrator privileges
>nul 2>&1 net session
if %errorlevel% neq 0 (
echo This script requires administrative privileges.
echo Please run the script as an administrator.
pause
exit 1
)
:: Script expects to be located in a subfolder "bemanitools" in the root folder
:: next to the folders data, JAA, JAB, etc.
cd /d %~dp0
set CONTENT_DIR=%CD%\..
set BEMANITOOLS_DIR=%CONTENT_DIR%\bemanitools
if not exist "%BEMANITOOLS_DIR%" (
echo The bemanitools directory "%BEMANITOOLS_DIR%" does not exist.
pause
exit 1
)
:: Keep that data vanilla, no need to copy these around anymore
:: Just add them to the env PATH so inject can find the libs and game executable
:: Remark: This also requires admin privileges to propage correctly to inject
set PATH=^
%BEMANITOOLS_DIR%;^
%PATH%
:: Current working dir is content dir which contains the exe and the data folder
cd /d %CONTENT_DIR%
if not exist dev\nvram mkdir dev\nvram
inject jbhook1.dll jubeat.exe --config jbhook-02.conf %*
%BEMANITOOLS_DIR%\inject.exe^
%BEMANITOOLS_DIR%\inject-02.xml^
%*
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="Shift-JIS"?>
<inject>
<version __type="u32">1</version>
<debugger>
<app>
<path __type="str">jubeat.exe</path>
<args __type="str"></args>
</app>
<attach_type __type="str">inject</attach_type>
</debugger>
<hooks>
<hook>
<enable __type="bool">1</enable>
<path __type="str">jbhook1.dll</path>
<config kind="inline">
<hook>
<gfx>
<!-- Run the game windowed -->
<windowed __type="bool">0</windowed>
<!-- rotate the normally-horizontal game window to be vertical -->
<vertical __type="bool">1</vertical>
</gfx>
<eamuse>
<!-- URL (e.g. http://my.eamuse.server:80/whatever) or IPV4 (e.g. 127.0.0.1:80) of the target eamuse server. The port is optional but defaults to 80. -->
<server __type="str">localhost:80</server>
<pcbid __type="bin">0101020304050607086F</pcbid>
<eamid __type="bin">0101020304050607086F</eamid>
</eamuse>
<security>
<mcode __type="str">GCH44JAB</mcode>
</security>
</hook>
</config>
</hook>
</hooks>
<logger>
<enable __type="bool">1</enable>
<level __type="str">misc</level>
<msg_buffer_size_bytes __type="u32">8192</msg_buffer_size_bytes>
<sinks>
<async>
<enable __type="bool">0</enable>
<queue_length __type="u8">64</queue_length>
<overflow_policy __type="str">discard_new</overflow_policy>
</async>
<console>
<enable __type="bool">1</enable>
<color __type="bool">1</color>
</console>
<file>
<enable __type="bool">1</enable>
<path __type="str">inject.log</path>
<append __type="bool">0</append>
<rotate __type="bool">0</rotate>
<max_rotations __type="u8">1</max_rotations>
</file>
</sinks>
</logger>
<debug>
<property_configs_log __type="bool">1</property_configs_log>
<property_api_trace_log __type="bool">0</property_api_trace_log>
</debug>
</inject>
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="Shift-JIS"?>
<inject>
<version __type="u32">1</version>
<debugger>
<app>
<path __type="str">jubeat.exe</path>
<args __type="str"></args>
</app>
<attach_type __type="str">inject</attach_type>
</debugger>
<hooks>
<hook>
<enable __type="bool">1</enable>
<path __type="str">jbhook1.dll</path>
<config kind="inline">
<hook>
<gfx>
<!-- Run the game windowed -->
<windowed __type="bool">0</windowed>
<!-- rotate the normally-horizontal game window to be vertical -->
<vertical __type="bool">1</vertical>
</gfx>
<eamuse>
<!-- URL (e.g. http://my.eamuse.server:80/whatever) or IPV4 (e.g. 127.0.0.1:80) of the target eamuse server. The port is optional but defaults to 80. -->
<server __type="str">localhost:80</server>
<pcbid __type="bin">0101020304050607086F</pcbid>
<eamid __type="bin">0101020304050607086F</eamid>
</eamuse>
<security>
<mcode __type="str">GCI44JAA</mcode>
</security>
</hook>
</config>
</hook>
</hooks>
<logger>
<enable __type="bool">1</enable>
<level __type="str">misc</level>
<msg_buffer_size_bytes __type="u32">8192</msg_buffer_size_bytes>
<sinks>
<async>
<enable __type="bool">0</enable>
<queue_length __type="u8">64</queue_length>
<overflow_policy __type="str">discard_new</overflow_policy>
</async>
<console>
<enable __type="bool">1</enable>
<color __type="bool">1</color>
</console>
<file>
<enable __type="bool">1</enable>
<path __type="str">inject.log</path>
<append __type="bool">0</append>
<rotate __type="bool">0</rotate>
<max_rotations __type="u8">1</max_rotations>
</file>
</sinks>
</logger>
<debug>
<property_configs_log __type="bool">1</property_configs_log>
<property_api_trace_log __type="bool">0</property_api_trace_log>
</debug>
</inject>
-18
View File
@@ -1,18 +0,0 @@
# Run the game windowed
gfx.windowed=false
# rotate the normally-horizontal game window to be vertical
gfx.vertical=true
# URL (e.g. http://my.eamuse.server:80/whatever) or IPV4 (e.g. 127.0.0.1:80) of the target eamuse server. The port is optional but defaults to 80.
eamuse.server=localhost:80
# PCBID
eamuse.pcbid=0101020304050607086F
# EAMID
eamuse.eamid=0101020304050607086F
# Mcode of the game to run.
security.mcode=GCH44JAB
-18
View File
@@ -1,18 +0,0 @@
# Run the game windowed
gfx.windowed=false
# rotate the normally-horizontal game window to be vertical
gfx.vertical=true
# URL (e.g. http://my.eamuse.server:80/whatever) or IPV4 (e.g. 127.0.0.1:80) of the target eamuse server. The port is optional but defaults to 80.
eamuse.server=localhost:80
# PCBID
eamuse.pcbid=0101020304050607086F
# EAMID
eamuse.eamid=0101020304050607086F
# Mcode of the game to run.
security.mcode=GCI44JAA