Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/refactor: bemanitools core, logger, thread #282

Open
wants to merge 41 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
431a7b8
chore: Apply code formatting
Jan 28, 2024
4c9ed32
feat(util): Add log function for logging in exception handlers
Jan 28, 2024
a70f7c6
feat(util): Separate debug module with proper stacktrace printing
Jan 28, 2024
e1bccc4
feat(inject): Use new exception handler with stacktraces
Jan 28, 2024
fbbe956
fix(make): Include dwarf symbols and remove stripping
Jan 28, 2024
0eda352
feat(util): Add func to check if running as admin user
Jan 28, 2024
c20fbbd
feat: Add new module to scope avs related "utility" stuff
Jan 28, 2024
201d3d2
feat(avs-api): Improve property_type enum
Jan 28, 2024
4ac0ac5
chore(avs-api): Move psmap terminator to enum
Jan 28, 2024
ed21aa2
feat(avs-api): Introduce AVS error type
Jan 28, 2024
ffaeb79
feat(avs-api): Add more AVS file system related functions
Jan 28, 2024
9f5bb81
feat(avs-api): Add more property node related functions
Jan 28, 2024
bc743df
fix(avs-api): Variable type and naming
Jan 28, 2024
e2b4113
feat(avs imports): Add lib export definitions of new AVS API functions
Jan 28, 2024
fe05817
feat/fix(avs/ddr): Support AVS 2.13.06
Jan 28, 2024
1d6dfbb
fix(dist): Incorrect versioning for ddr distribution packages
Jan 29, 2024
5330802
fix(doc): Update list of supported ddr versions
Jan 29, 2024
24e7dd5
refactor(launcher): Major re-work of launcher
Jan 29, 2024
a237454
refactor(dist): Config and .bat files
Jan 29, 2024
d95633c
fix(hook): Add missing hook_table_revert impl
Feb 3, 2024
d42b426
feat(procmon): Library to hook and monitor selected system calls
Feb 3, 2024
017caab
feat(launcher): Integrate procmon as optional dependency
Feb 3, 2024
68488e0
feat: Add core module
Feb 19, 2024
a80c34f
feat: Add helper to set avs implementations
Feb 19, 2024
431cda8
feat(avs): Add property get and clear error functions
Feb 19, 2024
97e2735
feat(avs-util): Add helper to translate property errors
Feb 19, 2024
d33f476
refactor(api): Thread and log API
Feb 19, 2024
a7171af
fix(dist): Missing bemanitools dir scoping for config
Feb 19, 2024
9ba5845
fix(dist/iidx): Use modern mounttable in avs config override
Feb 19, 2024
60b2c23
refactor: Entire code base, thread and log usage
Feb 19, 2024
b8439ba
chore: Apply code formatting
Feb 19, 2024
2da5bcc
chore: Delete old log and thread modules in util
Feb 19, 2024
e7c8cfe
refactor(inject): Use new core thread and log modules
Feb 19, 2024
1a9a2f7
refactor(launcher): Use new core thread and log modules
Feb 19, 2024
8a71f92
feat(launcher): Improve error output when missing vcredist deps
Feb 19, 2024
fc9c96b
feat(dev): Add a separate docker dev cotainer
Feb 19, 2024
a003c21
fix(launcher/property): Fix property merging
Feb 19, 2024
5c6904c
refactor(launcher): Tweak usage of property-util accordingly
Feb 19, 2024
d84c46f
refactor(launcher/avs): Support new style mounttables
Feb 19, 2024
9a6763e
feat(launcher): Abstract old and new style mounttables
Feb 19, 2024
2d7d084
fix(launcher): Auto creating fs directories for mounttables
Feb 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
21 changes: 21 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM --platform=amd64 debian:11.6-slim@sha256:f7d141c1ec6af549958a7a2543365a7829c2cdc4476308ec2e182f8a7c59b519

LABEL description="Development environment for bemanitools"

