97 lines
3.0 KiB
Makefile
97 lines
3.0 KiB
Makefile
name = 'Dodge Bolt'
|
|
version = 0.1.0
|
|
love_version = 11.4
|
|
itchio = rokaspuz/dodge-bolt
|
|
|
|
LOVE_WIN32_DIR = build/love-$(love_version)-win32
|
|
LOVE_WIN64_DIR = build/love-$(love_version)-win64
|
|
|
|
all: win32 win64 linux
|
|
|
|
love: clean_love
|
|
mkdir -p build
|
|
cd src && zip -9 -r ../build/$(name).love . \
|
|
-x *.tiled-project \
|
|
-x *.tiled-session \
|
|
-x *.tsx \
|
|
-x *.tmx \
|
|
|
|
win32: clean_windows download-love-win32 love
|
|
mkdir -p build/win32/$(name)
|
|
cp -r $(LOVE_WIN32_DIR)/*.dll build/win32/$(name)
|
|
cp -r $(LOVE_WIN32_DIR)/license.txt build/win32/$(name)
|
|
cat $(LOVE_WIN32_DIR)/love.exe build/$(name).love > build/win32/$(name)/$(name).exe
|
|
|
|
win64: clean_windows download-love-win64 love
|
|
mkdir -p build/win64/$(name)
|
|
cp -r $(LOVE_WIN64_DIR)/*.dll build/win64/$(name)
|
|
cp -r $(LOVE_WIN64_DIR)/license.txt build/win64/$(name)
|
|
cat $(LOVE_WIN64_DIR)/love.exe build/$(name).love > build/win64/$(name)/$(name).exe
|
|
|
|
linux: clean_linux download-appimage love
|
|
mkdir -p build/linux
|
|
cd build/linux && ../love.AppImage --appimage-extract
|
|
cat build/linux/squashfs-root/bin/love build/$(name).love > build/linux/squashfs-root/bin/game
|
|
chmod +x build/linux/squashfs-root/bin/game
|
|
cp -f love.desktop build/linux/squashfs-root/love.desktop
|
|
appimagetool build/linux/squashfs-root build/linux/$(name)
|
|
rm -rf build/linux/squashfs-root
|
|
|
|
deploy: deploy-win32 deploy-win64 deploy-linux
|
|
|
|
deploy-win32: download-butler win32
|
|
cd build/win32 && zip -9 -r $(name).zip .
|
|
./build/butler push build/win32/$(name).zip $(itchio):win32 --userversion $(version)
|
|
|
|
deploy-win64: download-butler win64
|
|
cd build/win64 && zip -9 -r $(name).zip .
|
|
./build/butler push build/win64/$(name).zip $(itchio):win64 --userversion $(version)
|
|
|
|
deploy-linux: download-butler linux
|
|
cd build/linux && zip -9 -r $(name).zip .
|
|
./build/butler push build/linux/$(name).zip $(itchio):linux --userversion $(version)
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
clean_windows:
|
|
rm -rf build/windows
|
|
|
|
clean_linux:
|
|
rm -rf build/linux
|
|
|
|
clean_love:
|
|
rm -f build/$(name).love
|
|
|
|
download-love-win32:
|
|
ifeq (,$(wildcard ./build/love-${love_version}-win32/))
|
|
mkdir -p build
|
|
wget -O build/love-win32.zip https://github.com/love2d/love/releases/download/${love_version}/love-${love_version}-win32.zip
|
|
unzip build/love-win32.zip -d build
|
|
rm build/love-win32.zip
|
|
endif
|
|
|
|
download-love-win64:
|
|
ifeq (,$(wildcard ./build/love-${love_version}-win64/))
|
|
mkdir -p build
|
|
wget -O build/love-win64.zip https://github.com/love2d/love/releases/download/${love_version}/love-${love_version}-win64.zip
|
|
unzip build/love-win64.zip -d build
|
|
rm build/love-win64.zip
|
|
endif
|
|
|
|
download-appimage:
|
|
ifeq (,$(wildcard ./build/love.AppImage))
|
|
mkdir -p build
|
|
wget -O build/love.AppImage https://github.com/love2d/love/releases/download/${love_version}/love-${love_version}-x86_64.AppImage
|
|
chmod +x build/love.AppImage
|
|
endif
|
|
|
|
download-butler:
|
|
ifeq (,$(wildcard ./build/butler))
|
|
mkdir -p build
|
|
wget -O build/butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
|
|
unzip build/butler.zip -d build
|
|
chmod +x build/butler
|
|
rm build/butler.zip
|
|
endif
|