diff --git a/go.mod b/go.mod index eeac348..b7b6613 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( git.kirsle.net/go/audio v0.0.0-20200429055451-ae3b0695ba6f git.kirsle.net/go/log v0.0.0-20200902035305-70ac2848949b - git.kirsle.net/go/render v0.0.0-20210614025954-d77f5056b782 + git.kirsle.net/go/render v0.0.0-20211231003948-9e640ab5c3da git.kirsle.net/go/ui v0.0.0-20200710023146-e2a561fbd04c github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/fsnotify/fsnotify v1.4.9 @@ -18,8 +18,18 @@ require ( github.com/urfave/cli/v2 v2.3.0 github.com/veandco/go-sdl2 v0.4.10 github.com/vmihailenco/msgpack v3.3.3+incompatible - golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d + golang.org/x/image v0.0.0-20211028202545-6944b10bf410 google.golang.org/appengine v1.6.7 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/sourcemap.v1 v1.0.5 // indirect ) + +replace git.kirsle.net/go/render => /home/kirsle/SketchyMaze/deps/render + +replace git.kirsle.net/go/ui => /home/kirsle/SketchyMaze/deps/ui + +replace git.kirsle.net/go/audio => /home/kirsle/SketchyMaze/deps/audio + +//replace git.kirsle.net/go/render => /run/build/sketchymaze/deps/render +//replace git.kirsle.net/go/ui => /run/build/sketchymaze/deps/ui +//replace git.kirsle.net/go/audio => /run/build/sketchymaze/deps/audio diff --git a/go.sum b/go.sum index bf6b2ea..d115e0c 100644 --- a/go.sum +++ b/go.sum @@ -224,6 +224,8 @@ golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d h1:RNPAfi2nHY7C2srAV8A49jpsYr0ADedCk1wq6fTMTvs= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -232,6 +234,7 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= diff --git a/scripts/fpm-bundle.sh b/scripts/fpm-bundle.sh index 2d68de4..e03a5ad 100755 --- a/scripts/fpm-bundle.sh +++ b/scripts/fpm-bundle.sh @@ -69,9 +69,23 @@ echo ===================== echo Starting fpm package build. echo ===================== +# Handle all architectures! Default x86_64 +RPM_ARCH="x86_64" +DEB_ARCH="x86_64" +case "$archs" in + i?86) + RPM_ARCH="i386" + DEB_ARCH="i386" + ;; + aarch64) + RPM_ARCH="aarch64" + DEB_ARCH="arm64" + ;; +esac + # RPM Package fpm -C ./root -s dir -t rpm \ - -d SDL2 -d SDL2_ttf -a x86_64 \ + -d SDL2 -d SDL2_ttf -a $RPM_ARCH \ -n sketchy-maze -v ${VERSION} \ --license="Copyright" \ --maintainer=noah@kirsle.net \ @@ -80,7 +94,8 @@ fpm -C ./root -s dir -t rpm \ # Debian Package fpm -C ./root -s dir -t deb \ - -d libsdl2 -d libsdl2-ttf -a x86_64 \ + -d libsdl2-2.0 -d libsdl2-ttf-2.0 -d libsdl2-mixer-2.0 \ + -a $DEB_ARCH \ -n sketchy-maze -v ${VERSION} \ --license="Copyright" \ --maintainer=noah@kirsle.net \ diff --git a/scripts/release.sh b/scripts/release.sh index deecef3..0ac7bab 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -18,6 +18,14 @@ DIST_PATH="$(pwd)/dist/sketchymaze-${VERSION}" RELEASE_PATH="$(pwd)/dist/release/${VERSION}" STAGE_PATH="$(pwd)/dist/stage/${VERSION}" +# Handle all architectures! Default x86_64 +# Used in zipfiles for Linux and Windows (fpm-bundle.sh has its own logic) +ARCH_LABEL="64bit" +case "$archs" in + i?86) ARCH_LABEL="32bit" ;; + aarch64) ARCH_LABEL="aarch64" ;; +esac + if [[ ! -d $DIST_PATH ]]; then echo Run this script from the root of the game repository, such that echo ./dist/sketchymaze-${VERSION} exists. Run 'make mingw' and/or @@ -33,6 +41,16 @@ if [[ -d $STAGE_PATH ]]; then rm -rf $STAGE_PATH fi +# Check that we will bundle the Guidebook with the release. +if [[ ! -d "./guidebook" ]]; then + echo Guidebook not found locally! Should I download the latest or proceed without it? + echo Type 'y' to download the guidebook or press enter to skip. + read ANSWER + if [[ "$ANSWER" == "y" ]]; then + wget https://download.sketchymaze.com/guidebook.tar.gz && tar -xzvf guidebook.tar.gz + fi +fi + # Release scripts by operating system. linux() { # Check for Linux binaries in the dist folder. @@ -50,7 +68,7 @@ linux() { rm *.exe *.dll # Tar it. - tar -czvf "${RELEASE_PATH}/linux/sketchymaze-${VERSION}-linux-64bit.tar.gz" . + tar -czvf "${RELEASE_PATH}/linux/sketchymaze-${VERSION}-linux-${ARCH_LABEL}.tar.gz" . # fpm it. ../../../../scripts/fpm-bundle.sh @@ -75,7 +93,7 @@ windows() { rm sketchymaze doodad # Zip it. - zip -r "${RELEASE_PATH}/windows/sketchymaze-${VERSION}-windows-64bit.zip" . + zip -r "${RELEASE_PATH}/windows/sketchymaze-${VERSION}-windows-${ARCH_LABEL}.zip" . cd - } macos() {