# mingw-w64-gcc has 32-bit and 64-bit toolchains
RUN apt-get update && apt-get install -y --no-install-recommends \
mingw-w64 \
mingw-w64-common \
make \
zip \
git \
clang-format \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install mdformat

RUN mkdir /bemanitools
WORKDIR /bemanitools

ENV SHELL /bin/bash
42 changes: 30 additions & 12 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ BUILDDIR ?= build

builddir_docker := $(BUILDDIR)/docker

docker_container_name := "bemanitools-build"
docker_image_name := "bemanitools-build:latest"
docker_build_container_name := "bemanitools-build"
docker_build_image_name := "bemanitools-build:latest"
docker_dev_container_name := "bemanitools-dev"
docker_dev_image_name := "bemanitools-dev:latest"

depdir := $(BUILDDIR)/dep
objdir := $(BUILDDIR)/obj
Expand All @@ -25,7 +27,7 @@ toolchain_64 := x86_64-w64-mingw32-

gitrev := $(shell git rev-parse HEAD)
cppflags := -I src -I src/main -I src/test -DGITREV=$(gitrev)
cflags := -O2 -pipe -ffunction-sections -fdata-sections \
cflags := -g -O2 -pipe -ffunction-sections -fdata-sections \
-Wall -std=c99 -DPSAPI_VERSION=1
cflags_release := -Werror
ldflags := -Wl,--gc-sections -static-libgcc
Expand All @@ -41,6 +43,7 @@ FORCE:

.PHONY: \
build-docker \
dev-docker \
clean \
code-format \
print-building \
Expand Down Expand Up @@ -83,21 +86,38 @@ version:
$(V)echo "$(gitrev)" > version

build-docker:
$(V)docker rm -f $(docker_container_name) 2> /dev/null || true
$(V)docker rm -f $(docker_build_container_name) 2> /dev/null || true
$(V)docker \
build \
-t $(docker_image_name) \
-f Dockerfile \
-t $(docker_build_image_name) \
-f Dockerfile.build \
.
$(V)docker \
run \
--volume $(shell pwd):/bemanitools \
--name $(docker_container_name) \
$(docker_image_name)
--name $(docker_build_container_name) \
$(docker_build_image_name)

dev-docker:
$(V)docker rm -f $(docker_dev_container_name) 2> /dev/null || true
$(V)docker \
build \
-t $(docker_dev_image_name) \
-f Dockerfile.dev \
.
$(V)docker \
run \
--interactive \
--tty \
--volume $(shell pwd):/bemanitools \
--name $(docker_dev_container_name) \
$(docker_dev_image_name)

clean-docker:
$(V)docker rm -f $(docker_container_name) || true
$(V)docker image rm -f $(docker_image_name) || true
$(V)docker rm -f $(docker_dev_container_name) || true
$(V)docker image rm -f $(docker_dev_image_name) || true
$(V)docker rm -f $(docker_build_container_name) || true
$(V)docker image rm -f $(docker_build_image_name) || true
$(V)rm -rf $(BUILDDIR)

#
Expand Down Expand Up @@ -240,7 +260,6 @@ $$(dll_$1_$2_$3) $$(implib_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) \
$(V)$$(toolchain_$1)gcc -shared \
-o $$(dll_$1_$2_$3) -Wl,--out-implib,$$(implib_$1_$2_$3) \
-Wl,--start-group $$^ -Wl,--end-group $$(ldflags_$3)
$(V)$$(toolchain_$1)strip $$(dll_$1_$2_$3)
$(V)$$(toolchain_$1)ranlib $$(implib_$1_$2_$3)

endef
Expand All @@ -257,7 +276,6 @@ $$(exe_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) $$(absdpl_$1_$2_$3) \
| $$(bindir_$1_$2)
$(V)echo ... $$@
$(V)$$(toolchain_$1)gcc -o $$@ $$^ $$(ldflags_$3)
$(V)$$(toolchain_$1)strip $$@

endef

Expand Down
Loading