forked from Hay1tsme/bananatools
update to fedora 36, massive build speedups (Thanks Felix!)
This commit is contained in:
parent
55978cc2a3
commit
3158f60709
56
Dockerfile
56
Dockerfile
@ -1,38 +1,34 @@
|
|||||||
FROM fedora:31
|
FROM fedora:36
|
||||||
|
|
||||||
LABEL description="Build environment for bananatools"
|
LABEL description="Build environment for bananatools"
|
||||||
|
|
||||||
RUN yum -y install meson
|
RUN dnf -y install meson ninja-build make zip clang mingw64-gcc.x86_64 mingw32-gcc.x86_64 git
|
||||||
RUN yum -y install ninja-build
|
|
||||||
RUN yum -y install make
|
|
||||||
RUN yum -y install zip
|
|
||||||
RUN yum -y install clang
|
|
||||||
RUN yum -y install mingw64-gcc.x86_64
|
|
||||||
RUN yum -y install mingw32-gcc.x86_64
|
|
||||||
RUN yum -y install git
|
|
||||||
|
|
||||||
RUN mkdir /bananatools
|
RUN mkdir /bananatools
|
||||||
WORKDIR /bananatools
|
WORKDIR /bananatools
|
||||||
|
|
||||||
COPY hooklib hooklib
|
VOLUME [ "/bananatools" ]
|
||||||
COPY ferrumhook ferrumhook
|
|
||||||
COPY ferrumio ferrumio
|
|
||||||
COPY taikohook taikohook
|
|
||||||
COPY taikoio taikoio
|
|
||||||
COPY platform platform
|
|
||||||
COPY subprojects subprojects
|
|
||||||
COPY gfxhook gfxhook
|
|
||||||
COPY jvs jvs
|
|
||||||
COPY amcus amcus
|
|
||||||
COPY board board
|
|
||||||
COPY util util
|
|
||||||
COPY dist dist
|
|
||||||
COPY cross-mingw-32.txt cross-mingw-32.txt
|
|
||||||
COPY cross-mingw-64.txt cross-mingw-64.txt
|
|
||||||
COPY Makefile Makefile
|
|
||||||
COPY meson.build meson.build
|
|
||||||
COPY Package.mk Package.mk
|
|
||||||
COPY precompiled.h precompiled.h
|
|
||||||
COPY README.md README.md
|
|
||||||
|
|
||||||
RUN make dist
|
# COPY hooklib hooklib
|
||||||
|
# COPY ferrumhook ferrumhook
|
||||||
|
# COPY ferrumio ferrumio
|
||||||
|
# COPY taikohook taikohook
|
||||||
|
# COPY taikoio taikoio
|
||||||
|
# COPY platform platform
|
||||||
|
# COPY subprojects subprojects
|
||||||
|
# COPY gfxhook gfxhook
|
||||||
|
# COPY jvs jvs
|
||||||
|
# COPY amcus amcus
|
||||||
|
# COPY board board
|
||||||
|
# COPY util util
|
||||||
|
# COPY dist dist
|
||||||
|
# COPY cross-mingw-32.txt cross-mingw-32.txt
|
||||||
|
# COPY cross-mingw-64.txt cross-mingw-64.txt
|
||||||
|
# COPY Makefile Makefile
|
||||||
|
# COPY meson.build meson.build
|
||||||
|
# COPY Package.mk Package.mk
|
||||||
|
# COPY precompiled.h precompiled.h
|
||||||
|
# COPY README.md README.md
|
||||||
|
|
||||||
|
#RUN make dist
|
||||||
|
ENTRYPOINT [ "make", "dist" ]
|
||||||
|
@ -3,7 +3,6 @@ amcus_lib = static_library(
|
|||||||
include_directories : inc,
|
include_directories : inc,
|
||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
c_pch : '../precompiled.h',
|
c_pch : '../precompiled.h',
|
||||||
vs_module_defs : 'amcus.def',
|
|
||||||
dependencies : [
|
dependencies : [
|
||||||
capnhook.get_variable('hook_dep'),
|
capnhook.get_variable('hook_dep'),
|
||||||
],
|
],
|
||||||
@ -16,7 +15,7 @@ amcus_lib = static_library(
|
|||||||
'config.c',
|
'config.c',
|
||||||
'config.h',
|
'config.h',
|
||||||
'iauth.c',
|
'iauth.c',
|
||||||
'iauth.h',
|
'iauth.h',
|
||||||
'amcus.c',
|
'amcus.c',
|
||||||
'amcus.h',
|
'amcus.h',
|
||||||
'guid.c',
|
'guid.c',
|
||||||
|
@ -13,7 +13,7 @@ if ERRORLEVEL 1 (
|
|||||||
goto failure
|
goto failure
|
||||||
)
|
)
|
||||||
|
|
||||||
docker create --name %CONTAINER_NAME% %IMAGE_NAME%
|
docker run -it --rm -v %~dp0:/bananatools --name %CONTAINER_NAME% %IMAGE_NAME%
|
||||||
|
|
||||||
if ERRORLEVEL 1 (
|
if ERRORLEVEL 1 (
|
||||||
goto failure
|
goto failure
|
||||||
@ -22,9 +22,8 @@ if ERRORLEVEL 1 (
|
|||||||
rd /s /q "!BUILD_OUTPUT_PATH!"
|
rd /s /q "!BUILD_OUTPUT_PATH!"
|
||||||
mkdir "!BUILD_OUTPUT_PATH!"
|
mkdir "!BUILD_OUTPUT_PATH!"
|
||||||
|
|
||||||
docker cp %CONTAINER_NAME%:/bananatools/build/zip %BUILD_OUTPUT_PATH%
|
REM docker cp %CONTAINER_NAME%:/bananatools/build/zip %BUILD_OUTPUT_PATH%
|
||||||
|
|
||||||
docker rm -f %CONTAINER_NAME%
|
|
||||||
docker image rm -f %IMAGE_NAME%
|
docker image rm -f %IMAGE_NAME%
|
||||||
|
|
||||||
goto success
|
goto success
|
||||||
|
@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
#include "util/dprintf.h"
|
#include "util/dprintf.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* AMFrameWork (AMFW) is a DLL that contains many helper classes
|
* AMFrameWork (AMFW) is a DLL that contains many helper classes
|
||||||
* for things like input, network, dongle, and other functions that
|
* for things like input, network, dongle, and other functions that
|
||||||
* it would be useful for us to have control of. Luckily we don't have
|
* it would be useful for us to have control of. Luckily we don't have
|
||||||
* to reinvent the wheel for the most part, we can just hook the functions
|
* to reinvent the wheel for the most part, we can just hook the functions
|
||||||
* that AMFW uses and let it talk to the game for us.
|
* that AMFW uses and let it talk to the game for us.
|
||||||
*/
|
*/
|
||||||
void amfw_dongle_insert_hooks(HMODULE target);
|
void amfw_dongle_insert_hooks(HMODULE target);
|
||||||
|
|
||||||
static int my_nbamUsbFinderInitialize();
|
static int my_nbamUsbFinderInitialize();
|
||||||
static int my_nbamUsbFinderGetSerialNumber(int a1, char *serial);
|
static int my_nbamUsbFinderGetSerialNumber(int a1, char serial[32]);
|
||||||
static int my_nbamUsbFinder_GetInformation(int a1, int a2, uint64_t a3, uint16_t a4, void *a5);
|
static int my_nbamUsbFinder_GetInformation(int a1, int a2, uint64_t a3, uint16_t a4, void *a5);
|
||||||
|
|
||||||
static const struct hook_symbol dongle_hooks[] = {
|
static const struct hook_symbol dongle_hooks[] = {
|
||||||
@ -47,7 +47,7 @@ HRESULT amfw_hook_init(wchar_t serial[13])
|
|||||||
dprintf("AMFW: Init\n");
|
dprintf("AMFW: Init\n");
|
||||||
|
|
||||||
hMod = GetModuleHandle("AMFrameWork.dll");
|
hMod = GetModuleHandle("AMFrameWork.dll");
|
||||||
|
|
||||||
if (hMod == NULL) {
|
if (hMod == NULL) {
|
||||||
dprintf("AMFW: DLL not found, disabling\n");
|
dprintf("AMFW: DLL not found, disabling\n");
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
@ -60,7 +60,7 @@ HRESULT amfw_hook_init(wchar_t serial[13])
|
|||||||
path_hook_insert_hooks(hMod);
|
path_hook_insert_hooks(hMod);
|
||||||
qr_insert_hooks(hMod);
|
qr_insert_hooks(hMod);
|
||||||
wcstombs_s(NULL, g_serial, sizeof(g_serial), serial, 26);
|
wcstombs_s(NULL, g_serial, sizeof(g_serial), serial, 26);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,4 +91,4 @@ static int my_nbamUsbFinder_GetInformation(int a1, int a2, uint64_t a3, uint16_t
|
|||||||
memset(a5, 0x00, 0x628);
|
memset(a5, 0x00, 0x628);
|
||||||
//memcpy(a5 + 0x428, L"123456789012\0", 26);
|
//memcpy(a5 + 0x428, L"123456789012\0", 26);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user