2 Commits

Author SHA1 Message Date
8c9c1f2b47 - [WIP] Afegides DLLs de windows per a quan empaquete 2026-03-20 08:37:01 +01:00
6cccd44743 - [FIX] Eliminat un warning en macOS en jfile
- [WIP] Sistema de release automatic
2026-03-20 08:35:28 +01:00
8 changed files with 65 additions and 2 deletions

1
.gitignore vendored
View File

@@ -4,5 +4,4 @@ mini_debug.exe
mini_debug
.vscode/*
info.plist
*.dll
build/*

BIN
bin/SDL3.dll Normal file

Binary file not shown.

BIN
bin/libgcc_s_seh-1.dll Normal file

Binary file not shown.

BIN
bin/libstdc++-6.dll Normal file

Binary file not shown.

BIN
bin/libwinpthread-1.dll Normal file

Binary file not shown.

27
do_release.bat Normal file
View File

@@ -0,0 +1,27 @@
@echo off
REM Comprobar parámetro
IF "%1"=="" (
echo Uso: build_windows.bat ^<PARAMETRO^>
exit /b 1
)
set PARAM=%1
echo Compilando windows...
make windows || exit /b 1
echo Compilando windows_debug...
make windows_debug || exit /b 1
echo Creando paquetes...
REM Crear ZIP release con mini.exe + DLLs
tar -a -c -f mini_%PARAM%_windows_release.zip mini.exe bin\*.dll || exit /b 1
REM Crear ZIP debug solo con mini_debug.exe
tar -a -c -f mini_%PARAM%_windows_debug.zip mini_debug.exe || exit /b 1
echo Paquetes generados:
echo mini_%PARAM%_windows_release.zip
echo mini_%PARAM%_windows_debug.zip

36
do_release.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Uso: $0 <PARAMETRO>"
exit 1
fi
PARAM=$1
# Datos Windows
WIN_USER="raimon"
WIN_HOST="192.168.1.51"
WIN_PATH_SSH="/cygdrive/c/Users/raimon/dev/mini"
echo "=== Compilando Linux ==="
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
echo "=== Ejecutando build remoto Windows ==="
ssh ${WIN_USER}@${WIN_HOST} "cd '${WIN_PATH_SSH}' && build_windows.bat ${PARAM}"
echo "=== Copiando ZIPs desde Windows ==="
scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SSH}/mini_${PARAM}_windows_release.zip" .
scp ${WIN_USER}@${WIN_HOST}:"${WIN_PATH_SSH}/mini_${PARAM}_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"

View File

@@ -78,10 +78,11 @@ bool file_getdictionary() {
fi.read( (char*)&file_size, 4 );
uint8_t path_size;
fi.read( (char*)&path_size, 1 );
char file_name[path_size+1];
char *file_name = (char*)malloc(path_size+1);
fi.read( file_name, path_size );
file_name[path_size] = 0;
std::string filename = file_name;
free(file_name);
toc.push_back({filename, file_size, file_offset});
}
fi.close();