Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDL3 versions to latest pre-releases and bump version to 0.0.3 [publish sdl3 win] #133

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions win/build_sdl3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand All @@ -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
Expand All @@ -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 ..
Expand Down
2 changes: 1 addition & 1 deletion win/sdl3.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Loading