1
0
mirror of synced 2024-11-23 21:40:58 +01:00

clean up build scripts

This commit is contained in:
Kevin Trocolli 2023-01-18 23:08:49 -05:00
parent 364540b47f
commit 59732daf89
4 changed files with 9 additions and 41 deletions

View File

@ -9,26 +9,4 @@ WORKDIR /bananatools
VOLUME [ "/bananatools" ] VOLUME [ "/bananatools" ]
# 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" ] ENTRYPOINT [ "make", "dist" ]

View File

@ -5,16 +5,12 @@ V ?= @
BUILD_DIR := build BUILD_DIR := build
BUILD_DIR_32 := $(BUILD_DIR)/build32 BUILD_DIR_32 := $(BUILD_DIR)/build32
BUILD_DIR_64 := $(BUILD_DIR)/build64 BUILD_DIR_64 := $(BUILD_DIR)/build64
BUILD_DIR_DOCKER := $(BUILD_DIR)/docker
BUILD_DIR_ZIP := $(BUILD_DIR)/zip BUILD_DIR_ZIP := $(BUILD_DIR)/zip
DOC_DIR := doc DOC_DIR := doc
DIST_DIR := dist DIST_DIR := dist
DOCKER_CONTAINER_NAME := "bananatools-build"
DOCKER_IMAGE_NAME := "bananatools:build"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Targets # Targets
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -23,6 +19,7 @@ include Package.mk
.PHONY: build # Build the project .PHONY: build # Build the project
build: build:
$(V)rm -Rf $(BUILD_DIR_ZIP)
$(V)meson --cross cross-mingw-32.txt $(BUILD_DIR_32) $(V)meson --cross cross-mingw-32.txt $(BUILD_DIR_32)
$(V)ninja -C $(BUILD_DIR_32) $(V)ninja -C $(BUILD_DIR_32)
$(V)meson --cross cross-mingw-64.txt $(BUILD_DIR_64) $(V)meson --cross cross-mingw-64.txt $(BUILD_DIR_64)
@ -38,15 +35,6 @@ zip: $(BUILD_DIR_ZIP)/bananatools.zip
clean: clean:
$(V)rm -rf $(BUILD_DIR) subprojects/capnhook $(V)rm -rf $(BUILD_DIR) subprojects/capnhook
.PHONY: build-docker # Build the project in a docker container
build-docker:
$(V)docker rm -f $(DOCKER_CONTAINER_NAME) 2> /dev/null || true
$(V)docker build -t $(DOCKER_IMAGE_NAME) -f Dockerfile .
$(V)docker create --name $(DOCKER_CONTAINER_NAME) $(DOCKER_IMAGE_NAME)
$(V)rm -rf $(BUILD_DIR_DOCKER)
$(V)mkdir -p $(BUILD_DIR_DOCKER)
$(V)docker cp $(DOCKER_CONTAINER_NAME):/bananatools/$(BUILD_DIR_ZIP) $(BUILD_DIR_DOCKER)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Utility, combo and alias targets # Utility, combo and alias targets
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------

View File

@ -20,9 +20,17 @@ $(BUILD_DIR_ZIP)/taiko.zip:
$(V)strip $(BUILD_DIR_ZIP)/taiko/*.{exe,dll} $(V)strip $(BUILD_DIR_ZIP)/taiko/*.{exe,dll}
$(V)cd $(BUILD_DIR_ZIP)/taiko ; zip -r ../taiko.zip * $(V)cd $(BUILD_DIR_ZIP)/taiko ; zip -r ../taiko.zip *
$(BUILD_DIR_ZIP)/doc.zip: \
$(DOC_DIR)/ferrumhook.md \
$(DOC_DIR)/taikohook.md \
| $(zipdir)/
$(V)echo ... $@
$(V)zip -r $@ $^
$(BUILD_DIR_ZIP)/bananatools.zip: \ $(BUILD_DIR_ZIP)/bananatools.zip: \
$(BUILD_DIR_ZIP)/ferrum.zip \ $(BUILD_DIR_ZIP)/ferrum.zip \
$(BUILD_DIR_ZIP)/taiko.zip \ $(BUILD_DIR_ZIP)/taiko.zip \
$(BUILD_DIR_ZIP)/doc.zip \
README.md \ README.md \
$(V)echo ... $@ $(V)echo ... $@

View File

@ -2,7 +2,6 @@
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
:: Static Environment Variables :: Static Environment Variables
set BUILD_OUTPUT_PATH=build\docker
set IMAGE_NAME=hay1tsme/bananatools-build:latest set IMAGE_NAME=hay1tsme/bananatools-build:latest
set CONTAINER_NAME=bananatools-build set CONTAINER_NAME=bananatools-build
@ -19,11 +18,6 @@ if ERRORLEVEL 1 (
goto failure goto failure
) )
rd /s /q "!BUILD_OUTPUT_PATH!"
mkdir "!BUILD_OUTPUT_PATH!"
REM docker cp %CONTAINER_NAME%:/bananatools/build/zip %BUILD_OUTPUT_PATH%
docker image rm -f %IMAGE_NAME% docker image rm -f %IMAGE_NAME%
goto success goto success