From 8b603c96f1f1e1ee8f5c337d37a900d614c8b284 Mon Sep 17 00:00:00 2001 From: TheTank20 <57580668+thepwrtank18@users.noreply.github.com> Date: Wed, 4 Jun 2025 19:51:59 -0400 Subject: [PATCH] Update windows.yml --- .github/workflows/windows.yml | 91 ++++++++--------------------------- 1 file changed, 20 insertions(+), 71 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d9c9536..834d14d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -41,8 +41,6 @@ jobs: git make perl - mingw-w64-x86_64-gcc - mingw-w64-x86_64-pkg-config nasm - name: Cache OpenSSL 64-bit build @@ -52,10 +50,28 @@ jobs: path: ${{ env.OPENSSL_PREFIX }} key: openssl-${{ env.OPENSSL_VERSION }}-msys2-mingw64 + - name: Setup TDM-GCC + run: | + Write-Host Downloading TDM-GCC v10.3.0... + Invoke-WebRequest -Uri 'https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm64-2/tdm64-gcc-10.3.0-2.exe' -OutFile 'C:\Windows\temp\TDM-GCC-64.exe' + Write-Host Creating directory... + New-Item -ItemType Directory -Path 'C:\TDM-GCC-64' + Write-Host Copying files [Set 1/3]... + Start-Process '7z' -ArgumentList 'e C:\Windows\temp\TDM-GCC-64.exe -oC:\TDM-GCC-64 -y' -Wait + Write-Host Copying files [Set 2/3]... + Start-Process '7z' -ArgumentList 'e C:\TDM-GCC-64\*.tar.xz -oC:\TDM-GCC-64 -y' -Wait + Write-Host Copying files [Set 3/3]... + Start-Process '7z' -ArgumentList 'x C:\TDM-GCC-64\*.tar -oC:\TDM-GCC-64 -y' -Wait + Write-Host Adding environment variables... + $env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) + + - name: Build OpenSSL 64-bit (if not cached) if: steps.cache-openssl.outputs.cache-hit != 'true' shell: msys2 {0} run: | + export PATH="/c/TDM-GCC-64/bin:$PATH" git clone --branch openssl-${OPENSSL_VERSION} https://github.com/openssl/openssl.git cd openssl ./Configure mingw64 no-shared --prefix="${OPENSSL_PREFIX}" @@ -68,6 +84,7 @@ jobs: - name: Configure UMSKT (TDM-GCC 64-bit) shell: msys2 {0} run: | + export PATH="/c/TDM-GCC-64/bin:$PATH" cmake -G "MinGW Makefiles" \ -DCMAKE_C_COMPILER="mingw-w64-x86_64-gcc" \ -DCMAKE_CXX_COMPILER="mingw-w64-x86_64-g++" \ @@ -89,72 +106,4 @@ jobs: name: UMSKT-TDM64 path: ./Release/* - build-tdm32: - runs-on: windows-latest - env: - OPENSSL_VERSION: "3.1.8" - OPENSSL_PREFIX: "${{ github.workspace }}/openssl-install-32" - steps: - - name: Install MSYS2 and dependencies - uses: msys2/setup-msys2@v2 - with: - update: true - install: >- - git - make - perl - mingw-w64-i686-gcc - nasm - - - name: Download and Install TDM-GCC-64 - run: | - Invoke-WebRequest -Uri "https://jmeubank.github.io/tdm-gcc/download/tdm64-gcc-10.3.0.exe" -OutFile "$env:TEMP\tdm64-gcc.exe" - Start-Process -FilePath "$env:TEMP\tdm64-gcc.exe" -ArgumentList "/VERYSILENT", "/DIR=C:\TDM-GCC-64" -Wait - - - name: Cache OpenSSL 32-bit build - id: cache-openssl - uses: actions/cache@v4 - with: - path: ${{ env.OPENSSL_PREFIX }} - key: openssl-${{ env.OPENSSL_VERSION }}-msys2-tdmgcc32 - - - name: Build OpenSSL 32-bit (if not cached) - if: steps.cache-openssl.outputs.cache-hit != 'true' - shell: msys2 {0} - run: | - export PATH="/c/TDM-GCC-64/bin:$PATH" - git clone --branch openssl-${OPENSSL_VERSION} https://github.com/openssl/openssl.git - cd openssl - ./Configure mingw no-shared --prefix="${OPENSSL_PREFIX}" CFLAGS="-m32" CXXFLAGS="-m32" - make -j$(nproc) - make install - - - name: Checkout Source Tree - uses: actions/checkout@v4 - - - name: Configure UMSKT (TDM-GCC 32-bit) - shell: msys2 {0} - run: | - export PATH="/c/TDM-GCC-64/bin:$PATH" - cmake -G "MinGW Makefiles" \ - -DCMAKE_C_COMPILER="gcc" \ - -DCMAKE_CXX_COMPILER="g++" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_PREFIX}" \ - -DOPENSSL_INCLUDE_DIR="${OPENSSL_PREFIX}/include" \ - -DOPENSSL_CRYPTO_LIBRARY="${OPENSSL_PREFIX}/lib/libcrypto.a" \ - -DOPENSSL_SSL_LIBRARY="${OPENSSL_PREFIX}/lib/libssl.a" \ - -DCMAKE_C_FLAGS="-m32" \ - -DCMAKE_CXX_FLAGS="-m32" \ - . - - - name: Build UMSKT (TDM-GCC 32-bit) - shell: msys2 {0} - run: | - export PATH="/c/TDM-GCC-64/bin:$PATH" - make - - - name: Upload build artifact - uses: actions/upload-artifact@v4.6.2 - with: - name: UMSKT-TDM32 - path: ./Release/* \ No newline at end of file +# 32-bit support will happen when everything's all good