- [FIX] Eliminat un warning en macOS en jfile
- [WIP] Sistema de release automatic
This commit is contained in:
27
do_release.bat
Normal file
27
do_release.bat
Normal 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
36
do_release.sh
Normal 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"
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user