Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 29 additions & 9 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 @@ -41,6 +43,7 @@ FORCE:

.PHONY: \
build-docker \
dev-docker \
clean \
code-format \
doc-format \
Expand Down Expand Up @@ -89,21 +92,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
91 changes: 91 additions & 0 deletions Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ include src/main/bstio/Module.mk
include src/main/camhook/Module.mk
include src/main/cconfig/Module.mk
include src/main/config/Module.mk
include src/main/core/Module.mk
include src/main/d3d9-util/Module.mk
include src/main/d3d9exhook/Module.mk
include src/main/ddrhook-util/Module.mk
Expand Down Expand Up @@ -324,6 +325,10 @@ $(zipdir)/iidx-18.zip: \
dist/iidx/config.bat \
dist/iidx/gamestart-18.bat \
dist/iidx/iidxhook-18.conf \
dist/iidx/launcher-18.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand Down Expand Up @@ -355,6 +360,10 @@ $(zipdir)/iidx-19.zip: \
dist/iidx/config.bat \
dist/iidx/gamestart-19.bat \
dist/iidx/iidxhook-19.conf \
dist/iidx/launcher-19.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand All @@ -371,6 +380,10 @@ $(zipdir)/iidx-20.zip: \
dist/iidx/config.bat \
dist/iidx/gamestart-20.bat \
dist/iidx/iidxhook-20.conf \
dist/iidx/launcher-20.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand Down Expand Up @@ -408,6 +421,13 @@ $(zipdir)/iidx-21-to-24.zip: \
dist/iidx/iidxhook-22.conf \
dist/iidx/iidxhook-23.conf \
dist/iidx/iidxhook-24.conf \
dist/iidx/launcher-21.xml \
dist/iidx/launcher-22.xml \
dist/iidx/launcher-23.xml \
dist/iidx/launcher-24.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand All @@ -426,6 +446,11 @@ $(zipdir)/iidx-25-to-26.zip: \
dist/iidx/gamestart-26.bat \
dist/iidx/iidxhook-25.conf \
dist/iidx/iidxhook-26.conf \
dist/iidx/launcher-25.xml \
dist/iidx/launcher-26.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand All @@ -448,6 +473,13 @@ $(zipdir)/iidx-27-to-30.zip: \
dist/iidx/iidxhook-28.conf \
dist/iidx/iidxhook-29.conf \
dist/iidx/iidxhook-30.conf \
dist/iidx/launcher-27.xml \
dist/iidx/launcher-28.xml \
dist/iidx/launcher-29.xml \
dist/iidx/launcher-30.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
dist/iidx/vefx.txt \
| $(zipdir)/
$(V)echo ... $@
Expand Down Expand Up @@ -516,6 +548,10 @@ $(zipdir)/jb-03.zip: \
build/bin/indep-32/jbio.dll \
dist/jb/config.bat \
dist/jb/gamestart-03.bat \
dist/jb/launcher-03.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -529,6 +565,10 @@ $(zipdir)/jb-04.zip: \
build/bin/indep-32/jbio.dll \
dist/jb/config.bat \
dist/jb/gamestart-03.bat \
dist/jb/launcher-03.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -542,6 +582,10 @@ $(zipdir)/jb-05-to-07.zip: \
build/bin/indep-32/jbio.dll \
dist/jb/config.bat \
dist/jb/gamestart-04.bat \
dist/jb/launcher-04.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -555,6 +599,10 @@ $(zipdir)/jb-08.zip: \
build/bin/indep-32/jbio.dll \
dist/jb/config.bat \
dist/jb/gamestart-04.bat \
dist/jb/launcher-04.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -579,6 +627,10 @@ $(zipdir)/sdvx-01-to-04.zip: \
build/bin/indep-32/sdvxio.dll \
dist/sdvx/config.bat \
dist/sdvx/gamestart.bat \
dist/sdvx/launcher.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -593,6 +645,10 @@ $(zipdir)/sdvx-05-to-06.zip: \
dist/sdvx5/config.bat \
dist/sdvx5/gamestart.bat \
dist/sdvx5/sdvxhook2.conf \
dist/sdvx5/launcher.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -607,6 +663,10 @@ $(zipdir)/sdvx-05-cn.zip: \
dist/sdvx5/config.bat \
dist/sdvx5/gamestart-cn.bat \
dist/sdvx5/sdvxhook2-cn.conf \
dist/sdvx5/launcher-cn.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand Down Expand Up @@ -681,6 +741,10 @@ $(zipdir)/ddr-12.zip: \
build/bin/indep-32/geninput.dll \
dist/ddr/config.bat \
dist/ddr/gamestart-12.bat \
dist/ddr/launcher-12.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -697,6 +761,10 @@ $(zipdir)/ddr-13.zip: \
build/bin/indep-32/geninput.dll \
dist/ddr/config.bat \
dist/ddr/gamestart-13.bat \
dist/ddr/launcher-13.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -710,11 +778,21 @@ $(zipdir)/ddr-14-to-18.zip: \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/geninput.dll \
dist/ddr/config.bat \
dist/ddr/gamestart-17.bat \
dist/ddr/gamestart-18.bat \
dist/ddr/gamestart-14.bat \
dist/ddr/gamestart-15.bat \
dist/ddr/gamestart-16.bat \
dist/ddr/gamestart-17.bat \
dist/ddr/gamestart-18.bat \
dist/ddr/launcher-14.xml \
dist/ddr/launcher-15.xml \
dist/ddr/launcher-16.xml \
dist/ddr/launcher-17.xml \
dist/ddr/launcher-18.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand All @@ -728,9 +806,17 @@ $(zipdir)/ddr-16-to-18-x64.zip: \
build/bin/indep-64/eamio.dll \
build/bin/indep-64/geninput.dll \
dist/ddr/config.bat \
dist/ddr/gamestart-17.bat \
dist/ddr/gamestart-18.bat \
dist/ddr/gamestart-16.bat \
dist/ddr/gamestart-17.bat \
dist/ddr/gamestart-18.bat \
dist/ddr/launcher-16.xml \
dist/ddr/launcher-17.xml \
dist/ddr/launcher-18.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand Down Expand Up @@ -769,6 +855,11 @@ $(zipdir)/bst.zip: \
dist/bst/config.bat \
dist/bst/gamestart1.bat \
dist/bst/gamestart2.bat \
dist/bst/launcher-01.xml \
dist/bst/launcher-02.xml \
dist/shared/ea3-ident.xml \
dist/shared/ea3-license.xml \
dist/shared/ea3-service.xml \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -j $@ $^
Expand Down
34 changes: 29 additions & 5 deletions dist/bst/gamestart1.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
@echo off

