49 lines
1.6 KiBLFS
Makefile
49 lines
1.6 KiBLFS
Makefile
VERSION=$(shell git log -1 --pretty=%B | tr -d '\n')
|
|
NAME=Monde-en-carton
|
|
|
|
WIN_FOLDER=${NAME}-win-${VERSION}
|
|
MAC_APP=${NAME}-mac-${VERSION}.app
|
|
MAC_TARGET=${NAME}-mac-${VERSION}
|
|
|
|
BUILD_FOLDER=Builds
|
|
|
|
# Variables for itch.io
|
|
ITCH_USER=your-itch-username # Replace with your itch.io username
|
|
GAME_NAME=le-monde-en-carton # Replace with your game's name on itch.io
|
|
WIN_CHANNEL=windows # The itch.io channel for the Windows build
|
|
MAC_CHANNEL=mac # The itch.io channel for the macOS build
|
|
|
|
UNITY_PATH=/Applications/Unity/Hub/Editor/2021.3.35f1/Unity.app/Contents/MacOS/Unity
|
|
PROJECT_PATH=/Users/gabrielvidal/PROJECTS/monde-usage-unity
|
|
|
|
build.win:
|
|
@echo "Building Windows version..."
|
|
$(UNITY_PATH) -quit -batchmode -projectPath $(PROJECT_PATH) -executeMethod Builder.Build -buildTarget Win64 -logFile build_win.log
|
|
|
|
build.mac:
|
|
@echo "Building macOS version..."
|
|
$(UNITY_PATH) -quit -batchmode -projectPath $(PROJECT_PATH) -executeMethod Builder.Build -buildTarget OSXUniversal -logFile build_mac.log
|
|
|
|
zip.build:
|
|
@echo "Building zip file..."
|
|
# Exclude mac files and folders
|
|
|
|
zip.build.win:
|
|
zip -r ${BUILD_FOLDER}/${WIN_FOLDER}.zip ${BUILD_FOLDER}/${WIN_FOLDER} -x "*.DS_Store"
|
|
|
|
zip.build.mac:
|
|
zip -r ${BUILD_FOLDER}/${MAC_TARGET}.zip ${BUILD_FOLDER}/${MAC_APP} -x "*.DS_Store"
|
|
|
|
|
|
|
|
butler.push.win:
|
|
@echo "Pushing Windows build to itch.io..."
|
|
butler push ${BUILD_FOLDER}/${WIN_FOLDER} ${ITCH_USER}/${GAME_NAME}:${WIN_CHANNEL} --userversion ${VERSION}
|
|
|
|
butler.push.mac:
|
|
@echo "Pushing macOS build to itch.io..."
|
|
butler push ${BUILD_FOLDER}/${MAC_TARGET} ${ITCH_USER}/${GAME_NAME}:${MAC_CHANNEL} --userversion ${VERSION}
|
|
|
|
clean:
|
|
rm -rf ${BUILD_FOLDER}/*
|