diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 27a35b1..4cf1cfe 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,7 +11,7 @@ jobs: # ============================================================================ build-linux: runs-on: ubuntu-latest - container: node:20-slim + container: ubuntu:latest steps: - name: Checkout uses: actions/checkout@v4 @@ -38,7 +38,7 @@ jobs: && make install \ && rm -rf /tmp/SDL3 - - name: Compilar (Make Linux) + - name: Compilar run: | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig make linux_release @@ -54,22 +54,38 @@ jobs: # ============================================================================ build-windows: runs-on: ubuntu-latest - container: node:20-slim + container: ubuntu:latest steps: - uses: actions/checkout@v4 - - name: Instalar MinGW y Zip - run: apt-get update && apt-get install -y build-essential wget mingw-w64 g++ g++-mingw-w64-x86-64 zip + - name: Instalar dependencias + run: | + apt-get update && apt-get install -y \ + curl build-essential cmake git pkg-config wget zip \ + mingw-w64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y nodejs \ + && rm -rf /var/lib/apt/lists/* - name: Setup SDL3 (MinGW) run: | - SDL_VER="3.2.26" - wget -q https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VER}/SDL3-devel-${SDL_VER}-mingw.tar.gz - tar -xzf SDL3-devel-${SDL_VER}-mingw.tar.gz - cp -r SDL3-${SDL_VER}/x86_64-w64-mingw32/* /usr/x86_64-w64-mingw32/ + git clone https://github.com/libsdl-org/SDL.git /tmp/SDL3 \ + && cd /tmp/SDL3 \ + && mkdir build-mingw && cd build-mingw \ + && cmake .. \ + -DCMAKE_SYSTEM_NAME=Windows \ + -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ + -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ + -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 \ + && make -j$(nproc) \ + && make install \ + && rm -rf /tmp/SDL3 - name: Compilar (Make Windows Cross) # AQUÍ ESTÁ LA MAGIA: Pasamos la ruta de la DLL al makefile + #run: make windows_cross SDL_DLL_PATH=/usr/x86_64-w64-mingw32/bin/SDL3.dll run: make windows_cross SDL_DLL_PATH=/usr/x86_64-w64-mingw32/bin/SDL3.dll - name: Subir artefacto diff --git a/source/project.h b/source/project.h index 0d5acf5..ae9ca12 100644 --- a/source/project.h +++ b/source/project.h @@ -5,5 +5,5 @@ constexpr const char* NAME = "pollo"; constexpr const char* LONG_NAME = "Los pollos hermanos"; constexpr const char* VERSION = "0.1"; constexpr const char* COPYRIGHT = "@2025 JailDesigner"; -constexpr const char* GIT_HASH = "cb9f09d"; +constexpr const char* GIT_HASH = "dd09471"; } // namespace Project