Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c9c1f2b47 | |||
| 6cccd44743 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,5 +4,4 @@ mini_debug.exe
|
|||||||
mini_debug
|
mini_debug
|
||||||
.vscode/*
|
.vscode/*
|
||||||
info.plist
|
info.plist
|
||||||
*.dll
|
|
||||||
build/*
|
build/*
|
||||||
BIN
bin/SDL3.dll
Normal file
BIN
bin/SDL3.dll
Normal file
Binary file not shown.
BIN
bin/libgcc_s_seh-1.dll
Normal file
BIN
bin/libgcc_s_seh-1.dll
Normal file
Binary file not shown.
BIN
bin/libstdc++-6.dll
Normal file
BIN
bin/libstdc++-6.dll
Normal file
Binary file not shown.
BIN
bin/libwinpthread-1.dll
Normal file
BIN
bin/libwinpthread-1.dll
Normal file
Binary file not shown.
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 );
|
fi.read( (char*)&file_size, 4 );
|
||||||
uint8_t path_size;
|
uint8_t path_size;
|
||||||
fi.read( (char*)&path_size, 1 );
|
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 );
|
fi.read( file_name, path_size );
|
||||||
file_name[path_size] = 0;
|
file_name[path_size] = 0;
|
||||||
std::string filename = file_name;
|
std::string filename = file_name;
|
||||||
|
free(file_name);
|
||||||
toc.push_back({filename, file_size, file_offset});
|
toc.push_back({filename, file_size, file_offset});
|
||||||
}
|
}
|
||||||
fi.close();
|
fi.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user