- [FIX] Arreglat el make de macos

- [NEW] Publicació automàtica de releases
This commit is contained in:
2026-03-20 11:46:11 +01:00
parent 446f588cfe
commit d573c159fa
3 changed files with 26 additions and 20 deletions

2
.gitignore vendored
View File

@@ -5,3 +5,5 @@ mini_debug
.vscode/* .vscode/*
info.plist info.plist
build/* build/*
*.zip
*.tar.gz

View File

@@ -11,13 +11,13 @@ windows_debug:
g++ $(source) -D DEBUG -g -Wall -Os -lmingw32 -lSDL3 -lopengl32 -o "$(executable)_debug.exe" g++ $(source) -D DEBUG -g -Wall -Os -lmingw32 -lSDL3 -lopengl32 -o "$(executable)_debug.exe"
macos: 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: 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: 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: linux:
g++ $(source) -D LUA_USE_LINUX -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL3 -lGL -o "$(executable)" g++ $(source) -D LUA_USE_LINUX -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL3 -lGL -o "$(executable)"

View File

@@ -1,12 +1,16 @@
#!/bin/bash #!/bin/bash
set -e set -e
if [ -z "$1" ]; then #if [ -z "$1" ]; then
echo "Uso: $0 <PARAMETRO>" # echo "Uso: $0 <PARAMETRO>"
exit 1 # exit 1
fi #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 # Datos Windows
WIN_USER="raimon" WIN_USER="raimon"
@@ -15,23 +19,23 @@ WIN_PATH_SSH="C:\Users\raimon\dev\mini"
WIN_PATH_SCP="C:/Users/Raimon/dev/mini" WIN_PATH_SCP="C:/Users/Raimon/dev/mini"
echo "=== Compilando Linux ===" echo "=== Compilando Linux ==="
#make linux make linux
#make linux_debug make linux_debug
echo "=== Empaquetando Linux ===" echo "=== Empaquetando Linux ==="
#tar -czf mini_${PARAM}_linux_release.tar.gz mini tar -czf mini_v${VERSION}_linux_release.tar.gz mini
#tar -czf mini_${PARAM}_linux_debug.tar.gz mini_debug tar -czf mini_v${VERSION}_linux_debug.tar.gz mini_debug
echo "=== Ejecutando build remoto Windows ===" 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 ===" 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_v${VERSION}_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_debug.zip" .
echo "=== Build completado correctamente ===" echo "=== Build completado correctamente ==="
echo "Generados:" echo "Generados:"
echo " mini_${PARAM}_linux_release.tar.gz" echo " mini_v${VERSION}_linux_release.tar.gz"
echo " mini_${PARAM}_linux_debug.tar.gz" echo " mini_v${VERSION}_linux_debug.tar.gz"
echo " mini_${PARAM}_windows_release.zip" echo " mini_v${VERSION}_windows_release.zip"
echo " mini_${PARAM}_windows_debug.zip" echo " mini_v${VERSION}_windows_debug.zip"