:: 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
:: (contents/) next to the folders modules, data etc.
cd /d %~dp0

if not exist dev\nvram mkdir dev\nvram
if not exist dev\nvram\coin.xml copy prop\defaults\coin.xml dev\nvram\coin.xml
if not exist dev\nvram\eacoin.xml copy prop\defaults\eacoin.xml dev\nvram\eacoin.xml
if not exist dev\raw mkdir dev\raw
:: Script expects to be located in the root folder (contents/) next to the
:: folders modules, data etc.
set CONTENT_DIR=%CD%\..
set BEMANITOOLS_DIR=%CONTENT_DIR%\bemanitools
set MODULES_DIR=%CONTENT_DIR%\modules

:: Keep that data vanilla, no need to copy these around anymore
:: Just add them to the env PATH so launcher can find the libs and game executable
:: Remark: This also requires admin privileges to propage correctly to launcher
set PATH=^
%MODULES_DIR%;^
%BEMANITOOLS_DIR%;^
%PATH%

:: Current working dir is the game's root folder
cd /d %CONTENT_DIR%

launcher -K bsthook.dll -E prop/ea3-config-1.xml beatstream1.dll %*
%BEMANITOOLS_DIR%\launcher %BEMANITOOLS_DIR%\launcher-01.xml %*
Loading