diff --git a/win/build_sdl3.ps1 b/win/build_sdl3.ps1 index 3143ab4..6c94290 100644 --- a/win/build_sdl3.ps1 +++ b/win/build_sdl3.ps1 @@ -63,13 +63,14 @@ New-Item -ItemType Directory -Path kivy-dependencies/build New-Item -ItemType Directory -Path kivy-dependencies/dist # windows SDL3 -$WINDOWS__SDL3__VERSION = "3.1.2" -$WINDOWS__SDL3__URL="https://github.com/libsdl-org/SDL/archive/refs/heads/main.tar.gz" -$WINDOWS__SDL3__FOLDER="SDL-main" +$WINDOWS__SDL3__VERSION = "3.1.10" +$WINDOWS__SDL3__URL="https://github.com/libsdl-org/SDL/releases/download/prerelease-$WINDOWS__SDL3__VERSION/SDL3-$WINDOWS__SDL3__VERSION.tar.gz" +$WINDOWS__SDL3__FOLDER="SDL3-$WINDOWS__SDL3__VERSION" # windows SDL3_image -$WINDOWS__SDL3_IMAGE__URL="https://github.com/libsdl-org/SDL_image/archive/refs/heads/main.tar.gz" -$WINDOWS__SDL3_IMAGE__FOLDER="SDL_image-main" +$WINDOWS__SDL3_IMAGE__VERSION="3.1.0" +$WINDOWS__SDL3_IMAGE__URL="https://github.com/libsdl-org/SDL_image/releases/download/preview-$WINDOWS__SDL3_IMAGE__VERSION/SDL3_image-$WINDOWS__SDL3_IMAGE__VERSION.tar.gz" +$WINDOWS__SDL3_IMAGE__FOLDER="SDL3_image-$WINDOWS__SDL3_IMAGE__VERSION" # windows SDL3_mixer $WINDOWS__SDL3_MIXER__URL="https://github.com/libsdl-org/SDL_mixer/archive/refs/heads/main.tar.gz" @@ -83,7 +84,7 @@ $WINDOWS__SDL3_TTF__FOLDER="SDL_ttf-main" Write-Host "Downloading the dependencies..." Write-Host "-- SDL3, url: $WINDOWS__SDL3__URL" Invoke-WebRequest -Uri $WINDOWS__SDL3__URL -OutFile "kivy-dependencies/download/SDL3-$WINDOWS__SDL3__VERSION.tar.gz" -Invoke-WebRequest -Uri $WINDOWS__SDL3_IMAGE__URL -OutFile "kivy-dependencies/download/SDL_image-main.tar.gz" +Invoke-WebRequest -Uri $WINDOWS__SDL3_IMAGE__URL -OutFile "kivy-dependencies/download/SDL3_image-$WINDOWS__SDL3_IMAGE__VERSION.tar.gz" Invoke-WebRequest -Uri $WINDOWS__SDL3_MIXER__URL -OutFile "kivy-dependencies/download/SDL_mixer-main.tar.gz" Invoke-WebRequest -Uri $WINDOWS__SDL3_TTF__URL -OutFile "kivy-dependencies/download/SDL_ttf-main.tar.gz" @@ -95,13 +96,13 @@ pushd kivy-dependencies/build Write-Host "Extracting the dependencies..." # Extract the dependencies tar -xf "../download/SDL3-$WINDOWS__SDL3__VERSION.tar.gz" -tar -xf "../download/SDL_image-main.tar.gz" +tar -xf "../download/SDL3_image-$WINDOWS__SDL3_IMAGE__VERSION.tar.gz" tar -xf "../download/SDL_mixer-main.tar.gz" tar -xf "../download/SDL_ttf-main.tar.gz" # Move into the SDL3 folder Write-Host "-- Build SDL3" -cd "SDL-main" +cd $WINDOWS__SDL3__FOLDER cmake -S . -B build -DCMAKE_INSTALL_PREFIX="$dist_folder" -DCMAKE_BUILD_TYPE=Release -GNinja cmake --build build/ --config Release --verbose --parallel cmake --install build/ --config Release @@ -110,27 +111,27 @@ cd .. # Move into the SDL_mixer folder Write-Host "-- Build SDL_mixer" -cd "SDL_mixer-main" +cd $WINDOWS__SDL3_MIXER__FOLDER ./external/Get-GitModules.ps1 -cmake -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DSDL3MIXER_VENDORED=ON -DSDL3_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -GNinja +cmake -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DSDLMIXER_VENDORED=ON -DSDL_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -GNinja cmake --build build/ --config Release --parallel --verbose cmake --install build/ --config Release cd .. # Move into the SDL_image folder Write-Host "-- Build SDL_image" -cd "SDL_image-main" +cd $WINDOWS__SDL3_IMAGE__FOLDER ./external/Get-GitModules.ps1 -cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DSDL3IMAGE_TIF_VENDORED=ON -DSDL3IMAGE_WEBP_VENDORED=ON -DSDL3IMAGE_JPG_VENDORED=ON -DSDL3IMAGE_PNG_VENDORED=ON -DSDL3IMAGE_TIF_SHARED=OFF -DSDL3IMAGE_WEBP_SHARED=OFF -DSDL3IMAGE_VENDORED=OFF -DSDL3_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -GNinja +cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DSDLIMAGE_TIF_VENDORED=ON -DSDLIMAGE_WEBP_VENDORED=ON -DSDLIMAGE_JPG_VENDORED=ON -DSDLIMAGE_PNG_VENDORED=ON -DSDLIMAGE_TIF_SHARED=OFF -DSDLIMAGE_WEBP_SHARED=OFF -DSDLIMAGE_VENDORED=OFF -DSDL_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -GNinja cmake --build build/ --config Release --parallel --verbose cmake --install build/ --config Release cd .. # Move into the SDL_ttf folder Write-Host "-- Build SDL_ttf" -cd "SDL_ttf-main" +cd $WINDOWS__SDL3_TTF__FOLDER ./external/Get-GitModules.ps1 -cmake -B build-cmake -DBUILD_SHARED_LIBS=ON -DSDL3TTF_HARFBUZZ=ON -DFT_DISABLE_PNG=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DSDL3TTF_VENDORED=ON -DSDL3_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -GNinja +cmake -B build-cmake -DBUILD_SHARED_LIBS=ON -DSDLTTF_HARFBUZZ=ON -DFT_DISABLE_PNG=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DSDLTTF_VENDORED=ON -DSDL_DIR="$dist_folder/cmake" -DCMAKE_INSTALL_PREFIX="$dist_folder" -GNinja cmake --build build-cmake --config Release --verbose cmake --install build-cmake/ --config Release --verbose cd .. diff --git a/win/sdl3.py b/win/sdl3.py index 76d8871..965921c 100644 --- a/win/sdl3.py +++ b/win/sdl3.py @@ -1,7 +1,7 @@ from __future__ import absolute_import, print_function from .common import * -__version__ = "0.0.2" +__version__ = "0.0.3" def get_sdl3(cache, build_path, arch, package, output, download_only=False):