diff --git a/Dockerfile b/Dockerfile index c21c84d..cd872e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN gem install fpm; exit 0 # Download and install modern Go. WORKDIR /root -RUN wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz -O go.tgz && \ +RUN wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz -O go.tgz && \ tar -xzf go.tgz && \ cp -r go /opt/go diff --git a/Makefile b/Makefile index 5f0a70f..6055340 100644 --- a/Makefile +++ b/Makefile @@ -170,9 +170,7 @@ dist: doodads build __dist-common # and Windows apps. .PHONY: docker docker: - mkdir -p docker-artifacts - podman build --cap-add SYS_ADMIN --device /dev/fuse -t doodle_docker . - podman run --rm --mount type=bind,src=$(shell pwd)/docker-artifacts,dst=/mnt/export doodle_docker + ./scripts/docker-build.sh # `make dist-free` builds and tars up a release in shareware mode. .PHONY: dist-free diff --git a/go.mod b/go.mod index 75aa9b6..86fe21b 100644 --- a/go.mod +++ b/go.mod @@ -6,21 +6,27 @@ require ( git.kirsle.net/go/audio v0.0.0-20230310065553-fa6eb3d3a029 git.kirsle.net/go/log v0.0.0-20200902035305-70ac2848949b git.kirsle.net/go/render v0.0.0-20220505053906-129a24300dfa - git.kirsle.net/go/ui v0.0.0-20230409041824-8716c479e90b + git.kirsle.net/go/ui v0.0.0-20231209035443-e912e2bd035c github.com/aichaos/rivescript-go v0.4.0 github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/dlclark/regexp2 v1.10.0 // indirect github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d - github.com/fsnotify/fsnotify v1.4.9 + github.com/fsnotify/fsnotify v1.7.0 github.com/gen2brain/dlgs v0.0.0-20220603100644-40c77870fa8d - github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15 // indirect + github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 // indirect github.com/google/uuid v1.4.0 github.com/gopherjs/gopherjs v1.17.2 // indirect github.com/kirsle/configdir v0.0.0-20170128060238-e45d2f54772f github.com/tomnomnom/xtermcolor v0.0.0-20160428124646-b78803f00a7e // indirect - github.com/urfave/cli/v2 v2.25.7 + github.com/urfave/cli/v2 v2.26.0 github.com/veandco/go-sdl2 v0.4.36 golang.org/x/crypto v0.16.0 // indirect golang.org/x/image v0.14.0 ) + +replace git.kirsle.net/go/render => /home/kirsle/SketchyMaze/doodle/deps/render + +replace git.kirsle.net/go/ui => /home/kirsle/SketchyMaze/doodle/deps/ui + +replace git.kirsle.net/go/audio => /home/kirsle/SketchyMaze/doodle/deps/audio diff --git a/go.sum b/go.sum index a7c9f27..47bdf37 100644 --- a/go.sum +++ b/go.sum @@ -105,6 +105,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gen2brain/dlgs v0.0.0-20220603100644-40c77870fa8d h1:dHYKX8CBAs1zSGXm3q3M15CLAEwPEkwrK1ed8FCo+Xo= github.com/gen2brain/dlgs v0.0.0-20220603100644-40c77870fa8d/go.mod h1:/eFcjDXaU2THSOOqLxOPETIbHETnamk8FA/hMjhg/gU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -180,6 +181,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15 h1:t2sLhFuGXwoomaKLTuoxFfFqqlG1Gp2DpsupXq3UvZ0= github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 h1:PxlBVtIFHR/mtWk2i0gTEdCz+jBnqiuHNSki0epDbVs= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= @@ -308,6 +311,8 @@ github.com/tomnomnom/xtermcolor v0.0.0-20160428124646-b78803f00a7e h1:Ee+VZw13r9 github.com/tomnomnom/xtermcolor v0.0.0-20160428124646-b78803f00a7e/go.mod h1:fSIW/szJHsRts/4U8wlMPhs+YqJC+7NYR+Qqb1uJVpA= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI= +github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/veandco/go-sdl2 v0.4.1/go.mod h1:FB+kTpX9YTE+urhYiClnRzpOXbiWgaU3+5F2AB78DPg= github.com/veandco/go-sdl2 v0.4.33/go.mod h1:OROqMhHD43nT4/i9crJukyVecjPNYYuCofep6SNiAjY= github.com/veandco/go-sdl2 v0.4.36 h1:Ltydev536rRQodmIrTWFZ3dRp5A+/6t5CYvbi4Kvia0= @@ -504,6 +509,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh new file mode 100755 index 0000000..eeab662 --- /dev/null +++ b/scripts/docker-build.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Script to build the Docker CI to export Linux and Windows, 64- and 32-bit releases. + +# Ensure we run this from the doodle root. +if [[ ! -f "./cmd/doodle/main.go" ]]; then + echo "Run this script from the root of your doodle engine checkout." + echo "This is probably up one directory from where this script lives." + exit 1 +fi + +# Fedora: we will need to setenforce permissive to copy the artifacts from the +# Docker container out to the host. +if type "getenforce" > /dev/null; then + current=`getenforce`; + if [ $current -eq "Enforcing"]; then + echo "Your current SELinux policy is set to: $current." + echo "This will prevent the final built artifacts being moved from the Docker" + echo "container into the output directory on your host." + echo "" + + read -e -p "Can I run command 'sudo setenforce permissive'? [yn]" choice + [[ "$choice" == [Yy]* ]] && sudo setenforce permissive || echo "That was a no" + fi +fi + +# If we don't have podman installed, substitute it for docker. +if ! type "podman" > /dev/null; then + echo "Note: podman not found, trying docker instead." + alias podman=`which docker` +fi + +mkdir -p docker-artifacts +podman build --cap-add SYS_ADMIN --device /dev/fuse -t doodle_docker . +podman run --rm --mount type=bind,src=$(shell pwd)/docker-artifacts,dst=/mnt/export doodle_docker \ No newline at end of file diff --git a/winres/16.png b/winres/16.png new file mode 100644 index 0000000..46428d2 Binary files /dev/null and b/winres/16.png differ diff --git a/winres/256.png b/winres/256.png new file mode 100644 index 0000000..0b8e7b3 Binary files /dev/null and b/winres/256.png differ diff --git a/winres/32.png b/winres/32.png new file mode 100644 index 0000000..2899bfc Binary files /dev/null and b/winres/32.png differ diff --git a/winres/64.png b/winres/64.png new file mode 100644 index 0000000..b98f729 Binary files /dev/null and b/winres/64.png differ diff --git a/winres/winres.json b/winres/winres.json new file mode 100644 index 0000000..4e8c77d --- /dev/null +++ b/winres/winres.json @@ -0,0 +1,63 @@ +{ + "RT_GROUP_ICON": { + "APP": { + "0000": [ + "256.png", + "64.png", + "32.png", + "16.png" + ] + } + }, + "RT_MANIFEST": { + "#1": { + "0409": { + "identity": { + "name": "", + "version": "" + }, + "description": "", + "minimum-os": "win7", + "execution-level": "as invoker", + "ui-access": false, + "auto-elevate": false, + "dpi-awareness": "system", + "disable-theming": false, + "disable-window-filtering": false, + "high-resolution-scrolling-aware": false, + "ultra-high-resolution-scrolling-aware": false, + "long-path-aware": false, + "printer-driver-isolation": false, + "gdi-scaling": false, + "segment-heap": false, + "use-common-controls-v6": false + } + } + }, + "RT_VERSION": { + "#1": { + "0000": { + "fixed": { + "file_version": "0.0.0.0", + "product_version": "0.0.0.0" + }, + "info": { + "0409": { + "Comments": "A drawing-based maze game.", + "CompanyName": "", + "FileDescription": "", + "FileVersion": "", + "InternalName": "doodle", + "LegalCopyright": "© Noah Petherbridge 2023", + "LegalTrademarks": "", + "OriginalFilename": "sketchymaze.exe", + "PrivateBuild": "", + "ProductName": "Sketchy Maze", + "ProductVersion": "", + "SpecialBuild": "" + } + } + } + } + } +} \ No newline at end of file