Build system + release win64 + linux64

This commit is contained in:
bdnugget 2025-01-19 01:31:05 +01:00
parent e4d0b98945
commit a1ddbadea0
32 changed files with 879785 additions and 0 deletions

30
Dockerfile.build Normal file
View File

@ -0,0 +1,30 @@
FROM golang:1.23
# Install build dependencies
RUN apt-get update && apt-get install -y \
gcc-mingw-w64 \
cmake \
zip \
libasound2-dev \
mesa-common-dev \
libx11-dev \
libxrandr-dev \
libxi-dev \
xorg-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libwayland-dev \
wayland-protocols \
libxkbcommon-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
# Copy build scripts
COPY . /build/
# Set execute permissions
RUN chmod +x /build/scripts/build.sh
# Build command
CMD ["make", "all"]

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
.PHONY: all clean windows linux darwin
include scripts/platforms.mk
BINARY_NAME=goonscape
VERSION=1.0.0
BUILD_DIR=build
ASSETS_DIR=resources
all: clean $(PLATFORMS)
$(PLATFORMS):
@echo "Building for $@..."
@mkdir -p $(BUILD_DIR)/$@
@scripts/build.sh $(word 1,$(subst /, ,$@)) $(word 2,$(subst /, ,$@)) \
$(BUILD_DIR)/$@/$(BINARY_NAME)$(if $(findstring windows,$@),.exe,)
@cp -r $(ASSETS_DIR) $(BUILD_DIR)/$@/
@cd $(BUILD_DIR) && zip -r $(BINARY_NAME)-$(word 1,$(subst /, ,$@))-$(word 2,$(subst /, ,$@))-v$(VERSION).zip $@
@echo "Done building for $@"
clean:
rm -rf $(BUILD_DIR)
# Development build for current platform
dev:
go build -o $(BINARY_NAME)
# Run tests
test:
go test ./...

Binary file not shown.

Binary file not shown.

BIN
build/linux/amd64/goonscape Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd coomer.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd goonion.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd shreke.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
build/windows/amd64/goonscape.exe Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd coomer.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd goonion.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -0,0 +1,12 @@
# Blender 3.6.0 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd shreke.png

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

24
scripts/build.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# Main build process
build() {
local os=$1
local arch=$2
local output=$3
# Set CGO flags for static linking
export CGO_ENABLED=1
export GOOS=$os
export GOARCH=$arch
# Platform specific flags
if [ "$os" = "windows" ]; then
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++
fi
go build -buildvcs=false -ldflags="-s -w" -o $output
}
# Call build with provided arguments
build "$1" "$2" "$3"

1
scripts/platforms.mk Normal file
View File

@ -0,0 +1 @@
PLATFORMS=windows/amd64 linux/amd64