clean up build scripts
This commit is contained in:
parent
364540b47f
commit
59732daf89
22
Dockerfile
22
Dockerfile
@ -9,26 +9,4 @@ WORKDIR /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" ]
|
||||
|
14
Makefile
14
Makefile
@ -5,16 +5,12 @@ V ?= @
|
||||
BUILD_DIR := build
|
||||
BUILD_DIR_32 := $(BUILD_DIR)/build32
|
||||
BUILD_DIR_64 := $(BUILD_DIR)/build64
|
||||
BUILD_DIR_DOCKER := $(BUILD_DIR)/docker
|
||||
BUILD_DIR_ZIP := $(BUILD_DIR)/zip
|
||||
|
||||
DOC_DIR := doc
|
||||
|
||||
DIST_DIR := dist
|
||||
|
||||
DOCKER_CONTAINER_NAME := "bananatools-build"
|
||||
DOCKER_IMAGE_NAME := "bananatools:build"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Targets
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -23,6 +19,7 @@ include Package.mk
|
||||
|
||||
.PHONY: build # Build the project
|
||||
build:
|
||||
$(V)rm -Rf $(BUILD_DIR_ZIP)
|
||||
$(V)meson --cross cross-mingw-32.txt $(BUILD_DIR_32)
|
||||
$(V)ninja -C $(BUILD_DIR_32)
|
||||
$(V)meson --cross cross-mingw-64.txt $(BUILD_DIR_64)
|
||||
@ -38,15 +35,6 @@ zip: $(BUILD_DIR_ZIP)/bananatools.zip
|
||||
clean:
|
||||
$(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
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -20,9 +20,17 @@ $(BUILD_DIR_ZIP)/taiko.zip:
|
||||
$(V)strip $(BUILD_DIR_ZIP)/taiko/*.{exe,dll}
|
||||
$(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)/ferrum.zip \
|
||||
$(BUILD_DIR_ZIP)/taiko.zip \
|
||||
$(BUILD_DIR_ZIP)/doc.zip \
|
||||
README.md \
|
||||
|
||||
$(V)echo ... $@
|
||||
|
@ -2,7 +2,6 @@
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Static Environment Variables
|
||||
set BUILD_OUTPUT_PATH=build\docker
|
||||
set IMAGE_NAME=hay1tsme/bananatools-build:latest
|
||||
set CONTAINER_NAME=bananatools-build
|
||||
|
||||
@ -19,11 +18,6 @@ if ERRORLEVEL 1 (
|
||||
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%
|
||||
|
||||
goto success
|
||||
|
Loading…
Reference in New Issue
Block a user