From d573c159fa2b7a6ef513b31a0d883b688b58b49b Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 20 Mar 2026 11:46:11 +0100 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Arreglat=20el=20make=20de=20macos?= =?UTF-8?q?=20-=20[NEW]=20Publicaci=C3=B3=20autom=C3=A0tica=20de=20release?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- Makefile | 6 +++--- do_release.sh | 36 ++++++++++++++++++++---------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 8f7fb8d..3bdc774 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ mini_debug.exe mini_debug .vscode/* info.plist -build/* \ No newline at end of file +build/* +*.zip +*.tar.gz \ No newline at end of file diff --git a/Makefile b/Makefile index 7f181f3..bc0af63 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,13 @@ windows_debug: g++ $(source) -D DEBUG -g -Wall -Os -lmingw32 -lSDL3 -lopengl32 -o "$(executable)_debug.exe" macos: - clang++ $(source) -Wall -Os -std=c++11 -ffunction-sections -fdata-sections -lSDL3 -o "$(executable)" + clang++ $(source) -Wall -Os -std=c++17 -Wno-deprecated -ffunction-sections -fdata-sections -lSDL3 -framework OpenGL -o "$(executable)" macos_debug: - clang++ $(source) -D DEBUG -g -Wall -Os -std=c++11 -ffunction-sections -fdata-sections -lSDL3 -o "$(executable)_debug" + clang++ $(source) -D DEBUG -g -Wall -Os -std=c++17 -Wno-deprecated -ffunction-sections -fdata-sections -lSDL3 -framework OpenGL -o "$(executable)_debug" macos_bundle: - clang++ $(source) -D MACOS_BUNDLE -Wall -Os -std=c++11 -framework SDL3 -F /Library/Frameworks -ffunction-sections -fdata-sections -o mini_bundle -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 + clang++ $(source) -D MACOS_BUNDLE -Wall -Os -std=c++17 -Wno-deprecated -framework SDL3 -framework OpenGL -F /Library/Frameworks -ffunction-sections -fdata-sections -o mini_bundle -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 linux: g++ $(source) -D LUA_USE_LINUX -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL3 -lGL -o "$(executable)" diff --git a/do_release.sh b/do_release.sh index 42d80c9..0032966 100755 --- a/do_release.sh +++ b/do_release.sh @@ -1,12 +1,16 @@ #!/bin/bash set -e -if [ -z "$1" ]; then - echo "Uso: $0 " - exit 1 -fi +#if [ -z "$1" ]; then +# echo "Uso: $0 " +# exit 1 +#fi -PARAM=$1 +# Leer versión desde version.h +VERSION=$(grep '#define MINI_VERSION' version.h | sed 's/.*"\(.*\)".*/\1/') +echo "Versión detectada: $VERSION" + +#PARAM=$1 # Datos Windows WIN_USER="raimon" @@ -15,23 +19,23 @@ WIN_PATH_SSH="C:\Users\raimon\dev\mini" WIN_PATH_SCP="C:/Users/Raimon/dev/mini" echo "=== Compilando Linux ===" -#make linux -#make linux_debug +make linux +make linux_debug echo "=== Empaquetando Linux ===" -#tar -czf mini_${PARAM}_linux_release.tar.gz mini -#tar -czf mini_${PARAM}_linux_debug.tar.gz mini_debug +tar -czf mini_v${VERSION}_linux_release.tar.gz mini +tar -czf mini_v${VERSION}_linux_debug.tar.gz mini_debug echo "=== Ejecutando build remoto Windows ===" -#ssh ${WIN_USER}@${WIN_HOST} "cd ${WIN_PATH_SSH} && do_release.bat ${PARAM}" +ssh ${WIN_USER}@${WIN_HOST} "cd ${WIN_PATH_SSH} && do_release.bat v${VERSION}" echo "=== Copiando ZIPs desde Windows ===" -scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SCP}/mini_${PARAM}_windows_release.zip" . -scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SCP}/mini_${PARAM}_windows_debug.zip" . +scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SCP}/mini_v${VERSION}_windows_release.zip" . +scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SCP}/mini_v${VERSION}_windows_debug.zip" . echo "=== Build completado correctamente ===" echo "Generados:" -echo " mini_${PARAM}_linux_release.tar.gz" -echo " mini_${PARAM}_linux_debug.tar.gz" -echo " mini_${PARAM}_windows_release.zip" -echo " mini_${PARAM}_windows_debug.zip" +echo " mini_v${VERSION}_linux_release.tar.gz" +echo " mini_v${VERSION}_linux_debug.tar.gz" +echo " mini_v${VERSION}_windows_release.zip" +echo " mini_v${VERSION}_windows_debug.zip"