Compare commits
35
Commits
main
...
58e9cc1bc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58e9cc1bc3 | ||
|
|
24fb2898e9 | ||
|
|
2147195774 | ||
|
|
bb97dcc23f | ||
|
|
920b77d381 | ||
|
|
430ccdab40 | ||
|
|
4f42a673a3 | ||
|
|
c9a0307878 | ||
|
|
5fbda03ceb | ||
|
|
366637aba3 | ||
|
|
609fa2fb08 | ||
|
|
e140a6d124 | ||
|
|
6710c37adc | ||
|
|
2898a4b689 | ||
|
|
1bc67f8c39 | ||
|
|
68e613057e | ||
|
|
811b4d809c | ||
|
|
fda755f7d8 | ||
|
|
d5024ebbf6 | ||
|
|
694b45341a | ||
|
|
206dcdedf1 | ||
|
|
4d16e1cb4f | ||
|
|
848b199201 | ||
|
|
db61b52997 | ||
|
|
e94a94559f | ||
|
|
52edb3757c | ||
|
|
c1a705e864 | ||
|
|
4b4c32f4b1 | ||
|
|
df5828142d | ||
|
|
f8b5800486 | ||
|
|
8241e9735a | ||
|
|
b29715f20d | ||
|
|
d9a620bc1f | ||
|
|
0d1aa938e3 | ||
|
|
ce3cd726c8 |
+3
-2
@@ -28,7 +28,7 @@ BreakConstructorInitializers: AfterColon
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 120
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ContinuationIndentWidth: 2
|
||||
ContinuationIndentWidth: 4
|
||||
IncludeCategories:
|
||||
- Regex: '^<.*'
|
||||
Priority: 1
|
||||
@@ -49,5 +49,6 @@ SpacesInAngles: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
TabWidth: 2
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
...
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
CompileFlags:
|
||||
CompilationDatabase: build/
|
||||
Completion:
|
||||
HeaderInsertion: Never
|
||||
@@ -4,6 +4,7 @@ saves/
|
||||
.cache/
|
||||
.vs/
|
||||
.vscode/
|
||||
.zed/
|
||||
out/
|
||||
*.toml
|
||||
*.ini
|
||||
@@ -20,9 +21,11 @@ vgcore.*
|
||||
*.data
|
||||
disasm.txt
|
||||
*log*.txt
|
||||
*.log
|
||||
CMakeSettings.json
|
||||
compile_commands.json
|
||||
*.diagsession
|
||||
tests/
|
||||
.DS_Store
|
||||
resources/version.hpp
|
||||
__cmake_systeminformation/CMakeFiles/
|
||||
|
||||
@@ -13,6 +13,7 @@ if(APPLE)
|
||||
enable_language(OBJC)
|
||||
endif()
|
||||
|
||||
set(USE_JIT FALSE)
|
||||
set(VULKAN_VALIDATION FALSE)
|
||||
set(SANITIZERS FALSE)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
@@ -115,6 +116,9 @@ endif()
|
||||
set(SIMD_FLAG NULL)
|
||||
|
||||
if(ARM64)
|
||||
if(USE_JIT)
|
||||
message(FATAL_ERROR "JIT unsupported in aarch64 at the moment")
|
||||
endif()
|
||||
message("Defining USE_NEON...")
|
||||
add_compile_definitions(USE_NEON)
|
||||
add_compile_definitions(SIMD_SUPPORT)
|
||||
@@ -182,6 +186,9 @@ endif()
|
||||
|
||||
target_link_libraries(kaizen PUBLIC imgui SDL3::SDL3 SDL3::SDL3-static cflags::cflags ${MIO_LIB} parallel-rdp capstone backend)
|
||||
target_compile_definitions(kaizen PUBLIC SDL_MAIN_HANDLED)
|
||||
if(USE_JIT)
|
||||
target_compile_definitions(kaizen PUBLIC KAIZEN_JIT_ENABLED)
|
||||
endif()
|
||||
|
||||
if (SANITIZERS)
|
||||
message("UBSAN AND ASAN: ON")
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#pragma once
|
||||
#define KAIZEN_GIT_COMMIT_HASH "${_git_hash}"
|
||||
@@ -1,7 +0,0 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Existing Issue(s)
|
||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||
@@ -1,82 +0,0 @@
|
||||
name: 'Setup GDK (Game Development Kit) for Windows Desktop'
|
||||
description: 'Download GDK and install into MSBuild'
|
||||
inputs:
|
||||
# Keep edition and ref in sync!
|
||||
edition:
|
||||
description: 'GDK edition'
|
||||
default: '240601' # YYMMUU (Year Month Update)
|
||||
ref:
|
||||
description: 'Git reference'
|
||||
default: 'June_2024_Update_1'
|
||||
folder:
|
||||
description: 'Folder where to create Directory.Build.props'
|
||||
required: true
|
||||
default: '${{ github.workspace }}'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: pwsh
|
||||
run: |
|
||||
$vs_folder=@(vswhere -latest -property installationPath)
|
||||
echo "vs-folder=${vs_folder}" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
echo "gdk-path=${{ runner.temp }}\GDK-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
||||
- name: 'Restore cached GDK'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--download `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--no-user-props
|
||||
- name: 'Extract GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--extract `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--no-user-props
|
||||
- name: 'Cache GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Copy MSBuild files into GDK'
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--copy-msbuild `
|
||||
--no-user-props
|
||||
- name: 'Write user props'
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
"--props-folder=${{ inputs.folder }}"
|
||||
@@ -1,53 +0,0 @@
|
||||
name: 'Setup LoongArch64 toolchain'
|
||||
description: 'Download Linux LoongArch64 toolchain and set output variables'
|
||||
inputs:
|
||||
version:
|
||||
description: 'LoongArch64 version'
|
||||
default: '2023.08.08'
|
||||
outputs:
|
||||
prefix:
|
||||
description: "LoongArch toolchain prefix"
|
||||
value: ${{ steps.final.outputs.prefix }}
|
||||
cc:
|
||||
description: "LoongArch C compiler"
|
||||
value: ${{ steps.final.outputs.cc }}
|
||||
cxx:
|
||||
description: "LoongArch C++ compiler"
|
||||
value: ${{ steps.final.outputs.cxx }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ inputs.version }}
|
||||
|
||||
- name: 'Download LoongArch64 gcc+glibc toolchain'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
shell: bash
|
||||
run: |
|
||||
url="https://github.com/loongson/build-tools/releases/download/${{ inputs.version }}/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz"
|
||||
|
||||
wget "$url" -O /tmp/toolchain.tar.xz
|
||||
|
||||
mkdir -p /opt
|
||||
tar -C /opt -x -f /tmp/toolchain.tar.xz
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ inputs.version }}
|
||||
- name: 'Set output vars'
|
||||
id: final
|
||||
shell: bash
|
||||
run: |
|
||||
prefix=/opt/cross-tools
|
||||
echo "prefix=${prefix}" >> $GITHUB_OUTPUT
|
||||
cc="${prefix}/bin/loongarch64-unknown-linux-gnu-gcc"
|
||||
cxx="${prefix}/bin/loongarch64-unknown-linux-gnu-g++"
|
||||
echo "cc=${cc}" >> $GITHUB_OUTPUT
|
||||
echo "cxx=${cxx}" >> $GITHUB_OUTPUT
|
||||
echo "LOONGARCH64_CC=${cc}" >>$GITHUB_ENV
|
||||
echo "LOONGARCH64_CXX=${cxx}" >>$GITHUB_ENV
|
||||
@@ -1,71 +0,0 @@
|
||||
name: 'Setup libusb for MSVC'
|
||||
description: 'Download libusb sdk for MSVC, and set output/environment variables'
|
||||
inputs:
|
||||
version:
|
||||
description: 'libusb version'
|
||||
required: true
|
||||
default: '1.0.27'
|
||||
arch:
|
||||
description: "libusb architecture (x86 or x64)"
|
||||
rqeuired: true
|
||||
outputs:
|
||||
root:
|
||||
description: "libusb root directory"
|
||||
value: ${{ steps.final.outputs.root }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Restore cached libusb-${{ inputs.version }}.7z'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
||||
key: libusb-msvc-${{ inputs.version }}
|
||||
- name: 'Download libusb ${{ inputs.version }}'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest "https://github.com/libusb/libusb/releases/download/v${{ inputs.version }}/libusb-${{ inputs.version }}.7z" -OutFile "C:\temp\libusb-${{ inputs.version }}.7z"
|
||||
- name: 'Cache libusb-${{ inputs.version }}.7z'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: 'C:\temp\libusb-${{ inputs.version }}.7z'
|
||||
key: libusb-msvc-${{ inputs.version }}
|
||||
- name: 'Extract libusb'
|
||||
shell: pwsh
|
||||
run: |
|
||||
7z "-oC:\temp\libusb-${{ inputs.version }}" x "C:\temp\libusb-${{ inputs.version }}.7z"
|
||||
- name: 'Set output vars'
|
||||
id: final
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ('${{ inputs.arch }}' -eq 'x86') {
|
||||
$archdir = "MS32";
|
||||
} elseif ('${{ inputs.arch }}' -eq 'x64') {
|
||||
$archdir = "MS64";
|
||||
} else {
|
||||
write-host "Invalid arch=${{ inputs.arch }}"
|
||||
exit 1
|
||||
}
|
||||
$libusb_incdir = "C:\temp\libusb-${{ inputs.version }}\include";
|
||||
$libusb_libdir = "C:\temp\libusb-${{ inputs.version }}\VS2022\${archdir}\dll";
|
||||
|
||||
$libusb_header = "${libusb_incdir}\libusb.h";
|
||||
$libusb_implib = "${libusb_libdir}\libusb-1.0.lib";
|
||||
$libusb_dll = "${libusb_libdir}\libusb-1.0.dll";
|
||||
|
||||
if (!(Test-Path "${libusb_header}")) {
|
||||
write-host "${libusb_header} does not exist!"
|
||||
exit 1
|
||||
}
|
||||
if (!(Test-Path "${libusb_implib}")){
|
||||
write-host "${libusb_implib} does not exist!"
|
||||
exit 1
|
||||
}
|
||||
if (!(Test-Path "${libusb_dll}")) {
|
||||
write-host "${libusb_dll} does not exist!"
|
||||
exit 1
|
||||
}
|
||||
echo "root=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_OUTPUT
|
||||
echo "LibUSB_ROOT=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_ENV
|
||||
@@ -1,102 +0,0 @@
|
||||
name: 'Setup Nonka N-Gage SDK'
|
||||
description: 'Download and setup Nokia N-Gage SDK'
|
||||
inputs:
|
||||
path:
|
||||
description: 'Installation path'
|
||||
default: 'default'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 'Verify platform'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
case "${{ runner.os }}-${{ runner.arch }}" in
|
||||
"Windows-X86" | "Windows-X64")
|
||||
echo "ok!"
|
||||
echo "cache-key=ngage-sdk-windows" >> ${GITHUB_OUTPUT}
|
||||
default_install_path="C:/ngagesdk"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
install_path="${{ inputs.path }}"
|
||||
if [ "x$install_path" = "xdefault" ]; then
|
||||
install_path="$default_install_path"
|
||||
fi
|
||||
echo "install-path=$install_path" >> ${GITHUB_OUTPUT}
|
||||
|
||||
toolchain_repo="https://github.com/ngagesdk/ngage-toolchain"
|
||||
toolchain_branch="main"
|
||||
echo "toolchain-repo=${toolchain_repo}" >> ${GITHUB_OUTPUT}
|
||||
echo "toolchain-branch=${toolchain_branch}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
sdk_repo="https://github.com/ngagesdk/sdk"
|
||||
sdk_branch="main"
|
||||
echo "sdk-repo=${sdk_repo}" >> ${GITHUB_OUTPUT}
|
||||
echo "sdk-branch=${sdk_branch}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
tools_repo="https://github.com/ngagesdk/tools"
|
||||
tools_branch="main"
|
||||
echo "tools-repo=${tools_repo}" >> ${GITHUB_OUTPUT}
|
||||
echo "tools-branch=${tools_branch}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
extras_repo="https://github.com/ngagesdk/extras"
|
||||
extras_branch="main"
|
||||
echo "extras-repo=${extras_repo}" >> ${GITHUB_OUTPUT}
|
||||
echo "extras-branch=${extras_branch}" >> ${GITHUB_OUTPUT}
|
||||
# - name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||
# id: cache-restore
|
||||
# uses: actions/cache/restore@v4
|
||||
# with:
|
||||
# path: '${{ runner.temp }}'
|
||||
# key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download N-Gage SDK'
|
||||
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
|
||||
Invoke-WebRequest "${{ steps.calc.outputs.toolchain-repo }}/archive/refs/heads/${{ steps.calc.outputs.toolchain-branch }}.zip" -OutFile "${{ runner.temp }}/ngage-toolchain.zip"
|
||||
Invoke-WebRequest "${{ steps.calc.outputs.sdk-repo }}/archive/refs/heads/${{ steps.calc.outputs.sdk-branch }}.zip" -OutFile "${{ runner.temp }}/sdk.zip"
|
||||
Invoke-WebRequest "${{ steps.calc.outputs.tools-repo }}/archive/refs/heads/${{ steps.calc.outputs.tools-branch }}.zip" -OutFile "${{ runner.temp }}/tools.zip"
|
||||
Invoke-WebRequest "${{ steps.calc.outputs.extras-repo }}/archive/refs/heads/${{ steps.calc.outputs.extras-branch }}.zip" -OutFile "${{ runner.temp }}/extras.zip"
|
||||
|
||||
# - name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
# uses: actions/cache/save@v4
|
||||
# with:
|
||||
# path: |
|
||||
# ${{ runner.temp }}/apps.zip
|
||||
# ${{ runner.temp }}/sdk.zip
|
||||
# ${{ runner.temp }}/tools.zip
|
||||
# key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Extract N-Gage SDK'
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path "${{ steps.calc.outputs.install-path }}" -Force
|
||||
|
||||
New-Item -ItemType Directory -Path "${{ runner.temp }}/ngage-toolchain-temp" -Force
|
||||
7z "-o${{ runner.temp }}/ngage-toolchain-temp" x "${{ runner.temp }}/ngage-toolchain.zip"
|
||||
Move-Item -Path "${{ runner.temp }}/ngage-toolchain-temp/ngage-toolchain-${{ steps.calc.outputs.toolchain-branch }}/*" -Destination "${{ steps.calc.outputs.install-path }}"
|
||||
|
||||
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/sdk.zip"
|
||||
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/sdk-${{ steps.calc.outputs.sdk-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/sdk"
|
||||
|
||||
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/tools.zip"
|
||||
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/tools-${{ steps.calc.outputs.tools-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/tools"
|
||||
|
||||
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/extras.zip"
|
||||
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/extras-${{ steps.calc.outputs.extras-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/extras"
|
||||
- name: 'Set output variables'
|
||||
id: final
|
||||
shell: sh
|
||||
run: |
|
||||
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/gcc/bin" >> $GITHUB_PATH
|
||||
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/ngagesdk/bin" >> $GITHUB_PATH
|
||||
echo "NGAGESDK=${{ steps.calc.outputs.install-path }}" >> $GITHUB_ENV
|
||||
echo "CMAKE_TOOLCHAIN_FILE=${{ steps.calc.outputs.install-path }}/cmake/ngage-toolchain.cmake" >> $GITHUB_ENV
|
||||
@@ -1,62 +0,0 @@
|
||||
name: 'Setup ninja'
|
||||
description: 'Download ninja and add it to the PATH environment variable'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Ninja version'
|
||||
default: '1.12.1'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
case "${{ runner.os }}-${{ runner.arch }}" in
|
||||
"Linux-X86" | "Linux-X64")
|
||||
archive="ninja-linux.zip"
|
||||
;;
|
||||
"Linux-ARM64")
|
||||
archive="ninja-linux-aarch64.zip"
|
||||
;;
|
||||
"macOS-X86" | "macOS-X64" | "macOS-ARM64")
|
||||
archive="ninja-mac.zip"
|
||||
;;
|
||||
"Windows-X86" | "Windows-X64")
|
||||
archive="ninja-win.zip"
|
||||
;;
|
||||
"Windows-ARM64")
|
||||
archive="ninja-winarm64.zip"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
echo "archive=${archive}" >> ${GITHUB_OUTPUT}
|
||||
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
|
||||
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
- name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Extract ninja'
|
||||
shell: pwsh
|
||||
run: |
|
||||
7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
- name: 'Set output variables'
|
||||
id: final
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" >> $env:GITHUB_PATH
|
||||
@@ -1,93 +0,0 @@
|
||||
name: 'Setup GLES for PlayStation Vita'
|
||||
description: 'Download GLES for VITA (PVR or PIB), and copy it into the vita sdk'
|
||||
inputs:
|
||||
pib-version:
|
||||
description: 'PIB version'
|
||||
default: '1.1.4'
|
||||
pvr-version:
|
||||
description: 'PVR_PSP2 version'
|
||||
default: '3.9'
|
||||
type:
|
||||
description: '"pib" or "pvr"'
|
||||
default: ''
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
if test "x${VITASDK}" = "x"; then
|
||||
echo "VITASDK must be defined"
|
||||
exit 1;
|
||||
fi
|
||||
case "x${{ inputs.type }}" in
|
||||
"xpvr")
|
||||
echo "cache-key=SDL-vita-gles-pvr-${{ inputs.pvr-version}}" >> ${GITHUB_OUTPUT}
|
||||
;;
|
||||
"xpib")
|
||||
echo "cache-key=SDL-vita-gles-pib-${{ inputs.pib-version}}" >> ${GITHUB_OUTPUT}
|
||||
;;
|
||||
*)
|
||||
echo "Invalid type. Must be 'pib' or 'pvr'."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: '${{ steps.calc.outputs.cache-key }}'
|
||||
- name: 'Download PVR_PSP2 (GLES)'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pvr' }}
|
||||
shell: sh
|
||||
run: |
|
||||
pvr_psp2_version=${{ inputs.pvr-version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure PVR_PSP2 headers
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
|
||||
unzip /tmp/v$pvr_psp2_version.zip -d/tmp
|
||||
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* /vita/dependencies/include
|
||||
rm /tmp/v$pvr_psp2_version.zip
|
||||
|
||||
# include guard of PVR_PSP2's khrplatform.h does not match the usual one
|
||||
sed -i -e s/__drvkhrplatform_h_/__khrplatform_h_/ /vita/dependencies/include/KHR/khrplatform.h
|
||||
|
||||
# Configure PVR_PSP2 stub libraries
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
|
||||
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} /vita/dependencies/lib \;
|
||||
rm /tmp/vitasdk_stubs.zip
|
||||
rm -rf /tmp/pvr_psp2_stubs
|
||||
|
||||
- name: 'Download gl4es4vita (OpenGL)'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pib' }}
|
||||
shell: sh
|
||||
run: |
|
||||
gl4es4vita_version=${{ inputs.pib-version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure gl4es4vita headers
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
|
||||
unzip -o /tmp/include.zip -d/vita/dependencies/include
|
||||
rm /tmp/include.zip
|
||||
|
||||
# Configure gl4es4vita stub libraries
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: '${{ steps.calc.outputs.cache-key }}'
|
||||
|
||||
- name: Copy PVR_PSP2 (GLES) or gl4es4vita (OpenGL) to vita toolchain dir
|
||||
shell: sh
|
||||
run: |
|
||||
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.0...3.5)
|
||||
project(ci_utils C CXX)
|
||||
|
||||
set(txt "CC=${CMAKE_C_COMPILER}
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
CFLAGS=${CMAKE_C_FLAGS}
|
||||
CXXFLAGS=${CMAKE_CXX_FLAGS}
|
||||
LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_STANDARD_LIBRARIES}
|
||||
")
|
||||
|
||||
message("${txt}")
|
||||
|
||||
set(VAR_PATH "/tmp/env.txt" CACHE PATH "Where to write environment file")
|
||||
message(STATUS "Writing CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS environment to ${VAR_PATH}")
|
||||
|
||||
file(WRITE "${VAR_PATH}" "${txt}")
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
name: 'Build (All)'
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
controller:
|
||||
name: 'Create test plan'
|
||||
runs-on: 'ubuntu-latest'
|
||||
outputs:
|
||||
platforms-level1: ${{ steps.plan.outputs.platforms-level1 }}
|
||||
platforms-others: ${{ steps.plan.outputs.platforms-others }}
|
||||
steps:
|
||||
- uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
sparse-checkout: '.github/workflows/create-test-plan.py'
|
||||
- name: 'Create plan'
|
||||
id: plan
|
||||
run: |
|
||||
# Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs
|
||||
# e.g. [sdl-ci-filter msvc-*]
|
||||
EOF=$(openssl rand -hex 32)
|
||||
cat >/tmp/commit_message.txt <<$EOF
|
||||
${{ github.event.head_commit.message }}
|
||||
$EOF
|
||||
|
||||
python .github/workflows/create-test-plan.py \
|
||||
--github-variable-prefix platforms \
|
||||
--github-ci \
|
||||
--verbose \
|
||||
${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \
|
||||
--commit-message-file /tmp/commit_message.txt
|
||||
level1:
|
||||
needs: [controller]
|
||||
uses: './.github/workflows/generic.yml'
|
||||
with:
|
||||
platforms: ${{ needs.controller.outputs.platforms-level1 }}
|
||||
level2:
|
||||
needs: [controller, level1]
|
||||
uses: './.github/workflows/generic.yml'
|
||||
with:
|
||||
platforms: ${{ needs.controller.outputs.platforms-others }}
|
||||
-883
@@ -1,883 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import dataclasses
|
||||
import fnmatch
|
||||
from enum import Enum
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AppleArch(Enum):
|
||||
Aarch64 = "aarch64"
|
||||
X86_64 = "x86_64"
|
||||
|
||||
|
||||
class MsvcArch(Enum):
|
||||
X86 = "x86"
|
||||
X64 = "x64"
|
||||
Arm32 = "arm"
|
||||
Arm64 = "arm64"
|
||||
|
||||
|
||||
class JobOs(Enum):
|
||||
WindowsLatest = "windows-latest"
|
||||
UbuntuLatest = "ubuntu-latest"
|
||||
MacosLatest = "macos-latest"
|
||||
Ubuntu22_04 = "ubuntu-22.04"
|
||||
Ubuntu24_04 = "ubuntu-24.04"
|
||||
Ubuntu24_04_arm = "ubuntu-24.04-arm"
|
||||
Macos13 = "macos-13"
|
||||
|
||||
|
||||
class SdlPlatform(Enum):
|
||||
Android = "android"
|
||||
Emscripten = "emscripten"
|
||||
Haiku = "haiku"
|
||||
LoongArch64 = "loongarch64"
|
||||
Msys2 = "msys2"
|
||||
Linux = "linux"
|
||||
MacOS = "macos"
|
||||
Ios = "ios"
|
||||
Tvos = "tvos"
|
||||
Msvc = "msvc"
|
||||
N3ds = "n3ds"
|
||||
PowerPC = "powerpc"
|
||||
PowerPC64 = "powerpc64"
|
||||
Ps2 = "ps2"
|
||||
Psp = "psp"
|
||||
Vita = "vita"
|
||||
Riscos = "riscos"
|
||||
FreeBSD = "freebsd"
|
||||
NetBSD = "netbsd"
|
||||
NGage = "ngage"
|
||||
|
||||
|
||||
class Msys2Platform(Enum):
|
||||
Mingw32 = "mingw32"
|
||||
Mingw64 = "mingw64"
|
||||
Clang64 = "clang64"
|
||||
Ucrt64 = "ucrt64"
|
||||
|
||||
|
||||
class IntelCompiler(Enum):
|
||||
Icc = "icc"
|
||||
Icx = "icx"
|
||||
|
||||
|
||||
class VitaGLES(Enum):
|
||||
Pib = "pib"
|
||||
Pvr = "pvr"
|
||||
|
||||
|
||||
@dataclasses.dataclass(slots=True)
|
||||
class JobSpec:
|
||||
name: str
|
||||
os: JobOs
|
||||
platform: SdlPlatform
|
||||
artifact: Optional[str]
|
||||
container: Optional[str] = None
|
||||
no_cmake: bool = False
|
||||
xcode: bool = False
|
||||
android_mk: bool = False
|
||||
android_gradle: bool = False
|
||||
lean: bool = False
|
||||
android_arch: Optional[str] = None
|
||||
android_abi: Optional[str] = None
|
||||
android_platform: Optional[int] = None
|
||||
msys2_platform: Optional[Msys2Platform] = None
|
||||
intel: Optional[IntelCompiler] = None
|
||||
apple_framework: Optional[bool] = None
|
||||
apple_archs: Optional[set[AppleArch]] = None
|
||||
msvc_project: Optional[str] = None
|
||||
msvc_arch: Optional[MsvcArch] = None
|
||||
clang_cl: bool = False
|
||||
gdk: bool = False
|
||||
vita_gles: Optional[VitaGLES] = None
|
||||
|
||||
|
||||
JOB_SPECS = {
|
||||
"msys2-mingw32": JobSpec(name="Windows (msys2, mingw32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32", msys2_platform=Msys2Platform.Mingw32, ),
|
||||
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
|
||||
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
|
||||
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
|
||||
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-x86": JobSpec(name="Windows (MSVC, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
|
||||
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
|
||||
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
|
||||
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
|
||||
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
|
||||
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
|
||||
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest", ),
|
||||
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest", ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"ubuntu-intel-icc": JobSpec(name="Ubuntu 22.04 (Intel Compiler)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-icc", intel=IntelCompiler.Icc, ),
|
||||
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos13, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
|
||||
"macos-framework-arm64": JobSpec(name="MacOS (Framework) (arm64)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact=None, apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, ),
|
||||
"macos-gnu-arm64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-gnu", apple_framework=False, apple_archs={AppleArch.Aarch64, }, ),
|
||||
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
|
||||
"tvos": JobSpec(name="tvOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Tvos, artifact="SDL-tvos-arm64", xcode=True, ),
|
||||
"android-cmake": JobSpec(name="Android (CMake)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, ),
|
||||
"android-cmake-lean": JobSpec(name="Android (CMake, lean)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-lean-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, lean=True, ),
|
||||
"android-mk": JobSpec(name="Android (Android.mk)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_mk=True, ),
|
||||
"android-gradle": JobSpec(name="Android (Gradle)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_gradle=True, ),
|
||||
"emscripten": JobSpec(name="Emscripten", os=JobOs.UbuntuLatest, platform=SdlPlatform.Emscripten, artifact="SDL-emscripten", ),
|
||||
"haiku": JobSpec(name="Haiku", os=JobOs.UbuntuLatest, platform=SdlPlatform.Haiku, artifact="SDL-haiku-x64", container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
|
||||
"loongarch64": JobSpec(name="LoongArch64", os=JobOs.UbuntuLatest, platform=SdlPlatform.LoongArch64, artifact="SDL-loongarch64", ),
|
||||
"n3ds": JobSpec(name="Nintendo 3DS", os=JobOs.UbuntuLatest, platform=SdlPlatform.N3ds, artifact="SDL-n3ds", container="devkitpro/devkitarm:latest", ),
|
||||
"ppc": JobSpec(name="PowerPC", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC, artifact="SDL-ppc", container="dockcross/linux-ppc:latest", ),
|
||||
"ppc64": JobSpec(name="PowerPC64", os=JobOs.UbuntuLatest, platform=SdlPlatform.PowerPC64, artifact="SDL-ppc64le", container="dockcross/linux-ppc64le:latest", ),
|
||||
"ps2": JobSpec(name="Sony PlayStation 2", os=JobOs.UbuntuLatest, platform=SdlPlatform.Ps2, artifact="SDL-ps2", container="ps2dev/ps2dev:latest", ),
|
||||
"psp": JobSpec(name="Sony PlayStation Portable", os=JobOs.UbuntuLatest, platform=SdlPlatform.Psp, artifact="SDL-psp", container="pspdev/pspdev:latest", ),
|
||||
"vita-pib": JobSpec(name="Sony PlayStation Vita (GLES w/ pib)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pib", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pib, ),
|
||||
"vita-pvr": JobSpec(name="Sony PlayStation Vita (GLES w/ PVR_PSP2)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pvr", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pvr, ),
|
||||
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
|
||||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", ),
|
||||
"ngage": JobSpec(name="N-Gage", os=JobOs.WindowsLatest, platform=SdlPlatform.NGage, artifact="SDL-ngage", ),
|
||||
}
|
||||
|
||||
|
||||
class StaticLibType(Enum):
|
||||
STATIC_LIB = "SDL3-static.lib"
|
||||
A = "libSDL3.a"
|
||||
|
||||
|
||||
class SharedLibType(Enum):
|
||||
WIN32 = "SDL3.dll"
|
||||
SO_0 = "libSDL3.so.0"
|
||||
SO = "libSDL3.so"
|
||||
DYLIB = "libSDL3.0.dylib"
|
||||
FRAMEWORK = "SDL3.framework/Versions/A/SDL3"
|
||||
|
||||
|
||||
@dataclasses.dataclass(slots=True)
|
||||
class JobDetails:
|
||||
name: str
|
||||
key: str
|
||||
os: str
|
||||
platform: str
|
||||
artifact: str
|
||||
no_cmake: bool
|
||||
ccache: bool = False
|
||||
build_tests: bool = True
|
||||
container: str = ""
|
||||
cmake_build_type: str = "RelWithDebInfo"
|
||||
shell: str = "sh"
|
||||
sudo: str = "sudo"
|
||||
cmake_config_emulator: str = ""
|
||||
apk_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
apt_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
brew_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_toolchain_file: str = ""
|
||||
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
clang_tidy: bool = True
|
||||
cppflags: list[str] = dataclasses.field(default_factory=list)
|
||||
cc: str = ""
|
||||
cxx: str = ""
|
||||
cflags: list[str] = dataclasses.field(default_factory=list)
|
||||
cxxflags: list[str] = dataclasses.field(default_factory=list)
|
||||
ldflags: list[str] = dataclasses.field(default_factory=list)
|
||||
pollute_directories: list[str] = dataclasses.field(default_factory=list)
|
||||
use_cmake: bool = True
|
||||
shared: bool = True
|
||||
static: bool = True
|
||||
shared_lib: Optional[SharedLibType] = None
|
||||
static_lib: Optional[StaticLibType] = None
|
||||
run_tests: bool = True
|
||||
test_pkg_config: bool = True
|
||||
cc_from_cmake: bool = False
|
||||
source_cmd: str = ""
|
||||
pretest_cmd: str = ""
|
||||
java: bool = False
|
||||
android_apks: list[str] = dataclasses.field(default_factory=list)
|
||||
android_ndk: bool = False
|
||||
android_mk: bool = False
|
||||
android_gradle: bool = False
|
||||
minidump: bool = False
|
||||
intel: bool = False
|
||||
msys2_msystem: str = ""
|
||||
msys2_env: str = ""
|
||||
msys2_no_perl: bool = False
|
||||
werror: bool = True
|
||||
msvc_vcvars_arch: str = ""
|
||||
msvc_vcvars_sdk: str = ""
|
||||
msvc_project: str = ""
|
||||
msvc_project_flags: list[str] = dataclasses.field(default_factory=list)
|
||||
setup_ninja: bool = False
|
||||
setup_libusb_arch: str = ""
|
||||
xcode_sdk: str = ""
|
||||
cpactions: bool = False
|
||||
setup_gdk_folder: str = ""
|
||||
cpactions_os: str = ""
|
||||
cpactions_version: str = ""
|
||||
cpactions_arch: str = ""
|
||||
cpactions_setup_cmd: str = ""
|
||||
cpactions_install_cmd: str = ""
|
||||
setup_vita_gles_type: str = ""
|
||||
check_sources: bool = False
|
||||
setup_python: bool = False
|
||||
pypi_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
setup_gage_sdk_path: str = ""
|
||||
|
||||
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
||||
data = {
|
||||
"name": self.name,
|
||||
"key": self.key,
|
||||
"os": self.os,
|
||||
"ccache": self.ccache,
|
||||
"container": self.container if self.container else "",
|
||||
"platform": self.platform,
|
||||
"artifact": self.artifact,
|
||||
"enable-artifacts": enable_artifacts,
|
||||
"shell": self.shell,
|
||||
"msys2-msystem": self.msys2_msystem,
|
||||
"msys2-env": self.msys2_env,
|
||||
"msys2-no-perl": self.msys2_no_perl,
|
||||
"android-ndk": self.android_ndk,
|
||||
"java": self.java,
|
||||
"intel": self.intel,
|
||||
"apk-packages": my_shlex_join(self.apk_packages),
|
||||
"apt-packages": my_shlex_join(self.apt_packages),
|
||||
"test-pkg-config": self.test_pkg_config,
|
||||
"brew-packages": my_shlex_join(self.brew_packages),
|
||||
"pollute-directories": my_shlex_join(self.pollute_directories),
|
||||
"no-cmake": self.no_cmake,
|
||||
"build-tests": self.build_tests,
|
||||
"source-cmd": self.source_cmd,
|
||||
"pretest-cmd": self.pretest_cmd,
|
||||
"cmake-config-emulator": self.cmake_config_emulator,
|
||||
"cc": self.cc,
|
||||
"cxx": self.cxx,
|
||||
"cflags": my_shlex_join(self.cppflags + self.cflags),
|
||||
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
|
||||
"ldflags": my_shlex_join(self.ldflags),
|
||||
"cmake-toolchain-file": self.cmake_toolchain_file,
|
||||
"clang-tidy": self.clang_tidy,
|
||||
"cmake-arguments": my_shlex_join(self.cmake_arguments),
|
||||
"cmake-build-arguments": my_shlex_join(self.cmake_build_arguments),
|
||||
"shared": self.shared,
|
||||
"static": self.static,
|
||||
"shared-lib": self.shared_lib.value if self.shared_lib else None,
|
||||
"static-lib": self.static_lib.value if self.static_lib else None,
|
||||
"cmake-build-type": self.cmake_build_type,
|
||||
"run-tests": self.run_tests,
|
||||
"android-apks": my_shlex_join(self.android_apks),
|
||||
"android-gradle": self.android_gradle,
|
||||
"android-mk": self.android_mk,
|
||||
"werror": self.werror,
|
||||
"sudo": self.sudo,
|
||||
"msvc-vcvars-arch": self.msvc_vcvars_arch,
|
||||
"msvc-vcvars-sdk": self.msvc_vcvars_sdk,
|
||||
"msvc-project": self.msvc_project,
|
||||
"msvc-project-flags": my_shlex_join(self.msvc_project_flags),
|
||||
"setup-ninja": self.setup_ninja,
|
||||
"setup-libusb-arch": self.setup_libusb_arch,
|
||||
"cc-from-cmake": self.cc_from_cmake,
|
||||
"xcode-sdk": self.xcode_sdk,
|
||||
"cpactions": self.cpactions,
|
||||
"cpactions-os": self.cpactions_os,
|
||||
"cpactions-version": self.cpactions_version,
|
||||
"cpactions-arch": self.cpactions_arch,
|
||||
"cpactions-setup-cmd": self.cpactions_setup_cmd,
|
||||
"cpactions-install-cmd": self.cpactions_install_cmd,
|
||||
"setup-vita-gles-type": self.setup_vita_gles_type,
|
||||
"setup-gdk-folder": self.setup_gdk_folder,
|
||||
"check-sources": self.check_sources,
|
||||
"setup-python": self.setup_python,
|
||||
"pypi-packages": my_shlex_join(self.pypi_packages),
|
||||
"setup-ngage-sdk-path": self.setup_gage_sdk_path,
|
||||
}
|
||||
return {k: v for k, v in data.items() if v != ""}
|
||||
|
||||
|
||||
def my_shlex_join(s):
|
||||
def escape(s):
|
||||
if s[:1] == "'" and s[-1:] == "'":
|
||||
return s
|
||||
if set(s).intersection(set("; \t")):
|
||||
return f'"{s}"'
|
||||
return s
|
||||
|
||||
return " ".join(escape(s))
|
||||
|
||||
|
||||
def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDetails:
|
||||
job = JobDetails(
|
||||
name=spec.name,
|
||||
key=key,
|
||||
os=spec.os.value,
|
||||
artifact=spec.artifact or "",
|
||||
container=spec.container or "",
|
||||
platform=spec.platform.value,
|
||||
sudo="sudo",
|
||||
no_cmake=spec.no_cmake,
|
||||
)
|
||||
if job.os.startswith("ubuntu"):
|
||||
job.apt_packages.extend([
|
||||
"ninja-build",
|
||||
"pkg-config",
|
||||
])
|
||||
pretest_cmd = []
|
||||
if trackmem_symbol_names:
|
||||
pretest_cmd.append("export SDL_TRACKMEM_SYMBOL_NAMES=1")
|
||||
else:
|
||||
pretest_cmd.append("export SDL_TRACKMEM_SYMBOL_NAMES=0")
|
||||
win32 = spec.platform in (SdlPlatform.Msys2, SdlPlatform.Msvc)
|
||||
fpic = None
|
||||
build_parallel = True
|
||||
if spec.lean:
|
||||
job.cppflags.append("-DSDL_LEAN_AND_MEAN=1")
|
||||
if win32:
|
||||
job.cmake_arguments.append("-DSDLTEST_PROCDUMP=ON")
|
||||
job.minidump = True
|
||||
if spec.intel is not None:
|
||||
match spec.intel:
|
||||
case IntelCompiler.Icx:
|
||||
job.cc = "icx"
|
||||
job.cxx = "icpx"
|
||||
case IntelCompiler.Icc:
|
||||
job.cc = "icc"
|
||||
job.cxx = "icpc"
|
||||
# Disable deprecation warning
|
||||
job.cppflags.append("-diag-disable=10441")
|
||||
# Avoid 'Catastrophic error: cannot open precompiled header file'
|
||||
job.cmake_arguments.append("-DCMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON")
|
||||
job.clang_tidy = False
|
||||
case _:
|
||||
raise ValueError(f"Invalid intel={spec.intel}")
|
||||
job.source_cmd = f"source /opt/intel/oneapi/setvars.sh;"
|
||||
job.intel = True
|
||||
job.shell = "bash"
|
||||
job.cmake_arguments.extend((
|
||||
f"-DCMAKE_C_COMPILER={job.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={job.cxx}",
|
||||
"-DCMAKE_SYSTEM_NAME=Linux",
|
||||
))
|
||||
match spec.platform:
|
||||
case SdlPlatform.Msvc:
|
||||
job.setup_ninja = not spec.gdk
|
||||
job.clang_tidy = False # complains about \threadsafety: "unknown command tag name [clang-diagnostic-documentation-unknown-command]"
|
||||
job.msvc_project = spec.msvc_project if spec.msvc_project else ""
|
||||
job.msvc_project_flags.append("-p:TreatWarningsAsError=true")
|
||||
job.test_pkg_config = False
|
||||
job.shared_lib = SharedLibType.WIN32
|
||||
job.static_lib = StaticLibType.STATIC_LIB
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase",
|
||||
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=-DEBUG",
|
||||
))
|
||||
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
|
||||
|
||||
if spec.clang_cl:
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_C_COMPILER=clang-cl",
|
||||
"-DCMAKE_CXX_COMPILER=clang-cl",
|
||||
))
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.cflags.append("/clang:-m32")
|
||||
job.cxxflags.append("/clang:-m32")
|
||||
job.ldflags.append("/MACHINE:X86")
|
||||
case MsvcArch.X64:
|
||||
job.cflags.append("/clang:-m64")
|
||||
job.cxxflags.append("/clang:-m64")
|
||||
job.ldflags.append("/MACHINE:X64")
|
||||
case _:
|
||||
raise ValueError(f"Unsupported clang-cl architecture (arch={spec.msvc_arch})")
|
||||
if spec.msvc_project:
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
msvc_platform = "Win32"
|
||||
case MsvcArch.X64:
|
||||
msvc_platform = "x64"
|
||||
case _:
|
||||
raise ValueError(f"Unsupported vcxproj architecture (arch={spec.msvc_arch})")
|
||||
if spec.gdk:
|
||||
msvc_platform = f"Gaming.Desktop.{msvc_platform}"
|
||||
job.msvc_project_flags.append(f"-p:Platform={msvc_platform}")
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.msvc_vcvars_arch = "x64_x86"
|
||||
case MsvcArch.X64:
|
||||
job.msvc_vcvars_arch = "x64"
|
||||
case MsvcArch.Arm32:
|
||||
job.msvc_vcvars_arch = "x64_arm"
|
||||
job.msvc_vcvars_sdk = "10.0.22621.0" # 10.0.26100.0 dropped ARM32 um and ucrt libraries
|
||||
job.run_tests = False
|
||||
case MsvcArch.Arm64:
|
||||
job.msvc_vcvars_arch = "x64_arm64"
|
||||
job.run_tests = False
|
||||
if spec.gdk:
|
||||
job.setup_gdk_folder = "VisualC-GDK"
|
||||
else:
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.setup_libusb_arch = "x86"
|
||||
case MsvcArch.X64:
|
||||
job.setup_libusb_arch = "x64"
|
||||
case SdlPlatform.Linux:
|
||||
if spec.name.startswith("Ubuntu"):
|
||||
assert spec.os.value.startswith("ubuntu-")
|
||||
job.apt_packages.extend((
|
||||
"ccache",
|
||||
"gnome-desktop-testing",
|
||||
"libasound2-dev",
|
||||
"libpulse-dev",
|
||||
"libaudio-dev",
|
||||
"libjack-dev",
|
||||
"libsndio-dev",
|
||||
"libusb-1.0-0-dev",
|
||||
"libx11-dev",
|
||||
"libxext-dev",
|
||||
"libxrandr-dev",
|
||||
"libxcursor-dev",
|
||||
"libxfixes-dev",
|
||||
"libxi-dev",
|
||||
"libxss-dev",
|
||||
"libwayland-dev",
|
||||
"libxkbcommon-dev",
|
||||
"libdrm-dev",
|
||||
"libgbm-dev",
|
||||
"libgl1-mesa-dev",
|
||||
"libgles2-mesa-dev",
|
||||
"libegl1-mesa-dev",
|
||||
"libdbus-1-dev",
|
||||
"libibus-1.0-dev",
|
||||
"libudev-dev",
|
||||
"fcitx-libs-dev",
|
||||
))
|
||||
match = re.match(r"ubuntu-(?P<year>[0-9]+)\.(?P<month>[0-9]+).*", spec.os.value)
|
||||
ubuntu_year, ubuntu_month = [int(match["year"]), int(match["month"])]
|
||||
if ubuntu_year >= 22:
|
||||
job.apt_packages.extend(("libpipewire-0.3-dev", "libdecor-0-dev"))
|
||||
job.apt_packages.extend((
|
||||
"libunwind-dev", # For SDL_test memory tracking
|
||||
))
|
||||
job.ccache = True
|
||||
if trackmem_symbol_names:
|
||||
# older libunwind is slow
|
||||
job.cmake_arguments.append("-DSDLTEST_TIMEOUT_MULTIPLIER=2")
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
fpic = True
|
||||
case SdlPlatform.Ios | SdlPlatform.Tvos:
|
||||
job.brew_packages.extend([
|
||||
"ccache",
|
||||
"ninja",
|
||||
])
|
||||
job.ccache = True
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.test_pkg_config = False
|
||||
job.shared_lib = SharedLibType.DYLIB
|
||||
job.static_lib = StaticLibType.A
|
||||
match spec.platform:
|
||||
case SdlPlatform.Ios:
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = 'iphoneos'
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=iOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0",
|
||||
])
|
||||
case SdlPlatform.Tvos:
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = 'appletvos'
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=tvOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0",
|
||||
])
|
||||
case SdlPlatform.MacOS:
|
||||
if spec.apple_framework:
|
||||
job.static = False
|
||||
job.clang_tidy = False
|
||||
job.test_pkg_config = False
|
||||
job.cmake_arguments.extend((
|
||||
"'-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13",
|
||||
"-DSDL_FRAMEWORK=ON",
|
||||
))
|
||||
job.shared_lib = SharedLibType.FRAMEWORK
|
||||
else:
|
||||
job.clang_tidy = True
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_OSX_ARCHITECTURES=arm64",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13",
|
||||
"-DCLANG_TIDY_BINARY=$(brew --prefix llvm)/bin/clang-tidy",
|
||||
))
|
||||
job.shared_lib = SharedLibType.DYLIB
|
||||
job.static_lib = StaticLibType.A
|
||||
job.ccache = True
|
||||
job.apt_packages = []
|
||||
job.brew_packages.extend((
|
||||
"ccache",
|
||||
"ninja",
|
||||
))
|
||||
if job.clang_tidy:
|
||||
job.brew_packages.append("llvm")
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = "macosx"
|
||||
case SdlPlatform.Android:
|
||||
job.android_gradle = spec.android_gradle
|
||||
job.android_mk = spec.android_mk
|
||||
job.apt_packages.append("ccache")
|
||||
job.run_tests = False
|
||||
job.shared_lib = SharedLibType.SO
|
||||
job.static_lib = StaticLibType.A
|
||||
if spec.android_mk or not spec.no_cmake:
|
||||
job.android_ndk = True
|
||||
if spec.android_gradle or not spec.no_cmake:
|
||||
job.java = True
|
||||
if spec.android_mk or spec.android_gradle:
|
||||
job.apt_packages = []
|
||||
if not spec.no_cmake:
|
||||
job.ccache = True
|
||||
job.cmake_arguments.extend((
|
||||
f"-DANDROID_PLATFORM={spec.android_platform}",
|
||||
f"-DANDROID_ABI={spec.android_abi}",
|
||||
))
|
||||
job.cmake_toolchain_file = "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake"
|
||||
job.cc = f"${{ANDROID_NDK_HOME}}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target={spec.android_arch}-none-linux-androideabi{spec.android_platform}"
|
||||
|
||||
job.android_apks = [
|
||||
"testaudiorecording-apk",
|
||||
"testautomation-apk",
|
||||
"testcontroller-apk",
|
||||
"testmultiaudio-apk",
|
||||
"testsprite-apk",
|
||||
]
|
||||
case SdlPlatform.Emscripten:
|
||||
job.clang_tidy = False # clang-tidy does not understand -gsource-map
|
||||
job.shared = False
|
||||
job.ccache = True
|
||||
job.apt_packages.append("ccache")
|
||||
job.cmake_config_emulator = "emcmake"
|
||||
job.cmake_build_type = "Debug"
|
||||
job.test_pkg_config = False
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDLTEST_BROWSER=chrome",
|
||||
"-DSDLTEST_TIMEOUT_MULTIPLIER=4",
|
||||
"-DSDLTEST_CHROME_BINARY=${CHROME_BINARY}",
|
||||
))
|
||||
job.cflags.extend((
|
||||
"-gsource-map",
|
||||
"-ffile-prefix-map=${PWD}=/SDL",
|
||||
))
|
||||
job.ldflags.extend((
|
||||
"--source-map-base", "/",
|
||||
))
|
||||
pretest_cmd.extend((
|
||||
"# Start local HTTP server",
|
||||
"cmake --build build --target serve-sdl-tests --verbose &",
|
||||
"chrome --version",
|
||||
"chromedriver --version",
|
||||
))
|
||||
job.static_lib = StaticLibType.A
|
||||
job.setup_python = True
|
||||
job.pypi_packages.append("selenium")
|
||||
case SdlPlatform.Ps2:
|
||||
job.ccache = False # actions/ccache does not work in psp container (incompatible tar of busybox)
|
||||
build_parallel = False
|
||||
job.shared = False
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["ccache", "cmake", "gmp", "mpc1", "mpfr4", "ninja", "pkgconf", "git", ]
|
||||
job.cmake_toolchain_file = "${PS2DEV}/ps2sdk/ps2dev.cmake"
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "mips64r5900el-ps2-elf-gcc"
|
||||
job.ldflags = ["-L${PS2DEV}/ps2sdk/ee/lib", "-L${PS2DEV}/gsKit/lib", "-L${PS2DEV}/ps2sdk/ports/lib", ]
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Psp:
|
||||
job.ccache = False # actions/ccache does not work in psp container (incompatible tar of busybox)
|
||||
build_parallel = False
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["ccache", "cmake", "gmp", "mpc1", "mpfr4", "ninja", "pkgconf", ]
|
||||
job.cmake_toolchain_file = "${PSPDEV}/psp/share/pspdev.cmake"
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "psp-gcc"
|
||||
job.ldflags = ["-L${PSPDEV}/lib", "-L${PSPDEV}/psp/lib", "-L${PSPDEV}/psp/sdk/lib", ]
|
||||
job.pollute_directories = ["${PSPDEV}/include", "${PSPDEV}/psp/include", "${PSPDEV}/psp/sdk/include", ]
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Vita:
|
||||
job.ccache = True
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["ccache", "cmake", "ninja", "pkgconf", "bash", "tar"]
|
||||
job.cmake_toolchain_file = "${VITASDK}/share/vita.toolchain.cmake"
|
||||
assert spec.vita_gles is not None
|
||||
job.setup_vita_gles_type = {
|
||||
VitaGLES.Pib: "pib",
|
||||
VitaGLES.Pvr: "pvr",
|
||||
}[spec.vita_gles]
|
||||
job.cmake_arguments.extend((
|
||||
f"-DVIDEO_VITA_PIB={ 'true' if spec.vita_gles == VitaGLES.Pib else 'false' }",
|
||||
f"-DVIDEO_VITA_PVR={ 'true' if spec.vita_gles == VitaGLES.Pvr else 'false' }",
|
||||
"-DSDL_ARMNEON=ON",
|
||||
"-DSDL_ARMSIMD=ON",
|
||||
))
|
||||
# Fix vita.toolchain.cmake (https://github.com/vitasdk/vita-toolchain/pull/253)
|
||||
job.source_cmd = r"""sed -i -E "s#set\\( PKG_CONFIG_EXECUTABLE \"\\$\\{VITASDK}/bin/arm-vita-eabi-pkg-config\" \\)#set\\( PKG_CONFIG_EXECUTABLE \"${VITASDK}/bin/arm-vita-eabi-pkg-config\" CACHE PATH \"Path of pkg-config executable\" \\)#" ${VITASDK}/share/vita.toolchain.cmake"""
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "arm-vita-eabi-gcc"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Haiku:
|
||||
job.ccache = True
|
||||
fpic = False
|
||||
job.run_tests = False
|
||||
job.apt_packages.append("ccache")
|
||||
job.cc = "x86_64-unknown-haiku-gcc"
|
||||
job.cxx = "x86_64-unknown-haiku-g++"
|
||||
job.sudo = ""
|
||||
job.cmake_arguments.extend((
|
||||
f"-DCMAKE_C_COMPILER={job.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={job.cxx}",
|
||||
"-DSDL_UNIX_CONSOLE_BUILD=ON",
|
||||
))
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.PowerPC64 | SdlPlatform.PowerPC:
|
||||
job.ccache = True
|
||||
# FIXME: Enable SDL_WERROR
|
||||
job.werror = False
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.sudo = ""
|
||||
job.apt_packages = ["ccache"]
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDL_UNIX_CONSOLE_BUILD=ON",
|
||||
))
|
||||
case SdlPlatform.LoongArch64:
|
||||
job.ccache = True
|
||||
fpic = True
|
||||
job.run_tests = False
|
||||
job.apt_packages.append("ccache")
|
||||
job.cc = "${LOONGARCH64_CC}"
|
||||
job.cxx = "${LOONGARCH64_CXX}"
|
||||
job.cmake_arguments.extend((
|
||||
f"-DCMAKE_C_COMPILER={job.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={job.cxx}",
|
||||
"-DSDL_UNIX_CONSOLE_BUILD=ON",
|
||||
"-DCMAKE_SYSTEM_NAME=Linux",
|
||||
))
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.N3ds:
|
||||
job.ccache = True
|
||||
job.shared = False
|
||||
job.apt_packages = ["ccache", "ninja-build", "binutils"]
|
||||
job.clang_tidy = False
|
||||
job.run_tests = False
|
||||
job.cc_from_cmake = True
|
||||
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Msys2:
|
||||
job.ccache = True
|
||||
job.shell = "msys2 {0}"
|
||||
assert spec.msys2_platform
|
||||
job.msys2_msystem = spec.msys2_platform.value
|
||||
job.msys2_env = {
|
||||
"mingw32": "mingw-w64-i686",
|
||||
"mingw64": "mingw-w64-x86_64",
|
||||
"clang64": "mingw-w64-clang-x86_64",
|
||||
"ucrt64": "mingw-w64-ucrt-x86_64",
|
||||
}[spec.msys2_platform.value]
|
||||
job.msys2_no_perl = spec.msys2_platform in (Msys2Platform.Mingw32, )
|
||||
job.shared_lib = SharedLibType.WIN32
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Riscos:
|
||||
job.ccache = False # FIXME: enable when container gets upgrade
|
||||
# FIXME: Enable SDL_WERROR
|
||||
job.werror = False
|
||||
job.apt_packages = ["ccache", "cmake", "ninja-build"]
|
||||
job.test_pkg_config = False
|
||||
job.shared = False
|
||||
job.run_tests = False
|
||||
job.sudo = ""
|
||||
job.cmake_arguments.extend((
|
||||
"-DRISCOS:BOOL=ON",
|
||||
"-DCMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON",
|
||||
"-DSDL_GCC_ATOMICS:BOOL=OFF",
|
||||
))
|
||||
job.cmake_toolchain_file = "/home/riscos/env/toolchain-riscos.cmake"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.FreeBSD | SdlPlatform.NetBSD:
|
||||
job.cpactions = True
|
||||
job.no_cmake = True
|
||||
job.run_tests = False
|
||||
job.apt_packages = []
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
match spec.platform:
|
||||
case SdlPlatform.FreeBSD:
|
||||
job.cpactions_os = "freebsd"
|
||||
job.cpactions_version = "14.2"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "sudo pkg update"
|
||||
job.cpactions_install_cmd = "sudo pkg install -y cmake ninja pkgconf libXcursor libXext libXinerama libXi libXfixes libXrandr libXScrnSaver libXxf86vm wayland wayland-protocols libxkbcommon mesa-libs libglvnd evdev-proto libinotify alsa-lib jackit pipewire pulseaudio sndio dbus zh-fcitx ibus libudev-devd"
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDL_CHECK_REQUIRED_INCLUDES=/usr/local/include",
|
||||
"-DSDL_CHECK_REQUIRED_LINK_OPTIONS=-L/usr/local/lib",
|
||||
))
|
||||
case SdlPlatform.NetBSD:
|
||||
job.cpactions_os = "netbsd"
|
||||
job.cpactions_version = "10.1"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "export PATH=\"/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH\"; export PKG_CONFIG_PATH=\"/usr/pkg/lib/pkgconfig\";export PKG_PATH=\"https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f \"1 2\" -d.)/All/\";echo \"PKG_PATH=$PKG_PATH\";echo \"uname -a -> \"$(uname -a)\"\";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update"
|
||||
job.cpactions_install_cmd = "sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1"
|
||||
case SdlPlatform.NGage:
|
||||
build_parallel = False
|
||||
job.cmake_build_type = "Release"
|
||||
job.setup_ninja = True
|
||||
job.static_lib = StaticLibType.STATIC_LIB
|
||||
job.shared_lib = None
|
||||
job.clang_tidy = False
|
||||
job.werror = False # FIXME: enable SDL_WERROR
|
||||
job.shared = False
|
||||
job.run_tests = False
|
||||
job.setup_gage_sdk_path = "C:/ngagesdk"
|
||||
job.cmake_toolchain_file = "C:/ngagesdk/cmake/ngage-toolchain.cmake"
|
||||
job.test_pkg_config = False
|
||||
case _:
|
||||
raise ValueError(f"Unsupported platform={spec.platform}")
|
||||
|
||||
if "ubuntu" in spec.name.lower():
|
||||
job.check_sources = True
|
||||
job.setup_python = True
|
||||
|
||||
if job.ccache:
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_C_COMPILER_LAUNCHER=ccache",
|
||||
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
|
||||
))
|
||||
if not build_parallel:
|
||||
job.cmake_build_arguments.append("-j1")
|
||||
if job.cflags or job.cppflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_C_FLAGS=\"{my_shlex_join(job.cflags + job.cppflags)}\"")
|
||||
if job.cxxflags or job.cppflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_CXX_FLAGS=\"{my_shlex_join(job.cxxflags + job.cppflags)}\"")
|
||||
if job.ldflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_SHARED_LINKER_FLAGS=\"{my_shlex_join(job.ldflags)}\"")
|
||||
job.cmake_arguments.append(f"-DCMAKE_EXE_LINKER_FLAGS=\"{my_shlex_join(job.ldflags)}\"")
|
||||
job.pretest_cmd = "\n".join(pretest_cmd)
|
||||
def tf(b):
|
||||
return "ON" if b else "OFF"
|
||||
|
||||
if fpic is not None:
|
||||
job.cmake_arguments.append(f"-DCMAKE_POSITION_INDEPENDENT_CODE={tf(fpic)}")
|
||||
|
||||
if job.no_cmake:
|
||||
job.cmake_arguments = []
|
||||
|
||||
return job
|
||||
|
||||
|
||||
def spec_to_platform(spec: JobSpec, key: str, enable_artifacts: bool, trackmem_symbol_names: bool) -> dict[str, str|bool]:
|
||||
logger.info("spec=%r", spec)
|
||||
job = spec_to_job(spec, key=key, trackmem_symbol_names=trackmem_symbol_names)
|
||||
logger.info("job=%r", job)
|
||||
platform = job.to_workflow(enable_artifacts=enable_artifacts)
|
||||
logger.info("platform=%r", platform)
|
||||
return platform
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--github-variable-prefix", default="platforms")
|
||||
parser.add_argument("--github-ci", action="store_true")
|
||||
parser.add_argument("--verbose", action="store_true")
|
||||
parser.add_argument("--commit-message-file")
|
||||
parser.add_argument("--no-artifact", dest="enable_artifacts", action="store_false")
|
||||
parser.add_argument("--trackmem-symbol-names", dest="trackmem_symbol_names", action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=logging.INFO if args.verbose else logging.WARNING)
|
||||
|
||||
remaining_keys = set(JOB_SPECS.keys())
|
||||
|
||||
all_level_keys = (
|
||||
# Level 1
|
||||
(
|
||||
"haiku",
|
||||
),
|
||||
)
|
||||
|
||||
filters = []
|
||||
if args.commit_message_file:
|
||||
with open(args.commit_message_file, "r") as f:
|
||||
commit_message = f.read()
|
||||
for m in re.finditer(r"\[sdl-ci-filter (.*)]", commit_message, flags=re.M):
|
||||
filters.append(m.group(1).strip(" \t\n\r\t'\""))
|
||||
|
||||
if re.search(r"\[sdl-ci-artifacts?]", commit_message, flags=re.M):
|
||||
args.enable_artifacts = True
|
||||
|
||||
if re.search(r"\[sdl-ci-(full-)?trackmem(-symbol-names)?]", commit_message, flags=re.M):
|
||||
args.trackmem_symbol_names = True
|
||||
|
||||
if not filters:
|
||||
filters.append("*")
|
||||
|
||||
logger.info("filters: %r", filters)
|
||||
|
||||
all_level_platforms = {}
|
||||
|
||||
all_platforms = {key: spec_to_platform(spec, key=key, enable_artifacts=args.enable_artifacts, trackmem_symbol_names=args.trackmem_symbol_names) for key, spec in JOB_SPECS.items()}
|
||||
|
||||
for level_i, level_keys in enumerate(all_level_keys, 1):
|
||||
level_key = f"level{level_i}"
|
||||
logger.info("Level %d: keys=%r", level_i, level_keys)
|
||||
assert all(k in remaining_keys for k in level_keys)
|
||||
level_platforms = tuple(all_platforms[key] for key in level_keys)
|
||||
remaining_keys.difference_update(level_keys)
|
||||
all_level_platforms[level_key] = level_platforms
|
||||
logger.info("=" * 80)
|
||||
|
||||
logger.info("Keys before filter: %r", remaining_keys)
|
||||
|
||||
filtered_remaining_keys = set()
|
||||
for filter in filters:
|
||||
filtered_remaining_keys.update(fnmatch.filter(remaining_keys, filter))
|
||||
|
||||
logger.info("Keys after filter: %r", filtered_remaining_keys)
|
||||
|
||||
remaining_keys = filtered_remaining_keys
|
||||
|
||||
logger.info("Remaining: %r", remaining_keys)
|
||||
all_level_platforms["others"] = tuple(all_platforms[key] for key in remaining_keys)
|
||||
|
||||
if args.github_ci:
|
||||
for level, platforms in all_level_platforms.items():
|
||||
platforms_json = json.dumps(platforms)
|
||||
txt = f"{args.github_variable_prefix}-{level}={platforms_json}"
|
||||
logger.info("%s", txt)
|
||||
if "GITHUB_OUTPUT" in os.environ:
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
|
||||
f.write(txt)
|
||||
f.write("\n")
|
||||
else:
|
||||
logger.warning("GITHUB_OUTPUT not defined")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-436
@@ -1,436 +0,0 @@
|
||||
name: 'Build'
|
||||
run-name: 'Configure, Build and Test SDL'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platforms:
|
||||
description: 'JSON-encoded test properties'
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
container: ${{ matrix.platform.container }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ${{ fromJSON(inputs.platforms) }}
|
||||
steps:
|
||||
- name: 'Set up MSYS2'
|
||||
if: ${{ matrix.platform.platform == 'msys2' }}
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.platform.msys2-msystem }}
|
||||
install: >-
|
||||
${{ matrix.platform.msys2-env }}-cc
|
||||
${{ matrix.platform.msys2-env }}-cmake
|
||||
${{ matrix.platform.msys2-env }}-ninja
|
||||
${{ (!matrix.platform.msys2-no-perl && format('{0}-perl', matrix.platform.msys2-env)) || '' }}
|
||||
${{ matrix.platform.msys2-env }}-pkg-config
|
||||
${{ matrix.platform.msys2-env }}-clang-tools-extra
|
||||
${{ (matrix.platform.ccache && format('{0}-ccache', matrix.platform.msys2-env)) || '' }}
|
||||
- name: 'About this job'
|
||||
run: |
|
||||
echo "key=${{ matrix.platform.key }}"
|
||||
echo "name=${{ matrix.platform.name }}"
|
||||
echo "os=${{ matrix.platform.os }}"
|
||||
echo ""
|
||||
echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
|
||||
- uses: actions/checkout@v4
|
||||
- name: 'Set up ninja'
|
||||
if: ${{ matrix.platform.setup-ninja }}
|
||||
uses: ./.github/actions/setup-ninja
|
||||
- name: 'Set up libusb for MSVC'
|
||||
if: ${{ matrix.platform.setup-libusb-arch != '' }}
|
||||
uses: ./.github/actions/setup-msvc-libusb
|
||||
with:
|
||||
arch: ${{ matrix.platform.setup-libusb-arch }}
|
||||
- uses: mymindstorm/setup-emsdk@v14
|
||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||
with:
|
||||
version: 3.1.35
|
||||
- uses: browser-actions/setup-chrome@v1
|
||||
id: setup-chrome
|
||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||
with:
|
||||
install-chromedriver: true
|
||||
- name: 'Add chrome to PATH'
|
||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||
run: |
|
||||
chrome_dir="$(dirname "${{ steps.setup-chrome.outputs.chrome-path }}")"
|
||||
chromedriver_dir="$(dirname "${{ steps.setup-chrome.outputs.chromedriver-path }}")"
|
||||
echo "CHROME_BINARY=${{ steps.setup-chrome.outputs.chrome-path }}" >>$GITHUB_ENV
|
||||
echo "CHROMEDRIVER_BINARY=${{ steps.setup-chrome.outputs.chromedriver-path }}" >>$GITHUB_ENV
|
||||
echo "chrome_dir=${chrome_dir}"
|
||||
echo "chromedriver_dir=${chromedriver_dir}"
|
||||
echo "${chrome_dir}" >>${GITHUB_PATH}
|
||||
echo "${chromedriver_dir}" >>${GITHUB_PATH}
|
||||
- uses: nttld/setup-ndk@v1
|
||||
if: ${{ matrix.platform.android-ndk }}
|
||||
id: setup-ndk
|
||||
with:
|
||||
local-cache: true
|
||||
ndk-version: r21e
|
||||
- name: 'Configure Android NDK variables'
|
||||
if: ${{ matrix.platform.android-ndk }}
|
||||
shell: sh
|
||||
run: |
|
||||
# We cannot use GitHub expressions in the controller job
|
||||
echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >>$GITHUB_ENV
|
||||
- uses: actions/setup-java@v4
|
||||
if: ${{ matrix.platform.java }}
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
if: ${{ matrix.platform.platform == 'msvc' }}
|
||||
with:
|
||||
arch: ${{ matrix.platform.msvc-vcvars-arch }}
|
||||
sdk: ${{ matrix.platform.msvc-vcvars-sdk }}
|
||||
- name: 'Set up Nokia N-Gage SDK'
|
||||
uses: ./.github/actions/setup-ngage-sdk
|
||||
if: ${{ matrix.platform.setup-ngage-sdk-path != '' }}
|
||||
with:
|
||||
path: '${{ matrix.platform.setup-ngage-sdk-path }}'
|
||||
- name: 'Set up Windows GDK Desktop'
|
||||
uses: ./.github/actions/setup-gdk-desktop
|
||||
if: ${{ matrix.platform.setup-gdk-folder != '' }}
|
||||
with:
|
||||
folder: '${{ matrix.platform.setup-gdk-folder }}'
|
||||
- name: 'Set up LoongArch64 toolchain'
|
||||
uses: ./.github/actions/setup-loongarch64-toolchain
|
||||
id: setup-loongarch64-toolchain
|
||||
if: ${{ matrix.platform.platform == 'loongarch64' }}
|
||||
- name: 'Setup Intel oneAPI toolchain'
|
||||
id: intel
|
||||
if: ${{ matrix.platform.intel }}
|
||||
run: |
|
||||
# Download the key to system keyring
|
||||
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||
|
||||
# Add signed entry to apt sources and configure the APT client to use Intel repository:
|
||||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
|
||||
# Update package list
|
||||
sudo apt-get update -y
|
||||
|
||||
# Install oneAPI
|
||||
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
- name: 'Install apk packages'
|
||||
if: ${{ matrix.platform.apk-packages != '' }}
|
||||
run: |
|
||||
${{ matrix.platform.sudo }} apk update
|
||||
${{ matrix.platform.sudo }} apk add ${{ matrix.platform.apk-packages }}
|
||||
- name: 'Install apt packages'
|
||||
if: ${{ matrix.platform.apt-packages != '' }}
|
||||
run: |
|
||||
${{ matrix.platform.sudo }} apt-get update
|
||||
${{ matrix.platform.sudo }} apt-get install -y ${{ matrix.platform.apt-packages }}
|
||||
- name: 'Install brew packages'
|
||||
if: ${{ matrix.platform.brew-packages != '' }}
|
||||
run: |
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew update
|
||||
brew install ${{ matrix.platform.brew-packages }}
|
||||
- name: 'Setup Python'
|
||||
uses: 'actions/setup-python@main'
|
||||
if: ${{ matrix.platform.setup-python }}
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 'Install PyPI packages'
|
||||
if: ${{ matrix.platform.pypi-packages != '' }}
|
||||
run: |
|
||||
python -m pip install --user ${{ matrix.platform.pypi-packages }}
|
||||
- name: 'Set up GLES for VITA' # Must be after apk
|
||||
if: ${{ matrix.platform.setup-vita-gles-type != '' }}
|
||||
uses: ./.github/actions/setup-vita-gles
|
||||
with:
|
||||
type: ${{ matrix.platform.setup-vita-gles-type }}
|
||||
|
||||
- name: 'Pollute toolchain with "bad" SDL headers'
|
||||
if: ${{ matrix.platform.pollute-directories != '' }}
|
||||
#shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
# Create "bad" SDL headers in the toolchain.
|
||||
# SDL sources should not use these.
|
||||
for include in ${{ matrix.platform.pollute-directories }}; do
|
||||
toolchain_directory="${include}/SDL3"
|
||||
echo "Creating directory ${toolchain_directory}"
|
||||
mkdir -p "${toolchain_directory}/SDL3"
|
||||
for header in include/SDL3/*.h; do
|
||||
dest="${toolchain_directory}/SDL3/$(basename "${header}")"
|
||||
echo "Creating ${dest}"
|
||||
echo '#error "System SDL headers must not be used by build system"' >"$dest"
|
||||
done
|
||||
done
|
||||
|
||||
- name: 'Calculate ccache key'
|
||||
if: ${{ matrix.platform.ccache }}
|
||||
id: prepare-restore-ccache
|
||||
run: |
|
||||
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
|
||||
- name: 'Restore ccache'
|
||||
if: ${{ matrix.platform.ccache }}
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-ccache
|
||||
with:
|
||||
path: ${{ runner.temp }}/ccache
|
||||
key: ccache-${{ matrix.platform.key }}-${{ steps.prepare-restore-ccache.outputs.timestamp }}
|
||||
restore-keys: |
|
||||
ccache-${{matrix.platform.key}}
|
||||
- name: 'Configure ccache'
|
||||
if: ${{ matrix.platform.ccache }}
|
||||
run: |
|
||||
echo 'CCACHE_DIR=${{ runner.temp }}/ccache' >>${GITHUB_ENV}
|
||||
- name: 'Prepare ccache'
|
||||
if: ${{ matrix.platform.ccache && steps.restore-ccache.outputs.cache-hit }}
|
||||
run: |
|
||||
if [ "x${{ runner.os }}" = "xmacOS" ]; then
|
||||
touch_date="2025-02-01T12:00:00Z"
|
||||
else
|
||||
touch_date="2025-02-01"
|
||||
fi
|
||||
find "${CCACHE_DIR}" -type f -exec touch -a -m -d "$touch_date" {} +
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: 'Configure (CMake)'
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
#shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
-DSDL_EXAMPLES=${{ matrix.platform.build-tests }} \
|
||||
-DSDL_TESTS=${{ matrix.platform.build-tests }} \
|
||||
-DSDLTEST_TRACKMEM=ON \
|
||||
-DSDL_INSTALL_TESTS=${{ matrix.platform.build-tests }} \
|
||||
-DSDL_CLANG_TIDY=${{ matrix.platform.clang-tidy }} \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
-DSDL_INSTALL_CPACK=ON \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
|
||||
- name: 'Build (CMake)'
|
||||
id: build
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
cmake --build build --config ${{ matrix.platform.cmake-build-type }} --verbose -- ${{ matrix.platform.cmake-build-arguments }}
|
||||
- name: 'Verify SDL_REVISION'
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
run: |
|
||||
echo "This should show us the SDL_REVISION"
|
||||
echo "Shared library:"
|
||||
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
||||
echo "Static library:"
|
||||
${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
||||
- name: 'Run build-time tests (CMake)'
|
||||
id: tests
|
||||
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.pretest-cmd }}
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -j2
|
||||
- name: "Build test apk's (CMake)"
|
||||
id: apks
|
||||
if: ${{ always() && steps.build.outcome == 'success' && matrix.platform.android-apks != '' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
cmake --build build --config ${{ matrix.platform.cmake-build-type }} \
|
||||
--target \
|
||||
${{ matrix.platform.android-apks }} \
|
||||
--verbose \
|
||||
-- ${{ matrix.platform.cmake-build-arguments }}
|
||||
- name: 'Install (CMake)'
|
||||
id: install
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
cmake --install build --config ${{ matrix.platform.cmake-build-type }}
|
||||
echo "prefix=$(pwd)/prefix" >> $GITHUB_OUTPUT
|
||||
( cd prefix; find . ) | LC_ALL=C sort -u
|
||||
- name: 'Package (CPack)'
|
||||
id: package
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
# DMG creation on macOS occasionally fails, so try multiple times
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/25671
|
||||
success=0
|
||||
max_tries=10
|
||||
for i in $(seq $max_tries); do
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target package -- ${{ matrix.platform.cmake-build-arguments }} && success=1
|
||||
if test $success = 1; then
|
||||
break
|
||||
fi
|
||||
echo "Package creation failed. Sleep 1 second and try again."
|
||||
sleep 1
|
||||
done
|
||||
if test $success = 0; then
|
||||
echo "Package creation failed after $max_tries attempts."
|
||||
exit 1
|
||||
fi
|
||||
- name: 'Verify CMake configuration files'
|
||||
if: ${{ steps.install.outcome == 'success' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S cmake/test -B cmake_test_build -GNinja \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DTEST_SHARED=${{ matrix.platform.shared }} \
|
||||
-DTEST_STATIC=${{ matrix.platform.static }} \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.install.outputs.prefix }}"
|
||||
cmake --build cmake_test_build --verbose --config ${{ matrix.platform.cmake-build-type }} -- ${{ matrix.platform.cmake-build-arguments }}
|
||||
- name: 'Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain'
|
||||
if: ${{ steps.install.outcome == 'success' && matrix.platform.cc-from-cmake }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
cmake -S .github/cmake -B /tmp/cmake_extract \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
|
||||
-DVAR_PATH=/tmp/env.txt
|
||||
cat /tmp/env.txt >> $GITHUB_ENV
|
||||
- name: 'Verify sdl3.pc'
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
if: ${{ steps.install.outcome == 'success' && matrix.platform.test-pkg-config }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cc && format('export CC="{0}"', matrix.platform.cc) || '' }}
|
||||
${{ matrix.platform.cflags && format('export CFLAGS="{0}"', matrix.platform.cflags) || '' }}
|
||||
${{ matrix.platform.ldflags && format('export LDFLAGS="{0}"', matrix.platform.ldflags) || '' }}
|
||||
export PKG_CONFIG_PATH=${{ steps.install.outputs.prefix }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- name: 'Build (cross-platform-actions, BSD)'
|
||||
id: cpactions
|
||||
if: ${{ matrix.platform.cpactions }}
|
||||
uses: cross-platform-actions/action@v0.27.0
|
||||
with:
|
||||
operating_system: '${{ matrix.platform.cpactions-os }}'
|
||||
architecture: '${{ matrix.platform.cpactions-arch }}'
|
||||
version: '${{ matrix.platform.cpactions-version }}'
|
||||
run: |
|
||||
${{ matrix.platform.cpactions-setup-cmd }}
|
||||
${{ matrix.platform.cpactions-install-cmd }}
|
||||
cmake -S . -B build -GNinja \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
-DSDL_INSTALL_DOCS=ON \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --verbose
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target package
|
||||
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target clean
|
||||
rm -rf build/dist/_CPack_Packages
|
||||
rm -rf build/CMakeFiles
|
||||
rm -rf build/docs
|
||||
- name: Add msbuild to PATH
|
||||
id: setup-msbuild
|
||||
if: ${{ matrix.platform.msvc-project != '' }}
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.msvc-project != '' }}
|
||||
run: |
|
||||
"$(cygpath -u '${{ steps.setup-msbuild.outputs.msbuildPath }}\msbuild.exe')" ${{ matrix.platform.msvc-project }} -m -p:BuildInParallel=true -p:Configuration=Release ${{ matrix.platform.msvc-project-flags }}
|
||||
- name: 'Build (Android.mk)'
|
||||
if: ${{ matrix.platform.android-mk }}
|
||||
run: |
|
||||
./build-scripts/androidbuildlibs.sh
|
||||
- name: 'Create Gradle project (Android)'
|
||||
if: ${{ matrix.platform.android-gradle }}
|
||||
run: |
|
||||
for folder in build-ndk-build build-cmake; do
|
||||
python build-scripts/create-android-project.py \
|
||||
--output "${folder}" \
|
||||
--variant copy \
|
||||
org.libsdl.testspriteminimal \
|
||||
test/testspriteminimal.c test/icon.h
|
||||
done
|
||||
echo ""
|
||||
echo "Project contents:"
|
||||
echo ""
|
||||
find "build-ndk-build/org.libsdl.testspriteminimal"
|
||||
- name: 'Build Android app (Gradle & ndk-build)'
|
||||
if: ${{ matrix.platform.android-gradle }}
|
||||
run: |
|
||||
cd build-ndk-build/org.libsdl.testspriteminimal
|
||||
./gradlew -i assembleRelease
|
||||
- name: 'Build Android app (Gradle & CMake)'
|
||||
if: ${{ matrix.platform.android-gradle }}
|
||||
run: |
|
||||
cd build-cmake/org.libsdl.testspriteminimal
|
||||
./gradlew -i assembleRelease -PBUILD_WITH_CMAKE=1
|
||||
- name: 'Build (xcode)'
|
||||
if: ${{ matrix.platform.xcode-sdk != '' }}
|
||||
run: |
|
||||
xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3 -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
|
||||
- name: 'Prune old ccache files'
|
||||
if: ${{ matrix.platform.ccache }}
|
||||
run: |
|
||||
ccache --evict-older-than=1d
|
||||
ccache -s
|
||||
- name: 'Save ccache'
|
||||
if: ${{ matrix.platform.ccache }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/ccache
|
||||
key: ${{ steps.restore-ccache.outputs.cache-primary-key }}
|
||||
- name: 'Check Sources'
|
||||
if: ${{ matrix.platform.check-sources }}
|
||||
run: |
|
||||
set -e
|
||||
build-scripts/test-versioning.sh
|
||||
python build-scripts/check_android_jni.py
|
||||
python build-scripts/check_stdlib_usage.py
|
||||
- name: 'Upload binary package'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: '${{ matrix.platform.artifact }}'
|
||||
path: |
|
||||
build/dist/SDL3*
|
||||
build/include*
|
||||
- name: 'Upload minidumps'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }}
|
||||
with:
|
||||
if-no-files-found: ignore
|
||||
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||
path: build/**/*.dmp
|
||||
- name: "Upload Android test apk's"
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ matrix.platform.enable-artifacts && always() && matrix.platform.artifact != '' && steps.apks.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: '${{ matrix.platform.artifact }}-apks'
|
||||
path: build/test/*.apk
|
||||
-655
@@ -1,655 +0,0 @@
|
||||
name: 'release'
|
||||
run-name: 'Create SDL release artifacts for ${{ inputs.commit }}'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit:
|
||||
description: 'Commit of SDL'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
||||
src:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
project: ${{ steps.releaser.outputs.project }}
|
||||
version: ${{ steps.releaser.outputs.version }}
|
||||
src-tar-gz: ${{ steps.releaser.outputs.src-tar-gz }}
|
||||
src-tar-xz: ${{ steps.releaser.outputs.src-tar-xz }}
|
||||
src-zip: ${{ steps.releaser.outputs.src-zip }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Set up SDL sources'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'SDL'
|
||||
fetch-depth: 0
|
||||
- name: 'Build Source archive'
|
||||
id: releaser
|
||||
shell: bash
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions source \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ github.workspace }}/SDL" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store source archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace}}/dist'
|
||||
- name: 'Generate summary'
|
||||
run: |
|
||||
echo "Run the following commands to download all artifacts:" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo "mkdir -p /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "cd /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "gh run -R ${{ github.repository }} download ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
linux-verify:
|
||||
needs: [src]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: zip
|
||||
run: |
|
||||
mkdir /tmp/zipdir
|
||||
cd /tmp/zipdir
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=/tmp/zipdir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Compare contents of ${{ needs.src.outputs.src-zip }} and ${{ needs.src.outputs.src-tar-gz }}'
|
||||
run: |
|
||||
diff /tmp/zipdir /tmp/tardir
|
||||
- name: 'Test versioning'
|
||||
shell: bash
|
||||
run: |
|
||||
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
|
||||
- name: 'Install Linux dependencies'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev \
|
||||
libusb-1.0-0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
|
||||
libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
- name: 'CMake (configure + build + tests + examples)'
|
||||
run: |
|
||||
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
|
||||
cmake --build /tmp/build --verbose
|
||||
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
|
||||
|
||||
dmg:
|
||||
needs: [src]
|
||||
runs-on: macos-latest
|
||||
outputs:
|
||||
dmg: ${{ steps.releaser.outputs.dmg }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/tardir"
|
||||
tar -C "${{ github.workspace }}/tardir" -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=${{ github.workspace }}/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build SDL3.dmg'
|
||||
id: releaser
|
||||
shell: bash
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions dmg \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ steps.tar.outputs.path }}" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store DMG image file'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dmg
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
dmg-verify:
|
||||
needs: [dmg, src]
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dmg
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Mount ${{ needs.dmg.outputs.dmg }}'
|
||||
id: mount
|
||||
run: |
|
||||
hdiutil attach '${{ github.workspace }}/${{ needs.dmg.outputs.dmg }}'
|
||||
mount_point="/Volumes/${{ needs.src.outputs.project }}"
|
||||
if [ ! -d "$mount_point/${{ needs.src.outputs.project }}.xcframework" ]; then
|
||||
echo "Cannot find ${{ needs.src.outputs.project }}.xcframework!"
|
||||
exit 1
|
||||
fi
|
||||
echo "mount_point=$mount_point">>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) Darwin'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
|
||||
-Werror=dev \
|
||||
-B build_darwin
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}/SDL3.xcframework/macos-arm64_x86_64" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
|
||||
-Werror=dev \
|
||||
-B build_darwin_2
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
- name: 'CMake (configure + build) iOS'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_ios
|
||||
cmake --build build_ios --config Release --verbose
|
||||
- name: 'CMake (configure + build) tvOS'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=tvOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_tvos
|
||||
cmake --build build_tvos --config Release --verbose
|
||||
- name: 'CMake (configure + build) iOS simulator'
|
||||
run: |
|
||||
sysroot=$(xcodebuild -version -sdk iphonesimulator Path)
|
||||
echo "sysroot=$sysroot"
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_ios_simulator
|
||||
cmake --build build_ios_simulator --config Release --verbose
|
||||
- name: 'CMake (configure + build) tvOS simulator'
|
||||
run: |
|
||||
sysroot=$(xcodebuild -version -sdk appletvsimulator Path)
|
||||
echo "sysroot=$sysroot"
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=tvOS \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-Werror=dev \
|
||||
-B build_tvos_simulator
|
||||
cmake --build build_tvos_simulator --config Release --verbose
|
||||
|
||||
msvc:
|
||||
needs: [src]
|
||||
runs-on: windows-2019
|
||||
outputs:
|
||||
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
|
||||
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
|
||||
VC-arm64: ${{ steps.releaser.outputs.VC-arm64 }}
|
||||
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: zip
|
||||
run: |
|
||||
New-Item C:\temp -ItemType Directory -ErrorAction SilentlyContinue
|
||||
cd C:\temp
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=C:\temp\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
|
||||
- name: 'Build MSVC binary archives'
|
||||
id: releaser
|
||||
run: |
|
||||
python build-scripts/build-release.py `
|
||||
--actions msvc `
|
||||
--commit ${{ inputs.commit }} `
|
||||
--root "${{ steps.zip.outputs.path }}" `
|
||||
--github `
|
||||
--debug
|
||||
- name: 'Store MSVC archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
msvc-verify:
|
||||
needs: [msvc, src]
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: 'Fetch .github/actions/setup-ninja/action.yml'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: '.github/actions/setup-ninja/action.yml'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download MSVC binaries'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir '${{ github.workspace }}/sources'
|
||||
cd '${{ github.workspace }}/sources'
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=${{ github.workspace }}/sources/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
|
||||
- name: 'Unzip ${{ needs.msvc.outputs.VC-devel }}'
|
||||
id: bin
|
||||
run: |
|
||||
mkdir '${{ github.workspace }}/vc'
|
||||
cd '${{ github.workspace }}/vc'
|
||||
unzip "${{ github.workspace }}/${{ needs.msvc.outputs.VC-devel }}"
|
||||
echo "path=${{ github.workspace }}/vc/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
|
||||
- name: Set up ninja
|
||||
uses: ./.github/actions/setup-ninja
|
||||
- name: 'Configure vcvars x86'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64_x86
|
||||
- name: 'CMake (configure + build + tests) x86'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_x86 `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=TRUE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_x86 --config Release --verbose
|
||||
ctest --test-dir build_x86 --no-tests=error -C Release --output-on-failure
|
||||
- name: 'Configure vcvars x64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
- name: 'CMake (configure + build + tests) x64'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_x64 `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=TRUE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_x64 --config Release --verbose
|
||||
ctest --test-dir build_x64 --no-tests=error -C Release --output-on-failure
|
||||
- name: 'Configure vcvars arm64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64_arm64
|
||||
- name: 'CMake (configure + build) arm64'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_arm64 `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=TRUE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_arm64 --config Release --verbose
|
||||
- name: 'CMake (configure + build) arm64ec'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_arm64ec `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=TRUE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DSDL_DISABLE_AVX=TRUE `
|
||||
-DSDL_DISABLE_AVX2=TRUE `
|
||||
-DSDL_DISABLE_AVX512F=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_C_FLAGS="/arm64EC" `
|
||||
-DCMAKE_CXX_FLAGS="/arm64EC" `
|
||||
-DCMAKE_EXE_LINKER_FLAGS="/MACHINE:ARM64EC" `
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="/MACHINE:ARM64EC" `
|
||||
-DCMAKE_STATIC_LINKER_FLAGS="/MACHINE:ARM64EC" `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_arm64ec --config Release --verbose
|
||||
|
||||
mingw:
|
||||
needs: [src]
|
||||
runs-on: ubuntu-24.04 # FIXME: current ubuntu-latest ships an outdated mingw, replace with ubuntu-latest once 24.04 becomes the new default
|
||||
outputs:
|
||||
mingw-devel-tar-gz: ${{ steps.releaser.outputs.mingw-devel-tar-gz }}
|
||||
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Install Mingw toolchain'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build MinGW binary archives'
|
||||
id: releaser
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions mingw \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ steps.tar.outputs.path }}" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store MinGW archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mingw
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
mingw-verify:
|
||||
needs: [mingw, src]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Install Mingw toolchain'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download MinGW binaries'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: mingw
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Untar ${{ needs.mingw.outputs.mingw-devel-tar-gz }}'
|
||||
id: bin
|
||||
run: |
|
||||
mkdir -p /tmp/mingw-tardir
|
||||
tar -C /tmp/mingw-tardir -v -x -f "${{ github.workspace }}/${{ needs.mingw.outputs.mingw-devel-tar-gz }}"
|
||||
echo "path=/tmp/mingw-tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) i686'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DTEST_FULL=TRUE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=TRUE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
|
||||
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
|
||||
-Werror=dev \
|
||||
-B build_x86
|
||||
cmake --build build_x86 --config Release --verbose
|
||||
- name: 'CMake (configure + build) x86_64'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DTEST_FULL=TRUE \
|
||||
-DTEST_STATIC=false \
|
||||
-DTEST_TEST=TRUE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
|
||||
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
|
||||
-Werror=dev \
|
||||
-B build_x64
|
||||
cmake --build build_x64 --config Release --verbose
|
||||
|
||||
android:
|
||||
needs: [src]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
android-aar: ${{ steps.releaser.outputs.android-aar }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Setup Android NDK'
|
||||
id: setup-ndk
|
||||
uses: nttld/setup-ndk@v1
|
||||
with:
|
||||
local-cache: true
|
||||
ndk-version: r21e
|
||||
- name: 'Setup Java JDK'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
- name: 'Install ninja'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build Android prefab binary archive(s)'
|
||||
id: releaser
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions android \
|
||||
--android-api 23 \
|
||||
--android-ndk-home "${{ steps.setup-ndk.outputs.ndk-path }}" \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ steps.tar.outputs.path }}" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store Android archive(s)'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
android-verify:
|
||||
needs: [android, src]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download Android .aar archive'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: android
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Extract Android SDK from AAR'
|
||||
id: sdk
|
||||
run: |
|
||||
cd /tmp
|
||||
unzip "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}"
|
||||
python "${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" -o /tmp/SDL3-android
|
||||
echo "prefix=/tmp/SDL3-android" >>$GITHUB_OUTPUT
|
||||
echo "sdl3-aar=/tmp/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" >>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) x86, x64, arm32, arm64'
|
||||
run: |
|
||||
android_abis="x86 x86_64 armeabi-v7a arm64-v8a"
|
||||
for android_abi in ${android_abis}; do
|
||||
echo "Configuring ${android_abi}..."
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=TRUE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=TRUE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.sdk.outputs.prefix }}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_ABI=${android_abi} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-B "${android_abi}"
|
||||
echo "Building ${android_abi}..."
|
||||
cmake --build "${android_abi}" --config Release --verbose
|
||||
done
|
||||
- name: 'Create gradle project'
|
||||
id: create-gradle-project
|
||||
run: |
|
||||
python ${{ steps.src.outputs.path }}/build-scripts/create-android-project.py \
|
||||
org.libsdl.testspriteminimal \
|
||||
${{ steps.src.outputs.path }}/test/testspriteminimal.c \
|
||||
${{ steps.src.outputs.path }}/test/icon.h \
|
||||
--variant aar \
|
||||
--output "/tmp/projects"
|
||||
echo "path=/tmp/projects/org.libsdl.testspriteminimal" >>$GITHUB_OUTPUT
|
||||
- name: 'Copy SDL3 aar into Gradle project'
|
||||
run: |
|
||||
cp "${{ steps.sdk.outputs.sdl3-aar }}" "${{ steps.create-gradle-project.outputs.path }}/app/libs"
|
||||
|
||||
echo ""
|
||||
echo "Project contents:"
|
||||
echo ""
|
||||
find "${{ steps.create-gradle-project.outputs.path }}"
|
||||
- name: 'Build app (Gradle & CMake)'
|
||||
run: |
|
||||
cd "${{ steps.create-gradle-project.outputs.path }}"
|
||||
./gradlew -i assembleRelease -Pandroid.native.buildOutput=verbose -PBUILD_WITH_CMAKE=1
|
||||
- name: 'Build app (Gradle & ndk-build)'
|
||||
run: |
|
||||
cd "${{ steps.create-gradle-project.outputs.path }}"
|
||||
./gradlew -i assembleRelease -Pandroid.native.buildOutput=verbose
|
||||
@@ -1,178 +0,0 @@
|
||||
build/
|
||||
build-*/
|
||||
!build-scripts/
|
||||
buildbot/
|
||||
/VERSION.txt
|
||||
__pycache__
|
||||
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.obj
|
||||
*.res
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.dSYM
|
||||
*,e1f
|
||||
*,ff8
|
||||
*.lnk
|
||||
*.err
|
||||
*.exp
|
||||
*.map
|
||||
*.orig
|
||||
*~
|
||||
*.swp
|
||||
*.tmp
|
||||
*.rej
|
||||
|
||||
# for CMake
|
||||
.cmake
|
||||
CMakeFiles/
|
||||
CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
cmake_uninstall.cmake
|
||||
install_manifest.txt
|
||||
*Targets.cmake
|
||||
*Config.cmake
|
||||
*ConfigVersion.cmake
|
||||
CTestTestfile.cmake
|
||||
Testing
|
||||
compile_commands.json
|
||||
.cache/
|
||||
/include-config-*
|
||||
/include-revision
|
||||
/Makefile
|
||||
.ninja_*
|
||||
*.ninja
|
||||
*.pc
|
||||
test/*.test
|
||||
wayland-generated-protocols
|
||||
|
||||
# for CLion
|
||||
.idea
|
||||
cmake-build-*
|
||||
|
||||
# for Xcode
|
||||
*.mode1*
|
||||
*.perspective*
|
||||
*.pbxuser
|
||||
(^|/)build($|/)
|
||||
.DS_Store
|
||||
xcuserdata
|
||||
*.xcworkspace
|
||||
Xcode/build.xcconfig
|
||||
|
||||
# for Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# for Visual C++
|
||||
.vs
|
||||
Debug
|
||||
Release
|
||||
*.user
|
||||
*.ncb
|
||||
*.suo
|
||||
*.sdf
|
||||
VisualC/tests/gamepadmap/axis.bmp
|
||||
VisualC/tests/gamepadmap/button.bmp
|
||||
VisualC/tests/gamepadmap/gamepadmap.bmp
|
||||
VisualC/tests/gamepadmap/gamepadmap_back.bmp
|
||||
VisualC/tests/loopwave/sample.wav
|
||||
VisualC/tests/testautomation/*.bmp
|
||||
VisualC/tests/testgamepad/axis.bmp
|
||||
VisualC/tests/testgamepad/button.bmp
|
||||
VisualC/tests/testgamepad/gamepadmap.bmp
|
||||
VisualC/tests/testgamepad/gamepadmap_back.bmp
|
||||
VisualC/tests/testoverlay/moose.dat
|
||||
VisualC/tests/testrendertarget/icon.bmp
|
||||
VisualC/tests/testrendertarget/sample.bmp
|
||||
VisualC/tests/testscale/icon.bmp
|
||||
VisualC/tests/testscale/sample.bmp
|
||||
VisualC/tests/testsprite/icon.bmp
|
||||
VisualC/tests/testyuv/testyuv.bmp
|
||||
VisualC-GDK/**/Layout
|
||||
src/render/direct3d12/D3D12_*_One.h
|
||||
src/render/direct3d12/D3D12_*_Series.h
|
||||
src/gpu/d3d12/D3D12_*_One.h
|
||||
src/gpu/d3d12/D3D12_*_Series.h
|
||||
|
||||
# for Android
|
||||
android-project/local.properties
|
||||
android-project/.gradle/
|
||||
|
||||
test/checkkeys
|
||||
test/checkkeysthreads
|
||||
test/gamepadmap
|
||||
test/loopwave
|
||||
test/loopwavequeue
|
||||
test/testatomic
|
||||
test/testaudiorecording
|
||||
test/testaudiohotplug
|
||||
test/testaudioinfo
|
||||
test/testautomation
|
||||
test/testbounds
|
||||
test/testcustomcursor
|
||||
test/testdisplayinfo
|
||||
test/testdraw
|
||||
test/testdrawchessboard
|
||||
test/testdropfile
|
||||
test/testerror
|
||||
test/testevdev
|
||||
test/testfile
|
||||
test/testfilesystem
|
||||
test/testgamepad
|
||||
test/testgeometry
|
||||
test/testgesture
|
||||
test/testgl
|
||||
test/testgles
|
||||
test/testgles2
|
||||
test/testhaptic
|
||||
test/testhittesting
|
||||
test/testhotplug
|
||||
test/testiconv
|
||||
test/testime
|
||||
test/testintersections
|
||||
test/testjoystick
|
||||
test/testkeys
|
||||
test/testloadso
|
||||
test/testlocale
|
||||
test/testlock
|
||||
test/testmessage
|
||||
test/testmouse
|
||||
test/testmultiaudio
|
||||
test/testnative
|
||||
test/testoverlay
|
||||
test/testplatform
|
||||
test/testpower
|
||||
test/testqsort
|
||||
test/testrelative
|
||||
test/testrendercopyex
|
||||
test/testrendertarget
|
||||
test/testresample
|
||||
test/testrumble
|
||||
test/testscale
|
||||
test/testsem
|
||||
test/testsensor
|
||||
test/testshader
|
||||
test/testshape
|
||||
test/testsprite
|
||||
test/testspriteminimal
|
||||
test/teststreaming
|
||||
test/testsurround
|
||||
test/testthread
|
||||
test/testtimer
|
||||
test/testurl
|
||||
test/testver
|
||||
test/testviewport
|
||||
test/testvulkan
|
||||
test/testwm
|
||||
test/testyuv
|
||||
test/torturethread
|
||||
|
||||
# for Doxygen
|
||||
docs/output
|
||||
SDL.tag
|
||||
doxygen_warn.txt
|
||||
Vendored
-3902
File diff suppressed because it is too large
Load Diff
-926
@@ -1,926 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Desktop.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Desktop.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL3</ProjectName>
|
||||
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
|
||||
<IncludePath>$(ProjectDir)../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<IncludePath>$(ProjectDir)../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_xs.lib;uuid.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
call "$(ProjectDir)..\..\src\render\direct3d12\compile_shaders_xbox.bat" "$(ProjectDir)..\"
|
||||
call "$(ProjectDir)..\..\src\gpu\d3d12\compile_shaders_xbox.bat" "$(ProjectDir)..\"
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_x.lib;uuid.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
call $(ProjectDir)..\..\src\render\direct3d12\compile_shaders_xbox.bat $(ProjectDir)..\ one
|
||||
call $(ProjectDir)..\..\src\gpu\d3d12\compile_shaders_xbox.bat $(ProjectDir)..\ one
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_xs.lib;uuid.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
call $(ProjectDir)..\..\src\render\direct3d12\compile_shaders_xbox.bat $(ProjectDir)..\
|
||||
call $(ProjectDir)..\..\src\gpu\d3d12\compile_shaders_xbox.bat $(ProjectDir)..\
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\include\build_config;$(ProjectDir)\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_x.lib;uuid.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
call $(ProjectDir)..\..\src\render\direct3d12\compile_shaders_xbox.bat $(ProjectDir)..\ one
|
||||
call $(ProjectDir)..\..\src\gpu\d3d12\compile_shaders_xbox.bat $(ProjectDir)..\ one
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_close_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_atomic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_audio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_bits.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_blendmode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_clipboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_copying.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_cpuinfo.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_egl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_endian.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_error.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_events.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gamepad.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gpu.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_asyncio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_joystick.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_messagebox.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_metal.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl_glext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2ext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_process.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_iostream.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_storage.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_common.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_compare.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_crc32.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_font.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_fuzzer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_harness.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_md5.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_memory.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_thread.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_time.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_timer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_touch.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_types.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_version.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_video.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_vulkan.h" />
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
|
||||
<ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_gameinput.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\cpuinfo\SDL_cpuinfo_c.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\scancodes_windows.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_categories_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_eventwatch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keymap_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_hidapihaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\windows\pch.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxone.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxseries.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c" />
|
||||
<ClCompile Include="..\..\src\camera\SDL_camera.c" />
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog.c" />
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_sysrwlock_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_syscond_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_sysmutex_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\gdk\SDL_gdktextinput.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_icd.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_layer.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_directfb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_fuchsia.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ggp.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ios.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_macos.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_metal.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_vi.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_wayland.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_win32.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xcb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_clipboard_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_egl_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_surface_utils.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsgameinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_gameinput.cpp"/>
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dialog\dummy\SDL_dummydialog.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_categories.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_eventwatch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keymap.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.cpp" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_flydigi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gip.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps3.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps5.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\s_modf.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\process\SDL_process.c" />
|
||||
<ClCompile Include="..\..\src\process\dummy\SDL_dummyprocess.c" />
|
||||
<ClCompile Include="..\..\src\process\windows\SDL_windowsprocess.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_pipeline_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_render_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_shaders_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc16.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memcpy.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memmove.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memset.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
|
||||
<MASM Condition="'$(Platform)'=='x64'" Include="..\..\src\stdlib\SDL_mslibc_x64.masm">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</MASM>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_murmur3.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_random.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\storage\generic\SDL_genericstorage.c" />
|
||||
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysrwlock_srw.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
||||
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
||||
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
||||
<ClCompile Include="..\..\src\time\SDL_time.c" />
|
||||
<ClCompile Include="..\..\src\time\windows\SDL_systime.c" />
|
||||
<ClCompile Include="..\..\src\tray\dummy\SDL_tray.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tray\windows\SDL_tray.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tray\SDL_tray_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\gdk\SDL_gdktextinput.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\video\SDL_blit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_egl.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stb.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_surface_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsgameinput.cpp" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
-495
@@ -1,495 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxone.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxseries.cpp" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp" />
|
||||
<ClCompile Include="..\..\src\main\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_gameinput.cpp" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_categories.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_eventwatch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keymap.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
|
||||
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.cpp" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_flydigi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gip.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps3.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps5.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_modf.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\process\SDL_process.c" />
|
||||
<ClCompile Include="..\..\src\process\dummy\SDL_dummyprocess.c" />
|
||||
<ClCompile Include="..\..\src\process\windows\SDL_windowsprocess.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc16.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memcpy.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memmove.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memset.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_murmur3.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_random.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysrwlock_srw.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
||||
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
||||
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\gdk\SDL_gdktextinput.cpp" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_egl.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stb.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_surface_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsgameinput.cpp" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c" />
|
||||
<ClCompile Include="..\..\src\camera\SDL_camera.c" />
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog.c" />
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\dialog\dummy\SDL_dummydialog.c" />
|
||||
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_pipeline_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_render_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_shaders_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\storage\generic\SDL_genericstorage.c" />
|
||||
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
|
||||
<ClCompile Include="..\..\src\time\SDL_time.c" />
|
||||
<ClCompile Include="..\..\src\time\windows\SDL_systime.c" />
|
||||
<ClCompile Include="..\..\src\tray\dummy\SDL_tray.c" />
|
||||
<ClCompile Include="..\..\src\tray\windows\SDL_tray.c" />
|
||||
<ClCompile Include="..\..\src\tray\SDL_tray_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_close_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_atomic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_audio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_bits.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_blendmode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_clipboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_copying.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_cpuinfo.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_egl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_endian.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_error.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_events.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gamepad.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gpu.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_joystick.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_messagebox.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_metal.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl_glext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2ext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_process.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_iostream.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_common.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_compare.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_crc32.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_font.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_fuzzer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_harness.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_md5.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_memory.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_thread.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_timer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_touch.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_types.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_version.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_video.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_vulkan.h" />
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_gameinput.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\cpuinfo\SDL_cpuinfo_c.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\scancodes_windows.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_categories_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_eventwatch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keymap_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_hidapihaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_sysrwlock_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_syscond_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_sysmutex_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\gdk\SDL_gdktextinput.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_icd.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_layer.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_directfb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_fuchsia.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ggp.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ios.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_macos.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_metal.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_vi.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_wayland.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_win32.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xcb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_clipboard_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_egl_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_surface_utils.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsgameinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_asyncio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_storage.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_time.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
-214
@@ -1,214 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Desktop.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Desktop.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL3_test</ProjectName>
|
||||
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
|
||||
<RootNamespace>SDL_test</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_compare.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_font.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_harness.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_log.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_md5.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_memory.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
Vendored
-777
@@ -1,777 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL3</ProjectName>
|
||||
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IncludePath>$(ProjectDir)/../../src;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;$(ProjectDir)/../../include/build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4100;4127;4152;4201</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;$(ProjectDir)/../../include/build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4100;4127;4152;4201</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;$(ProjectDir)/../../include/build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4100;4127;4152;4201</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;$(ProjectDir)/../../include/build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SDL_internal.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4100;4127;4152;4201</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_close_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_atomic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_audio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_bits.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_blendmode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_clipboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_copying.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_cpuinfo.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_egl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_endian.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_error.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_events.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gamepad.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_gpu.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_asyncio.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_joystick.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_messagebox.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_metal.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengl_glext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2ext.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_gl2platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_opengles2_khrplatform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pen.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_pixels.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_process.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_iostream.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_storage.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_surface.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_system.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_assert.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_common.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_compare.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_crc32.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_font.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_fuzzer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_harness.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_md5.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_test_memory.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_thread.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_time.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_timer.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_touch.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_version.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_video.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_vulkan.h" />
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioqueue.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audioresample.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
|
||||
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_gameinput.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\cpuinfo\SDL_cpuinfo_c.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_unsupported.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\scancodes_windows.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_categories_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_eventwatch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keymap_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan_vkfuncs.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_hidapihaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\render\vulkan\SDL_shaders_vulkan.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\camera\dummy\SDL_camera_dummy.c" />
|
||||
<ClCompile Include="..\..\src\camera\mediafoundation\SDL_camera_mediafoundation.c" />
|
||||
<ClCompile Include="..\..\src\camera\SDL_camera.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog.c" />
|
||||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\main\windows\SDL_sysmain_runapp.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_properties_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_syscond_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_sysmutex_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\generic\SDL_sysrwlock_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_icd.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_layer.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_directfb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_fuchsia.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ggp.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ios.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_macos.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_metal.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_vi.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_wayland.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_win32.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xcb.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenopengles.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\offscreen\SDL_offscreenwindow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_clipboard_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_egl_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_surface_utils.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsgameinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsrawinput.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioqueue.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audioresample.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_gameinput.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_categories.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_eventwatch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keymap.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_pen.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\hidapi\SDL_hidapihaptic_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\gdk\SDL_gameinputjoystick.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_flydigi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gip.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps3.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps5.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_modf.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\process\SDL_process.c" />
|
||||
<ClCompile Include="..\..\src\process\windows\SDL_windowsprocess.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_pipeline_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_render_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\gpu\SDL_shaders_gpu.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hashtable.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\SDL_properties.c" />
|
||||
<ClCompile Include="..\..\src\SDL_utils.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc16.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memcpy.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memmove.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memset.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_murmur3.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_random.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\storage\generic\SDL_genericstorage.c" />
|
||||
<ClCompile Include="..\..\src\storage\steam\SDL_steamstorage.c" />
|
||||
<ClCompile Include="..\..\src\storage\SDL_storage.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_sysrwlock.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysrwlock_srw.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
||||
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
||||
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
||||
<ClCompile Include="..\..\src\time\SDL_time.c" />
|
||||
<ClCompile Include="..\..\src\time\windows\SDL_systime.c" />
|
||||
<ClCompile Include="..\..\src\tray\windows\SDL_tray.c" />
|
||||
<ClCompile Include="..\..\src\tray\SDL_tray_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenevents.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\offscreen\SDL_offscreenwindow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_egl.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stb.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video_unsupported.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_surface_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsgameinput.cpp">
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
<PrecompiledHeaderOutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)_cpp.pch</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsrawinput.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
-1618
File diff suppressed because it is too large
Load Diff
-180
@@ -1,180 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL3_test</ProjectName>
|
||||
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
|
||||
<RootNamespace>SDL_test</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(AdditionalOptions) /utf-8</AdditionalOptions>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_compare.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_font.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_harness.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_log.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_md5.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_memory.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
3.2.10:
|
||||
---------------------------------------------------------------------------
|
||||
* Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT to control whether XSelectInput() should be called on external windows to enable input events.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
3.2.4:
|
||||
---------------------------------------------------------------------------
|
||||
* Added SDL_StretchSurface()
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
3.2.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Check out [migration guide](docs/README-migration.md) for details on API changes since SDL 2.0, and tips on transitioning your code from SDL2 code to SDL3.
|
||||
|
||||
There have been too many changes to list them all, but here are some of the highlights:
|
||||
|
||||
https://wiki.libsdl.org/SDL3/NewFeatures
|
||||
|
||||
Thank you to all the people who have contributed code and feedback to the SDL 3.0 release!
|
||||
-3310
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-62
@@ -1,62 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
def buildWithCMake = project.hasProperty('BUILD_WITH_CMAKE');
|
||||
|
||||
android {
|
||||
namespace = "org.libsdl.app"
|
||||
compileSdkVersion 35
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-21"
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
cmake {
|
||||
arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static"
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
applicationVariants.all { variant ->
|
||||
tasks["merge${variant.name.capitalize()}Assets"]
|
||||
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
|
||||
}
|
||||
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
}
|
||||
externalNativeBuild {
|
||||
if (buildWithCMake) {
|
||||
cmake {
|
||||
path 'jni/CMakeLists.txt'
|
||||
}
|
||||
} else {
|
||||
ndkBuild {
|
||||
path 'jni/Android.mk'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
lint {
|
||||
abortOnError = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(my_app)
|
||||
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
find_package(SDL3 CONFIG)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
find_library(SDL3_LIBRARY NAMES "SDL3")
|
||||
find_path(SDL3_INCLUDE_DIR NAMES "SDL3/SDL.h")
|
||||
add_library(SDL3::SDL3 UNKNOWN IMPORTED)
|
||||
set_property(TARGET SDL3::SDL3 PROPERTY IMPORTED_LOCATION "${SDL3_LIBRARY}")
|
||||
set_property(TARGET SDL3::SDL3 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
message(FATAL_ERROR "Cannot find SDL3.
|
||||
|
||||
Possible ways to fix this:
|
||||
- Use a SDL3 Android aar archive, and configure gradle to use it: prefab is required.
|
||||
- Add add_subdirectory(path/to/SDL) to your CMake script, and make sure a vendored SDL is present there.
|
||||
")
|
||||
endif()
|
||||
|
||||
add_library(main SHARED
|
||||
YourSourceHere.c
|
||||
)
|
||||
target_link_libraries(main PRIVATE SDL3::SDL3)
|
||||
@@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0"
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- OpenGL ES 2.0 -->
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
||||
<!-- Touchscreen support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.usb.host"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Audio recording support -->
|
||||
<!-- if you want to record audio, uncomment this. -->
|
||||
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
|
||||
<!-- <uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Camera support -->
|
||||
<!-- if you want to record video, uncomment this. -->
|
||||
<!--
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
-->
|
||||
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> -->
|
||||
|
||||
<!-- Allow access to the vibrator -->
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<!-- Allow access to Internet -->
|
||||
<!-- if you want to connect to the network or internet, uncomment this. -->
|
||||
<!--
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
-->
|
||||
|
||||
<!-- Create a Java class extending SDLActivity and place it in a
|
||||
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
|
||||
|
||||
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
|
||||
in the XML below.
|
||||
|
||||
An example Java class can be found in README-android.md
|
||||
-->
|
||||
<application android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:hardwareAccelerated="true" >
|
||||
|
||||
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
||||
<meta-data android:name="SDL_ENV.SDL_ANDROID_TRAP_BACK_BUTTON" android:value="0"/>
|
||||
-->
|
||||
|
||||
<activity android:name="SDLActivity"
|
||||
android:label="@string/app_name"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:preferMinimalPostProcessing="true"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- Let Android know that we can handle some USB devices and should receive this event -->
|
||||
<intent-filter>
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||
</intent-filter>
|
||||
<!-- Drop file event -->
|
||||
<!--
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
-->
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
-3836
File diff suppressed because one or more lines are too long
@@ -1,599 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Add source files and headers to Xcode and Visual Studio projects.
|
||||
# THIS IS NOT ROBUST, THIS IS JUST RYAN AVOIDING RUNNING BETWEEN
|
||||
# THREE COMPUTERS AND A BUNCH OF DEVELOPMENT ENVIRONMENTS TO ADD
|
||||
# A STUPID FILE TO THE BUILD.
|
||||
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
|
||||
my %xcode_references = ();
|
||||
sub generate_xcode_id {
|
||||
my @chars = ('0'..'9', 'A'..'F');
|
||||
my $str;
|
||||
|
||||
do {
|
||||
my $len = 16;
|
||||
$str = '0000'; # start and end with '0000' so we know we added it.
|
||||
while ($len--) {
|
||||
$str .= $chars[rand @chars]
|
||||
};
|
||||
$str .= '0000'; # start and end with '0000' so we know we added it.
|
||||
} while (defined($xcode_references{$str}));
|
||||
|
||||
$xcode_references{$str} = 1; # so future calls can't generate this one.
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
sub process_xcode {
|
||||
my $addpath = shift;
|
||||
my $pbxprojfname = shift;
|
||||
my $lineno;
|
||||
|
||||
%xcode_references = ();
|
||||
|
||||
my $addfname = basename($addpath);
|
||||
my $addext = '';
|
||||
if ($addfname =~ /\.(.*?)\Z/) {
|
||||
$addext = $1;
|
||||
}
|
||||
|
||||
my $is_public_header = ($addpath =~ /\Ainclude\/SDL3\//) ? 1 : 0;
|
||||
my $filerefpath = $is_public_header ? "SDL3/$addfname" : $addfname;
|
||||
|
||||
my $srcs_or_headers = '';
|
||||
my $addfiletype = '';
|
||||
|
||||
if ($addext eq 'c') {
|
||||
$srcs_or_headers = 'Sources';
|
||||
$addfiletype = 'sourcecode.c.c';
|
||||
} elsif ($addext eq 'm') {
|
||||
$srcs_or_headers = 'Sources';
|
||||
$addfiletype = 'sourcecode.c.objc';
|
||||
} elsif ($addext eq 'h') {
|
||||
$srcs_or_headers = 'Headers';
|
||||
$addfiletype = 'sourcecode.c.h';
|
||||
} else {
|
||||
die("Unexpected file extension '$addext'\n");
|
||||
}
|
||||
|
||||
my $fh;
|
||||
|
||||
open $fh, '<', $pbxprojfname or die("Failed to open '$pbxprojfname': $!\n");
|
||||
chomp(my @pbxproj = <$fh>);
|
||||
close($fh);
|
||||
|
||||
# build a table of all ids, in case we duplicate one by some miracle.
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
|
||||
# like "F3676F582A7885080091160D /* SDL3.dmg */ = {"
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
$xcode_references{$1} = $2;
|
||||
}
|
||||
}
|
||||
|
||||
# build out of a tree of PBXGroup items.
|
||||
my %pbxgroups = ();
|
||||
my $thispbxgroup;
|
||||
my $pbxgroup_children;
|
||||
my $pbxgroup_state = 0;
|
||||
my $pubheaders_group_hash = '';
|
||||
my $libsrc_group_hash = '';
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
if ($pbxgroup_state == 0) {
|
||||
$pbxgroup_state++ if /\A\/\* Begin PBXGroup section \*\/\Z/;
|
||||
} elsif ($pbxgroup_state == 1) {
|
||||
# like "F3676F582A7885080091160D /* SDL3.dmg */ = {"
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
my %newhash = ();
|
||||
$pbxgroups{$1} = \%newhash;
|
||||
$thispbxgroup = \%newhash;
|
||||
$pubheaders_group_hash = $1 if $2 eq 'Public Headers';
|
||||
$libsrc_group_hash = $1 if $2 eq 'Library Source';
|
||||
$pbxgroup_state++;
|
||||
} elsif (/\A\/\* End PBXGroup section \*\/\Z/) {
|
||||
last;
|
||||
} else {
|
||||
die("Expected pbxgroup obj on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 2) {
|
||||
if (/\A\t\t\tisa \= PBXGroup;\Z/) {
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's isa field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 3) {
|
||||
if (/\A\t\t\tchildren \= \(\Z/) {
|
||||
my %newhash = ();
|
||||
$$thispbxgroup{'children'} = \%newhash;
|
||||
$pbxgroup_children = \%newhash;
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's children field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 4) {
|
||||
if (/\A\t\t\t\t([A-F0-9]{24}) \/\* (.*?) \*\/,\Z/) {
|
||||
$$pbxgroup_children{$1} = $2;
|
||||
} elsif (/\A\t\t\t\);\Z/) {
|
||||
$pbxgroup_state++;
|
||||
} else {
|
||||
die("Expected pbxgroup obj's children element on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} elsif ($pbxgroup_state == 5) {
|
||||
if (/\A\t\t\t(.*?) \= (.*?);\Z/) {
|
||||
$$thispbxgroup{$1} = $2;
|
||||
} elsif (/\A\t\t\};\Z/) {
|
||||
$pbxgroup_state = 1;
|
||||
} else {
|
||||
die("Expected pbxgroup obj field on '$pbxprojfname' line $lineno\n");
|
||||
}
|
||||
} else {
|
||||
die("bug in this script.");
|
||||
}
|
||||
}
|
||||
|
||||
die("Didn't see PBXGroup section in '$pbxprojfname'. Bug?\n") if $pbxgroup_state == 0;
|
||||
die("Didn't see Public Headers PBXGroup in '$pbxprojfname'. Bug?\n") if $pubheaders_group_hash eq '';
|
||||
die("Didn't see Library Source PBXGroup in '$pbxprojfname'. Bug?\n") if $libsrc_group_hash eq '';
|
||||
|
||||
# Some debug log dumping...
|
||||
if (0) {
|
||||
foreach (keys %pbxgroups) {
|
||||
my $k = $_;
|
||||
my $g = $pbxgroups{$k};
|
||||
print("$_:\n");
|
||||
foreach (keys %$g) {
|
||||
print(" $_:\n");
|
||||
if ($_ eq 'children') {
|
||||
my $kids = $$g{$_};
|
||||
foreach (keys %$kids) {
|
||||
print(" $_ -> " . $$kids{$_} . "\n");
|
||||
}
|
||||
} else {
|
||||
print(' ' . $$g{$_} . "\n");
|
||||
}
|
||||
}
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
# Get some unique IDs for our new thing.
|
||||
my $fileref = generate_xcode_id();
|
||||
my $buildfileref = generate_xcode_id();
|
||||
|
||||
|
||||
# Figure out what group to insert this into (or what groups to make)
|
||||
my $add_to_group_fileref = $fileref;
|
||||
my $add_to_group_addfname = $addfname;
|
||||
my $newgrptext = '';
|
||||
my $grphash = '';
|
||||
if ($is_public_header) {
|
||||
$grphash = $pubheaders_group_hash; # done!
|
||||
} else {
|
||||
$grphash = $libsrc_group_hash;
|
||||
my @splitpath = split(/\//, dirname($addpath));
|
||||
if ($splitpath[0] eq 'src') {
|
||||
shift @splitpath;
|
||||
}
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
my $g = $pbxgroups{$grphash};
|
||||
my $kids = $$g{'children'};
|
||||
my $found = 0;
|
||||
foreach (keys %$kids) {
|
||||
my $hash = $_;
|
||||
my $fname = $$kids{$hash};
|
||||
if (uc($fname) eq uc($elem)) {
|
||||
$grphash = $hash;
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
unshift(@splitpath, $elem), last if (not $found);
|
||||
}
|
||||
|
||||
if (@splitpath) { # still elements? We need to build groups.
|
||||
my $newgroupref = generate_xcode_id();
|
||||
|
||||
$add_to_group_fileref = $newgroupref;
|
||||
$add_to_group_addfname = $splitpath[0];
|
||||
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
my $lastelem = @splitpath ? 0 : 1;
|
||||
my $childhash = $lastelem ? $fileref : generate_xcode_id();
|
||||
my $childpath = $lastelem ? $addfname : $splitpath[0];
|
||||
$newgrptext .= "\t\t$newgroupref /* $elem */ = {\n";
|
||||
$newgrptext .= "\t\t\tisa = PBXGroup;\n";
|
||||
$newgrptext .= "\t\t\tchildren = (\n";
|
||||
$newgrptext .= "\t\t\t\t$childhash /* $childpath */,\n";
|
||||
$newgrptext .= "\t\t\t);\n";
|
||||
$newgrptext .= "\t\t\tpath = $elem;\n";
|
||||
$newgrptext .= "\t\t\tsourceTree = \"<group>\";\n";
|
||||
$newgrptext .= "\t\t};\n";
|
||||
$newgroupref = $childhash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $tmpfname = "$pbxprojfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
my $add_to_this_group = 0;
|
||||
$pbxgroup_state = 0;
|
||||
$lineno = 0;
|
||||
foreach (@pbxproj) {
|
||||
$lineno++;
|
||||
if ($pbxgroup_state == 0) {
|
||||
# Drop in new references at the end of their sections...
|
||||
if (/\A\/\* End PBXBuildFile section \*\/\Z/) {
|
||||
print $fh "\t\t$buildfileref /* $addfname in $srcs_or_headers */ = {isa = PBXBuildFile; fileRef = $fileref /* $addfname */;";
|
||||
if ($is_public_header) {
|
||||
print $fh " settings = {ATTRIBUTES = (Public, ); };";
|
||||
}
|
||||
print $fh " };\n";
|
||||
} elsif (/\A\/\* End PBXFileReference section \*\/\Z/) {
|
||||
print $fh "\t\t$fileref /* $addfname */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = $addfiletype; name = $addfname; path = $filerefpath; sourceTree = \"<group>\"; };\n";
|
||||
} elsif (/\A\/\* Begin PBXGroup section \*\/\Z/) {
|
||||
$pbxgroup_state = 1;
|
||||
} elsif (/\A\/\* Begin PBXSourcesBuildPhase section \*\/\Z/) {
|
||||
$pbxgroup_state = 5;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 1) {
|
||||
if (/\A\t\t([A-F0-9]{24}) \/\* (.*?) \*\/ \= \{\Z/) {
|
||||
$pbxgroup_state++;
|
||||
$add_to_this_group = $1 eq $grphash;
|
||||
} elsif (/\A\/\* End PBXGroup section \*\/\Z/) {
|
||||
print $fh $newgrptext;
|
||||
$pbxgroup_state = 0;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 2) {
|
||||
if (/\A\t\t\tchildren \= \(\Z/) {
|
||||
$pbxgroup_state++;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 3) {
|
||||
if (/\A\t\t\t\);\Z/) {
|
||||
if ($add_to_this_group) {
|
||||
print $fh "\t\t\t\t$add_to_group_fileref /* $add_to_group_addfname */,\n";
|
||||
}
|
||||
$pbxgroup_state++;
|
||||
}
|
||||
} elsif ($pbxgroup_state == 4) {
|
||||
if (/\A\t\t\};\Z/) {
|
||||
$add_to_this_group = 0;
|
||||
}
|
||||
$pbxgroup_state = 1;
|
||||
} elsif ($pbxgroup_state == 5) {
|
||||
if (/\A\t\t\t\);\Z/) {
|
||||
if ($srcs_or_headers eq 'Sources') {
|
||||
print $fh "\t\t\t\t$buildfileref /* $addfname in $srcs_or_headers */,\n";
|
||||
}
|
||||
$pbxgroup_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $pbxprojfname);
|
||||
}
|
||||
|
||||
my %visualc_references = ();
|
||||
sub generate_visualc_id { # these are just standard Windows GUIDs.
|
||||
my @chars = ('0'..'9', 'a'..'f');
|
||||
my $str;
|
||||
|
||||
do {
|
||||
my $len = 24;
|
||||
$str = '0000'; # start and end with '0000' so we know we added it.
|
||||
while ($len--) {
|
||||
$str .= $chars[rand @chars]
|
||||
};
|
||||
$str .= '0000'; # start and end with '0000' so we know we added it.
|
||||
$str =~ s/\A(........)(....)(....)(............)\Z/$1-$2-$3-$4/; # add dashes in the appropriate places.
|
||||
} while (defined($visualc_references{$str}));
|
||||
|
||||
$visualc_references{$str} = 1; # so future calls can't generate this one.
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
sub process_visualstudio {
|
||||
my $addpath = shift;
|
||||
my $vcxprojfname = shift;
|
||||
my $lineno;
|
||||
|
||||
%visualc_references = ();
|
||||
|
||||
my $is_public_header = ($addpath =~ /\Ainclude\/SDL3\//) ? 1 : 0;
|
||||
|
||||
my $addfname = basename($addpath);
|
||||
my $addext = '';
|
||||
if ($addfname =~ /\.(.*?)\Z/) {
|
||||
$addext = $1;
|
||||
}
|
||||
|
||||
my $isheader = 0;
|
||||
if ($addext eq 'c') {
|
||||
$isheader = 0;
|
||||
} elsif ($addext eq 'm') {
|
||||
return; # don't add Objective-C files to Visual Studio projects!
|
||||
} elsif ($addext eq 'h') {
|
||||
$isheader = 1;
|
||||
} else {
|
||||
die("Unexpected file extension '$addext'\n");
|
||||
}
|
||||
|
||||
my $fh;
|
||||
|
||||
open $fh, '<', $vcxprojfname or die("Failed to open '$vcxprojfname': $!\n");
|
||||
chomp(my @vcxproj = <$fh>);
|
||||
close($fh);
|
||||
|
||||
my $vcxgroup_state;
|
||||
|
||||
my $rawaddvcxpath = "$addpath";
|
||||
$rawaddvcxpath =~ s/\//\\/g;
|
||||
|
||||
# Figure out relative path from vcxproj file...
|
||||
my $addvcxpath = '';
|
||||
my @subdirs = split(/\//, $vcxprojfname);
|
||||
pop @subdirs;
|
||||
foreach (@subdirs) {
|
||||
$addvcxpath .= "..\\";
|
||||
}
|
||||
$addvcxpath .= $rawaddvcxpath;
|
||||
|
||||
my $prevname = undef;
|
||||
|
||||
my $tmpfname;
|
||||
|
||||
$tmpfname = "$vcxprojfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
my $added = 0;
|
||||
|
||||
$added = 0;
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
$lineno = 0;
|
||||
foreach (@vcxproj) {
|
||||
$lineno++;
|
||||
if ($vcxgroup_state == 0) {
|
||||
if (/\A \<ItemGroup\>\Z/) {
|
||||
$vcxgroup_state = 1;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 1) {
|
||||
if (/\A \<ClInclude .*\Z/) {
|
||||
$vcxgroup_state = 2 if $isheader;
|
||||
} elsif (/\A \<ClCompile .*\Z/) {
|
||||
$vcxgroup_state = 3 if not $isheader;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
}
|
||||
}
|
||||
|
||||
# Don't do elsif, we need to check this line again.
|
||||
if ($vcxgroup_state == 2) {
|
||||
if (/\A <ClInclude Include="(.*?)" \/\>\Z/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
}
|
||||
} elsif ($vcxgroup_state == 3) {
|
||||
if (/\A <ClCompile Include="(.*?)" \/\>\Z/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\" />\n";
|
||||
$vcxgroup_state = 0;
|
||||
$added = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $vcxprojfname);
|
||||
|
||||
my $vcxfiltersfname = "$vcxprojfname.filters";
|
||||
open $fh, '<', $vcxfiltersfname or die("Failed to open '$vcxfiltersfname': $!\n");
|
||||
chomp(my @vcxfilters = <$fh>);
|
||||
close($fh);
|
||||
|
||||
my $newgrptext = '';
|
||||
my $filter = '';
|
||||
if ($is_public_header) {
|
||||
$filter = 'API Headers';
|
||||
} else {
|
||||
$filter = lc(dirname($addpath));
|
||||
$filter =~ s/\Asrc\///; # there's no filter for the base "src/" dir, where SDL.c and friends live.
|
||||
$filter =~ s/\//\\/g;
|
||||
$filter = '' if $filter eq 'src';
|
||||
|
||||
if ($filter ne '') {
|
||||
# see if the filter already exists, otherwise add it.
|
||||
my %existing_filters = ();
|
||||
my $current_filter = '';
|
||||
my $found = 0;
|
||||
foreach (@vcxfilters) {
|
||||
# These lines happen to be unique, so we don't have to parse down to find this section.
|
||||
if (/\A \<Filter Include\="(.*?)"\>\Z/) {
|
||||
$current_filter = lc($1);
|
||||
if ($current_filter eq $filter) {
|
||||
$found = 1;
|
||||
}
|
||||
} elsif (/\A \<UniqueIdentifier\>\{(.*?)\}\<\/UniqueIdentifier\>\Z/) {
|
||||
$visualc_references{$1} = $current_filter; # gather up existing GUIDs to avoid duplicates.
|
||||
$existing_filters{$current_filter} = $1;
|
||||
}
|
||||
}
|
||||
|
||||
if (not $found) { # didn't find it? We need to build filters.
|
||||
my $subpath = '';
|
||||
my @splitpath = split(/\\/, $filter);
|
||||
while (my $elem = shift(@splitpath)) {
|
||||
$subpath .= "\\" if ($subpath ne '');
|
||||
$subpath .= $elem;
|
||||
if (not $existing_filters{$subpath}) {
|
||||
my $newgroupref = generate_visualc_id();
|
||||
$newgrptext .= " <Filter Include=\"$subpath\">\n";
|
||||
$newgrptext .= " <UniqueIdentifier>{$newgroupref}</UniqueIdentifier>\n";
|
||||
$newgrptext .= " </Filter>\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tmpfname = "$vcxfiltersfname.tmp";
|
||||
open $fh, '>', $tmpfname or die("Failed to open '$tmpfname': $!\n");
|
||||
|
||||
$added = 0;
|
||||
$vcxgroup_state = 0;
|
||||
$prevname = undef;
|
||||
$lineno = 0;
|
||||
foreach (@vcxfilters) {
|
||||
$lineno++;
|
||||
|
||||
# We cheat here, because these lines are unique, we don't have to fully parse this file.
|
||||
if ($vcxgroup_state == 0) {
|
||||
if (/\A \<Filter Include\="(.*?)"\>\Z/) {
|
||||
if ($newgrptext ne '') {
|
||||
$vcxgroup_state = 1;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif (/\A \<ClInclude .*\Z/) {
|
||||
if ($isheader) {
|
||||
$vcxgroup_state = 2;
|
||||
$prevname = undef;
|
||||
}
|
||||
} elsif (/\A \<ClCompile .*\Z/) {
|
||||
if (not $isheader) {
|
||||
$vcxgroup_state = 3;
|
||||
$prevname = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Don't do elsif, we need to check this line again.
|
||||
if ($vcxgroup_state == 1) {
|
||||
if (/\A \<\/ItemGroup\>\Z/) {
|
||||
print $fh $newgrptext;
|
||||
$newgrptext = '';
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 2) {
|
||||
if (/\A <ClInclude Include="(.*?)"/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClInclude>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClInclude Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClInclude>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
} elsif ($vcxgroup_state == 3) {
|
||||
if (/\A <ClCompile Include="(.*?)"/) {
|
||||
my $nextname = $1;
|
||||
if ((not $added) && (((not defined $prevname) || (uc($prevname) lt uc($addvcxpath))) && (uc($nextname) gt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClCompile>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$prevname = $nextname;
|
||||
} elsif (/\A \<\/ItemGroup\>\Z/) {
|
||||
if ((not $added) && ((not defined $prevname) || (uc($prevname) lt uc($addvcxpath)))) {
|
||||
print $fh " <ClCompile Include=\"$addvcxpath\"";
|
||||
if ($filter ne '') {
|
||||
print $fh ">\n";
|
||||
print $fh " <Filter>$filter</Filter>\n";
|
||||
print $fh " </ClCompile>\n";
|
||||
} else {
|
||||
print $fh " />\n";
|
||||
}
|
||||
$added = 1;
|
||||
}
|
||||
$vcxgroup_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print $fh "$_\n";
|
||||
}
|
||||
|
||||
close($fh);
|
||||
rename($tmpfname, $vcxfiltersfname);
|
||||
}
|
||||
|
||||
|
||||
# Mainline!
|
||||
|
||||
chdir(dirname($0)); # assumed to be in build-scripts
|
||||
chdir('..'); # head to root of source tree.
|
||||
|
||||
foreach (@ARGV) {
|
||||
s/\A\.\///; # Turn "./path/to/file.txt" into "path/to/file.txt"
|
||||
my $arg = $_;
|
||||
process_xcode($arg, 'Xcode/SDL/SDL.xcodeproj/project.pbxproj');
|
||||
process_visualstudio($arg, 'VisualC/SDL/SDL.vcxproj');
|
||||
process_visualstudio($arg, 'VisualC-GDK/SDL/SDL.vcxproj');
|
||||
}
|
||||
|
||||
print("Done. Please run `git diff` and make sure this looks okay!\n");
|
||||
|
||||
exit(0);
|
||||
|
||||
-1557
File diff suppressed because it is too large
Load Diff
-420
@@ -1,420 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
# arising from the use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any purpose,
|
||||
# including commercial applications, and to alter it and redistribute it
|
||||
# freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you must not
|
||||
# claim that you wrote the original software. If you use this software
|
||||
# in a product, an acknowledgment in the product documentation would be
|
||||
# appreciated but is not required.
|
||||
# 2. Altered source versions must be plainly marked as such, and must not be
|
||||
# misrepresented as being the original software.
|
||||
# 3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use Cwd qw(abs_path);
|
||||
use IPC::Open2;
|
||||
|
||||
my $examples_dir = abs_path(dirname(__FILE__) . "/../examples");
|
||||
my $project = undef;
|
||||
my $emsdk_dir = undef;
|
||||
my $compile_dir = undef;
|
||||
my $cmake_flags = undef;
|
||||
my $output_dir = undef;
|
||||
|
||||
sub usage {
|
||||
die("USAGE: $0 <project_name> <emsdk_dir> <compiler_output_directory> <cmake_flags> <html_output_directory>\n\n");
|
||||
}
|
||||
|
||||
sub do_system {
|
||||
my $cmd = shift;
|
||||
$cmd = "exec /bin/bash -c \"$cmd\"";
|
||||
print("$cmd\n");
|
||||
return system($cmd);
|
||||
}
|
||||
|
||||
sub do_mkdir {
|
||||
my $d = shift;
|
||||
if ( ! -d $d ) {
|
||||
print("mkdir '$d'\n");
|
||||
mkdir($d) or die("Couldn't mkdir('$d'): $!\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub do_copy {
|
||||
my $src = shift;
|
||||
my $dst = shift;
|
||||
print("cp '$src' '$dst'\n");
|
||||
copy($src, $dst) or die("Failed to copy '$src' to '$dst': $!\n");
|
||||
}
|
||||
|
||||
sub build_latest {
|
||||
# Try to build just the latest without re-running cmake, since that is SLOW.
|
||||
print("Building latest version of $project ...\n");
|
||||
if (do_system("EMSDK_QUIET=1 source '$emsdk_dir/emsdk_env.sh' && cd '$compile_dir' && ninja") != 0) {
|
||||
# Build failed? Try nuking the build dir and running CMake from scratch.
|
||||
print("\n\nBuilding latest version of $project FROM SCRATCH ...\n");
|
||||
if (do_system("EMSDK_QUIET=1 source '$emsdk_dir/emsdk_env.sh' && rm -rf '$compile_dir' && mkdir '$compile_dir' && cd '$compile_dir' && emcmake cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel $cmake_flags '$examples_dir/..' && ninja") != 0) {
|
||||
die("Failed to build latest version of $project!\n"); # oh well.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub get_category_description {
|
||||
my $category = shift;
|
||||
my $retval = ucfirst($category);
|
||||
|
||||
if (open(my $fh, '<', "$examples_dir/$category/description.txt")) {
|
||||
$retval = <$fh>;
|
||||
chomp($retval);
|
||||
close($fh);
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
sub get_categories {
|
||||
my @categories = ();
|
||||
|
||||
if (open(my $fh, '<', "$examples_dir/categories.txt")) {
|
||||
while (<$fh>) {
|
||||
chomp;
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
next if $_ eq '';
|
||||
next if /\A\#/;
|
||||
push @categories, $_;
|
||||
}
|
||||
close($fh);
|
||||
} else {
|
||||
opendir(my $dh, $examples_dir) or die("Couldn't opendir '$examples_dir': $!\n");
|
||||
foreach my $dir (sort readdir $dh) {
|
||||
next if ($dir eq '.') || ($dir eq '..'); # obviously skip current and parent entries.
|
||||
next if not -d "$examples_dir/$dir"; # only care about subdirectories.
|
||||
push @categories, $dir;
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
return @categories;
|
||||
}
|
||||
|
||||
sub get_examples_for_category {
|
||||
my $category = shift;
|
||||
|
||||
my @examples = ();
|
||||
|
||||
opendir(my $dh, "$examples_dir/$category") or die("Couldn't opendir '$examples_dir/$category': $!\n");
|
||||
foreach my $dir (sort readdir $dh) {
|
||||
next if ($dir eq '.') || ($dir eq '..'); # obviously skip current and parent entries.
|
||||
next if not -d "$examples_dir/$category/$dir"; # only care about subdirectories.
|
||||
|
||||
push @examples, $dir;
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
return @examples;
|
||||
}
|
||||
|
||||
sub handle_example_dir {
|
||||
my $category = shift;
|
||||
my $example = shift;
|
||||
|
||||
my @files = ();
|
||||
my $files_str = '';
|
||||
opendir(my $dh, "$examples_dir/$category/$example") or die("Couldn't opendir '$examples_dir/$category/$example': $!\n");
|
||||
my $spc = '';
|
||||
while (readdir($dh)) {
|
||||
my $path = "$examples_dir/$category/$example/$_";
|
||||
next if not -f $path; # only care about files.
|
||||
push @files, $path if /\.[ch]\Z/; # add .c and .h files to source code.
|
||||
if (/\.c\Z/) { # only care about .c files for compiling.
|
||||
$files_str .= "$spc$path";
|
||||
$spc = ' ';
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
my $dst = "$output_dir/$category/$example";
|
||||
|
||||
print("Building $category/$example ...\n");
|
||||
|
||||
my $basefname = "$example";
|
||||
$basefname =~ s/\A\d+\-//;
|
||||
$basefname = "$category-$basefname";
|
||||
my $jsfname = "$basefname.js";
|
||||
my $wasmfname = "$basefname.wasm";
|
||||
my $thumbnailfname = 'thumbnail.png';
|
||||
my $onmouseoverfname = 'onmouseover.webp';
|
||||
my $jssrc = "$compile_dir/examples/$jsfname";
|
||||
my $wasmsrc = "$compile_dir/examples/$wasmfname";
|
||||
my $thumbnailsrc = "$examples_dir/$category/$example/$thumbnailfname";
|
||||
my $onmouseoversrc = "$examples_dir/$category/$example/$onmouseoverfname";
|
||||
my $jsdst = "$dst/$jsfname";
|
||||
my $wasmdst = "$dst/$wasmfname";
|
||||
my $thumbnaildst = "$dst/$thumbnailfname";
|
||||
my $onmouseoverdst = "$dst/$onmouseoverfname";
|
||||
|
||||
my $description = '';
|
||||
my $has_paragraph = 0;
|
||||
if (open(my $readmetxth, '<', "$examples_dir/$category/$example/README.txt")) {
|
||||
while (<$readmetxth>) {
|
||||
chomp;
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
if (($_ eq '') && ($description ne '')) {
|
||||
$has_paragraph = 1;
|
||||
} else {
|
||||
if ($has_paragraph) {
|
||||
$description .= "\n<br/>\n<br/>\n";
|
||||
$has_paragraph = 0;
|
||||
}
|
||||
$description .= "$_ ";
|
||||
}
|
||||
}
|
||||
close($readmetxth);
|
||||
$description =~ s/\s+\Z//;
|
||||
}
|
||||
|
||||
do_mkdir($dst);
|
||||
do_copy($jssrc, $jsdst);
|
||||
do_copy($wasmsrc, $wasmdst);
|
||||
do_copy($thumbnailsrc, $thumbnaildst) if ( -f $thumbnailsrc );
|
||||
do_copy($onmouseoversrc, $onmouseoverdst) if ( -f $onmouseoversrc );
|
||||
|
||||
my $highlight_cmd = "highlight '--outdir=$dst' --style-outfile=highlight.css --fragment --enclose-pre --stdout --syntax=c '--plug-in=$examples_dir/highlight-plugin.lua'";
|
||||
print("$highlight_cmd\n");
|
||||
my $pid = open2(my $child_out, my $child_in, $highlight_cmd);
|
||||
|
||||
my $htmlified_source_code = '';
|
||||
foreach (sort(@files)) {
|
||||
my $path = $_;
|
||||
open my $srccode, '<', $path or die("Couldn't open '$path': $!\n");
|
||||
my $fname = "$path";
|
||||
$fname =~ s/\A.*\///;
|
||||
print $child_in "/* $fname ... */\n\n";
|
||||
while (<$srccode>) {
|
||||
print $child_in $_;
|
||||
}
|
||||
print $child_in "\n\n\n";
|
||||
close($srccode);
|
||||
}
|
||||
|
||||
close($child_in);
|
||||
|
||||
while (<$child_out>) {
|
||||
$htmlified_source_code .= $_;
|
||||
}
|
||||
close($child_out);
|
||||
|
||||
waitpid($pid, 0);
|
||||
|
||||
my $other_examples_html = "<ul>";
|
||||
foreach my $example (get_examples_for_category($category)) {
|
||||
$other_examples_html .= "<li><a href='/$project/$category/$example'>$category/$example</a></li>";
|
||||
}
|
||||
$other_examples_html .= "</ul>";
|
||||
|
||||
my $category_description = get_category_description($category);
|
||||
my $preview_image = get_example_thumbnail($project, $category, $example);
|
||||
|
||||
my $html = '';
|
||||
open my $htmltemplate, '<', "$examples_dir/template.html" or die("Couldn't open '$examples_dir/template.html': $!\n");
|
||||
while (<$htmltemplate>) {
|
||||
s/\@project_name\@/$project/g;
|
||||
s/\@category_name\@/$category/g;
|
||||
s/\@category_description\@/$category_description/g;
|
||||
s/\@example_name\@/$example/g;
|
||||
s/\@javascript_file\@/$jsfname/g;
|
||||
s/\@htmlified_source_code\@/$htmlified_source_code/g;
|
||||
s/\@description\@/$description/g;
|
||||
s/\@preview_image\@/$preview_image/g;
|
||||
s/\@other_examples_html\@/$other_examples_html/g;
|
||||
$html .= $_;
|
||||
}
|
||||
close($htmltemplate);
|
||||
|
||||
open my $htmloutput, '>', "$dst/index.html" or die("Couldn't open '$dst/index.html': $!\n");
|
||||
print $htmloutput $html;
|
||||
close($htmloutput);
|
||||
}
|
||||
|
||||
sub get_example_thumbnail {
|
||||
my $project = shift;
|
||||
my $category = shift;
|
||||
my $example = shift;
|
||||
|
||||
if ( -f "$examples_dir/$category/$example/thumbnail.png" ) {
|
||||
return "/$project/$category/$example/thumbnail.png";
|
||||
} elsif ( -f "$examples_dir/$category/thumbnail.png" ) {
|
||||
return "/$project/$category/thumbnail.png";
|
||||
}
|
||||
|
||||
return "/$project/thumbnail.png";
|
||||
}
|
||||
|
||||
sub generate_example_thumbnail {
|
||||
my $project = shift;
|
||||
my $category = shift;
|
||||
my $example = shift;
|
||||
|
||||
my $example_no_num = "$example";
|
||||
$example_no_num =~ s/\A\d+\-//;
|
||||
|
||||
my $example_image_url = get_example_thumbnail($project, $category, $example);
|
||||
|
||||
my $example_mouseover_html = '';
|
||||
if ( -f "$examples_dir/$category/$example/onmouseover.webp" ) {
|
||||
$example_mouseover_html = "onmouseover=\"this.src='/$project/$category/$example/onmouseover.webp'\" onmouseout=\"this.src='$example_image_url';\"";
|
||||
} elsif ( -f "$examples_dir/$category/onmouseover.webp" ) {
|
||||
$example_mouseover_html = "onmouseover=\"this.src='/$project/$category/onmouseover.webp'\" onmouseout=\"this.src='$example_image_url';\"";
|
||||
}
|
||||
|
||||
return "
|
||||
<a href='/$project/$category/$example'>
|
||||
<div>
|
||||
<img src='$example_image_url' $example_mouseover_html />
|
||||
<div>$example_no_num</div>
|
||||
</div>
|
||||
</a>"
|
||||
;
|
||||
}
|
||||
|
||||
sub generate_example_thumbnails_for_category {
|
||||
my $project = shift;
|
||||
my $category = shift;
|
||||
my @examples = get_examples_for_category($category);
|
||||
my $retval = '';
|
||||
foreach my $example (@examples) {
|
||||
$retval .= generate_example_thumbnail($project, $category, $example);
|
||||
}
|
||||
return $retval;
|
||||
}
|
||||
|
||||
sub handle_category_dir {
|
||||
my $category = shift;
|
||||
|
||||
print("Category $category ...\n");
|
||||
|
||||
do_mkdir("$output_dir/$category");
|
||||
|
||||
opendir(my $dh, "$examples_dir/$category") or die("Couldn't opendir '$examples_dir/$category': $!\n");
|
||||
|
||||
while (readdir($dh)) {
|
||||
next if ($_ eq '.') || ($_ eq '..'); # obviously skip current and parent entries.
|
||||
next if not -d "$examples_dir/$category/$_"; # only care about subdirectories.
|
||||
handle_example_dir($category, $_);
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
my $examples_list_html = generate_example_thumbnails_for_category($project, $category);
|
||||
|
||||
my $dst = "$output_dir/$category";
|
||||
|
||||
do_copy("$examples_dir/$category/thumbnail.png", "$dst/thumbnail.png") if ( -f "$examples_dir/$category/thumbnail.png" );
|
||||
do_copy("$examples_dir/$category/onmouseover.webp", "$dst/onmouseover.webp") if ( -f "$examples_dir/$category/onmouseover.webp" );
|
||||
|
||||
my $category_description = get_category_description($category);
|
||||
my $preview_image = "/$project/thumbnail.png";
|
||||
if ( -f "$examples_dir/$category/thumbnail.png" ) {
|
||||
$preview_image = "/$project/$category/thumbnail.png";
|
||||
}
|
||||
|
||||
# write category page
|
||||
my $html = '';
|
||||
open my $htmltemplate, '<', "$examples_dir/template-category.html" or die("Couldn't open '$examples_dir/template-category.html': $!\n");
|
||||
while (<$htmltemplate>) {
|
||||
s/\@project_name\@/$project/g;
|
||||
s/\@category_name\@/$category/g;
|
||||
s/\@category_description\@/$category_description/g;
|
||||
s/\@examples_list_html\@/$examples_list_html/g;
|
||||
s/\@preview_image\@/$preview_image/g;
|
||||
$html .= $_;
|
||||
}
|
||||
close($htmltemplate);
|
||||
|
||||
open my $htmloutput, '>', "$dst/index.html" or die("Couldn't open '$dst/index.html': $!\n");
|
||||
print $htmloutput $html;
|
||||
close($htmloutput);
|
||||
}
|
||||
|
||||
|
||||
# Mainline!
|
||||
|
||||
foreach (@ARGV) {
|
||||
$project = $_, next if not defined $project;
|
||||
$emsdk_dir = $_, next if not defined $emsdk_dir;
|
||||
$compile_dir = $_, next if not defined $compile_dir;
|
||||
$cmake_flags = $_, next if not defined $cmake_flags;
|
||||
$output_dir = $_, next if not defined $output_dir;
|
||||
usage(); # too many arguments.
|
||||
}
|
||||
|
||||
usage() if not defined $output_dir;
|
||||
|
||||
print("Examples dir: $examples_dir\n");
|
||||
print("emsdk dir: $emsdk_dir\n");
|
||||
print("Compile dir: $compile_dir\n");
|
||||
print("CMake flags: $cmake_flags\n");
|
||||
print("Output dir: $output_dir\n");
|
||||
|
||||
do_system("rm -rf '$output_dir'");
|
||||
do_mkdir($output_dir);
|
||||
|
||||
build_latest();
|
||||
|
||||
do_copy("$examples_dir/template.css", "$output_dir/examples.css");
|
||||
do_copy("$examples_dir/template-placeholder.png", "$output_dir/thumbnail.png");
|
||||
|
||||
opendir(my $dh, $examples_dir) or die("Couldn't opendir '$examples_dir': $!\n");
|
||||
|
||||
while (readdir($dh)) {
|
||||
next if ($_ eq '.') || ($_ eq '..'); # obviously skip current and parent entries.
|
||||
next if not -d "$examples_dir/$_"; # only care about subdirectories.
|
||||
# !!! FIXME: this needs to generate a preview page for all the categories.
|
||||
handle_category_dir($_);
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
# write homepage
|
||||
my $homepage_list_html = "";
|
||||
foreach my $category (get_categories()) {
|
||||
my $category_description = get_category_description($category);
|
||||
$homepage_list_html .= "<h2>$category_description</h2>";
|
||||
$homepage_list_html .= "<div class='list'>";
|
||||
$homepage_list_html .= generate_example_thumbnails_for_category($project, $category);
|
||||
$homepage_list_html .= "</div>";
|
||||
}
|
||||
|
||||
my $preview_image = "/$project/thumbnail.png";
|
||||
|
||||
my $dst = "$output_dir/";
|
||||
my $html = '';
|
||||
open my $htmltemplate, '<', "$examples_dir/template-homepage.html" or die("Couldn't open '$examples_dir/template-category.html': $!\n");
|
||||
while (<$htmltemplate>) {
|
||||
s/\@project_name\@/$project/g;
|
||||
s/\@homepage_list_html\@/$homepage_list_html/g;
|
||||
s/\@preview_image\@/$preview_image/g;
|
||||
$html .= $_;
|
||||
}
|
||||
close($htmltemplate);
|
||||
|
||||
open my $htmloutput, '>', "$dst/index.html" or die("Couldn't open '$dst/index.html': $!\n");
|
||||
print $htmloutput $html;
|
||||
close($htmloutput);
|
||||
|
||||
print("All examples built successfully!\n");
|
||||
exit(0); # success!
|
||||
-1627
File diff suppressed because it is too large
Load Diff
-172
@@ -1,172 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import dataclasses
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
SDL_ANDROID_C = ROOT / "src/core/android/SDL_android.c"
|
||||
METHOD_SOURCE_PATHS = (
|
||||
SDL_ANDROID_C,
|
||||
ROOT / "src/hidapi/android/hid.cpp",
|
||||
)
|
||||
JAVA_ROOT = ROOT / "android-project/app/src/main/java"
|
||||
|
||||
|
||||
BASIC_TYPE_SPEC_LUT = {
|
||||
"char": "C",
|
||||
"byte": "B",
|
||||
"short": "S",
|
||||
"int": "I",
|
||||
"long": "J",
|
||||
"float": "F",
|
||||
"double": "D",
|
||||
"void": "V",
|
||||
"boolean": "Z",
|
||||
"Object": "Ljava/lang/Object;",
|
||||
"String": "Ljava/lang/String;",
|
||||
}
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class JniType:
|
||||
typ: str
|
||||
array: int
|
||||
|
||||
|
||||
def java_type_to_jni_spec_internal(type_str: str) -> tuple[int, str]:
|
||||
for basic_type_str, basic_type_spec in BASIC_TYPE_SPEC_LUT.items():
|
||||
if type_str.startswith(basic_type_str):
|
||||
return len(basic_type_str), basic_type_spec
|
||||
raise ValueError(f"Don't know how to convert {repr(type_str)} to its equivalent jni spec")
|
||||
|
||||
|
||||
def java_type_to_jni_spec(type_str: str) -> str:
|
||||
end, type_spec = java_type_to_jni_spec_internal(type_str)
|
||||
suffix_str = type_str[end:]
|
||||
assert(all(c in "[] \t" for c in suffix_str))
|
||||
suffix_str = "".join(filter(lambda v: v in "[]", suffix_str))
|
||||
assert len(suffix_str) % 2 == 0
|
||||
array_spec = "[" * (len(suffix_str) // 2)
|
||||
return array_spec + type_spec
|
||||
|
||||
|
||||
def java_method_to_jni_spec(ret: str, args: list[str]) -> str:
|
||||
return "(" + "".join(java_type_to_jni_spec(a) for a in args) +")" + java_type_to_jni_spec(ret)
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class JniMethodBinding:
|
||||
name: str
|
||||
spec: str
|
||||
|
||||
|
||||
def collect_jni_bindings_from_c() -> dict[str, set[JniMethodBinding]]:
|
||||
bindings = {}
|
||||
|
||||
sdl_android_text = SDL_ANDROID_C.read_text()
|
||||
for m in re.finditer(r"""register_methods\((?:[A-Za-z0-9]+),\s*"(?P<class>[a-zA-Z0-9_/]+)",\s*(?P<table>[a-zA-Z0-9_]+),\s*SDL_arraysize\((?P=table)\)\)""", sdl_android_text):
|
||||
kls = m["class"]
|
||||
table = m["table"]
|
||||
methods = set()
|
||||
in_struct = False
|
||||
for method_source_path in METHOD_SOURCE_PATHS:
|
||||
method_source = method_source_path.read_text()
|
||||
for line in method_source.splitlines(keepends=False):
|
||||
if re.match(f"(static )?JNINativeMethod {table}" + r"\[([0-9]+)?\] = \{", line):
|
||||
in_struct = True
|
||||
continue
|
||||
if in_struct:
|
||||
if re.match(r"\};", line):
|
||||
in_struct = False
|
||||
break
|
||||
n = re.match(r"""\s*\{\s*"(?P<method>[a-zA-Z0-9_]+)"\s*,\s*"(?P<spec>[()A-Za-z0-9_/;[]+)"\s*,\s*(\(void\*\))?(HID|SDL)[_A-Z]*_JAVA_[_A-Z]*INTERFACE[_A-Z]*\((?P=method)\)\s*\},?""", line)
|
||||
assert n, f"'{line}' does not match regex"
|
||||
methods.add(JniMethodBinding(name=n["method"], spec=n["spec"]))
|
||||
continue
|
||||
if methods:
|
||||
break
|
||||
if methods:
|
||||
break
|
||||
assert methods, f"Could not find methods for {kls} (table={table})"
|
||||
|
||||
assert not in_struct
|
||||
|
||||
assert kls not in bindings, f"{kls} must be unique in C sources"
|
||||
bindings[kls] = methods
|
||||
return bindings
|
||||
|
||||
def collect_jni_bindings_from_java() -> dict[str, set[JniMethodBinding]]:
|
||||
bindings = {}
|
||||
|
||||
for root, _, files in os.walk(JAVA_ROOT):
|
||||
for file in files:
|
||||
file_path = pathlib.Path(root) / file
|
||||
java_text = file_path.read_text()
|
||||
methods = set()
|
||||
for m in re.finditer(r"(?:(?:public|private)\s+)?(?:static\s+)?native\s+(?P<ret>[A-Za-z0-9_]+)\s+(?P<method>[a-zA-Z0-9_]+)\s*\(\s*(?P<args>[^)]*)\);", java_text):
|
||||
name = m["method"]
|
||||
ret = m["ret"]
|
||||
args = []
|
||||
args_str = m["args"].strip()
|
||||
if args_str:
|
||||
for a_s in args_str.split(","):
|
||||
atype_str, _ = a_s.strip().rsplit(" ")
|
||||
args.append(atype_str.strip())
|
||||
|
||||
spec = java_method_to_jni_spec(ret=ret, args=args)
|
||||
methods.add(JniMethodBinding(name=name, spec=spec))
|
||||
if methods:
|
||||
relative_java_path = file_path.relative_to(JAVA_ROOT)
|
||||
relative_java_path_without_suffix = relative_java_path.with_suffix("")
|
||||
kls = "/".join(relative_java_path_without_suffix.parts)
|
||||
assert kls not in bindings, f"{kls} must be unique in JAVA sources"
|
||||
bindings[kls] = methods
|
||||
return bindings
|
||||
|
||||
|
||||
def print_error(*args):
|
||||
print("ERROR:", *args)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Verify Android JNI bindings")
|
||||
args = parser.parse_args()
|
||||
|
||||
bindings_from_c = collect_jni_bindings_from_c()
|
||||
bindings_from_java = collect_jni_bindings_from_java()
|
||||
|
||||
all_ok = bindings_from_c == bindings_from_java
|
||||
if all_ok:
|
||||
print("OK")
|
||||
else:
|
||||
print("NOT OK")
|
||||
kls_c = set(bindings_from_c.keys())
|
||||
kls_java = set(bindings_from_java.keys())
|
||||
if kls_c != kls_java:
|
||||
only_c = kls_c - kls_java
|
||||
for c in only_c:
|
||||
print_error(f"Missing class in JAVA sources: {c}")
|
||||
only_java = kls_java - kls_c
|
||||
for c in only_java:
|
||||
print_error(f"Missing class in C sources: {c}")
|
||||
|
||||
klasses = kls_c.union(kls_java)
|
||||
for kls in klasses:
|
||||
m_c = bindings_from_c.get(kls)
|
||||
m_j = bindings_from_java.get(kls)
|
||||
if m_c and m_j and m_c != m_j:
|
||||
m_only_c = m_c - m_j
|
||||
for c in m_only_c:
|
||||
print_error(f"{kls}: Binding only in C source: {c.name} {c.spec}")
|
||||
m_only_j = m_j - m_c
|
||||
for c in m_only_j:
|
||||
print_error(f"{kls}: Binding only in JAVA source: {c.name} {c.spec}")
|
||||
|
||||
return 0 if all_ok else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-262
@@ -1,262 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
# arising from the use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any purpose,
|
||||
# including commercial applications, and to alter it and redistribute it
|
||||
# freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you must not
|
||||
# claim that you wrote the original software. If you use this software
|
||||
# in a product, an acknowledgment in the product documentation would be
|
||||
# appreciated but is not required.
|
||||
# 2. Altered source versions must be plainly marked as such, and must not be
|
||||
# misrepresented as being the original software.
|
||||
# 3. This notice may not be removed or altered from any source distribution.
|
||||
#
|
||||
# This script detects use of stdlib function in SDL code
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
SDL_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
|
||||
STDLIB_SYMBOLS = [
|
||||
'abs',
|
||||
'acos',
|
||||
'acosf',
|
||||
'asin',
|
||||
'asinf',
|
||||
'asprintf',
|
||||
'atan',
|
||||
'atan2',
|
||||
'atan2f',
|
||||
'atanf',
|
||||
'atof',
|
||||
'atoi',
|
||||
'bsearch',
|
||||
'calloc',
|
||||
'ceil',
|
||||
'ceilf',
|
||||
'copysign',
|
||||
'copysignf',
|
||||
'cos',
|
||||
'cosf',
|
||||
'crc32',
|
||||
'exp',
|
||||
'expf',
|
||||
'fabs',
|
||||
'fabsf',
|
||||
'floor',
|
||||
'floorf',
|
||||
'fmod',
|
||||
'fmodf',
|
||||
'free',
|
||||
'getenv',
|
||||
'isalnum',
|
||||
'isalpha',
|
||||
'isblank',
|
||||
'iscntrl',
|
||||
'isdigit',
|
||||
'isgraph',
|
||||
'islower',
|
||||
'isprint',
|
||||
'ispunct',
|
||||
'isspace',
|
||||
'isupper',
|
||||
'isxdigit',
|
||||
'itoa',
|
||||
'lltoa',
|
||||
'log10',
|
||||
'log10f',
|
||||
'logf',
|
||||
'lround',
|
||||
'lroundf',
|
||||
'ltoa',
|
||||
'malloc',
|
||||
'memalign',
|
||||
'memcmp',
|
||||
'memcpy',
|
||||
'memcpy4',
|
||||
'memmove',
|
||||
'memset',
|
||||
'pow',
|
||||
'powf',
|
||||
'qsort',
|
||||
'qsort_r',
|
||||
'qsort_s',
|
||||
'realloc',
|
||||
'round',
|
||||
'roundf',
|
||||
'scalbn',
|
||||
'scalbnf',
|
||||
'setenv',
|
||||
'sin',
|
||||
'sinf',
|
||||
'snprintf',
|
||||
'sqrt',
|
||||
'sqrtf',
|
||||
'sscanf',
|
||||
'strcasecmp',
|
||||
'strchr',
|
||||
'strcmp',
|
||||
'strdup',
|
||||
'strlcat',
|
||||
'strlcpy',
|
||||
'strlen',
|
||||
'strlwr',
|
||||
'strncasecmp',
|
||||
'strncmp',
|
||||
'strrchr',
|
||||
'strrev',
|
||||
'strstr',
|
||||
'strtod',
|
||||
'strtokr',
|
||||
'strtol',
|
||||
'strtoll',
|
||||
'strtoul',
|
||||
'strupr',
|
||||
'tan',
|
||||
'tanf',
|
||||
'tolower',
|
||||
'toupper',
|
||||
'trunc',
|
||||
'truncf',
|
||||
'uitoa',
|
||||
'ulltoa',
|
||||
'ultoa',
|
||||
'utf8strlcpy',
|
||||
'utf8strlen',
|
||||
'vasprintf',
|
||||
'vsnprintf',
|
||||
'vsscanf',
|
||||
'wcscasecmp',
|
||||
'wcscmp',
|
||||
'wcsdup',
|
||||
'wcslcat',
|
||||
'wcslcpy',
|
||||
'wcslen',
|
||||
'wcsncasecmp',
|
||||
'wcsncmp',
|
||||
'wcsstr',
|
||||
]
|
||||
RE_STDLIB_SYMBOL = re.compile(rf"\b(?P<symbol>{'|'.join(STDLIB_SYMBOLS)})\b\(")
|
||||
|
||||
|
||||
def find_symbols_in_file(file: pathlib.Path) -> int:
|
||||
match_count = 0
|
||||
|
||||
allowed_extensions = [ ".c", ".cpp", ".m", ".h", ".hpp", ".cc" ]
|
||||
|
||||
excluded_paths = [
|
||||
"src/stdlib",
|
||||
"src/libm",
|
||||
"src/hidapi",
|
||||
"src/video/khronos",
|
||||
"src/video/stb_image.h",
|
||||
"include/SDL3",
|
||||
"build-scripts/gen_audio_resampler_filter.c",
|
||||
"build-scripts/gen_audio_channel_conversion.c",
|
||||
"test/win32/sdlprocdump.c",
|
||||
]
|
||||
|
||||
filename = pathlib.Path(file)
|
||||
|
||||
for ep in excluded_paths:
|
||||
if ep in filename.as_posix():
|
||||
# skip
|
||||
return 0
|
||||
|
||||
if filename.suffix not in allowed_extensions:
|
||||
# skip
|
||||
return 0
|
||||
|
||||
# print("Parse %s" % file)
|
||||
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
parsing_comment = False
|
||||
for line_i, original_line in enumerate(rfp, start=1):
|
||||
line = original_line.strip()
|
||||
|
||||
line_comment = ""
|
||||
|
||||
# Get the comment block /* ... */ across several lines
|
||||
while True:
|
||||
if parsing_comment:
|
||||
pos_end_comment = line.find("*/")
|
||||
if pos_end_comment >= 0:
|
||||
line = line[pos_end_comment+2:]
|
||||
parsing_comment = False
|
||||
else:
|
||||
break
|
||||
else:
|
||||
pos_start_comment = line.find("/*")
|
||||
if pos_start_comment >= 0:
|
||||
pos_end_comment = line.find("*/", pos_start_comment+2)
|
||||
if pos_end_comment >= 0:
|
||||
line_comment += line[pos_start_comment:pos_end_comment+2]
|
||||
line = line[:pos_start_comment] + line[pos_end_comment+2:]
|
||||
else:
|
||||
line_comment += line[pos_start_comment:]
|
||||
line = line[:pos_start_comment]
|
||||
parsing_comment = True
|
||||
break
|
||||
else:
|
||||
break
|
||||
if parsing_comment:
|
||||
continue
|
||||
pos_line_comment = line.find("//")
|
||||
if pos_line_comment >= 0:
|
||||
line_comment += line[pos_line_comment:]
|
||||
line = line[:pos_line_comment]
|
||||
|
||||
if m := RE_STDLIB_SYMBOL.match(line):
|
||||
override_string = f"This should NOT be SDL_{m['symbol']}()"
|
||||
if override_string not in line_comment:
|
||||
print(f"{filename}:{line_i}")
|
||||
print(f" {line}")
|
||||
print(f"")
|
||||
match_count += 1
|
||||
|
||||
except UnicodeDecodeError:
|
||||
print(f"{file} is not text, skipping", file=sys.stderr)
|
||||
|
||||
return match_count
|
||||
|
||||
def find_symbols_in_dir(path: pathlib.Path) -> int:
|
||||
match_count = 0
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
match_count += find_symbols_in_dir(entry)
|
||||
else:
|
||||
match_count += find_symbols_in_file(entry)
|
||||
return match_count
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars="@")
|
||||
parser.add_argument("path", default=SDL_ROOT, nargs="?", type=pathlib.Path, help="Path to look for stdlib symbols")
|
||||
args = parser.parse_args()
|
||||
|
||||
print(f"Looking for stdlib usage in {args.path}...")
|
||||
|
||||
match_count = find_symbols_in_dir(args.path)
|
||||
|
||||
if match_count:
|
||||
print("If the stdlib usage is intentional, add a '// This should NOT be SDL_<symbol>()' line comment.")
|
||||
print("")
|
||||
print("NOT OK")
|
||||
else:
|
||||
print("OK")
|
||||
return 1 if match_count else 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -1,18 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86)
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++)
|
||||
find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++)
|
||||
find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
|
||||
endif()
|
||||
@@ -1,14 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME QNX)
|
||||
|
||||
set(arch gcc_ntoaarch64le)
|
||||
|
||||
set(CMAKE_C_COMPILER qcc)
|
||||
set(CMAKE_C_COMPILER_TARGET ${arch})
|
||||
set(CMAKE_CXX_COMPILER q++)
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${arch})
|
||||
|
||||
set(CMAKE_SYSROOT $ENV{QNX_TARGET})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -1,14 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME QNX)
|
||||
|
||||
set(arch gcc_ntox86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER qcc)
|
||||
set(CMAKE_C_COMPILER_TARGET ${arch})
|
||||
set(CMAKE_CXX_COMPILER q++)
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${arch})
|
||||
|
||||
set(CMAKE_SYSROOT $ENV{QNX_TARGET})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -1,241 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
from argparse import ArgumentParser
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
|
||||
SDL_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
def extract_sdl_version() -> str:
|
||||
"""
|
||||
Extract SDL version from SDL3/SDL_version.h
|
||||
"""
|
||||
|
||||
with open(SDL_ROOT / "include/SDL3/SDL_version.h") as f:
|
||||
data = f.read()
|
||||
|
||||
major = int(next(re.finditer(r"#define\s+SDL_MAJOR_VERSION\s+([0-9]+)", data)).group(1))
|
||||
minor = int(next(re.finditer(r"#define\s+SDL_MINOR_VERSION\s+([0-9]+)", data)).group(1))
|
||||
micro = int(next(re.finditer(r"#define\s+SDL_MICRO_VERSION\s+([0-9]+)", data)).group(1))
|
||||
return f"{major}.{minor}.{micro}"
|
||||
|
||||
def replace_in_file(path: Path, regex_what: str, replace_with: str) -> None:
|
||||
with path.open("r") as f:
|
||||
data = f.read()
|
||||
|
||||
new_data, count = re.subn(regex_what, replace_with, data)
|
||||
|
||||
assert count > 0, f"\"{regex_what}\" did not match anything in \"{path}\""
|
||||
|
||||
with open(path, "w") as f:
|
||||
f.write(new_data)
|
||||
|
||||
|
||||
def android_mk_use_prefab(path: Path) -> None:
|
||||
"""
|
||||
Replace relative SDL inclusion with dependency on prefab package
|
||||
"""
|
||||
|
||||
with path.open() as f:
|
||||
data = "".join(line for line in f.readlines() if "# SDL" not in line)
|
||||
|
||||
data, _ = re.subn("[\n]{3,}", "\n\n", data)
|
||||
|
||||
data, count = re.subn(r"(LOCAL_SHARED_LIBRARIES\s*:=\s*SDL3)", "LOCAL_SHARED_LIBRARIES := SDL3 SDL3-Headers", data)
|
||||
assert count == 1, f"Must have injected SDL3-Headers in {path} exactly once"
|
||||
|
||||
newdata = data + textwrap.dedent("""
|
||||
# https://google.github.io/prefab/build-systems.html
|
||||
|
||||
# Add the prefab modules to the import path.
|
||||
$(call import-add-path,/out)
|
||||
|
||||
# Import SDL3 so we can depend on it.
|
||||
$(call import-module,prefab/SDL3)
|
||||
""")
|
||||
|
||||
with path.open("w") as f:
|
||||
f.write(newdata)
|
||||
|
||||
|
||||
def cmake_mk_no_sdl(path: Path) -> None:
|
||||
"""
|
||||
Don't add the source directories of SDL/SDL_image/SDL_mixer/...
|
||||
"""
|
||||
|
||||
with path.open() as f:
|
||||
lines = f.readlines()
|
||||
|
||||
newlines: list[str] = []
|
||||
for line in lines:
|
||||
if "add_subdirectory(SDL" in line:
|
||||
while newlines[-1].startswith("#"):
|
||||
newlines = newlines[:-1]
|
||||
continue
|
||||
newlines.append(line)
|
||||
|
||||
newdata, _ = re.subn("[\n]{3,}", "\n\n", "".join(newlines))
|
||||
|
||||
with path.open("w") as f:
|
||||
f.write(newdata)
|
||||
|
||||
|
||||
def gradle_add_prefab_and_aar(path: Path, aar: str) -> None:
|
||||
with path.open() as f:
|
||||
data = f.read()
|
||||
|
||||
data, count = re.subn("android {", textwrap.dedent("""
|
||||
android {
|
||||
buildFeatures {
|
||||
prefab true
|
||||
}"""), data)
|
||||
assert count == 1
|
||||
|
||||
data, count = re.subn("dependencies {", textwrap.dedent(f"""
|
||||
dependencies {{
|
||||
implementation files('libs/{aar}')"""), data)
|
||||
assert count == 1
|
||||
|
||||
with path.open("w") as f:
|
||||
f.write(data)
|
||||
|
||||
|
||||
def gradle_add_package_name(path: Path, package_name: str) -> None:
|
||||
with path.open() as f:
|
||||
data = f.read()
|
||||
|
||||
data, count = re.subn("org.libsdl.app", package_name, data)
|
||||
assert count >= 1
|
||||
|
||||
with path.open("w") as f:
|
||||
f.write(data)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
description = "Create a simple Android gradle project from input sources."
|
||||
epilog = textwrap.dedent("""\
|
||||
You need to manually copy a prebuilt SDL3 Android archive into the project tree when using the aar variant.
|
||||
|
||||
Any changes you have done to the sources in the Android project will be lost
|
||||
""")
|
||||
parser = ArgumentParser(description=description, epilog=epilog, allow_abbrev=False)
|
||||
parser.add_argument("package_name", metavar="PACKAGENAME", help="Android package name (e.g. com.yourcompany.yourapp)")
|
||||
parser.add_argument("sources", metavar="SOURCE", nargs="*", help="Source code of your application. The files are copied to the output directory.")
|
||||
parser.add_argument("--variant", choices=["copy", "symlink", "aar"], default="copy", help="Choose variant of SDL project (copy: copy SDL sources, symlink: symlink SDL sources, aar: use Android aar archive)")
|
||||
parser.add_argument("--output", "-o", default=SDL_ROOT / "build", type=Path, help="Location where to store the Android project")
|
||||
parser.add_argument("--version", default=None, help="SDL3 version to use as aar dependency (only used for aar variant)")
|
||||
|
||||
args = parser.parse_args()
|
||||
if not args.sources:
|
||||
print("Reading source file paths from stdin (press CTRL+D to stop)")
|
||||
args.sources = [path for path in sys.stdin.read().strip().split() if path]
|
||||
if not args.sources:
|
||||
parser.error("No sources passed")
|
||||
|
||||
if not os.getenv("ANDROID_HOME"):
|
||||
print("WARNING: ANDROID_HOME environment variable not set", file=sys.stderr)
|
||||
if not os.getenv("ANDROID_NDK_HOME"):
|
||||
print("WARNING: ANDROID_NDK_HOME environment variable not set", file=sys.stderr)
|
||||
|
||||
args.sources = [Path(src) for src in args.sources]
|
||||
|
||||
build_path = args.output / args.package_name
|
||||
|
||||
# Remove the destination folder
|
||||
shutil.rmtree(build_path, ignore_errors=True)
|
||||
|
||||
# Copy the Android project
|
||||
shutil.copytree(SDL_ROOT / "android-project", build_path)
|
||||
|
||||
# Add the source files to the ndk-build and cmake projects
|
||||
replace_in_file(build_path / "app/jni/src/Android.mk", r"YourSourceHere\.c", " \\\n ".join(src.name for src in args.sources))
|
||||
replace_in_file(build_path / "app/jni/src/CMakeLists.txt", r"YourSourceHere\.c", "\n ".join(src.name for src in args.sources))
|
||||
|
||||
# Remove placeholder source "YourSourceHere.c"
|
||||
(build_path / "app/jni/src/YourSourceHere.c").unlink()
|
||||
|
||||
# Copy sources to output folder
|
||||
for src in args.sources:
|
||||
if not src.is_file():
|
||||
parser.error(f"\"{src}\" is not a file")
|
||||
shutil.copyfile(src, build_path / "app/jni/src" / src.name)
|
||||
|
||||
sdl_project_files = (
|
||||
SDL_ROOT / "src",
|
||||
SDL_ROOT / "include",
|
||||
SDL_ROOT / "LICENSE.txt",
|
||||
SDL_ROOT / "README.md",
|
||||
SDL_ROOT / "Android.mk",
|
||||
SDL_ROOT / "CMakeLists.txt",
|
||||
SDL_ROOT / "cmake",
|
||||
)
|
||||
if args.variant == "copy":
|
||||
(build_path / "app/jni/SDL").mkdir(exist_ok=True, parents=True)
|
||||
for sdl_project_file in sdl_project_files:
|
||||
# Copy SDL project files and directories
|
||||
if sdl_project_file.is_dir():
|
||||
shutil.copytree(sdl_project_file, build_path / "app/jni/SDL" / sdl_project_file.name)
|
||||
elif sdl_project_file.is_file():
|
||||
shutil.copyfile(sdl_project_file, build_path / "app/jni/SDL" / sdl_project_file.name)
|
||||
elif args.variant == "symlink":
|
||||
(build_path / "app/jni/SDL").mkdir(exist_ok=True, parents=True)
|
||||
# Create symbolic links for all SDL project files
|
||||
for sdl_project_file in sdl_project_files:
|
||||
os.symlink(sdl_project_file, build_path / "app/jni/SDL" / sdl_project_file.name)
|
||||
elif args.variant == "aar":
|
||||
if not args.version:
|
||||
args.version = extract_sdl_version()
|
||||
|
||||
major = args.version.split(".")[0]
|
||||
aar = f"SDL{ major }-{ args.version }.aar"
|
||||
|
||||
# Remove all SDL java classes
|
||||
shutil.rmtree(build_path / "app/src/main/java")
|
||||
|
||||
# Use prefab to generate include-able files
|
||||
gradle_add_prefab_and_aar(build_path / "app/build.gradle", aar=aar)
|
||||
|
||||
# Make sure to use the prefab-generated files and not SDL sources
|
||||
android_mk_use_prefab(build_path / "app/jni/src/Android.mk")
|
||||
cmake_mk_no_sdl(build_path / "app/jni/CMakeLists.txt")
|
||||
|
||||
aar_libs_folder = build_path / "app/libs"
|
||||
aar_libs_folder.mkdir(parents=True)
|
||||
with (aar_libs_folder / "copy-sdl-aars-here.txt").open("w") as f:
|
||||
f.write(f"Copy {aar} to this folder.\n")
|
||||
|
||||
print(f"WARNING: copy { aar } to { aar_libs_folder }", file=sys.stderr)
|
||||
|
||||
# Add the package name to build.gradle
|
||||
gradle_add_package_name(build_path / "app/build.gradle", args.package_name)
|
||||
|
||||
# Create entry activity, subclassing SDLActivity
|
||||
activity = args.package_name[args.package_name.rfind(".") + 1:].capitalize() + "Activity"
|
||||
activity_path = build_path / "app/src/main/java" / args.package_name.replace(".", "/") / f"{activity}.java"
|
||||
activity_path.parent.mkdir(parents=True)
|
||||
with activity_path.open("w") as f:
|
||||
f.write(textwrap.dedent(f"""
|
||||
package {args.package_name};
|
||||
|
||||
import org.libsdl.app.SDLActivity;
|
||||
|
||||
public class {activity} extends SDLActivity
|
||||
{{
|
||||
}}
|
||||
"""))
|
||||
|
||||
# Add the just-generated activity to the Android manifest
|
||||
replace_in_file(build_path / "app/src/main/AndroidManifest.xml", 'name="SDLActivity"', f'name="{activity}"')
|
||||
|
||||
# Update project and build
|
||||
print("To build and install to a device for testing, run the following:")
|
||||
print(f"cd {build_path}")
|
||||
print("./gradlew installDebug")
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def determine_remote() -> str:
|
||||
text = (ROOT / "build-scripts/release-info.json").read_text()
|
||||
release_info = json.loads(text)
|
||||
if "remote" in release_info:
|
||||
return release_info["remote"]
|
||||
project_with_version = release_info["name"]
|
||||
project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
|
||||
return f"libsdl-org/{project}"
|
||||
|
||||
|
||||
def main():
|
||||
default_remote = determine_remote()
|
||||
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml")
|
||||
parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})")
|
||||
parser.add_argument("--commit", help=f"Input 'commit' of release.yml (default is the hash of the ref)")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.commit is None:
|
||||
args.commit = subprocess.check_output(["git", "rev-parse", args.ref], cwd=ROOT, text=True).strip()
|
||||
|
||||
|
||||
print(f"Running release.yml workflow:")
|
||||
print(f" remote = {args.remote}")
|
||||
print(f" ref = {args.ref}")
|
||||
print(f" commit = {args.commit}")
|
||||
|
||||
subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-169
@@ -1,169 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
use Cwd qw(abs_path);
|
||||
|
||||
my $wikipath = undef;
|
||||
foreach (@ARGV) {
|
||||
$wikipath = abs_path($_), next if not defined $wikipath;
|
||||
}
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
chdir('..');
|
||||
|
||||
my %fulltags = ();
|
||||
my @unsorted_releases = ();
|
||||
open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
|
||||
|
||||
while (<PIPEFH>) {
|
||||
chomp;
|
||||
my $fulltag = $_;
|
||||
if ($fulltag =~ /\A(prerelease|preview|release)\-(\d+)\.(\d+)\.(\d+)\Z/) {
|
||||
# Ignore anything that isn't a x.y.0 release.
|
||||
# Make sure new APIs are assigned to the next minor version and ignore the patch versions, but we'll make an except for the prereleases.
|
||||
my $release_type = $1;
|
||||
my $major = int($2);
|
||||
my $minor = int($3);
|
||||
my $patch = int($4);
|
||||
next if ($major != 3); # Ignore anything that isn't an SDL3 release.
|
||||
next if ($patch != 0) && ($minor >= 2); # Ignore anything that is a patch release (unless it was between the preview release and the official release).
|
||||
|
||||
# Consider this release version.
|
||||
my $ver = "${major}.${minor}.${patch}";
|
||||
push @unsorted_releases, $ver;
|
||||
$fulltags{$ver} = $fulltag;
|
||||
}
|
||||
}
|
||||
close(PIPEFH);
|
||||
|
||||
#print("\n\nUNSORTED\n");
|
||||
#foreach (@unsorted_releases) {
|
||||
# print "$_\n";
|
||||
#}
|
||||
|
||||
my @releases = sort {
|
||||
my @asplit = split /\./, $a;
|
||||
my @bsplit = split /\./, $b;
|
||||
my $rc;
|
||||
for (my $i = 0; $i < scalar(@asplit); $i++) {
|
||||
return 1 if (scalar(@bsplit) <= $i); # a is "2.0.1" and b is "2.0", or whatever.
|
||||
my $aseg = $asplit[$i];
|
||||
my $bseg = $bsplit[$i];
|
||||
$rc = int($aseg) <=> int($bseg);
|
||||
return $rc if ($rc != 0); # found the difference.
|
||||
}
|
||||
return 0; # still here? They matched completely?!
|
||||
} @unsorted_releases;
|
||||
|
||||
my $current_release = $releases[-1];
|
||||
my $next_release;
|
||||
|
||||
if (scalar(@releases) > 0) {
|
||||
# this happens to work for how SDL versions things at the moment.
|
||||
$current_release = $releases[-1];
|
||||
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
# if we're still in the 3.1.x prereleases, call the "next release" 3.2.0 even if we do more prereleases.
|
||||
if (($current_release_segments[0] == '3') && ($current_release_segments[1] == '1')) {
|
||||
$next_release = '3.2.0';
|
||||
} else {
|
||||
@current_release_segments[1] = '' . (int($current_release_segments[1]) + 2);
|
||||
$next_release = join('.', @current_release_segments);
|
||||
}
|
||||
}
|
||||
|
||||
#print("\n\nSORTED\n");
|
||||
#foreach (@releases) {
|
||||
# print "$_\n";
|
||||
#}
|
||||
#print("\nCURRENT RELEASE: $current_release\n");
|
||||
#print("NEXT RELEASE: $next_release\n\n");
|
||||
|
||||
push @releases, 'HEAD';
|
||||
$fulltags{'HEAD'} = 'HEAD';
|
||||
|
||||
my %funcs = ();
|
||||
foreach my $release (@releases) {
|
||||
#print("Checking $release...\n");
|
||||
my $tag = $fulltags{$release};
|
||||
my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h";
|
||||
|
||||
if ($release =~ /\A3\.[01]\.\d+\Z/) { # make everything up to the first SDL3 official release look like 3.2.0.
|
||||
$release = '3.2.0';
|
||||
}
|
||||
|
||||
open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n";
|
||||
while (<PIPEFH>) {
|
||||
chomp;
|
||||
if (/\A\#define\s+(SDL_.*?)\s+SDL_.*?_REAL\Z/) {
|
||||
my $fn = $1;
|
||||
$funcs{$fn} = $release if not defined $funcs{$fn};
|
||||
}
|
||||
}
|
||||
close(PIPEFH);
|
||||
}
|
||||
|
||||
if (not defined $wikipath) {
|
||||
foreach my $release (@releases) {
|
||||
foreach my $fn (sort keys %funcs) {
|
||||
print("$fn: $funcs{$fn}\n") if $funcs{$fn} eq $release;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (defined $wikipath) {
|
||||
chdir($wikipath);
|
||||
foreach my $fn (keys %funcs) {
|
||||
next if $fn eq 'SDL_ThreadID'; # this was a function early on (it's now called SDL_GetThreadID), but now it's a datatype (which originally had a different capitalization).
|
||||
my $revision = $funcs{$fn};
|
||||
$revision = $next_release if $revision eq 'HEAD';
|
||||
my $fname = "$fn.md";
|
||||
if ( ! -f $fname ) {
|
||||
#print STDERR "No such file: $fname\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my @lines = ();
|
||||
open(FH, '<', $fname) or die("Can't open $fname for read: $!\n");
|
||||
my $added = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if ((/\A\-\-\-\-/) && (!$added)) {
|
||||
push @lines, "## Version";
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
$added = 1;
|
||||
}
|
||||
push @lines, $_;
|
||||
next if not /\A\#\#\s+Version/;
|
||||
$added = 1;
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
next if not (/\A\#\#\s+/ || /\A\-\-\-\-/);
|
||||
push @lines, $_;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
|
||||
if (!$added) {
|
||||
push @lines, "## Version";
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
}
|
||||
|
||||
open(FH, '>', $fname) or die("Can't open $fname for write: $!\n");
|
||||
foreach (@lines) {
|
||||
print FH "$_\n";
|
||||
}
|
||||
close(FH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
|
||||
Built with:
|
||||
|
||||
gcc -o genchancvt build-scripts/gen_audio_channel_conversion.c -lm && ./genchancvt > src/audio/SDL_audio_channel_converters.h
|
||||
|
||||
*/
|
||||
|
||||
#define NUM_CHANNELS 8
|
||||
|
||||
static const char *layout_names[NUM_CHANNELS] = {
|
||||
"Mono", "Stereo", "2.1", "Quad", "4.1", "5.1", "6.1", "7.1"
|
||||
};
|
||||
|
||||
static const char *channel_names[NUM_CHANNELS][NUM_CHANNELS] = {
|
||||
/* mono */ { "FC" },
|
||||
/* stereo */ { "FL", "FR" },
|
||||
/* 2.1 */ { "FL", "FR", "LFE" },
|
||||
/* quad */ { "FL", "FR", "BL", "BR" },
|
||||
/* 4.1 */ { "FL", "FR", "LFE", "BL", "BR" },
|
||||
/* 5.1 */ { "FL", "FR", "FC", "LFE", "BL", "BR" },
|
||||
/* 6.1 */ { "FL", "FR", "FC", "LFE", "BC", "SL", "SR" },
|
||||
/* 7.1 */ { "FL", "FR", "FC", "LFE", "BL", "BR", "SL", "SR" },
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* This table is from FAudio:
|
||||
*
|
||||
* https://raw.githubusercontent.com/FNA-XNA/FAudio/master/src/matrix_defaults.inl
|
||||
*/
|
||||
static const float channel_conversion_matrix[8][8][64] = {
|
||||
{
|
||||
/* 1 x 1 */
|
||||
{ 1.000000000f },
|
||||
/* 1 x 2 */
|
||||
{ 1.000000000f, 1.000000000f },
|
||||
/* 1 x 3 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f },
|
||||
/* 1 x 4 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 1 x 5 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 1 x 6 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 1 x 7 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 1 x 8 */
|
||||
{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 2 x 1 */
|
||||
{ 0.500000000f, 0.500000000f },
|
||||
/* 2 x 2 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 2 x 3 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 2 x 4 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 2 x 5 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 2 x 6 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 2 x 7 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 2 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 3 x 1 */
|
||||
{ 0.333333343f, 0.333333343f, 0.333333343f },
|
||||
/* 3 x 2 */
|
||||
{ 0.800000012f, 0.000000000f, 0.200000003f, 0.000000000f, 0.800000012f, 0.200000003f },
|
||||
/* 3 x 3 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 3 x 4 */
|
||||
{ 0.888888896f, 0.000000000f, 0.111111112f, 0.000000000f, 0.888888896f, 0.111111112f, 0.000000000f, 0.000000000f, 0.111111112f, 0.000000000f, 0.000000000f, 0.111111112f },
|
||||
/* 3 x 5 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 3 x 6 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 3 x 7 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 3 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 4 x 1 */
|
||||
{ 0.250000000f, 0.250000000f, 0.250000000f, 0.250000000f },
|
||||
/* 4 x 2 */
|
||||
{ 0.421000004f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.219999999f, 0.358999997f },
|
||||
/* 4 x 3 */
|
||||
{ 0.421000004f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.219999999f, 0.358999997f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 4 x 4 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 4 x 5 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 4 x 6 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 4 x 7 */
|
||||
{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
|
||||
/* 4 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 5 x 1 */
|
||||
{ 0.200000003f, 0.200000003f, 0.200000003f, 0.200000003f, 0.200000003f },
|
||||
/* 5 x 2 */
|
||||
{ 0.374222219f, 0.000000000f, 0.111111112f, 0.319111109f, 0.195555553f, 0.000000000f, 0.374222219f, 0.111111112f, 0.195555553f, 0.319111109f },
|
||||
/* 5 x 3 */
|
||||
{ 0.421000004f, 0.000000000f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.000000000f, 0.219999999f, 0.358999997f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 5 x 4 */
|
||||
{ 0.941176474f, 0.000000000f, 0.058823530f, 0.000000000f, 0.000000000f, 0.000000000f, 0.941176474f, 0.058823530f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.058823530f, 0.941176474f, 0.000000000f, 0.000000000f, 0.000000000f, 0.058823530f, 0.000000000f, 0.941176474f },
|
||||
/* 5 x 5 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 5 x 6 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 5 x 7 */
|
||||
{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
|
||||
/* 5 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 6 x 1 */
|
||||
{ 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f },
|
||||
/* 6 x 2 */
|
||||
{ 0.294545442f, 0.000000000f, 0.208181813f, 0.090909094f, 0.251818180f, 0.154545456f, 0.000000000f, 0.294545442f, 0.208181813f, 0.090909094f, 0.154545456f, 0.251818180f },
|
||||
/* 6 x 3 */
|
||||
{ 0.324000001f, 0.000000000f, 0.229000002f, 0.000000000f, 0.277000010f, 0.170000002f, 0.000000000f, 0.324000001f, 0.229000002f, 0.000000000f, 0.170000002f, 0.277000010f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 6 x 4 */
|
||||
{ 0.558095276f, 0.000000000f, 0.394285709f, 0.047619049f, 0.000000000f, 0.000000000f, 0.000000000f, 0.558095276f, 0.394285709f, 0.047619049f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.047619049f, 0.558095276f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.047619049f, 0.000000000f, 0.558095276f },
|
||||
/* 6 x 5 */
|
||||
{ 0.586000025f, 0.000000000f, 0.414000005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f, 0.414000005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f },
|
||||
/* 6 x 6 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 6 x 7 */
|
||||
{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
|
||||
/* 6 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
|
||||
},
|
||||
{
|
||||
/* 7 x 1 */
|
||||
{ 0.143142849f, 0.143142849f, 0.143142849f, 0.142857149f, 0.143142849f, 0.143142849f, 0.143142849f },
|
||||
/* 7 x 2 */
|
||||
{ 0.247384623f, 0.000000000f, 0.174461529f, 0.076923080f, 0.174461529f, 0.226153851f, 0.100615382f, 0.000000000f, 0.247384623f, 0.174461529f, 0.076923080f, 0.174461529f, 0.100615382f, 0.226153851f },
|
||||
/* 7 x 3 */
|
||||
{ 0.268000007f, 0.000000000f, 0.188999996f, 0.000000000f, 0.188999996f, 0.245000005f, 0.108999997f, 0.000000000f, 0.268000007f, 0.188999996f, 0.000000000f, 0.188999996f, 0.108999997f, 0.245000005f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 7 x 4 */
|
||||
{ 0.463679999f, 0.000000000f, 0.327360004f, 0.040000003f, 0.000000000f, 0.168960005f, 0.000000000f, 0.000000000f, 0.463679999f, 0.327360004f, 0.040000003f, 0.000000000f, 0.000000000f, 0.168960005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.040000003f, 0.327360004f, 0.431039989f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.040000003f, 0.327360004f, 0.000000000f, 0.431039989f },
|
||||
/* 7 x 5 */
|
||||
{ 0.483000010f, 0.000000000f, 0.340999991f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.483000010f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.340999991f, 0.449000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.340999991f, 0.000000000f, 0.449000001f },
|
||||
/* 7 x 6 */
|
||||
{ 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.223000005f, 0.000000000f, 0.000000000f, 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.223000005f, 0.000000000f, 0.000000000f, 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.432000011f, 0.568000019f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.432000011f, 0.000000000f, 0.568000019f },
|
||||
/* 7 x 7 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
|
||||
/* 7 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.707000017f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.707000017f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f }
|
||||
},
|
||||
{
|
||||
/* 8 x 1 */
|
||||
{ 0.125125006f, 0.125125006f, 0.125125006f, 0.125000000f, 0.125125006f, 0.125125006f, 0.125125006f, 0.125125006f },
|
||||
/* 8 x 2 */
|
||||
{ 0.211866662f, 0.000000000f, 0.150266662f, 0.066666670f, 0.181066677f, 0.111066669f, 0.194133341f, 0.085866667f, 0.000000000f, 0.211866662f, 0.150266662f, 0.066666670f, 0.111066669f, 0.181066677f, 0.085866667f, 0.194133341f },
|
||||
/* 8 x 3 */
|
||||
{ 0.226999998f, 0.000000000f, 0.160999998f, 0.000000000f, 0.194000006f, 0.119000003f, 0.208000004f, 0.092000000f, 0.000000000f, 0.226999998f, 0.160999998f, 0.000000000f, 0.119000003f, 0.194000006f, 0.092000000f, 0.208000004f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
|
||||
/* 8 x 4 */
|
||||
{ 0.466344833f, 0.000000000f, 0.329241365f, 0.034482758f, 0.000000000f, 0.000000000f, 0.169931039f, 0.000000000f, 0.000000000f, 0.466344833f, 0.329241365f, 0.034482758f, 0.000000000f, 0.000000000f, 0.000000000f, 0.169931039f, 0.000000000f, 0.000000000f, 0.000000000f, 0.034482758f, 0.466344833f, 0.000000000f, 0.433517247f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.034482758f, 0.000000000f, 0.466344833f, 0.000000000f, 0.433517247f },
|
||||
/* 8 x 5 */
|
||||
{ 0.483000010f, 0.000000000f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.483000010f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.483000010f, 0.000000000f, 0.449000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.483000010f, 0.000000000f, 0.449000001f },
|
||||
/* 8 x 6 */
|
||||
{ 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.188999996f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.188999996f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.481999993f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.481999993f },
|
||||
/* 8 x 7 */
|
||||
{ 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.287999988f, 0.287999988f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.458999991f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.458999991f, 0.000000000f, 0.541000009f },
|
||||
/* 8 x 8 */
|
||||
{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f }
|
||||
}
|
||||
};
|
||||
|
||||
static char *remove_dots(const char *str) /* this is NOT robust. */
|
||||
{
|
||||
static char retval1[32];
|
||||
static char retval2[32];
|
||||
static int idx = 0;
|
||||
char *retval = (idx++ & 1) ? retval1 : retval2;
|
||||
char *ptr = retval;
|
||||
while (*str) {
|
||||
if (*str != '.') {
|
||||
*(ptr++) = *str;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
*ptr = '\0';
|
||||
return retval;
|
||||
}
|
||||
|
||||
static char *lowercase(const char *str) /* this is NOT robust. */
|
||||
{
|
||||
static char retval1[32];
|
||||
static char retval2[32];
|
||||
static int idx = 0;
|
||||
char *retval = (idx++ & 1) ? retval1 : retval2;
|
||||
char *ptr = retval;
|
||||
while (*str) {
|
||||
const char ch = *(str++);
|
||||
*(ptr++) = ((ch >= 'A') && (ch <= 'Z')) ? (ch - ('A' - 'a')) : ch;
|
||||
}
|
||||
*ptr = '\0';
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void write_converter(const int fromchans, const int tochans)
|
||||
{
|
||||
const char *fromstr = layout_names[fromchans-1];
|
||||
const char *tostr = layout_names[tochans-1];
|
||||
const float *cvtmatrix = channel_conversion_matrix[fromchans-1][tochans-1];
|
||||
const float *fptr;
|
||||
const int convert_backwards = (tochans > fromchans);
|
||||
int input_channel_used[NUM_CHANNELS];
|
||||
int i, j;
|
||||
|
||||
if (tochans == fromchans) {
|
||||
return; /* nothing to convert, don't generate a converter. */
|
||||
}
|
||||
|
||||
for (i = 0; i < fromchans; i++) {
|
||||
input_channel_used[i] = 0;
|
||||
}
|
||||
|
||||
fptr = cvtmatrix;
|
||||
for (j = 0; j < tochans; j++) {
|
||||
for (i = 0; i < fromchans; i++) {
|
||||
#if 0
|
||||
printf("to=%d, from=%d, coeff=%f\n", j, i, *fptr);
|
||||
#endif
|
||||
if (*(fptr++) != 0.0f) {
|
||||
input_channel_used[i]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("static void SDL_Convert%sTo%s(float *dst, const float *src, int num_frames)\n{\n", remove_dots(fromstr), remove_dots(tostr));
|
||||
|
||||
printf(" int i;\n"
|
||||
"\n"
|
||||
" LOG_DEBUG_AUDIO_CONVERT(\"%s\", \"%s\");\n"
|
||||
"\n", lowercase(fromstr), lowercase(tostr));
|
||||
|
||||
if (convert_backwards) { /* must convert backwards when growing the output in-place. */
|
||||
printf(" // convert backwards, since output is growing in-place.\n");
|
||||
printf(" src += (num_frames-1)");
|
||||
if (fromchans != 1) {
|
||||
printf(" * %d", fromchans);
|
||||
}
|
||||
printf(";\n");
|
||||
|
||||
printf(" dst += (num_frames-1)");
|
||||
if (tochans != 1) {
|
||||
printf(" * %d", tochans);
|
||||
}
|
||||
printf(";\n");
|
||||
printf(" for (i = num_frames; i; i--, ");
|
||||
if (fromchans == 1) {
|
||||
printf("src--");
|
||||
} else {
|
||||
printf("src -= %d", fromchans);
|
||||
}
|
||||
printf(", ");
|
||||
if (tochans == 1) {
|
||||
printf("dst--");
|
||||
} else {
|
||||
printf("dst -= %d", tochans);
|
||||
}
|
||||
printf(") {\n");
|
||||
fptr = cvtmatrix;
|
||||
for (i = 0; i < fromchans; i++) {
|
||||
if (input_channel_used[i] > 1) { /* don't read it from src more than once. */
|
||||
printf(" const float src%s = src[%d];\n", channel_names[fromchans-1][i], i);
|
||||
}
|
||||
}
|
||||
|
||||
for (j = tochans - 1; j >= 0; j--) {
|
||||
int has_input = 0;
|
||||
fptr = cvtmatrix + (fromchans * j);
|
||||
printf(" dst[%d] /* %s */ =", j, channel_names[tochans-1][j]);
|
||||
for (i = fromchans - 1; i >= 0; i--) {
|
||||
const float coefficient = fptr[i];
|
||||
char srcname[32];
|
||||
if (coefficient == 0.0f) {
|
||||
continue;
|
||||
} else if (input_channel_used[i] > 1) {
|
||||
snprintf(srcname, sizeof (srcname), "src%s", channel_names[fromchans-1][i]);
|
||||
} else {
|
||||
snprintf(srcname, sizeof (srcname), "src[%d]", i);
|
||||
}
|
||||
|
||||
if (has_input) {
|
||||
printf(" +");
|
||||
}
|
||||
|
||||
has_input = 1;
|
||||
|
||||
if (coefficient == 1.0f) {
|
||||
printf(" %s", srcname);
|
||||
} else {
|
||||
printf(" (%s * %.9ff)", srcname, coefficient);
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_input) {
|
||||
printf(" 0.0f");
|
||||
}
|
||||
|
||||
printf(";\n");
|
||||
}
|
||||
|
||||
printf(" }\n");
|
||||
} else {
|
||||
printf(" for (i = num_frames; i; i--, ");
|
||||
if (fromchans == 1) {
|
||||
printf("src++");
|
||||
} else {
|
||||
printf("src += %d", fromchans);
|
||||
}
|
||||
printf(", ");
|
||||
if (tochans == 1) {
|
||||
printf("dst++");
|
||||
} else {
|
||||
printf("dst += %d", tochans);
|
||||
}
|
||||
printf(") {\n");
|
||||
|
||||
fptr = cvtmatrix;
|
||||
for (i = 0; i < fromchans; i++) {
|
||||
if (input_channel_used[i] > 1) { /* don't read it from src more than once. */
|
||||
printf(" const float src%s = src[%d];\n", channel_names[fromchans-1][i], i);
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < tochans; j++) {
|
||||
int has_input = 0;
|
||||
fptr = cvtmatrix + (fromchans * j);
|
||||
printf(" dst[%d] /* %s */ =", j, channel_names[tochans-1][j]);
|
||||
for (i = 0; i < fromchans; i++) {
|
||||
const float coefficient = fptr[i];
|
||||
char srcname[32];
|
||||
if (coefficient == 0.0f) {
|
||||
continue;
|
||||
} else if (input_channel_used[i] > 1) {
|
||||
snprintf(srcname, sizeof (srcname), "src%s", channel_names[fromchans-1][i]);
|
||||
} else {
|
||||
snprintf(srcname, sizeof (srcname), "src[%d]", i);
|
||||
}
|
||||
|
||||
if (has_input) {
|
||||
printf(" +");
|
||||
}
|
||||
|
||||
has_input = 1;
|
||||
|
||||
if (coefficient == 1.0f) {
|
||||
printf(" %s", srcname);
|
||||
} else {
|
||||
printf(" (%s * %.9ff)", srcname, coefficient);
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_input) {
|
||||
printf(" 0.0f");
|
||||
}
|
||||
|
||||
printf(";\n");
|
||||
}
|
||||
printf(" }\n");
|
||||
}
|
||||
|
||||
printf("\n}\n\n");
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ini, outi;
|
||||
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
" arising from the use of this software.\n"
|
||||
"\n"
|
||||
" Permission is granted to anyone to use this software for any purpose,\n"
|
||||
" including commercial applications, and to alter it and redistribute it\n"
|
||||
" freely, subject to the following restrictions:\n"
|
||||
"\n"
|
||||
" 1. The origin of this software must not be misrepresented; you must not\n"
|
||||
" claim that you wrote the original software. If you use this software\n"
|
||||
" in a product, an acknowledgment in the product documentation would be\n"
|
||||
" appreciated but is not required.\n"
|
||||
" 2. Altered source versions must be plainly marked as such, and must not be\n"
|
||||
" misrepresented as being the original software.\n"
|
||||
" 3. This notice may not be removed or altered from any source distribution.\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"// DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_channel_conversion.c\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"typedef void (*SDL_AudioChannelConverter)(float *dst, const float *src, int num_frames);\n"
|
||||
"\n"
|
||||
);
|
||||
|
||||
for (ini = 1; ini <= NUM_CHANNELS; ini++) {
|
||||
for (outi = 1; outi <= NUM_CHANNELS; outi++) {
|
||||
write_converter(ini, outi);
|
||||
}
|
||||
}
|
||||
|
||||
printf("static const SDL_AudioChannelConverter channel_converters[%d][%d] = { /* [from][to] */\n", NUM_CHANNELS, NUM_CHANNELS);
|
||||
for (ini = 1; ini <= NUM_CHANNELS; ini++) {
|
||||
const char *comma = "";
|
||||
printf(" {");
|
||||
for (outi = 1; outi <= NUM_CHANNELS; outi++) {
|
||||
const char *fromstr = layout_names[ini-1];
|
||||
const char *tostr = layout_names[outi-1];
|
||||
if (ini == outi) {
|
||||
printf("%s NULL", comma);
|
||||
} else {
|
||||
printf("%s SDL_Convert%sTo%s", comma, remove_dots(fromstr), remove_dots(tostr));
|
||||
}
|
||||
comma = ",";
|
||||
}
|
||||
printf(" }%s\n", (ini == NUM_CHANNELS) ? "" : ",");
|
||||
}
|
||||
|
||||
printf("};\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# To use this script: symlink it to .git/hooks/pre-push, then "git push"
|
||||
#
|
||||
# This script is called by "git push" after it has checked the remote status,
|
||||
# but before anything has been pushed. If this script exits with a non-zero
|
||||
# status nothing will be pushed.
|
||||
#
|
||||
# This hook is called with the following parameters:
|
||||
#
|
||||
# $1 -- Name of the remote to which the push is being done
|
||||
# $2 -- URL to which the push is being done
|
||||
#
|
||||
# If pushing without using a named remote those arguments will be equal.
|
||||
#
|
||||
# Information about the commits which are being pushed is supplied as lines to
|
||||
# the standard input in the form:
|
||||
#
|
||||
# <local ref> <local sha1> <remote ref> <remote sha1>
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my $remote = $ARGV[0];
|
||||
my $url = $ARGV[1];
|
||||
|
||||
#print("remote: $remote\n");
|
||||
#print("url: $url\n");
|
||||
|
||||
$url =~ s/\.git$//; # change myorg/myproject.git to myorg/myproject
|
||||
$url =~ s#^git\@github\.com\:#https://github.com/#i;
|
||||
my $commiturl = $url =~ /\Ahttps?:\/\/github.com\// ? "$url/commit/" : '';
|
||||
|
||||
my $z40 = '0000000000000000000000000000000000000000';
|
||||
my $reported = 0;
|
||||
|
||||
while (<STDIN>) {
|
||||
chomp;
|
||||
my ($local_ref, $local_sha, $remote_ref, $remote_sha) = split / /;
|
||||
#print("local_ref: $local_ref\n");
|
||||
#print("local_sha: $local_sha\n");
|
||||
#print("remote_ref: $remote_ref\n");
|
||||
#print("remote_sha: $remote_sha\n");
|
||||
|
||||
my $range = '';
|
||||
if ($remote_sha eq $z40) { # New branch, examine all commits
|
||||
$range = $local_sha;
|
||||
} else { # Update to existing branch, examine new commits
|
||||
$range = "$remote_sha..$local_sha";
|
||||
}
|
||||
|
||||
my $gitcmd = "git log --reverse --oneline --no-abbrev-commit '$range'";
|
||||
open(GITPIPE, '-|', $gitcmd) or die("\n\n$0: Failed to run '$gitcmd': $!\n\nAbort push!\n\n");
|
||||
while (<GITPIPE>) {
|
||||
chomp;
|
||||
if (/\A([a-fA-F0-9]+)\s+(.*?)\Z/) {
|
||||
my $hash = $1;
|
||||
my $msg = $2;
|
||||
|
||||
if (!$reported) {
|
||||
print("\nCommits expected to be pushed:\n");
|
||||
$reported = 1;
|
||||
}
|
||||
|
||||
#print("hash: $hash\n");
|
||||
#print("msg: $msg\n");
|
||||
|
||||
print("$commiturl$hash -- $msg\n");
|
||||
} else {
|
||||
die("$0: Unexpected output from '$gitcmd'!\n\nAbort push!\n\n");
|
||||
}
|
||||
}
|
||||
die("\n\n$0: Failing exit code from running '$gitcmd'!\n\nAbort push!\n\n") if !close(GITPIPE);
|
||||
}
|
||||
|
||||
print("\n") if $reported;
|
||||
|
||||
exit(0); # Let the push go forward.
|
||||
-322
@@ -1,322 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
# arising from the use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any purpose,
|
||||
# including commercial applications, and to alter it and redistribute it
|
||||
# freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you must not
|
||||
# claim that you wrote the original software. If you use this software
|
||||
# in a product, an acknowledgment in the product documentation would be
|
||||
# appreciated but is not required.
|
||||
# 2. Altered source versions must be plainly marked as such, and must not be
|
||||
# misrepresented as being the original software.
|
||||
# 3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
# This script was originally written by Ryan C. Gordon for PhysicsFS
|
||||
# ( https://icculus.org/physfs/ ), under the zlib license: the same license
|
||||
# that SDL itself uses).
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my $HASHBUCKETS1_16 = 256;
|
||||
my $HASHBUCKETS1_32 = 16;
|
||||
my $HASHBUCKETS2_16 = 16;
|
||||
my $HASHBUCKETS3_16 = 4;
|
||||
|
||||
my $mem_used = 0;
|
||||
|
||||
print <<__EOF__;
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken\@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This data was generated by SDL/build-scripts/makecasefoldhashtable.pl
|
||||
*
|
||||
* Do not manually edit this file!
|
||||
*/
|
||||
|
||||
#ifndef SDL_casefolding_h_
|
||||
#define SDL_casefolding_h_
|
||||
|
||||
/* We build three simple hashmaps here: one that maps Unicode codepoints to
|
||||
a one, two, or three lowercase codepoints. To retrieve this info: look at
|
||||
case_fold_hashX, where X is 1, 2, or 3. Most foldable codepoints fold to one,
|
||||
a few dozen fold to two, and a handful fold to three. If the codepoint isn't
|
||||
in any of these hashes, it doesn't fold (no separate upper and lowercase).
|
||||
|
||||
Almost all these codepoints fit into 16 bits, so we hash them as such to save
|
||||
memory. If a codepoint is > 0xFFFF, we have separate hashes for them,
|
||||
since there are (currently) only about 120 of them and (currently) all of them
|
||||
map to a single lowercase codepoint. */
|
||||
|
||||
typedef struct CaseFoldMapping1_32
|
||||
{
|
||||
Uint32 from;
|
||||
Uint32 to0;
|
||||
} CaseFoldMapping1_32;
|
||||
|
||||
typedef struct CaseFoldMapping1_16
|
||||
{
|
||||
Uint16 from;
|
||||
Uint16 to0;
|
||||
} CaseFoldMapping1_16;
|
||||
|
||||
typedef struct CaseFoldMapping2_16
|
||||
{
|
||||
Uint16 from;
|
||||
Uint16 to0;
|
||||
Uint16 to1;
|
||||
} CaseFoldMapping2_16;
|
||||
|
||||
typedef struct CaseFoldMapping3_16
|
||||
{
|
||||
Uint16 from;
|
||||
Uint16 to0;
|
||||
Uint16 to1;
|
||||
Uint16 to2;
|
||||
} CaseFoldMapping3_16;
|
||||
|
||||
typedef struct CaseFoldHashBucket1_16
|
||||
{
|
||||
const CaseFoldMapping1_16 *list;
|
||||
const Uint8 count;
|
||||
} CaseFoldHashBucket1_16;
|
||||
|
||||
typedef struct CaseFoldHashBucket1_32
|
||||
{
|
||||
const CaseFoldMapping1_32 *list;
|
||||
const Uint8 count;
|
||||
} CaseFoldHashBucket1_32;
|
||||
|
||||
typedef struct CaseFoldHashBucket2_16
|
||||
{
|
||||
const CaseFoldMapping2_16 *list;
|
||||
const Uint8 count;
|
||||
} CaseFoldHashBucket2_16;
|
||||
|
||||
typedef struct CaseFoldHashBucket3_16
|
||||
{
|
||||
const CaseFoldMapping3_16 *list;
|
||||
const Uint8 count;
|
||||
} CaseFoldHashBucket3_16;
|
||||
|
||||
__EOF__
|
||||
|
||||
|
||||
my @foldPairs1_16;
|
||||
my @foldPairs2_16;
|
||||
my @foldPairs3_16;
|
||||
my @foldPairs1_32;
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_16; $i++) {
|
||||
$foldPairs1_16[$i] = '';
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_32; $i++) {
|
||||
$foldPairs1_32[$i] = '';
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS2_16; $i++) {
|
||||
$foldPairs2_16[$i] = '';
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS3_16; $i++) {
|
||||
$foldPairs3_16[$i] = '';
|
||||
}
|
||||
|
||||
open(FH,'<','casefolding.txt') or die("failed to open casefolding.txt: $!\n");
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
# strip comments from textfile...
|
||||
s/\#.*\Z//;
|
||||
|
||||
# strip whitespace...
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
|
||||
next if not /\A([a-fA-F0-9]+)\;\s*(.)\;\s*(.+)\;/;
|
||||
my ($code, $status, $mapping) = ($1, $2, $3);
|
||||
|
||||
my $hexxed = hex($code);
|
||||
#print("// code '$code' status '$status' mapping '$mapping'\n");
|
||||
|
||||
if (($status eq 'C') or ($status eq 'F')) {
|
||||
my ($map1, $map2, $map3) = (undef, undef, undef);
|
||||
$map1 = $1 if $mapping =~ s/\A([a-fA-F0-9]+)(\s*|\Z)//;
|
||||
$map2 = $1 if $mapping =~ s/\A([a-fA-F0-9]+)(\s*|\Z)//;
|
||||
$map3 = $1 if $mapping =~ s/\A([a-fA-F0-9]+)(\s*|\Z)//;
|
||||
die("mapping space too small for '$code'\n") if ($mapping ne '');
|
||||
die("problem parsing mapping for '$code'\n") if (not defined($map1));
|
||||
|
||||
if ($hexxed < 128) {
|
||||
# Just ignore these, we'll handle the low-ASCII ones ourselves.
|
||||
} elsif ($hexxed > 0xFFFF) {
|
||||
# We just need to add the 32-bit 2 and/or 3 codepoint maps if this die()'s here.
|
||||
die("Uhoh, a codepoint > 0xFFFF that folds to multiple codepoints! Fixme.") if defined($map2);
|
||||
my $hashed = (($hexxed ^ ($hexxed >> 8)) & ($HASHBUCKETS1_32-1));
|
||||
#print("// hexxed '$hexxed' hashed1 '$hashed'\n");
|
||||
$foldPairs1_32[$hashed] .= " { 0x$code, 0x$map1 },\n";
|
||||
$mem_used += 8;
|
||||
} elsif (not defined($map2)) {
|
||||
my $hashed = (($hexxed ^ ($hexxed >> 8)) & ($HASHBUCKETS1_16-1));
|
||||
#print("// hexxed '$hexxed' hashed1 '$hashed'\n");
|
||||
$foldPairs1_16[$hashed] .= " { 0x$code, 0x$map1 },\n";
|
||||
$mem_used += 4;
|
||||
} elsif (not defined($map3)) {
|
||||
my $hashed = (($hexxed ^ ($hexxed >> 8)) & ($HASHBUCKETS2_16-1));
|
||||
#print("// hexxed '$hexxed' hashed2 '$hashed'\n");
|
||||
$foldPairs2_16[$hashed] .= " { 0x$code, 0x$map1, 0x$map2 },\n";
|
||||
$mem_used += 6;
|
||||
} else {
|
||||
my $hashed = (($hexxed ^ ($hexxed >> 8)) & ($HASHBUCKETS3_16-1));
|
||||
#print("// hexxed '$hexxed' hashed3 '$hashed'\n");
|
||||
$foldPairs3_16[$hashed] .= " { 0x$code, 0x$map1, 0x$map2, 0x$map3 },\n";
|
||||
$mem_used += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_16; $i++) {
|
||||
$foldPairs1_16[$i] =~ s/,\n\Z//;
|
||||
my $str = $foldPairs1_16[$i];
|
||||
next if $str eq '';
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold1_16_${num}";
|
||||
print("static const CaseFoldMapping1_16 ${sym}[] = {\n$str\n};\n\n");
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_32; $i++) {
|
||||
$foldPairs1_32[$i] =~ s/,\n\Z//;
|
||||
my $str = $foldPairs1_32[$i];
|
||||
next if $str eq '';
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold1_32_${num}";
|
||||
print("static const CaseFoldMapping1_32 ${sym}[] = {\n$str\n};\n\n");
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS2_16; $i++) {
|
||||
$foldPairs2_16[$i] =~ s/,\n\Z//;
|
||||
my $str = $foldPairs2_16[$i];
|
||||
next if $str eq '';
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold2_16_${num}";
|
||||
print("static const CaseFoldMapping2_16 ${sym}[] = {\n$str\n};\n\n");
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS3_16; $i++) {
|
||||
$foldPairs3_16[$i] =~ s/,\n\Z//;
|
||||
my $str = $foldPairs3_16[$i];
|
||||
next if $str eq '';
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold3_16_${num}";
|
||||
print("static const CaseFoldMapping3_16 ${sym}[] = {\n$str\n};\n\n");
|
||||
}
|
||||
|
||||
print("static const CaseFoldHashBucket1_16 case_fold_hash1_16[] = {\n");
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_16; $i++) {
|
||||
my $str = $foldPairs1_16[$i];
|
||||
if ($str eq '') {
|
||||
print(" { NULL, 0 },\n");
|
||||
} else {
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold1_16_${num}";
|
||||
print(" { $sym, SDL_arraysize($sym) },\n");
|
||||
}
|
||||
$mem_used += 12;
|
||||
}
|
||||
print("};\n\n");
|
||||
|
||||
|
||||
print("static const CaseFoldHashBucket1_32 case_fold_hash1_32[] = {\n");
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS1_32; $i++) {
|
||||
my $str = $foldPairs1_32[$i];
|
||||
if ($str eq '') {
|
||||
print(" { NULL, 0 },\n");
|
||||
} else {
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold1_32_${num}";
|
||||
print(" { $sym, SDL_arraysize($sym) },\n");
|
||||
}
|
||||
$mem_used += 12;
|
||||
}
|
||||
print("};\n\n");
|
||||
|
||||
|
||||
print("static const CaseFoldHashBucket2_16 case_fold_hash2_16[] = {\n");
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS2_16; $i++) {
|
||||
my $str = $foldPairs2_16[$i];
|
||||
if ($str eq '') {
|
||||
print(" { NULL, 0 },\n");
|
||||
} else {
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold2_16_${num}";
|
||||
print(" { $sym, SDL_arraysize($sym) },\n");
|
||||
}
|
||||
$mem_used += 12;
|
||||
}
|
||||
print("};\n\n");
|
||||
|
||||
print("static const CaseFoldHashBucket3_16 case_fold_hash3_16[] = {\n");
|
||||
|
||||
for (my $i = 0; $i < $HASHBUCKETS3_16; $i++) {
|
||||
my $str = $foldPairs3_16[$i];
|
||||
if ($str eq '') {
|
||||
print(" { NULL, 0 },\n");
|
||||
} else {
|
||||
my $num = '000' . $i;
|
||||
$num =~ s/\A.*?(\d\d\d)\Z/$1/;
|
||||
my $sym = "case_fold3_16_${num}";
|
||||
print(" { $sym, SDL_arraysize($sym) },\n");
|
||||
}
|
||||
$mem_used += 12;
|
||||
}
|
||||
print("};\n\n");
|
||||
|
||||
print <<__EOF__;
|
||||
#endif /* SDL_casefolding_h_ */
|
||||
|
||||
__EOF__
|
||||
|
||||
print STDERR "Memory required for case-folding hashtable: $mem_used bytes\n";
|
||||
|
||||
exit 0;
|
||||
|
||||
# end of makecashfoldhashtable.pl ...
|
||||
|
||||
-162
@@ -1,162 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2020-07-26.22; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $file"
|
||||
chmod "$dirmode" "$file" || errstatus=$?
|
||||
fi
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -1,91 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for the Android platform.
|
||||
|
||||
## Gradle integration
|
||||
|
||||
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
|
||||
|
||||
Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
|
||||
|
||||
In `app/build.gradle` of your Android project, add:
|
||||
```
|
||||
android {
|
||||
/* ... */
|
||||
buildFeatures {
|
||||
prefab true
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
|
||||
/* ... */
|
||||
}
|
||||
```
|
||||
|
||||
If you're using CMake, add the following to your CMakeLists.txt:
|
||||
```
|
||||
find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
|
||||
target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
|
||||
```
|
||||
|
||||
If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
|
||||
```
|
||||
LOCAL_SHARED_LIBARARIES := SDL3 SDL3-Headers
|
||||
```
|
||||
And add the following at the bottom:
|
||||
```
|
||||
# https://google.github.io/prefab/build-systems.html
|
||||
|
||||
# Add the prefab modules to the import path.
|
||||
$(call import-add-path,/out)
|
||||
|
||||
# Import @<@PROJECT_NAME@>@ so we can depend on it.
|
||||
$(call import-module,prefab/@<@PROJECT_NAME@>@)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Other build systems (advanced)
|
||||
|
||||
If you want to build a project without Gradle,
|
||||
running the following command will extract the Android archive into a more common directory structure.
|
||||
```
|
||||
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
|
||||
```
|
||||
Add `--help` for a list of all available options.
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Create a @<@PROJECT_NAME@>@ SDK prefix from an Android archive
|
||||
This file is meant to be placed in a the root of an android .aar archive
|
||||
|
||||
Example usage:
|
||||
```sh
|
||||
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o /usr/opt/android-sdks
|
||||
cmake -S my-project \
|
||||
-DCMAKE_PREFIX_PATH=/usr/opt/android-sdks \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
|
||||
-B build-arm64 -DANDROID_ABI=arm64-v8a \
|
||||
-DCMAKE_BUILD_TYPE=Releaase
|
||||
cmake --build build-arm64
|
||||
```
|
||||
"""
|
||||
import argparse
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import stat
|
||||
import zipfile
|
||||
|
||||
|
||||
AAR_PATH = pathlib.Path(__file__).resolve().parent
|
||||
ANDROID_ARCHS = { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" }
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Convert a @<@PROJECT_NAME@>@ Android .aar archive into a SDK",
|
||||
allow_abbrev=False,
|
||||
)
|
||||
parser.add_argument("--version", action="version", version="@<@PROJECT_NAME@>@ @<@PROJECT_VERSION@>@")
|
||||
parser.add_argument("-o", dest="output", type=pathlib.Path, required=True, help="Folder where to store the SDK")
|
||||
args = parser.parse_args()
|
||||
|
||||
print(f"Creating a @<@PROJECT_NAME@>@ SDK at {args.output}...")
|
||||
|
||||
prefix = args.output
|
||||
incdir = prefix / "include"
|
||||
libdir = prefix / "lib"
|
||||
|
||||
RE_LIB_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/libs/android\.(?P<arch>[a-zA-Z0-9_-]+)/(?P<filename>lib[A-Za-z0-9_]+\.(?:so|a))")
|
||||
RE_INC_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/include/(?P<header>[a-zA-Z0-9_./-]+)")
|
||||
RE_LICENSE = re.compile(r"(?:.*/)?(?P<filename>(?:license|copying)(?:\.md|\.txt)?)", flags=re.I)
|
||||
RE_PROGUARD = re.compile(r"(?:.*/)?(?P<filename>proguard.*\.(?:pro|txt))", flags=re.I)
|
||||
RE_CMAKE = re.compile(r"(?:.*/)?(?P<filename>.*\.cmake)", flags=re.I)
|
||||
|
||||
with zipfile.ZipFile(AAR_PATH) as zf:
|
||||
project_description = json.loads(zf.read("description.json"))
|
||||
project_name = project_description["name"]
|
||||
project_version = project_description["version"]
|
||||
licensedir = prefix / "share/licenses" / project_name
|
||||
cmakedir = libdir / "cmake" / project_name
|
||||
javadir = prefix / "share/java" / project_name
|
||||
javadocdir = prefix / "share/javadoc" / project_name
|
||||
|
||||
def read_zipfile_and_write(path: pathlib.Path, zippath: str):
|
||||
data = zf.read(zippath)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(data)
|
||||
|
||||
for zip_info in zf.infolist():
|
||||
zippath = zip_info.filename
|
||||
if m := RE_LIB_MODULE_ARCH.match(zippath):
|
||||
lib_path = libdir / m["arch"] / m["filename"]
|
||||
read_zipfile_and_write(lib_path, zippath)
|
||||
if m["filename"].endswith(".so"):
|
||||
os.chmod(lib_path, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||
|
||||
elif m := RE_INC_MODULE_ARCH.match(zippath):
|
||||
header_path = incdir / m["header"]
|
||||
read_zipfile_and_write(header_path, zippath)
|
||||
elif m:= RE_LICENSE.match(zippath):
|
||||
license_path = licensedir / m["filename"]
|
||||
read_zipfile_and_write(license_path, zippath)
|
||||
elif m:= RE_PROGUARD.match(zippath):
|
||||
proguard_path = javadir / m["filename"]
|
||||
read_zipfile_and_write(proguard_path, zippath)
|
||||
elif m:= RE_CMAKE.match(zippath):
|
||||
cmake_path = cmakedir / m["filename"]
|
||||
read_zipfile_and_write(cmake_path, zippath)
|
||||
elif zippath == "classes.jar":
|
||||
versioned_jar_path = javadir / f"{project_name}-{project_version}.jar"
|
||||
unversioned_jar_path = javadir / f"{project_name}.jar"
|
||||
read_zipfile_and_write(versioned_jar_path, zippath)
|
||||
os.symlink(src=versioned_jar_path.name, dst=unversioned_jar_path)
|
||||
elif zippath == "classes-sources.jar":
|
||||
jarpath = javadir / f"{project_name}-{project_version}-sources.jar"
|
||||
read_zipfile_and_write(jarpath, zippath)
|
||||
elif zippath == "classes-doc.jar":
|
||||
jarpath = javadocdir / f"{project_name}-{project_version}-javadoc.jar"
|
||||
read_zipfile_and_write(jarpath, zippath)
|
||||
|
||||
print("... done")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
# @<@PROJECT_NAME@>@ CMake version configuration file:
|
||||
# This file is meant to be placed in a lib/cmake/@<@PROJECT_NAME@>@ subfolder of a reconstructed Android SDL3 SDK
|
||||
|
||||
set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake")
|
||||
SDL_DetectTargetCPUArchitectures(_detected_archs)
|
||||
|
||||
# check that the installed version has a compatible architecture as the one which is currently searching:
|
||||
if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM32 OR SDL_CPU_ARM64))
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM32,ARM64)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "@<@PROJECT_NAME@>@",
|
||||
"version": "@<@PROJECT_VERSION@>@",
|
||||
"git-hash": "@<@PROJECT_COMMIT@>@"
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for the mingw-w64 toolchain.
|
||||
|
||||
The files for 32-bit architecture are in i686-w64-mingw32
|
||||
The files for 64-bit architecture are in x86_64-w64-mingw32
|
||||
|
||||
You can install them to another location, just type `make` for help.
|
||||
|
||||
To use this package, point your include path at _arch_/include and your library path at _arch_/lib, link with the @<@PROJECT_NAME@>@ library and copy _arch_/bin/@<@PROJECT_NAME@>@.dll next to your executable.
|
||||
|
||||
e.g.
|
||||
```sh
|
||||
gcc -o hello.exe hello.c -Ix86_64-w64-mingw32/include -Lx86_64-w64-mingw32/lib -l@<@PROJECT_NAME@>@
|
||||
cp x86_64-w64-mingw32/bin/@<@PROJECT_NAME@>@.dll .
|
||||
./hello.exe
|
||||
```
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#
|
||||
# Makefile for installing the mingw32 version of the SDL library
|
||||
|
||||
DESTDIR = /usr/local
|
||||
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
|
||||
|
||||
default:
|
||||
@echo "Run \"make install-i686\" to install 32-bit"
|
||||
@echo "Run \"make install-x86_64\" to install 64-bit"
|
||||
@echo "Run \"make install-all\" to install both"
|
||||
@echo "Add DESTDIR=/custom/path to change the destination folder"
|
||||
|
||||
install:
|
||||
@if test -d $(ARCH) && test -d $(DESTDIR); then \
|
||||
(cd $(ARCH) && cp -rv bin include lib share $(DESTDIR)/); \
|
||||
else \
|
||||
echo "*** ERROR: $(ARCH) or $(DESTDIR) does not exist!"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
install-i686:
|
||||
$(MAKE) install ARCH=i686-w64-mingw32
|
||||
|
||||
install-x86_64:
|
||||
$(MAKE) install ARCH=x86_64-w64-mingw32
|
||||
|
||||
install-all:
|
||||
@if test -d $(DESTDIR); then \
|
||||
mkdir -p $(DESTDIR)/cmake; \
|
||||
cp -rv cmake/* $(DESTDIR)/cmake; \
|
||||
for arch in $(ARCHITECTURES); do \
|
||||
$(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \
|
||||
done \
|
||||
else \
|
||||
echo "*** ERROR: $(DESTDIR) does not exist!"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: default install install-i686 install-x86_64 install-all
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>SDL_VENDOR_INFO="libsdl.org";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for Visual Studio.
|
||||
|
||||
To use this package, edit your project properties:
|
||||
- Add the include directory to "VC++ Directories" -> "Include Directories"
|
||||
- Add the lib/_arch_ directory to "VC++ Directories" -> "Library Directories"
|
||||
- Add @<@PROJECT_NAME@>@.lib to Linker -> Input -> "Additional Dependencies"
|
||||
- Copy lib/_arch_/@<@PROJECT_NAME@>@.dll to your project directory.
|
||||
|
||||
# Documentation
|
||||
|
||||
An API reference, tutorials, and additional documentation is available at:
|
||||
|
||||
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
|
||||
|
||||
# Example code
|
||||
|
||||
There are simple example programs available at:
|
||||
|
||||
https://examples.libsdl.org/SDL3
|
||||
|
||||
# Discussions
|
||||
|
||||
## Discord
|
||||
|
||||
You can join the official Discord server at:
|
||||
|
||||
https://discord.com/invite/BwpFGBWsv8
|
||||
|
||||
## Forums/mailing lists
|
||||
|
||||
You can join SDL development discussions at:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
|
||||
|
||||
## Announcement list
|
||||
|
||||
You can sign up for the low traffic announcement list at:
|
||||
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for arm64 Windows.
|
||||
|
||||
To use this package, simply replace an existing 64-bit ARM @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
# @<@PROJECT_NAME@>@ CMake configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
|
||||
|
||||
cmake_minimum_required(VERSION 3.0...3.28)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL3 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(set_and_check _var _file)
|
||||
set(${_var} "${_file}")
|
||||
if(NOT EXISTS "${_file}")
|
||||
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT ${_NAME}_${comp}_FOUND)
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
set(SDL3_FOUND TRUE)
|
||||
|
||||
if(SDL_CPU_X86)
|
||||
set(_sdl_arch_subdir "x86")
|
||||
elseif(SDL_CPU_X64 OR SDL_CPU_ARM64EC)
|
||||
set(_sdl_arch_subdir "x64")
|
||||
elseif(SDL_CPU_ARM64)
|
||||
set(_sdl_arch_subdir "arm64")
|
||||
else()
|
||||
set(SDL3_FOUND FALSE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_filename_component(_sdl3_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
|
||||
set_and_check(_sdl3_prefix "${_sdl3_prefix}")
|
||||
set(_sdl3_include_dirs "${_sdl3_prefix}/include")
|
||||
|
||||
set(_sdl3_implib "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.lib")
|
||||
set(_sdl3_dll "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.dll")
|
||||
set(_sdl3test_lib "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3_test.lib")
|
||||
|
||||
unset(_sdl_arch_subdir)
|
||||
unset(_sdl3_prefix)
|
||||
|
||||
# All targets are created, even when some might not be requested though COMPONENTS.
|
||||
# This is done for compatibility with CMake generated SDL3-target.cmake files.
|
||||
|
||||
if(NOT TARGET SDL3::Headers)
|
||||
add_library(SDL3::Headers INTERFACE IMPORTED)
|
||||
set_target_properties(SDL3::Headers
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_sdl3_include_dirs}"
|
||||
)
|
||||
endif()
|
||||
set(SDL3_Headers_FOUND TRUE)
|
||||
unset(_sdl3_include_dirs)
|
||||
|
||||
if(EXISTS "${_sdl3_implib}" AND EXISTS "${_sdl3_dll}")
|
||||
if(NOT TARGET SDL3::SDL3-shared)
|
||||
add_library(SDL3::SDL3-shared SHARED IMPORTED)
|
||||
set_target_properties(SDL3::SDL3-shared
|
||||
PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
|
||||
IMPORTED_IMPLIB "${_sdl3_implib}"
|
||||
IMPORTED_LOCATION "${_sdl3_dll}"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
|
||||
INTERFACE_SDL3_SHARED "ON"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
INTERFACE_SDL_VERSION "SDL3"
|
||||
)
|
||||
endif()
|
||||
set(SDL3_SDL3-shared_FOUND TRUE)
|
||||
else()
|
||||
set(SDL3_SDL3-shared_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl3_implib)
|
||||
unset(_sdl3_dll)
|
||||
|
||||
set(SDL3_SDL3-static_FOUND FALSE)
|
||||
|
||||
if(EXISTS "${_sdl3test_lib}")
|
||||
if(NOT TARGET SDL3::SDL3_test)
|
||||
add_library(SDL3::SDL3_test STATIC IMPORTED)
|
||||
set_target_properties(SDL3::SDL3_test
|
||||
PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
|
||||
IMPORTED_LOCATION "${_sdl3test_lib}"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
INTERFACE_SDL_VERSION "SDL3"
|
||||
)
|
||||
endif()
|
||||
set(SDL3_SDL3_test_FOUND TRUE)
|
||||
else()
|
||||
set(SDL3_SDL3_test_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl3test_lib)
|
||||
|
||||
if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
|
||||
set(SDL3_SDL3_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
add_library(${NEW_TARGET} INTERFACE IMPORTED)
|
||||
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
|
||||
else()
|
||||
add_library(${NEW_TARGET} ALIAS ${TARGET})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Make sure SDL3::SDL3 always exists
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
if(TARGET SDL3::SDL3-shared)
|
||||
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_required_components(SDL3)
|
||||
|
||||
set(SDL3_LIBRARIES SDL3::SDL3)
|
||||
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
|
||||
set(SDL3_STATIC_PRIVATE_LIBS)
|
||||
|
||||
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
|
||||
@@ -1,38 +0,0 @@
|
||||
# @<@PROJECT_NAME@>@ CMake version configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
|
||||
|
||||
set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake")
|
||||
SDL_DetectTargetCPUArchitectures(_detected_archs)
|
||||
|
||||
# check that the installed version has a compatible architecture as the one which is currently searching:
|
||||
if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM64 OR SDL_CPU_ARM64EC))
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM64)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for x64 Windows.
|
||||
|
||||
To use this package, simply replace an existing 64-bit @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
# Using this package
|
||||
|
||||
This package contains @<@PROJECT_NAME@>@ built for x86 Windows.
|
||||
|
||||
To use this package, simply replace an existing 32-bit @<@PROJECT_NAME@>@.dll with the one included here.
|
||||
|
||||
# Development packages
|
||||
|
||||
If you're looking for packages with headers and libraries, you can download one of these:
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
|
||||
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: Version */
|
||||
|
||||
/*
|
||||
* SDL_revision.h contains the SDL revision, which might be defined on the
|
||||
* compiler command line, or generated right into the header itself by the
|
||||
* build system.
|
||||
*/
|
||||
|
||||
#ifndef SDL_revision_h_
|
||||
#define SDL_revision_h_
|
||||
|
||||
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
|
||||
|
||||
#if defined(SDL_VENDOR_INFO)
|
||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: Version */
|
||||
|
||||
/*
|
||||
* SDL_revision.h contains the SDL revision, which might be defined on the
|
||||
* compiler command line, or generated right into the header itself by the
|
||||
* build system.
|
||||
*/
|
||||
|
||||
#ifndef SDL_revision_h_
|
||||
#define SDL_revision_h_
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
/**
|
||||
* This macro is a string describing the source at a particular point in
|
||||
* development.
|
||||
*
|
||||
* This string is often generated from revision control's state at build time.
|
||||
*
|
||||
* This string can be quite complex and does not follow any standard. For
|
||||
* example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732".
|
||||
* It might also be user-defined at build time, so it's best to treat it as a
|
||||
* clue in debugging forensics and not something the app will parse in any
|
||||
* way.
|
||||
*
|
||||
* \since This macro is available since SDL 3.0.0.
|
||||
*/
|
||||
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
|
||||
#elif defined(SDL_VENDOR_INFO)
|
||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
-210
@@ -1,210 +0,0 @@
|
||||
{
|
||||
"name": "SDL3",
|
||||
"remote": "libsdl-org/SDL",
|
||||
"version": {
|
||||
"file": "include/SDL3/SDL_version.h",
|
||||
"re_major": "^#define SDL_MAJOR_VERSION\\s+([0-9]+)$",
|
||||
"re_minor": "^#define SDL_MINOR_VERSION\\s+([0-9]+)$",
|
||||
"re_micro": "^#define SDL_MICRO_VERSION\\s+([0-9]+)$"
|
||||
},
|
||||
"source": {
|
||||
"checks": [
|
||||
"src/SDL.c",
|
||||
"include/SDL3/SDL.h",
|
||||
"test/testsprite.c",
|
||||
"android-project/app/src/main/java/org/libsdl/app/SDLActivity.java"
|
||||
],
|
||||
"files": {
|
||||
"include/SDL3": [
|
||||
"build-scripts/pkg-support/source/SDL_revision.h.in:SDL_revision.h"
|
||||
],
|
||||
"include/build_config": [
|
||||
"build-scripts/pkg-support/source/SDL_revision.h.cmake.in:SDL_revision.h.cmake"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dmg": {
|
||||
"project": "Xcode/SDL/SDL.xcodeproj",
|
||||
"path": "Xcode/SDL/build/SDL3.dmg",
|
||||
"target": "SDL3.dmg",
|
||||
"build-xcconfig": "Xcode/SDL/pkg-support/build.xcconfig"
|
||||
},
|
||||
"mingw": {
|
||||
"cmake": {
|
||||
"archs": ["x86", "x64"],
|
||||
"args": [
|
||||
"-DSDL_SHARED=ON",
|
||||
"-DSDL_STATIC=OFF",
|
||||
"-DSDL_DISABLE_INSTALL_DOCS=ON",
|
||||
"-DSDL_RELOCATABLE=ON",
|
||||
"-DSDL_TEST_LIBRARY=ON",
|
||||
"-DSDL_TESTS=OFF",
|
||||
"-DSDL_VENDOR_INFO=libsdl.org"
|
||||
],
|
||||
"shared-static": "args"
|
||||
},
|
||||
"files": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/mingw/INSTALL.md.in:INSTALL.md",
|
||||
"build-scripts/pkg-support/mingw/Makefile",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"cmake": [
|
||||
"build-scripts/pkg-support/mingw/cmake/SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/mingw/cmake/SDL3ConfigVersion.cmake"
|
||||
]
|
||||
}
|
||||
},
|
||||
"msvc": {
|
||||
"msbuild": {
|
||||
"archs": [
|
||||
"x86",
|
||||
"x64"
|
||||
],
|
||||
"directory-build-props": "build-scripts/pkg-support/msvc/Directory.Build.props",
|
||||
"projects": [
|
||||
"VisualC/SDL/SDL.vcxproj",
|
||||
"VisualC/SDL_test/SDL_test.vcxproj"
|
||||
],
|
||||
"files-lib": {
|
||||
"": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.dll"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"lib/@<@ARCH@>@": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.dll",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.lib",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.pdb",
|
||||
"VisualC/SDL_test/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_test.lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"cmake": {
|
||||
"archs": [
|
||||
"arm64"
|
||||
],
|
||||
"args": [
|
||||
"-DSDL_SHARED=ON",
|
||||
"-DSDL_STATIC=OFF",
|
||||
"-DSDL_TEST_LIBRARY=ON",
|
||||
"-DSDL_TESTS=OFF",
|
||||
"-DSDL_DISABLE_INSTALL_DOCS=ON",
|
||||
"-DSDL_RELOCATABLE=ON",
|
||||
"-DSDL_VENDOR_INFO=libsdl.org"
|
||||
],
|
||||
"files-lib": {
|
||||
"": [
|
||||
"bin/SDL3.dll"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"lib/@<@ARCH@>@": [
|
||||
"bin/SDL3.dll",
|
||||
"bin/SDL3.pdb",
|
||||
"lib/SDL3.lib",
|
||||
"lib/SDL3_test.lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files-lib": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/msvc/@<@ARCH@>@/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/msvc/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"cmake": [
|
||||
"build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in:SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake",
|
||||
"cmake/sdlcpu.cmake"
|
||||
],
|
||||
"include/SDL3": [
|
||||
"include/SDL3/*.h"
|
||||
]
|
||||
}
|
||||
},
|
||||
"android": {
|
||||
"cmake": {
|
||||
"args": [
|
||||
"-DSDL_SHARED=ON",
|
||||
"-DSDL_STATIC=OFF",
|
||||
"-DSDL_TEST_LIBRARY=ON",
|
||||
"-DSDL_TESTS=OFF",
|
||||
"-DSDL_ANDROID_JAR=ON",
|
||||
"-DSDL_INSTALL=ON",
|
||||
"-DSDL_INSTALL_DOCS=ON",
|
||||
"-DSDL_VENDOR_INFO=libsdl.org"
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"SDL3-Headers": {
|
||||
"type": "interface",
|
||||
"includes": {
|
||||
"SDL3": ["include/SDL3/*.h"]
|
||||
}
|
||||
},
|
||||
"Headers": {
|
||||
"type": "interface",
|
||||
"export-libraries": [":SDL3-Headers"]
|
||||
},
|
||||
"SDL3_test": {
|
||||
"type": "library",
|
||||
"library": "lib/libSDL3_test.a",
|
||||
"export-libraries": [":Headers"]
|
||||
},
|
||||
"SDL3-shared": {
|
||||
"type": "library",
|
||||
"library": "lib/libSDL3.so",
|
||||
"export-libraries": [":Headers"]
|
||||
},
|
||||
"SDL3": {
|
||||
"type": "interface",
|
||||
"export-libraries": [":SDL3-shared"]
|
||||
}
|
||||
},
|
||||
"jars": {
|
||||
"classes": "share/java/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.jar",
|
||||
"sources": "share/java/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@-sources.jar",
|
||||
"doc": "share/javadoc/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@-javadoc.jar"
|
||||
},
|
||||
"abis": [
|
||||
"armeabi-v7a",
|
||||
"arm64-v8a",
|
||||
"x86",
|
||||
"x86_64"
|
||||
],
|
||||
"api-minimum": 21,
|
||||
"api-target": 35,
|
||||
"ndk-minimum": 21,
|
||||
"aar-files": {
|
||||
"": [
|
||||
"android-project/app/proguard-rules.pro:proguard.txt",
|
||||
"build-scripts/pkg-support/android/aar/__main__.py.in:__main__.py",
|
||||
"build-scripts/pkg-support/android/aar/description.json.in:description.json"
|
||||
],
|
||||
"META-INF": [
|
||||
"LICENSE.txt"
|
||||
],
|
||||
"cmake": [
|
||||
"cmake/sdlcpu.cmake",
|
||||
"build-scripts/pkg-support/android/aar/cmake/SDL3Config.cmake",
|
||||
"build-scripts/pkg-support/android/aar/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake"
|
||||
]
|
||||
},
|
||||
"files": {
|
||||
"": [
|
||||
"build-scripts/pkg-support/android/INSTALL.md.in:INSTALL.md",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
-254
@@ -1,254 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames symbols in the API, updating SDL_oldnames.h and
|
||||
# adding documentation for the change.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import pprint
|
||||
import re
|
||||
import sys
|
||||
from rename_symbols import create_regex_from_replacements, replace_symbols_in_path
|
||||
|
||||
SDL_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
|
||||
SDL_INCLUDE_DIR = SDL_ROOT / "include/SDL3"
|
||||
SDL_BUILD_SCRIPTS = SDL_ROOT / "build-scripts"
|
||||
|
||||
|
||||
def main():
|
||||
if len(args.args) == 0 or (len(args.args) % 2) != 0:
|
||||
print("Usage: %s [-h] [--skip-header-check] header {enum,function,hint,structure,symbol} [old new ...]" % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
# Check whether we can still modify the ABI
|
||||
version_header = pathlib.Path( SDL_INCLUDE_DIR / "SDL_version.h" ).read_text()
|
||||
if not re.search(r"SDL_MINOR_VERSION\s+[01]\s", version_header):
|
||||
raise Exception("ABI is frozen, symbols cannot be renamed")
|
||||
|
||||
# Find the symbol in the headers
|
||||
if pathlib.Path(args.header).is_file():
|
||||
header = pathlib.Path(args.header)
|
||||
else:
|
||||
header = pathlib.Path(SDL_INCLUDE_DIR / args.header)
|
||||
|
||||
if not header.exists():
|
||||
raise Exception("Couldn't find header %s" % header)
|
||||
|
||||
header_name = header.name
|
||||
if (header.name == "SDL_gamepad.h"):
|
||||
header_name = "SDL_gamecontroller.h"
|
||||
|
||||
header_text = header.read_text()
|
||||
|
||||
# Replace the symbols in source code
|
||||
replacements = {}
|
||||
i = 0
|
||||
while i < len(args.args):
|
||||
oldname = args.args[i + 0]
|
||||
newname = args.args[i + 1]
|
||||
|
||||
if not args.skip_header_check and not re.search((r"\b%s\b" % oldname), header_text):
|
||||
raise Exception("Couldn't find %s in %s" % (oldname, header))
|
||||
|
||||
replacements[ oldname ] = newname
|
||||
replacements[ oldname + "_REAL" ] = newname + "_REAL"
|
||||
i += 2
|
||||
|
||||
regex = create_regex_from_replacements(replacements)
|
||||
for dir in ["src", "test", "examples", "include", "docs", "cmake/test"]:
|
||||
replace_symbols_in_path(SDL_ROOT / dir, regex, replacements)
|
||||
|
||||
# Replace the symbols in documentation
|
||||
i = 0
|
||||
while i < len(args.args):
|
||||
oldname = args.args[i + 0]
|
||||
newname = args.args[i + 1]
|
||||
|
||||
add_symbol_to_oldnames(header_name, oldname, newname)
|
||||
add_symbol_to_migration(header_name, args.type, oldname, newname)
|
||||
add_symbol_to_coccinelle(args.type, oldname, newname)
|
||||
i += 2
|
||||
|
||||
|
||||
def add_line(lines, i, section):
|
||||
lines.insert(i, section)
|
||||
i += 1
|
||||
return i
|
||||
|
||||
|
||||
def add_content(lines, i, content, add_trailing_line):
|
||||
if lines[i - 1] == "":
|
||||
lines[i - 1] = content
|
||||
else:
|
||||
i = add_line(lines, i, content)
|
||||
|
||||
if add_trailing_line:
|
||||
i = add_line(lines, i, "")
|
||||
return i
|
||||
|
||||
|
||||
def add_symbol_to_coccinelle(symbol_type, oldname, newname):
|
||||
file = open(SDL_BUILD_SCRIPTS / "SDL_migration.cocci", "a")
|
||||
# Append-adds at last
|
||||
|
||||
if symbol_type == "function":
|
||||
file.write("@@\n")
|
||||
file.write("@@\n")
|
||||
file.write("- %s\n" % oldname)
|
||||
file.write("+ %s\n" % newname)
|
||||
file.write(" (...)\n")
|
||||
|
||||
if symbol_type == "symbol":
|
||||
file.write("@@\n")
|
||||
file.write("@@\n")
|
||||
file.write("- %s\n" % oldname)
|
||||
file.write("+ %s\n" % newname)
|
||||
|
||||
# double check ?
|
||||
if symbol_type == "hint":
|
||||
file.write("@@\n")
|
||||
file.write("@@\n")
|
||||
file.write("- %s\n" % oldname)
|
||||
file.write("+ %s\n" % newname)
|
||||
|
||||
if symbol_type == "enum" or symbol_type == "structure":
|
||||
file.write("@@\n")
|
||||
file.write("typedef %s, %s;\n" % (oldname, newname))
|
||||
file.write("@@\n")
|
||||
file.write("- %s\n" % oldname)
|
||||
file.write("+ %s\n" % newname)
|
||||
|
||||
file.close()
|
||||
|
||||
|
||||
def add_symbol_to_oldnames(header, oldname, newname):
|
||||
file = (SDL_INCLUDE_DIR / "SDL_oldnames.h")
|
||||
lines = file.read_text().splitlines()
|
||||
mode = 0
|
||||
i = 0
|
||||
while i < len(lines):
|
||||
line = lines[i]
|
||||
if line == "#ifdef SDL_ENABLE_OLD_NAMES":
|
||||
if mode == 0:
|
||||
mode = 1
|
||||
section = ("/* ##%s */" % header)
|
||||
section_added = False
|
||||
content = ("#define %s %s" % (oldname, newname))
|
||||
content_added = False
|
||||
else:
|
||||
raise Exception("add_symbol_to_oldnames(): expected mode 0")
|
||||
elif line == "#elif !defined(SDL_DISABLE_OLD_NAMES)":
|
||||
if mode == 1:
|
||||
if not section_added:
|
||||
i = add_line(lines, i, section)
|
||||
|
||||
if not content_added:
|
||||
i = add_content(lines, i, content, True)
|
||||
|
||||
mode = 2
|
||||
section = ("/* ##%s */" % header)
|
||||
section_added = False
|
||||
content = ("#define %s %s_renamed_%s" % (oldname, oldname, newname))
|
||||
content_added = False
|
||||
else:
|
||||
raise Exception("add_symbol_to_oldnames(): expected mode 1")
|
||||
elif line == "#endif /* SDL_ENABLE_OLD_NAMES */":
|
||||
if mode == 2:
|
||||
if not section_added:
|
||||
i = add_line(lines, i, section)
|
||||
|
||||
if not content_added:
|
||||
i = add_content(lines, i, content, True)
|
||||
|
||||
mode = 3
|
||||
else:
|
||||
raise Exception("add_symbol_to_oldnames(): expected mode 2")
|
||||
elif line != "" and (mode == 1 or mode == 2):
|
||||
if line.startswith("/* ##"):
|
||||
if section_added:
|
||||
if not content_added:
|
||||
i = add_content(lines, i, content, True)
|
||||
content_added = True
|
||||
elif line == section:
|
||||
section_added = True
|
||||
elif section < line:
|
||||
i = add_line(lines, i, section)
|
||||
section_added = True
|
||||
i = add_content(lines, i, content, True)
|
||||
content_added = True
|
||||
elif line != "" and section_added and not content_added:
|
||||
if content == line:
|
||||
content_added = True
|
||||
elif content < line:
|
||||
i = add_content(lines, i, content, False)
|
||||
content_added = True
|
||||
i += 1
|
||||
|
||||
file.write_text("\n".join(lines) + "\n")
|
||||
|
||||
|
||||
def add_symbol_to_migration(header, symbol_type, oldname, newname):
|
||||
file = (SDL_ROOT / "docs/README-migration.md")
|
||||
lines = file.read_text().splitlines()
|
||||
section = ("## %s" % header)
|
||||
section_added = False
|
||||
note = ("The following %ss have been renamed:" % symbol_type)
|
||||
note_added = False
|
||||
if symbol_type == "function":
|
||||
content = ("* %s() => %s()" % (oldname, newname))
|
||||
else:
|
||||
content = ("* %s => %s" % (oldname, newname))
|
||||
content_added = False
|
||||
mode = 0
|
||||
i = 0
|
||||
while i < len(lines):
|
||||
line = lines[i]
|
||||
if line.startswith("##") and line.endswith(".h"):
|
||||
if line == section:
|
||||
section_added = True
|
||||
elif section < line:
|
||||
break
|
||||
|
||||
elif section_added and not note_added:
|
||||
if note == line:
|
||||
note_added = True
|
||||
elif note_added and not content_added:
|
||||
if content == line:
|
||||
content_added = True
|
||||
elif line == "" or content < line:
|
||||
i = add_line(lines, i, content)
|
||||
content_added = True
|
||||
i += 1
|
||||
|
||||
if not section_added:
|
||||
i = add_line(lines, i, section)
|
||||
i = add_line(lines, i, "")
|
||||
|
||||
if not note_added:
|
||||
i = add_line(lines, i, note)
|
||||
|
||||
if not content_added:
|
||||
i = add_content(lines, i, content, True)
|
||||
|
||||
file.write_text("\n".join(lines) + "\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
|
||||
parser.add_argument("--skip-header-check", action="store_true")
|
||||
parser.add_argument("header")
|
||||
parser.add_argument("type", choices=["enum", "function", "hint", "structure", "symbol"])
|
||||
parser.add_argument("args", nargs="*")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(-1)
|
||||
|
||||
exit(0)
|
||||
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames SDL headers in the specified paths
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
|
||||
def do_include_replacements(paths):
|
||||
replacements = [
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_image.h(?:[\">])"), r"<SDL3_image/SDL_image.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_mixer.h(?:[\">])"), r"<SDL3_mixer/SDL_mixer.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_net.h(?:[\">])"), r"<SDL3_net/SDL_net.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_rtf.h(?:[\">])"), r"<SDL3_rtf/SDL_rtf.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_ttf.h(?:[\">])"), r"<SDL3_ttf/SDL_ttf.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?SDL_gamecontroller.h(?:[\">])"), r"<SDL3/SDL_gamepad.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?begin_code.h(?:[\">])"), r"<SDL3/SDL_begin_code.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?close_code.h(?:[\">])"), r"<SDL3/SDL_close_code.h>" ),
|
||||
( re.compile(r"(?:[\"<])(?:SDL2/)?(SDL[_a-z0-9]*\.h)(?:[\">])"), r"<SDL3/\1>" )
|
||||
]
|
||||
for entry in paths:
|
||||
path = pathlib.Path(entry)
|
||||
if not path.exists():
|
||||
print("{} does not exist, skipping".format(entry))
|
||||
continue
|
||||
|
||||
replace_headers_in_path(path, replacements)
|
||||
|
||||
|
||||
def replace_headers_in_file(file, replacements):
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
original = rfp.read()
|
||||
contents = original
|
||||
for regex, replacement in replacements:
|
||||
contents = regex.sub(replacement, contents)
|
||||
if contents != original:
|
||||
with file.open("w", encoding="UTF-8", newline="") as wfp:
|
||||
wfp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
print("%s is not text, skipping" % file)
|
||||
except Exception as err:
|
||||
print("%s" % err)
|
||||
|
||||
|
||||
def replace_headers_in_dir(path, replacements):
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
replace_headers_in_dir(entry, replacements)
|
||||
else:
|
||||
print("Processing %s" % entry)
|
||||
replace_headers_in_file(entry, replacements)
|
||||
|
||||
|
||||
def replace_headers_in_path(path, replacements):
|
||||
if path.is_dir():
|
||||
replace_headers_in_dir(path, replacements)
|
||||
else:
|
||||
replace_headers_in_file(path, replacements)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@', description="Rename #include's for SDL3.")
|
||||
parser.add_argument("args", metavar="PATH", nargs="*", help="Input source file")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
do_include_replacements(args.args)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return 1
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-382
@@ -1,382 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames SDL macros in the specified paths
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
|
||||
class TextReplacer:
|
||||
def __init__(self, macros, repl_format):
|
||||
if isinstance(macros, dict):
|
||||
macros_keys = macros.keys()
|
||||
else:
|
||||
macros_keys = macros
|
||||
self.macros = macros
|
||||
self.re_macros = re.compile(r"\W(" + "|".join(macros_keys) + r")(?:\W|$)")
|
||||
self.repl_format = repl_format
|
||||
|
||||
def apply(self, contents):
|
||||
def cb(m):
|
||||
macro = m.group(1)
|
||||
original = m.group(0)
|
||||
match_start, _ = m.span(0)
|
||||
platform_start, platform_end = m.span(1)
|
||||
if isinstance(self.macros, dict):
|
||||
repl_args = (macro, self.macros[macro])
|
||||
else:
|
||||
repl_args = macro,
|
||||
new_text = self.repl_format.format(*repl_args)
|
||||
r = original[:(platform_start-match_start)] + new_text + original[platform_end-match_start:]
|
||||
return r
|
||||
contents, _ = self.re_macros.subn(cb, contents)
|
||||
|
||||
return contents
|
||||
|
||||
|
||||
class MacrosCheck:
|
||||
def __init__(self):
|
||||
self.renamed_platform_macros = TextReplacer(RENAMED_MACROS, "{1}")
|
||||
self.deprecated_platform_macros = TextReplacer(DEPRECATED_PLATFORM_MACROS, "{0} /* {0} has been removed in SDL3 */")
|
||||
|
||||
def run(self, contents):
|
||||
contents = self.renamed_platform_macros.apply(contents)
|
||||
contents = self.deprecated_platform_macros.apply(contents)
|
||||
return contents
|
||||
|
||||
|
||||
def apply_checks(paths):
|
||||
checks = (
|
||||
MacrosCheck(),
|
||||
)
|
||||
|
||||
for entry in paths:
|
||||
path = pathlib.Path(entry)
|
||||
if not path.exists():
|
||||
print("{} does not exist, skipping".format(entry))
|
||||
continue
|
||||
apply_checks_in_path(path, checks)
|
||||
|
||||
|
||||
def apply_checks_in_file(file, checks):
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
original = rfp.read()
|
||||
contents = original
|
||||
for check in checks:
|
||||
contents = check.run(contents)
|
||||
if contents != original:
|
||||
with file.open("w", encoding="UTF-8", newline="") as wfp:
|
||||
wfp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
print("%s is not text, skipping" % file)
|
||||
except Exception as err:
|
||||
print("%s" % err)
|
||||
|
||||
|
||||
def apply_checks_in_dir(path, checks):
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
apply_checks_in_dir(entry, checks)
|
||||
else:
|
||||
print("Processing %s" % entry)
|
||||
apply_checks_in_file(entry, checks)
|
||||
|
||||
|
||||
def apply_checks_in_path(path, checks):
|
||||
if path.is_dir():
|
||||
apply_checks_in_dir(path, checks)
|
||||
else:
|
||||
apply_checks_in_file(path, checks)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@', description="Rename macros for SDL3")
|
||||
parser.add_argument("args", nargs="*", help="Input source files")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
apply_checks(args.args)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return 1
|
||||
|
||||
|
||||
RENAMED_MACROS = {
|
||||
"__AIX__": "SDL_PLATFORM_AIX",
|
||||
"__HAIKU__": "SDL_PLATFORM_HAIKU",
|
||||
"__BSDI__": "SDL_PLATFORM_BSDI",
|
||||
"__FREEBSD__": "SDL_PLATFORM_FREEBSD",
|
||||
"__HPUX__": "SDL_PLATFORM_HPUX",
|
||||
"__IRIX__": "SDL_PLATFORM_IRIX",
|
||||
"__LINUX__": "SDL_PLATFORM_LINUX",
|
||||
"__OS2__": "SDL_PLATFORM_OS2",
|
||||
# "__ANDROID__": "SDL_PLATFORM_ANDROID,
|
||||
"__APPLE__": "SDL_PLATFORM_APPLE",
|
||||
"__TVOS__": "SDL_PLATFORM_TVOS",
|
||||
"__IPHONEOS__": "SDL_PLATFORM_IOS",
|
||||
"__MACOSX__": "SDL_PLATFORM_MACOS",
|
||||
"__NETBSD__": "SDL_PLATFORM_NETBSD",
|
||||
"__OPENBSD__": "SDL_PLATFORM_OPENBSD",
|
||||
"__OSF__": "SDL_PLATFORM_OSF",
|
||||
"__QNXNTO__": "SDL_PLATFORM_QNXNTO",
|
||||
"__RISCOS__": "SDL_PLATFORM_RISCOS",
|
||||
"__SOLARIS__": "SDL_PLATFORM_SOLARIS",
|
||||
"__PSP__": "SDL_PLATFORM_PSP",
|
||||
"__PS2__": "SDL_PLATFORM_PS2",
|
||||
"__VITA__": "SDL_PLATFORM_VITA",
|
||||
"__3DS__": "SDL_PLATFORM_3DS",
|
||||
# "__unix__": "SDL_PLATFORM_UNIX,
|
||||
"__XBOXSERIES__": "SDL_PLATFORM_XBOXSERIES",
|
||||
"__XBOXONE__": "SDL_PLATFORM_XBOXONE",
|
||||
"__WINDOWS__": "SDL_PLATFORM_WINDOWS",
|
||||
"__WIN32__": "SDL_PLATFORM_WIN32",
|
||||
# "__CYGWIN_": "SDL_PLATFORM_CYGWIN",
|
||||
"__WINGDK__": "SDL_PLATFORM_WINGDK",
|
||||
"__GDK__": "SDL_PLATFORM_GDK",
|
||||
# "__EMSCRIPTEN__": "SDL_PLATFORM_EMSCRIPTEN",
|
||||
}
|
||||
|
||||
DEPRECATED_PLATFORM_MACROS = {
|
||||
"__DREAMCAST__",
|
||||
"__NACL__",
|
||||
"__PNACL__",
|
||||
"__WINDOWS__",
|
||||
"__WINRT__",
|
||||
"SDL_ALTIVEC_BLITTERS",
|
||||
"SDL_ARM_NEON_BLITTERS",
|
||||
"SDL_ARM_SIMD_BLITTERS",
|
||||
"SDL_ATOMIC_DISABLED",
|
||||
"SDL_AUDIO_DISABLED",
|
||||
"SDL_AUDIO_DRIVER_AAUDIO",
|
||||
"SDL_AUDIO_DRIVER_ALSA",
|
||||
"SDL_AUDIO_DRIVER_ALSA_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_ANDROID",
|
||||
"SDL_AUDIO_DRIVER_ARTS",
|
||||
"SDL_AUDIO_DRIVER_ARTS_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_COREAUDIO",
|
||||
"SDL_AUDIO_DRIVER_DISK",
|
||||
"SDL_AUDIO_DRIVER_DSOUND",
|
||||
"SDL_AUDIO_DRIVER_DUMMY",
|
||||
"SDL_AUDIO_DRIVER_EMSCRIPTEN",
|
||||
"SDL_AUDIO_DRIVER_ESD",
|
||||
"SDL_AUDIO_DRIVER_ESD_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_FUSIONSOUND",
|
||||
"SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_HAIKU",
|
||||
"SDL_AUDIO_DRIVER_JACK",
|
||||
"SDL_AUDIO_DRIVER_JACK_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_N3DS",
|
||||
"SDL_AUDIO_DRIVER_NAS",
|
||||
"SDL_AUDIO_DRIVER_NAS_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_NETBSD",
|
||||
"SDL_AUDIO_DRIVER_OPENSLES",
|
||||
"SDL_AUDIO_DRIVER_OS2",
|
||||
"SDL_AUDIO_DRIVER_OSS",
|
||||
"SDL_AUDIO_DRIVER_PAUDIO",
|
||||
"SDL_AUDIO_DRIVER_PIPEWIRE",
|
||||
"SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_PS2",
|
||||
"SDL_AUDIO_DRIVER_PSP",
|
||||
"SDL_AUDIO_DRIVER_PULSEAUDIO",
|
||||
"SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_QSA",
|
||||
"SDL_AUDIO_DRIVER_SNDIO",
|
||||
"SDL_AUDIO_DRIVER_SNDIO_DYNAMIC",
|
||||
"SDL_AUDIO_DRIVER_SUNAUDIO",
|
||||
"SDL_AUDIO_DRIVER_VITA",
|
||||
"SDL_AUDIO_DRIVER_WASAPI",
|
||||
"SDL_AUDIO_DRIVER_WINMM",
|
||||
"SDL_CPUINFO_DISABLED",
|
||||
"SDL_DEFAULT_ASSERT_LEVEL",
|
||||
"SDL_EVENTS_DISABLED",
|
||||
"SDL_FILESYSTEM_ANDROID",
|
||||
"SDL_FILESYSTEM_COCOA",
|
||||
"SDL_FILESYSTEM_DISABLED",
|
||||
"SDL_FILESYSTEM_DUMMY",
|
||||
"SDL_FILESYSTEM_EMSCRIPTEN",
|
||||
"SDL_FILESYSTEM_HAIKU",
|
||||
"SDL_FILESYSTEM_N3DS",
|
||||
"SDL_FILESYSTEM_OS2",
|
||||
"SDL_FILESYSTEM_PS2",
|
||||
"SDL_FILESYSTEM_PSP",
|
||||
"SDL_FILESYSTEM_RISCOS",
|
||||
"SDL_FILESYSTEM_UNIX",
|
||||
"SDL_FILESYSTEM_VITA",
|
||||
"SDL_FILESYSTEM_WINDOWS",
|
||||
"SDL_FILE_DISABLED",
|
||||
"SDL_HAPTIC_ANDROID",
|
||||
"SDL_HAPTIC_DINPUT",
|
||||
"SDL_HAPTIC_DISABLED",
|
||||
"SDL_HAPTIC_DUMMY",
|
||||
"SDL_HAPTIC_IOKIT",
|
||||
"SDL_HAPTIC_LINUX",
|
||||
"SDL_HAPTIC_XINPUT",
|
||||
"SDL_HAVE_LIBDECOR_GET_MIN_MAX",
|
||||
"SDL_HAVE_MACHINE_JOYSTICK_H",
|
||||
"SDL_HIDAPI_DISABLED",
|
||||
"SDL_INPUT_FBSDKBIO",
|
||||
"SDL_INPUT_LINUXEV",
|
||||
"SDL_INPUT_LINUXKD",
|
||||
"SDL_INPUT_WSCONS",
|
||||
"SDL_IPHONE_KEYBOARD",
|
||||
"SDL_IPHONE_LAUNCHSCREEN",
|
||||
"SDL_JOYSTICK_ANDROID",
|
||||
"SDL_JOYSTICK_DINPUT",
|
||||
"SDL_JOYSTICK_DISABLED",
|
||||
"SDL_JOYSTICK_DUMMY",
|
||||
"SDL_JOYSTICK_EMSCRIPTEN",
|
||||
"SDL_JOYSTICK_HAIKU",
|
||||
"SDL_JOYSTICK_HIDAPI",
|
||||
"SDL_JOYSTICK_IOKIT",
|
||||
"SDL_JOYSTICK_LINUX",
|
||||
"SDL_JOYSTICK_MFI",
|
||||
"SDL_JOYSTICK_N3DS",
|
||||
"SDL_JOYSTICK_OS2",
|
||||
"SDL_JOYSTICK_PS2",
|
||||
"SDL_JOYSTICK_PSP",
|
||||
"SDL_JOYSTICK_RAWINPUT",
|
||||
"SDL_JOYSTICK_USBHID",
|
||||
"SDL_JOYSTICK_VIRTUAL",
|
||||
"SDL_JOYSTICK_VITA",
|
||||
"SDL_JOYSTICK_WGI",
|
||||
"SDL_JOYSTICK_XINPUT",
|
||||
"SDL_LIBSAMPLERATE_DYNAMIC",
|
||||
"SDL_LIBUSB_DYNAMIC",
|
||||
"SDL_LOADSO_DISABLED",
|
||||
"SDL_LOADSO_DLOPEN",
|
||||
"SDL_LOADSO_DUMMY",
|
||||
"SDL_LOADSO_LDG",
|
||||
"SDL_LOADSO_OS2",
|
||||
"SDL_LOADSO_WINDOWS",
|
||||
"SDL_LOCALE_DISABLED",
|
||||
"SDL_LOCALE_DUMMY",
|
||||
"SDL_MISC_DISABLED",
|
||||
"SDL_MISC_DUMMY",
|
||||
"SDL_POWER_ANDROID",
|
||||
"SDL_POWER_DISABLED",
|
||||
"SDL_POWER_EMSCRIPTEN",
|
||||
"SDL_POWER_HAIKU",
|
||||
"SDL_POWER_HARDWIRED",
|
||||
"SDL_POWER_LINUX",
|
||||
"SDL_POWER_MACOSX",
|
||||
"SDL_POWER_N3DS",
|
||||
"SDL_POWER_PSP",
|
||||
"SDL_POWER_UIKIT",
|
||||
"SDL_POWER_VITA",
|
||||
"SDL_POWER_WINDOWS",
|
||||
"SDL_POWER_WINRT",
|
||||
"SDL_RENDER_DISABLED",
|
||||
"SDL_SENSOR_ANDROID",
|
||||
"SDL_SENSOR_COREMOTION",
|
||||
"SDL_SENSOR_DISABLED",
|
||||
"SDL_SENSOR_DUMMY",
|
||||
"SDL_SENSOR_N3DS",
|
||||
"SDL_SENSOR_VITA",
|
||||
"SDL_SENSOR_WINDOWS",
|
||||
"SDL_THREADS_DISABLED",
|
||||
"SDL_THREAD_GENERIC_COND_SUFFIX",
|
||||
"SDL_THREAD_N3DS",
|
||||
"SDL_THREAD_OS2",
|
||||
"SDL_THREAD_PS2",
|
||||
"SDL_THREAD_PSP",
|
||||
"SDL_THREAD_PTHREAD",
|
||||
"SDL_THREAD_PTHREAD_RECURSIVE_MUTEX",
|
||||
"SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP",
|
||||
"SDL_THREAD_VITA",
|
||||
"SDL_THREAD_WINDOWS",
|
||||
"SDL_TIMERS_DISABLED",
|
||||
"SDL_TIMER_DUMMY",
|
||||
"SDL_TIMER_HAIKU",
|
||||
"SDL_TIMER_N3DS",
|
||||
"SDL_TIMER_OS2",
|
||||
"SDL_TIMER_PS2",
|
||||
"SDL_TIMER_PSP",
|
||||
"SDL_TIMER_UNIX",
|
||||
"SDL_TIMER_VITA",
|
||||
"SDL_TIMER_WINDOWS",
|
||||
"SDL_UDEV_DYNAMIC",
|
||||
"SDL_USE_IME",
|
||||
"SDL_USE_LIBICONV",
|
||||
"SDL_VIDEO_DISABLED",
|
||||
"SDL_VIDEO_DRIVER_ANDROID",
|
||||
"SDL_VIDEO_DRIVER_COCOA",
|
||||
"SDL_VIDEO_DRIVER_DIRECTFB",
|
||||
"SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC",
|
||||
"SDL_VIDEO_DRIVER_DUMMY",
|
||||
"SDL_VIDEO_DRIVER_EMSCRIPTEN",
|
||||
"SDL_VIDEO_DRIVER_HAIKU",
|
||||
"SDL_VIDEO_DRIVER_KMSDRM",
|
||||
"SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC",
|
||||
"SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM",
|
||||
"SDL_VIDEO_DRIVER_N3DS",
|
||||
"SDL_VIDEO_DRIVER_OFFSCREEN",
|
||||
"SDL_VIDEO_DRIVER_OS2",
|
||||
"SDL_VIDEO_DRIVER_PS2",
|
||||
"SDL_VIDEO_DRIVER_PSP",
|
||||
"SDL_VIDEO_DRIVER_QNX",
|
||||
"SDL_VIDEO_DRIVER_RISCOS",
|
||||
"SDL_VIDEO_DRIVER_RPI",
|
||||
"SDL_VIDEO_DRIVER_UIKIT",
|
||||
"SDL_VIDEO_DRIVER_VITA",
|
||||
"SDL_VIDEO_DRIVER_VIVANTE",
|
||||
"SDL_VIDEO_DRIVER_VIVANTE_VDK",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON",
|
||||
"SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH",
|
||||
"SDL_VIDEO_DRIVER_WINDOWS",
|
||||
"SDL_VIDEO_DRIVER_WINRT",
|
||||
"SDL_VIDEO_DRIVER_X11",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR",
|
||||
"SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS",
|
||||
"SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM",
|
||||
"SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS",
|
||||
"SDL_VIDEO_DRIVER_X11_XCURSOR",
|
||||
"SDL_VIDEO_DRIVER_X11_XDBE",
|
||||
"SDL_VIDEO_DRIVER_X11_XFIXES",
|
||||
"SDL_VIDEO_DRIVER_X11_XINPUT2",
|
||||
"SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH",
|
||||
"SDL_VIDEO_DRIVER_X11_XRANDR",
|
||||
"SDL_VIDEO_DRIVER_X11_XSCRNSAVER",
|
||||
"SDL_VIDEO_DRIVER_X11_XSHAPE",
|
||||
"SDL_VIDEO_METAL",
|
||||
"SDL_VIDEO_OPENGL",
|
||||
"SDL_VIDEO_OPENGL_BGL",
|
||||
"SDL_VIDEO_OPENGL_CGL",
|
||||
"SDL_VIDEO_OPENGL_EGL",
|
||||
"SDL_VIDEO_OPENGL_ES",
|
||||
"SDL_VIDEO_OPENGL_ES2",
|
||||
"SDL_VIDEO_OPENGL_GLX",
|
||||
"SDL_VIDEO_OPENGL_OSMESA",
|
||||
"SDL_VIDEO_OPENGL_OSMESA_DYNAMIC",
|
||||
"SDL_VIDEO_OPENGL_WGL",
|
||||
"SDL_VIDEO_RENDER_D3D",
|
||||
"SDL_VIDEO_RENDER_D3D11",
|
||||
"SDL_VIDEO_RENDER_D3D12",
|
||||
"SDL_VIDEO_RENDER_DIRECTFB",
|
||||
"SDL_VIDEO_RENDER_METAL",
|
||||
"SDL_VIDEO_RENDER_OGL",
|
||||
"SDL_VIDEO_RENDER_OGL_ES",
|
||||
"SDL_VIDEO_RENDER_OGL_ES2",
|
||||
"SDL_VIDEO_RENDER_PS2",
|
||||
"SDL_VIDEO_RENDER_PSP",
|
||||
"SDL_VIDEO_RENDER_VITA_GXM",
|
||||
"SDL_VIDEO_VITA_PIB",
|
||||
"SDL_VIDEO_VITA_PVR",
|
||||
"SDL_VIDEO_VITA_PVR_OGL",
|
||||
"SDL_VIDEO_VULKAN",
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames symbols in the specified paths
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
SDL_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
|
||||
SDL_INCLUDE_DIR = SDL_ROOT / "include/SDL3"
|
||||
|
||||
|
||||
def main():
|
||||
if args.all_symbols:
|
||||
if len(args.args) < 1:
|
||||
print("Usage: %s --all-symbols files_or_directories ..." % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
replacements = get_all_replacements()
|
||||
entries = args.args
|
||||
|
||||
else:
|
||||
if len(args.args) < 3:
|
||||
print("Usage: %s [--substring] oldname newname files_or_directories ..." % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
replacements = { args.args[0]: args.args[1] }
|
||||
entries = args.args[2:]
|
||||
|
||||
if args.substring:
|
||||
regex = create_substring_regex_from_replacements(replacements)
|
||||
else:
|
||||
regex = create_regex_from_replacements(replacements)
|
||||
|
||||
for entry in entries:
|
||||
path = pathlib.Path(entry)
|
||||
if not path.exists():
|
||||
print("%s doesn't exist, skipping" % entry)
|
||||
continue
|
||||
|
||||
replace_symbols_in_path(path, regex, replacements)
|
||||
|
||||
|
||||
def get_all_replacements():
|
||||
replacements = {}
|
||||
file = (SDL_INCLUDE_DIR / "SDL_oldnames.h")
|
||||
mode = 0
|
||||
for line in file.read_text().splitlines():
|
||||
if line == "#ifdef SDL_ENABLE_OLD_NAMES":
|
||||
if mode == 0:
|
||||
mode = 1
|
||||
else:
|
||||
raise Exception("get_all_replacements(): expected mode 0")
|
||||
elif line == "#elif !defined(SDL_DISABLE_OLD_NAMES)":
|
||||
if mode == 1:
|
||||
mode = 2
|
||||
else:
|
||||
raise Exception("get_all_replacements(): expected mode 1")
|
||||
elif line == "#endif /* SDL_ENABLE_OLD_NAMES */":
|
||||
if mode == 2:
|
||||
mode = 3
|
||||
else:
|
||||
raise Exception("add_symbol_to_oldnames(): expected mode 2")
|
||||
elif mode == 1 and line.startswith("#define "):
|
||||
words = line.split()
|
||||
replacements[words[1]] = words[2]
|
||||
# In case things are accidentally renamed to the "X_renamed_Y" symbol
|
||||
#replacements[words[1] + "_renamed_" + words[2]] = words[2]
|
||||
|
||||
return replacements
|
||||
|
||||
|
||||
def create_regex_from_replacements(replacements):
|
||||
return re.compile(r"\b(%s)\b" % "|".join(map(re.escape, replacements.keys())))
|
||||
|
||||
|
||||
def create_substring_regex_from_replacements(replacements):
|
||||
return re.compile(r"(%s)" % "|".join(map(re.escape, replacements.keys())))
|
||||
|
||||
|
||||
def replace_symbols_in_file(file, regex, replacements):
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
original = rfp.read()
|
||||
contents = regex.sub(lambda mo: replacements[mo.string[mo.start():mo.end()]], original)
|
||||
if contents != original:
|
||||
with file.open("w", encoding="UTF-8", newline="") as wfp:
|
||||
wfp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
print("%s is not text, skipping" % file)
|
||||
except Exception as err:
|
||||
print("%s" % err)
|
||||
|
||||
|
||||
def replace_symbols_in_dir(path, regex, replacements):
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
replace_symbols_in_dir(entry, regex, replacements)
|
||||
else:
|
||||
print("Processing %s" % entry)
|
||||
replace_symbols_in_file(entry, regex, replacements)
|
||||
|
||||
|
||||
def replace_symbols_in_path(path, regex, replacements):
|
||||
if path.is_dir():
|
||||
replace_symbols_in_dir(path, regex, replacements)
|
||||
else:
|
||||
replace_symbols_in_file(path, regex, replacements)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
|
||||
parser.add_argument("--all-symbols", action="store_true")
|
||||
parser.add_argument("--substring", action="store_true")
|
||||
parser.add_argument("args", nargs="*")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(-1)
|
||||
|
||||
exit(0)
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames symbols in the specified paths
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
if len(args.args) < 1:
|
||||
print("Usage: %s files_or_directories ..." % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
replacements = {
|
||||
"SDL_bool": "bool",
|
||||
"SDL_TRUE": "true",
|
||||
"SDL_FALSE": "false",
|
||||
}
|
||||
entries = args.args[0:]
|
||||
|
||||
regex = create_regex_from_replacements(replacements)
|
||||
|
||||
for entry in entries:
|
||||
path = pathlib.Path(entry)
|
||||
if not path.exists():
|
||||
print("%s doesn't exist, skipping" % entry)
|
||||
continue
|
||||
|
||||
replace_symbols_in_path(path, regex, replacements)
|
||||
|
||||
def create_regex_from_replacements(replacements):
|
||||
return re.compile(r"\b(%s)\b" % "|".join(map(re.escape, replacements.keys())))
|
||||
|
||||
def replace_symbols_in_file(file, regex, replacements):
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
original = rfp.read()
|
||||
contents = regex.sub(lambda mo: replacements[mo.string[mo.start():mo.end()]], original)
|
||||
if contents != original:
|
||||
with file.open("w", encoding="UTF-8", newline="") as wfp:
|
||||
wfp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
print("%s is not text, skipping" % file)
|
||||
except Exception as err:
|
||||
print("%s" % err)
|
||||
|
||||
|
||||
def replace_symbols_in_dir(path, regex, replacements):
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
replace_symbols_in_dir(entry, regex, replacements)
|
||||
else:
|
||||
print("Processing %s" % entry)
|
||||
replace_symbols_in_file(entry, regex, replacements)
|
||||
|
||||
|
||||
def replace_symbols_in_path(path, regex, replacements):
|
||||
if path.is_dir():
|
||||
replace_symbols_in_dir(path, regex, replacements)
|
||||
else:
|
||||
replace_symbols_in_file(path, regex, replacements)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
|
||||
parser.add_argument("args", nargs="*")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(-1)
|
||||
|
||||
exit(0)
|
||||
|
||||
-303
@@ -1,303 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import functools
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import textwrap
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
# Update both variables when updating the GDK
|
||||
GIT_REF = "June_2024_Update_1"
|
||||
GDK_EDITION = "240601" # YYMMUU
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class GdDesktopConfigurator:
|
||||
def __init__(self, gdk_path, arch, vs_folder, vs_version=None, vs_toolset=None, temp_folder=None, git_ref=None, gdk_edition=None):
|
||||
self.git_ref = git_ref or GIT_REF
|
||||
self.gdk_edition = gdk_edition or GDK_EDITION
|
||||
self.gdk_path = gdk_path
|
||||
self.temp_folder = temp_folder or Path(tempfile.gettempdir())
|
||||
self.dl_archive_path = Path(self.temp_folder) / f"{ self.git_ref }.zip"
|
||||
self.gdk_extract_path = Path(self.temp_folder) / f"GDK-{ self.git_ref }"
|
||||
self.arch = arch
|
||||
self.vs_folder = vs_folder
|
||||
self._vs_version = vs_version
|
||||
self._vs_toolset = vs_toolset
|
||||
|
||||
def download_archive(self) -> None:
|
||||
gdk_url = f"https://github.com/microsoft/GDK/archive/refs/tags/{ GIT_REF }.zip"
|
||||
logger.info("Downloading %s to %s", gdk_url, self.dl_archive_path)
|
||||
urllib.request.urlretrieve(gdk_url, self.dl_archive_path)
|
||||
assert self.dl_archive_path.is_file()
|
||||
|
||||
def extract_zip_archive(self) -> None:
|
||||
extract_path = self.gdk_extract_path.parent
|
||||
assert self.dl_archive_path.is_file()
|
||||
logger.info("Extracting %s to %s", self.dl_archive_path, extract_path)
|
||||
with zipfile.ZipFile(self.dl_archive_path) as zf:
|
||||
zf.extractall(extract_path)
|
||||
assert self.gdk_extract_path.is_dir(), f"{self.gdk_extract_path} must exist"
|
||||
|
||||
def extract_development_kit(self) -> None:
|
||||
extract_dks_cmd = self.gdk_extract_path / "SetupScripts/ExtractXboxOneDKs.cmd"
|
||||
assert extract_dks_cmd.is_file()
|
||||
logger.info("Extracting GDK Development Kit: running %s", extract_dks_cmd)
|
||||
cmd = ["cmd.exe", "/C", str(extract_dks_cmd), str(self.gdk_extract_path), str(self.gdk_path)]
|
||||
logger.debug("Running %r", cmd)
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
def detect_vs_version(self) -> str:
|
||||
vs_regex = re.compile("VS([0-9]{4})")
|
||||
supported_vs_versions = []
|
||||
for p in self.gaming_grdk_build_path.iterdir():
|
||||
if not p.is_dir():
|
||||
continue
|
||||
if m := vs_regex.match(p.name):
|
||||
supported_vs_versions.append(m.group(1))
|
||||
logger.info(f"Supported Visual Studio versions: {supported_vs_versions}")
|
||||
vs_versions = set(self.vs_folder.parts).intersection(set(supported_vs_versions))
|
||||
if not vs_versions:
|
||||
raise RuntimeError("Visual Studio version is incompatible")
|
||||
if len(vs_versions) > 1:
|
||||
raise RuntimeError(f"Too many compatible VS versions found ({vs_versions})")
|
||||
vs_version = vs_versions.pop()
|
||||
logger.info(f"Used Visual Studio version: {vs_version}")
|
||||
return vs_version
|
||||
|
||||
def detect_vs_toolset(self) -> str:
|
||||
toolset_paths = []
|
||||
for ts_path in self.gdk_toolset_parent_path.iterdir():
|
||||
if not ts_path.is_dir():
|
||||
continue
|
||||
ms_props = ts_path / "Microsoft.Cpp.props"
|
||||
if not ms_props.is_file():
|
||||
continue
|
||||
toolset_paths.append(ts_path.name)
|
||||
logger.info("Detected Visual Studio toolsets: %s", toolset_paths)
|
||||
assert toolset_paths, "Have we detected at least one toolset?"
|
||||
|
||||
def toolset_number(toolset: str) -> int:
|
||||
if m:= re.match("[^0-9]*([0-9]+).*", toolset):
|
||||
return int(m.group(1))
|
||||
return -9
|
||||
|
||||
return max(toolset_paths, key=toolset_number)
|
||||
|
||||
@property
|
||||
def vs_version(self) -> str:
|
||||
if self._vs_version is None:
|
||||
self._vs_version = self.detect_vs_version()
|
||||
return self._vs_version
|
||||
|
||||
@property
|
||||
def vs_toolset(self) -> str:
|
||||
if self._vs_toolset is None:
|
||||
self._vs_toolset = self.detect_vs_toolset()
|
||||
return self._vs_toolset
|
||||
|
||||
@staticmethod
|
||||
def copy_files_and_merge_into(srcdir: Path, dstdir: Path) -> None:
|
||||
logger.info(f"Copy {srcdir} to {dstdir}")
|
||||
for root, _, files in os.walk(srcdir):
|
||||
dest_root = dstdir / Path(root).relative_to(srcdir)
|
||||
if not dest_root.is_dir():
|
||||
dest_root.mkdir()
|
||||
for file in files:
|
||||
srcfile = Path(root) / file
|
||||
dstfile = dest_root / file
|
||||
shutil.copy(srcfile, dstfile)
|
||||
|
||||
def copy_msbuild(self) -> None:
|
||||
vc_toolset_parent_path = self.vs_folder / "MSBuild/Microsoft/VC"
|
||||
if 1:
|
||||
logger.info(f"Detected compatible Visual Studio version: {self.vs_version}")
|
||||
srcdir = vc_toolset_parent_path
|
||||
dstdir = self.gdk_toolset_parent_path
|
||||
assert srcdir.is_dir(), "Source directory must exist"
|
||||
assert dstdir.is_dir(), "Destination directory must exist"
|
||||
|
||||
self.copy_files_and_merge_into(srcdir=srcdir, dstdir=dstdir)
|
||||
|
||||
@property
|
||||
def game_dk_path(self) -> Path:
|
||||
return self.gdk_path / "Microsoft GDK"
|
||||
|
||||
@property
|
||||
def game_dk_latest_path(self) -> Path:
|
||||
return self.game_dk_path / self.gdk_edition
|
||||
|
||||
@property
|
||||
def windows_sdk_path(self) -> Path:
|
||||
return self.gdk_path / "Windows Kits/10"
|
||||
|
||||
@property
|
||||
def gaming_grdk_build_path(self) -> Path:
|
||||
return self.game_dk_latest_path / "GRDK"
|
||||
|
||||
@property
|
||||
def gdk_toolset_parent_path(self) -> Path:
|
||||
return self.gaming_grdk_build_path / f"VS{self.vs_version}/flatDeployment/MSBuild/Microsoft/VC"
|
||||
|
||||
@property
|
||||
def env(self) -> dict[str, str]:
|
||||
game_dk = self.game_dk_path
|
||||
game_dk_latest = self.game_dk_latest_path
|
||||
windows_sdk_dir = self.windows_sdk_path
|
||||
gaming_grdk_build = self.gaming_grdk_build_path
|
||||
|
||||
return {
|
||||
"GRDKEDITION": f"{self.gdk_edition}",
|
||||
"GameDK": f"{game_dk}\\",
|
||||
"GameDKLatest": f"{ game_dk_latest }\\",
|
||||
"WindowsSdkDir": f"{ windows_sdk_dir }\\",
|
||||
"GamingGRDKBuild": f"{ gaming_grdk_build }\\",
|
||||
"VSInstallDir": f"{ self.vs_folder }\\",
|
||||
}
|
||||
|
||||
def create_user_props(self, path: Path) -> None:
|
||||
vc_targets_path = self.gaming_grdk_build_path / f"VS{ self.vs_version }/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
vc_targets_path16 = self.gaming_grdk_build_path / f"VS2019/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
vc_targets_path17 = self.gaming_grdk_build_path / f"VS2022/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
additional_include_directories = ";".join(str(p) for p in self.gdk_include_paths)
|
||||
additional_library_directories = ";".join(str(p) for p in self.gdk_library_paths)
|
||||
durango_xdk_install_path = self.gdk_path / "Microsoft GDK"
|
||||
with path.open("w") as f:
|
||||
f.write(textwrap.dedent(f"""\
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VCTargetsPath>{ vc_targets_path }\\</VCTargetsPath>
|
||||
<VCTargetsPath16>{ vc_targets_path16 }\\</VCTargetsPath16>
|
||||
<VCTargetsPath17>{ vc_targets_path17 }\\</VCTargetsPath17>
|
||||
<BWOI_GDK_Path>{ self.gaming_grdk_build_path }\\</BWOI_GDK_Path>
|
||||
<Platform Condition="'$(Platform)' == ''">Gaming.Desktop.x64</Platform>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<XdkEditionTarget>{ self.gdk_edition }</XdkEditionTarget>
|
||||
<DurangoXdkInstallPath>{ durango_xdk_install_path }</DurangoXdkInstallPath>
|
||||
|
||||
<DefaultXdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2019>
|
||||
<XdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2019>
|
||||
<DefaultXdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2022>
|
||||
<XdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2022>
|
||||
|
||||
<Deterministic>true</Deterministic>
|
||||
<DisableInstalledVCTargetsUse>true</DisableInstalledVCTargetsUse>
|
||||
<ClearDevCommandPromptEnvVars>true</ClearDevCommandPromptEnvVars>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Gaming.Desktop.x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>{ additional_include_directories };%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>{ additional_library_directories };%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
"""))
|
||||
|
||||
@property
|
||||
def gdk_include_paths(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / "gamekit/include",
|
||||
]
|
||||
|
||||
@property
|
||||
def gdk_library_paths(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / f"gamekit/lib/{self.arch}",
|
||||
]
|
||||
|
||||
@property
|
||||
def gdk_binary_path(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / "bin",
|
||||
self.game_dk_path / "bin",
|
||||
]
|
||||
|
||||
@property
|
||||
def build_env(self) -> dict[str, str]:
|
||||
gdk_include = ";".join(str(p) for p in self.gdk_include_paths)
|
||||
gdk_lib = ";".join(str(p) for p in self.gdk_library_paths)
|
||||
gdk_path = ";".join(str(p) for p in self.gdk_binary_path)
|
||||
return {
|
||||
"GDK_INCLUDE": gdk_include,
|
||||
"GDK_LIB": gdk_lib,
|
||||
"GDK_PATH": gdk_path,
|
||||
}
|
||||
|
||||
def print_env(self) -> None:
|
||||
for k, v in self.env.items():
|
||||
print(f"set \"{k}={v}\"")
|
||||
print()
|
||||
for k, v in self.build_env.items():
|
||||
print(f"set \"{k}={v}\"")
|
||||
print()
|
||||
print(f"set \"PATH=%GDK_PATH%;%PATH%\"")
|
||||
print(f"set \"LIB=%GDK_LIB%;%LIB%\"")
|
||||
print(f"set \"INCLUDE=%GDK_INCLUDE%;%INCLUDE%\"")
|
||||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--arch", choices=["amd64"], default="amd64", help="Architecture")
|
||||
parser.add_argument("--download", action="store_true", help="Download GDK")
|
||||
parser.add_argument("--extract", action="store_true", help="Extract downloaded GDK")
|
||||
parser.add_argument("--copy-msbuild", action="store_true", help="Copy MSBuild files")
|
||||
parser.add_argument("--temp-folder", help="Temporary folder where to download and extract GDK")
|
||||
parser.add_argument("--gdk-path", required=True, type=Path, help="Folder where to store the GDK")
|
||||
parser.add_argument("--ref-edition", type=str, help="Git ref and GDK edition separated by comma")
|
||||
parser.add_argument("--vs-folder", required=True, type=Path, help="Installation folder of Visual Studio")
|
||||
parser.add_argument("--vs-version", required=False, type=int, help="Visual Studio version")
|
||||
parser.add_argument("--vs-toolset", required=False, help="Visual Studio toolset (e.g. v150)")
|
||||
parser.add_argument("--props-folder", required=False, type=Path, default=Path(), help="Visual Studio toolset (e.g. v150)")
|
||||
parser.add_argument("--no-user-props", required=False, dest="user_props", action="store_false", help="Don't ")
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
git_ref = None
|
||||
gdk_edition = None
|
||||
if args.ref_edition is not None:
|
||||
git_ref, gdk_edition = args.ref_edition.split(",", 1)
|
||||
try:
|
||||
int(gdk_edition)
|
||||
except ValueError:
|
||||
parser.error("Edition should be an integer (YYMMUU) (Y=year M=month U=update)")
|
||||
|
||||
configurator = GdDesktopConfigurator(
|
||||
arch=args.arch,
|
||||
git_ref=git_ref,
|
||||
gdk_edition=gdk_edition,
|
||||
vs_folder=args.vs_folder,
|
||||
vs_version=args.vs_version,
|
||||
vs_toolset=args.vs_toolset,
|
||||
gdk_path=args.gdk_path,
|
||||
temp_folder=args.temp_folder,
|
||||
)
|
||||
|
||||
if args.download:
|
||||
configurator.download_archive()
|
||||
|
||||
if args.extract:
|
||||
configurator.extract_zip_archive()
|
||||
|
||||
configurator.extract_development_kit()
|
||||
|
||||
if args.copy_msbuild:
|
||||
configurator.copy_msbuild()
|
||||
|
||||
if args.user_props:
|
||||
configurator.print_env()
|
||||
configurator.create_user_props(args.props_folder / "Directory.Build.props")
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
-3405
File diff suppressed because it is too large
Load Diff
-184
@@ -1,184 +0,0 @@
|
||||
if(MSVC)
|
||||
function(SDL_Preseed_CMakeCache)
|
||||
set(COMPILER_SUPPORTS_W3 "1" CACHE INTERNAL "Test /W3")
|
||||
set(COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR_ALWAYS "" CACHE INTERNAL "Test COMPILER_SUPPORTS_FDIAGNOSTICS_COLOR_ALWAYS")
|
||||
set(HAVE_ALLOCA_H "" CACHE INTERNAL "Have include alloca.h")
|
||||
set(HAVE_AUDIOCLIENT_H "1" CACHE INTERNAL "Have include audioclient.h")
|
||||
set(HAVE_D3D11_H "1" CACHE INTERNAL "Have include d3d11_1.h")
|
||||
set(HAVE_D3D9_H "1" CACHE INTERNAL "Have include d3d9.h")
|
||||
set(HAVE_DDRAW_H "1" CACHE INTERNAL "Have include ddraw.h")
|
||||
set(HAVE_DINPUT_H "1" CACHE INTERNAL "Have include dinput.h")
|
||||
set(HAVE_DSOUND_H "1" CACHE INTERNAL "Have include dsound.h")
|
||||
set(HAVE_DXGI_H "1" CACHE INTERNAL "Have include dxgi.h")
|
||||
set(HAVE_LIBM "" CACHE INTERNAL "Have library m")
|
||||
set(HAVE_MALLOC "1" CACHE INTERNAL "Have include malloc.h")
|
||||
set(HAVE_MMDEVICEAPI_H "1" CACHE INTERNAL "Have include mmdeviceapi.h")
|
||||
set(HAVE_SENSORSAPI_H "1" CACHE INTERNAL "Have include sensorsapi.h")
|
||||
set(HAVE_SHELLSCALINGAPI_H "1" CACHE INTERNAL "Have include shellscalingapi.h")
|
||||
set(HAVE_SHOBJIDL_CORE_H "1" CACHE INTERNAL "Have include shobjidl_core.h")
|
||||
set(HAVE_TPCSHRD_H "1" CACHE INTERNAL "Have include tpcshrd.h")
|
||||
set(HAVE_WIN32_CC "1" CACHE INTERNAL "Test HAVE_WIN32_CC")
|
||||
set(HAVE_XINPUT_H "1" CACHE INTERNAL "Test HAVE_XINPUT_H")
|
||||
set(LIBC_HAS_ABS "1" CACHE INTERNAL "Have symbol abs")
|
||||
set(LIBC_HAS_ACOS "1" CACHE INTERNAL "Have symbol acos")
|
||||
set(LIBC_HAS_ACOSF "1" CACHE INTERNAL "Have symbol acosf")
|
||||
set(LIBC_HAS_ASIN "1" CACHE INTERNAL "Have symbol asin")
|
||||
set(LIBC_HAS_ASINF "1" CACHE INTERNAL "Have symbol asinf")
|
||||
set(LIBC_HAS_ATAN "1" CACHE INTERNAL "Have symbol atan")
|
||||
set(LIBC_HAS_ATAN2 "1" CACHE INTERNAL "Have symbol atan2")
|
||||
set(LIBC_HAS_ATAN2F "1" CACHE INTERNAL "Have symbol atan2f")
|
||||
set(LIBC_HAS_ATANF "1" CACHE INTERNAL "Have symbol atanf")
|
||||
set(LIBC_HAS_ATOF "1" CACHE INTERNAL "Have symbol atof")
|
||||
set(LIBC_HAS_ATOI "1" CACHE INTERNAL "Have symbol atoi")
|
||||
set(LIBC_HAS_BCOPY "" CACHE INTERNAL "Have symbol bcopy")
|
||||
set(LIBC_HAS_CALLOC "1" CACHE INTERNAL "Have symbol calloc")
|
||||
set(LIBC_HAS_CEIL "1" CACHE INTERNAL "Have symbol ceil")
|
||||
set(LIBC_HAS_CEILF "1" CACHE INTERNAL "Have symbol ceilf")
|
||||
set(LIBC_HAS_COPYSIGN "1" CACHE INTERNAL "Have symbol copysign")
|
||||
set(LIBC_HAS_COPYSIGNF "1" CACHE INTERNAL "Have symbol copysignf")
|
||||
set(LIBC_HAS_COS "1" CACHE INTERNAL "Have symbol cos")
|
||||
set(LIBC_HAS_COSF "1" CACHE INTERNAL "Have symbol cosf")
|
||||
set(LIBC_HAS_EXP "1" CACHE INTERNAL "Have symbol exp")
|
||||
set(LIBC_HAS_EXPF "1" CACHE INTERNAL "Have symbol expf")
|
||||
set(LIBC_HAS_FABS "1" CACHE INTERNAL "Have symbol fabs")
|
||||
set(LIBC_HAS_FABSF "1" CACHE INTERNAL "Have symbol fabsf")
|
||||
set(LIBC_HAS_FLOAT_H "1" CACHE INTERNAL "Have include float.h")
|
||||
set(LIBC_HAS_FLOOR "1" CACHE INTERNAL "Have symbol floor")
|
||||
set(LIBC_HAS_FLOORF "1" CACHE INTERNAL "Have symbol floorf")
|
||||
set(LIBC_HAS_FMOD "1" CACHE INTERNAL "Have symbol fmod")
|
||||
set(LIBC_HAS_FMODF "1" CACHE INTERNAL "Have symbol fmodf")
|
||||
set(LIBC_HAS_FOPEN64 "" CACHE INTERNAL "Have symbol fopen64")
|
||||
set(LIBC_HAS_FREE "1" CACHE INTERNAL "Have symbol free")
|
||||
set(LIBC_HAS_FSEEKO "" CACHE INTERNAL "Have symbol fseeko")
|
||||
set(LIBC_HAS_FSEEKO64 "" CACHE INTERNAL "Have symbol fseeko64")
|
||||
set(LIBC_HAS_GETENV "1" CACHE INTERNAL "Have symbol getenv")
|
||||
set(LIBC_HAS_ICONV_H "" CACHE INTERNAL "Have include iconv.h")
|
||||
set(LIBC_HAS_INDEX "" CACHE INTERNAL "Have symbol index")
|
||||
set(LIBC_HAS_INTTYPES_H "1" CACHE INTERNAL "Have include inttypes.h")
|
||||
set(LIBC_HAS_ISINF "1" CACHE INTERNAL "Have include isinf(double)")
|
||||
set(LIBC_ISINF_HANDLES_FLOAT "1" CACHE INTERNAL "Have include isinf(float)")
|
||||
set(LIBC_HAS_ISINFF "" CACHE INTERNAL "Have include isinff(float)")
|
||||
set(LIBC_HAS_ISNAN "1" CACHE INTERNAL "Have include isnan(double)")
|
||||
set(LIBC_ISNAN_HANDLES_FLOAT "1" CACHE INTERNAL "Have include isnan(float)")
|
||||
set(LIBC_HAS_ISNANF "" CACHE INTERNAL "Have include isnanf(float)")
|
||||
set(LIBC_HAS_ITOA "1" CACHE INTERNAL "Have symbol itoa")
|
||||
set(LIBC_HAS_LIMITS_H "1" CACHE INTERNAL "Have include limits.h")
|
||||
set(LIBC_HAS_LOG "1" CACHE INTERNAL "Have symbol log")
|
||||
set(LIBC_HAS_LOG10 "1" CACHE INTERNAL "Have symbol log10")
|
||||
set(LIBC_HAS_LOG10F "1" CACHE INTERNAL "Have symbol log10f")
|
||||
set(LIBC_HAS_LOGF "1" CACHE INTERNAL "Have symbol logf")
|
||||
set(LIBC_HAS_LROUND "1" CACHE INTERNAL "Have symbol lround")
|
||||
set(LIBC_HAS_LROUNDF "1" CACHE INTERNAL "Have symbol lroundf")
|
||||
set(LIBC_HAS_MALLOC "1" CACHE INTERNAL "Have symbol malloc")
|
||||
set(LIBC_HAS_MALLOC_H "1" CACHE INTERNAL "Have include malloc.h")
|
||||
set(LIBC_HAS_MATH_H "1" CACHE INTERNAL "Have include math.h")
|
||||
set(LIBC_HAS_MEMCMP "1" CACHE INTERNAL "Have symbol memcmp")
|
||||
set(LIBC_HAS_MEMCPY "1" CACHE INTERNAL "Have symbol memcpy")
|
||||
set(LIBC_HAS_MEMMOVE "1" CACHE INTERNAL "Have symbol memmove")
|
||||
set(LIBC_HAS_MEMORY_H "1" CACHE INTERNAL "Have include memory.h")
|
||||
set(LIBC_HAS_MEMSET "1" CACHE INTERNAL "Have symbol memset")
|
||||
set(LIBC_HAS_MODF "1" CACHE INTERNAL "Have symbol modf")
|
||||
set(LIBC_HAS_MODFF "1" CACHE INTERNAL "Have symbol modff")
|
||||
set(LIBC_HAS_POW "1" CACHE INTERNAL "Have symbol pow")
|
||||
set(LIBC_HAS_POWF "1" CACHE INTERNAL "Have symbol powf")
|
||||
set(LIBC_HAS_PUTENV "1" CACHE INTERNAL "Have symbol putenv")
|
||||
set(LIBC_HAS_REALLOC "1" CACHE INTERNAL "Have symbol realloc")
|
||||
set(LIBC_HAS_RINDEX "" CACHE INTERNAL "Have symbol rindex")
|
||||
set(LIBC_HAS_ROUND "1" CACHE INTERNAL "Have symbol round")
|
||||
set(LIBC_HAS_ROUNDF "1" CACHE INTERNAL "Have symbol roundf")
|
||||
set(LIBC_HAS_SCALBN "1" CACHE INTERNAL "Have symbol scalbn")
|
||||
set(LIBC_HAS_SCALBNF "1" CACHE INTERNAL "Have symbol scalbnf")
|
||||
set(LIBC_HAS_SETENV "" CACHE INTERNAL "Have symbol setenv")
|
||||
set(LIBC_HAS_SIGNAL_H "1" CACHE INTERNAL "Have include signal.h")
|
||||
set(LIBC_HAS_SIN "1" CACHE INTERNAL "Have symbol sin")
|
||||
set(LIBC_HAS_SINF "1" CACHE INTERNAL "Have symbol sinf")
|
||||
set(LIBC_HAS_SQR "" CACHE INTERNAL "Have symbol sqr")
|
||||
set(LIBC_HAS_SQRT "1" CACHE INTERNAL "Have symbol sqrt")
|
||||
set(LIBC_HAS_SQRTF "1" CACHE INTERNAL "Have symbol sqrtf")
|
||||
set(LIBC_HAS_SSCANF "1" CACHE INTERNAL "Have symbol sscanf")
|
||||
set(LIBC_HAS_STDARG_H "1" CACHE INTERNAL "Have include stdarg.h")
|
||||
set(LIBC_HAS_STDBOOL_H "1" CACHE INTERNAL "Have include stdbool.h")
|
||||
set(LIBC_HAS_STDDEF_H "1" CACHE INTERNAL "Have include stddef.h")
|
||||
set(LIBC_HAS_STDINT_H "1" CACHE INTERNAL "Have include stdint.h")
|
||||
set(LIBC_HAS_STDIO_H "1" CACHE INTERNAL "Have include stdio.h")
|
||||
set(LIBC_HAS_STDLIB_H "1" CACHE INTERNAL "Have include stdlib.h")
|
||||
set(LIBC_HAS_STRCHR "1" CACHE INTERNAL "Have symbol strchr")
|
||||
set(LIBC_HAS_STRCMP "1" CACHE INTERNAL "Have symbol strcmp")
|
||||
set(LIBC_HAS_STRINGS_H "" CACHE INTERNAL "Have include strings.h")
|
||||
set(LIBC_HAS_STRING_H "1" CACHE INTERNAL "Have include string.h")
|
||||
set(LIBC_HAS_STRLCAT "" CACHE INTERNAL "Have symbol strlcat")
|
||||
set(LIBC_HAS_STRLCPY "" CACHE INTERNAL "Have symbol strlcpy")
|
||||
set(LIBC_HAS_STRLEN "1" CACHE INTERNAL "Have symbol strlen")
|
||||
set(LIBC_HAS_STRNCMP "1" CACHE INTERNAL "Have symbol strncmp")
|
||||
set(LIBC_HAS_STRNLEN "1" CACHE INTERNAL "Have symbol strnlen")
|
||||
set(LIBC_HAS_STRNSTR "" CACHE INTERNAL "Have symbol strnstr")
|
||||
set(LIBC_HAS_STRPBRK "1" CACHE INTERNAL "Have symbol strpbrk")
|
||||
set(LIBC_HAS_STRRCHR "1" CACHE INTERNAL "Have symbol strrchr")
|
||||
set(LIBC_HAS_STRSTR "1" CACHE INTERNAL "Have symbol strstr")
|
||||
set(LIBC_HAS_STRTOD "1" CACHE INTERNAL "Have symbol strtod")
|
||||
set(LIBC_HAS_STRTOK_R "" CACHE INTERNAL "Have symbol strtok_r")
|
||||
set(LIBC_HAS_STRTOL "1" CACHE INTERNAL "Have symbol strtol")
|
||||
set(LIBC_HAS_STRTOLL "1" CACHE INTERNAL "Have symbol strtoll")
|
||||
set(LIBC_HAS_STRTOUL "1" CACHE INTERNAL "Have symbol strtoul")
|
||||
set(LIBC_HAS_STRTOULL "1" CACHE INTERNAL "Have symbol strtoull")
|
||||
set(LIBC_HAS_SYS_TYPES_H "1" CACHE INTERNAL "Have include sys/types.h")
|
||||
set(LIBC_HAS_TAN "1" CACHE INTERNAL "Have symbol tan")
|
||||
set(LIBC_HAS_TANF "1" CACHE INTERNAL "Have symbol tanf")
|
||||
set(LIBC_HAS_TIME_H "1" CACHE INTERNAL "Have include time.h")
|
||||
set(LIBC_HAS_TRUNC "1" CACHE INTERNAL "Have symbol trunc")
|
||||
set(LIBC_HAS_TRUNCF "1" CACHE INTERNAL "Have symbol truncf")
|
||||
set(LIBC_HAS_UNSETENV "" CACHE INTERNAL "Have symbol unsetenv")
|
||||
set(LIBC_HAS_VSNPRINTF "1" CACHE INTERNAL "Have symbol vsnprintf")
|
||||
set(LIBC_HAS_VSSCANF "1" CACHE INTERNAL "Have symbol vsscanf")
|
||||
set(LIBC_HAS_WCHAR_H "1" CACHE INTERNAL "Have include wchar.h")
|
||||
set(LIBC_HAS_WCSCMP "1" CACHE INTERNAL "Have symbol wcscmp")
|
||||
set(LIBC_HAS_WCSDUP "1" CACHE INTERNAL "Have symbol wcsdup")
|
||||
set(LIBC_HAS_WCSLCAT "" CACHE INTERNAL "Have symbol wcslcat")
|
||||
set(LIBC_HAS_WCSLCPY "" CACHE INTERNAL "Have symbol wcslcpy")
|
||||
set(LIBC_HAS_WCSLEN "1" CACHE INTERNAL "Have symbol wcslen")
|
||||
set(LIBC_HAS_WCSNCMP "1" CACHE INTERNAL "Have symbol wcsncmp")
|
||||
set(LIBC_HAS_WCSNLEN "1" CACHE INTERNAL "Have symbol wcsnlen")
|
||||
set(LIBC_HAS_WCSSTR "1" CACHE INTERNAL "Have symbol wcsstr")
|
||||
set(LIBC_HAS_WCSTOL "1" CACHE INTERNAL "Have symbol wcstol")
|
||||
set(LIBC_HAS__EXIT "1" CACHE INTERNAL "Have symbol _Exit")
|
||||
set(LIBC_HAS__I64TOA "1" CACHE INTERNAL "Have symbol _i64toa")
|
||||
set(LIBC_HAS__LTOA "1" CACHE INTERNAL "Have symbol _ltoa")
|
||||
set(LIBC_HAS__STRREV "1" CACHE INTERNAL "Have symbol _strrev")
|
||||
set(LIBC_HAS__UI64TOA "1" CACHE INTERNAL "Have symbol _ui64toa")
|
||||
set(LIBC_HAS__UITOA "" CACHE INTERNAL "Have symbol _uitoa")
|
||||
set(LIBC_HAS__ULTOA "1" CACHE INTERNAL "Have symbol _ultoa")
|
||||
set(LIBC_HAS__WCSDUP "1" CACHE INTERNAL "Have symbol _wcsdup")
|
||||
set(LIBC_IS_GLIBC "" CACHE INTERNAL "Have symbol __GLIBC__")
|
||||
set(_ALLOCA_IN_MALLOC_H "" CACHE INTERNAL "Have symbol _alloca")
|
||||
|
||||
if(CHECK_CPU_ARCHITECTURE_X86)
|
||||
set(COMPILER_SUPPORTS_AVX "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_AVX")
|
||||
set(COMPILER_SUPPORTS_AVX2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_AVX2")
|
||||
set(COMPILER_SUPPORTS_MMX "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_MMX")
|
||||
set(COMPILER_SUPPORTS_SSE "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE")
|
||||
set(COMPILER_SUPPORTS_SSE2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE2")
|
||||
set(COMPILER_SUPPORTS_SSE3 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE3")
|
||||
set(COMPILER_SUPPORTS_SSE4_1 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE4_1")
|
||||
set(COMPILER_SUPPORTS_SSE4_2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE4_2")
|
||||
endif()
|
||||
|
||||
if(CHECK_CPU_ARCHITECTURE_X64)
|
||||
set(COMPILER_SUPPORTS_AVX "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_AVX")
|
||||
set(COMPILER_SUPPORTS_AVX2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_AVX2")
|
||||
set(COMPILER_SUPPORTS_MMX "" CACHE INTERNAL "Test COMPILER_SUPPORTS_MMX")
|
||||
set(COMPILER_SUPPORTS_SSE "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE")
|
||||
set(COMPILER_SUPPORTS_SSE2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE2")
|
||||
set(COMPILER_SUPPORTS_SSE3 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE3")
|
||||
set(COMPILER_SUPPORTS_SSE4_1 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE4_1")
|
||||
set(COMPILER_SUPPORTS_SSE4_2 "1" CACHE INTERNAL "Test COMPILER_SUPPORTS_SSE4_2")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.1")
|
||||
set(HAVE_ROAPI_H "1" CACHE INTERNAL "Have include roapi.h")
|
||||
set(HAVE_WINDOWS_GAMING_INPUT_H "1" CACHE INTERNAL "Test HAVE_WINDOWS_GAMING_INPUT_H")
|
||||
else()
|
||||
set(HAVE_ROAPI_H "" CACHE INTERNAL "Have include roapi.h")
|
||||
set(HAVE_WINDOWS_GAMING_INPUT_H "" CACHE INTERNAL "Test HAVE_WINDOWS_GAMING_INPUT_H")
|
||||
endif()
|
||||
endfunction()
|
||||
endif()
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
# SDL cmake project-config input for CMakeLists.txt script
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL3 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(SDL3_FOUND TRUE)
|
||||
set(_sdl3_framework @SDL_FRAMEWORK@)
|
||||
|
||||
# Find SDL3::Headers
|
||||
if(NOT TARGET SDL3::Headers)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3headersTargets.cmake")
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.25")
|
||||
set_property(TARGET SDL3::Headers PROPERTY SYSTEM 0)
|
||||
endif()
|
||||
endif()
|
||||
set(SDL3_Headers_FOUND TRUE)
|
||||
|
||||
# Find SDL3::SDL3-shared
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3sharedTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3sharedTargets.cmake")
|
||||
set(SDL3_SDL3-shared_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
macro(find_sdl3_static_dependencies)
|
||||
@SDL_FIND_PKG_CONFIG_COMMANDS@
|
||||
endmacro()
|
||||
|
||||
# Find SDL3::SDL3-static
|
||||
if(_sdl3_framework)
|
||||
set(SDL3_SDL3-static_FOUND TRUE)
|
||||
find_sdl3_static_dependencies()
|
||||
find_package(SDL3-static CONFIG)
|
||||
if(SDL3_SDL3-static_FOUND AND SDL3-static_FOUND)
|
||||
set(SDL3_SDL3-static_FOUND TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
|
||||
set(SDL3_SDL3-static_FOUND TRUE)
|
||||
find_sdl3_static_dependencies()
|
||||
if(SDL3_SDL3-static_FOUND)
|
||||
if(ANDROID OR HAIKU)
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3jarTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3jarTargets.cmake")
|
||||
set(SDL3_Jar_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
|
||||
set(SDL3_SDL3_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
# Find SDL3::SDL3_test
|
||||
if(_sdl3_framework)
|
||||
find_package(SDL3_test CONFIG)
|
||||
if(SDL3_test_FOUND)
|
||||
enable_language(OBJC)
|
||||
set(SDL3_SDL3_test_FOUND TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
|
||||
set(SDL3_SDL3_test_FOUND TRUE)
|
||||
@SDL_TEST_FIND_PKG_CONFIG_COMMANDS@
|
||||
if(SDL3_SDL3_test_FOUND)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SDL3_COMPONENTS AND NOT TARGET SDL3::Headers AND NOT TARGET SDL3::SDL3-shared AND NOT TARGET SDL3::SDL3-static)
|
||||
set(SDL3_FOUND FALSE)
|
||||
endif()
|
||||
check_required_components(SDL3)
|
||||
|
||||
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
add_library(${NEW_TARGET} INTERFACE IMPORTED)
|
||||
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
|
||||
else()
|
||||
add_library(${NEW_TARGET} ALIAS ${TARGET})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Make sure SDL3::SDL3 always exists
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
if(TARGET SDL3::SDL3-shared)
|
||||
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
|
||||
elseif(TARGET SDL3::SDL3-static)
|
||||
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(SDL3_LIBRARIES SDL3::SDL3)
|
||||
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
|
||||
set(SDL3_STATIC_PRIVATE_LIBS)
|
||||
|
||||
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
# FreeBSD / OpenBSD / NetBSD
|
||||
|
||||
SDL is fully supported on BSD platforms, and is built using [CMake](README-cmake.md).
|
||||
|
||||
If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
# Platforms
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
- [Android](README-android.md)
|
||||
- [Emscripten](README-emscripten.md)
|
||||
- [FreeBSD](README-bsd.md)
|
||||
- [Haiku OS](README-haiku.md)
|
||||
- [iOS](README-ios.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [macOS](README-macos.md)
|
||||
- [NetBSD](README-bsd.md)
|
||||
- [Nintendo Switch](README-switch.md)
|
||||
- [Nintendo 3DS](README-n3ds.md)
|
||||
- [OpenBSD](README-bsd.md)
|
||||
- [PlayStation 2](README-ps2.md)
|
||||
- [PlayStation 4](README-ps4.md)
|
||||
- [PlayStation 5](README-ps5.md)
|
||||
- [PlayStation Portable](README-psp.md)
|
||||
- [PlayStation Vita](README-vita.md)
|
||||
- [RISC OS](README-riscos.md)
|
||||
- [SteamOS](README-steamos.md)
|
||||
- [tvOS](README-ios.md)
|
||||
- [Windows](README-windows.md)
|
||||
- [Windows GDK](README-gdk.md)
|
||||
- [Xbox](README-gdk.md)
|
||||
- [Nokia N-Gage](README-ngage.md)
|
||||
|
||||
## Unsupported Platforms
|
||||
|
||||
If your favorite system is listed below, we aren't working on it. However, if you send reasonable patches and are willing to support the port in the long term, we are happy to take a look!
|
||||
|
||||
All of these still work with [SDL2](/SDL2), which is an incompatible API, but an option if you need to support these platforms still.
|
||||
|
||||
- Google Stadia
|
||||
- NaCL
|
||||
- OS/2
|
||||
- QNX
|
||||
- WinPhone
|
||||
- WinRT/UWP
|
||||
Vendored
-47
@@ -1,47 +0,0 @@
|
||||
PS2
|
||||
======
|
||||
SDL port for the Sony Playstation 2 contributed by:
|
||||
- Francisco Javier Trujillo Mata
|
||||
|
||||
|
||||
Credit to
|
||||
- The guys that ported SDL to PSP & Vita because I'm taking them as reference.
|
||||
- David G. F. for helping me with several issues and tests.
|
||||
|
||||
## Building
|
||||
To build SDL library for the PS2, make sure you have the latest PS2Dev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
## Notes
|
||||
If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the connection with your computer.
|
||||
So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
|
||||
It could be something similar as:
|
||||
```c
|
||||
.....
|
||||
|
||||
SDL_PS2_SKIP_IOP_RESET();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
.....
|
||||
```
|
||||
For a release binary is recommendable to reset the IOP always.
|
||||
|
||||
Remember to do a clean compilation every time you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
|
||||
|
||||
## Getting PS2 Dev
|
||||
[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
|
||||
|
||||
## Running on PCSX2 Emulator
|
||||
[PCSX2](https://github.com/PCSX2/pcsx2)
|
||||
|
||||
[More PCSX2 information](https://pcsx2.net/)
|
||||
|
||||
## To Do
|
||||
- PS2 Screen Keyboard
|
||||
- Dialogs
|
||||
- Others
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
# Nintendo Switch
|
||||
|
||||
SDL3 runs on the Nintendo Switch! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for Switch development with Nintendo. Please contact Ryan (icculus at icculus dot org) for details.
|
||||
Vendored
-388
@@ -1,388 +0,0 @@
|
||||
#
|
||||
# CMake script for building the SDL examples
|
||||
#
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake")
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckStructHasMember)
|
||||
include(CMakePushCheckState)
|
||||
include(sdlcompilers)
|
||||
|
||||
if(SDL_EXAMPLES_LINK_SHARED)
|
||||
set(sdl_name_component SDL3-shared)
|
||||
else()
|
||||
set(sdl_name_component SDL3-static)
|
||||
endif()
|
||||
set(HAVE_EXAMPLES_LINK_SHARED "${SDL_EXAMPLES_LINK_SHARED}" PARENT_SCOPE)
|
||||
|
||||
# CMake incorrectly detects opengl32.lib being present on MSVC ARM64
|
||||
if(NOT (MSVC AND SDL_CPU_ARM64))
|
||||
# Prefer GLVND, if present
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
find_package(OpenGL)
|
||||
endif()
|
||||
|
||||
set(SDL_EXAMPLE_EXECUTABLES)
|
||||
|
||||
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||
set(example_bin_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
||||
set(example_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
||||
endif()
|
||||
else()
|
||||
set(example_bin_dir "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.20)
|
||||
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
set(example_bin_dir "${example_bin_dir}$<$<BOOL:${is_multi_config}>:/$<CONFIG>>")
|
||||
endif()
|
||||
|
||||
file(GLOB RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/*.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/*.wav ${CMAKE_CURRENT_SOURCE_DIR}/../test/*.hex)
|
||||
|
||||
set(RESOURCE_FILE_NAMES)
|
||||
set(RESOURCE_FILES_BINDIR)
|
||||
foreach(resource_file IN LISTS RESOURCE_FILES)
|
||||
get_filename_component(res_file_name ${resource_file} NAME)
|
||||
list(APPEND RESOURCE_FILE_NAMES "${res_file_name}")
|
||||
set(resource_file_bindir "${example_bin_dir}/${res_file_name}")
|
||||
add_custom_command(OUTPUT "${resource_file_bindir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${resource_file}" "${resource_file_bindir}"
|
||||
DEPENDS "${resource_file}"
|
||||
)
|
||||
list(APPEND RESOURCE_FILES_BINDIR "${resource_file_bindir}")
|
||||
endforeach()
|
||||
add_custom_target(copy-sdl-example-resources
|
||||
DEPENDS "${RESOURCE_FILES_BINDIR}"
|
||||
)
|
||||
|
||||
macro(add_sdl_example_executable TARGET)
|
||||
cmake_parse_arguments(AST "BUILD_DEPENDENT" "" "SOURCES;DATAFILES" ${ARGN})
|
||||
if(AST_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown argument(s): ${AST_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT AST_SOURCES)
|
||||
message(FATAL_ERROR "add_sdl_example_executable needs at least one source")
|
||||
endif()
|
||||
set(EXTRA_SOURCES "")
|
||||
if(AST_DATAFILES)
|
||||
list(APPEND EXTRA_SOURCES ${DATAFILES})
|
||||
endif()
|
||||
if(ANDROID)
|
||||
add_library(${TARGET} SHARED ${AST_SOURCES} ${EXTRA_SOURCES})
|
||||
else()
|
||||
add_executable(${TARGET} ${AST_SOURCES} ${EXTRA_SOURCES})
|
||||
endif()
|
||||
SDL_AddCommonCompilerFlags(${TARGET})
|
||||
target_include_directories(${TARGET} PRIVATE "${SDL3_SOURCE_DIR}/src/video/khronos")
|
||||
target_link_libraries(${TARGET} PRIVATE SDL3::${sdl_name_component})
|
||||
|
||||
list(APPEND SDL_EXAMPLE_EXECUTABLES ${TARGET})
|
||||
if(AST_DATAFILES)
|
||||
if(PSP OR PS2)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E make_directory $<TARGET_FILE_DIR:${TARGET}>/sdl-${TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${AST_DATAFILES} $<TARGET_FILE_DIR:${TARGET}>/sdl-${TARGET}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
else()
|
||||
add_dependencies(${TARGET} copy-sdl-example-resources)
|
||||
endif()
|
||||
if(APPLE)
|
||||
# Make sure resource files get installed into macOS/iOS .app bundles.
|
||||
set_target_properties(${TARGET} PROPERTIES RESOURCE "${AST_DATAFILES}")
|
||||
endif()
|
||||
if(EMSCRIPTEN)
|
||||
foreach(res IN LISTS AST_DATAFILES)
|
||||
get_filename_component(res_name "${res}" NAME)
|
||||
target_link_options(${TARGET} PRIVATE "SHELL:--embed-file ${res}@${res_name}")
|
||||
endforeach()
|
||||
endif()
|
||||
set_property(TARGET ${TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES "$<TARGET_FILE_DIR:${TARGET}>/$<JOIN:${AST_DATAFILES},$<SEMICOLON>$<TARGET_FILE_DIR:${TARGET}>/>")
|
||||
endif()
|
||||
|
||||
if(WINDOWS)
|
||||
# CET support was added in VS 16.7
|
||||
if(MSVC_VERSION GREATER 1926 AND CMAKE_GENERATOR_PLATFORM MATCHES "Win32|x64")
|
||||
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -CETCOMPAT")
|
||||
endif()
|
||||
elseif(PSP)
|
||||
target_link_libraries(${TARGET} PRIVATE GL)
|
||||
elseif(EMSCRIPTEN)
|
||||
set_property(TARGET ${TARGET} PROPERTY SUFFIX ".html")
|
||||
target_link_options(${TARGET} PRIVATE -sALLOW_MEMORY_GROWTH=1)
|
||||
elseif(NGAGE)
|
||||
string(MD5 TARGET_MD5 "${TARGET}")
|
||||
string(SUBSTRING "${TARGET_MD5}" 0 8 TARGET_MD5_8)
|
||||
target_link_options(${TARGET} PRIVATE "SHELL:-s UID3=0x${TARGET_MD5_8}")
|
||||
endif()
|
||||
|
||||
if(OPENGL_FOUND)
|
||||
target_compile_definitions(${TARGET} PRIVATE HAVE_OPENGL)
|
||||
endif()
|
||||
|
||||
# FIXME: only add "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>" + include paths of external dependencies
|
||||
target_include_directories(${TARGET} PRIVATE "$<TARGET_PROPERTY:SDL3::${sdl_name_component},INCLUDE_DIRECTORIES>")
|
||||
endmacro()
|
||||
|
||||
add_sdl_example_executable(renderer-clear SOURCES renderer/01-clear/clear.c)
|
||||
add_sdl_example_executable(renderer-primitives SOURCES renderer/02-primitives/primitives.c)
|
||||
add_sdl_example_executable(renderer-lines SOURCES renderer/03-lines/lines.c)
|
||||
add_sdl_example_executable(renderer-points SOURCES renderer/04-points/points.c)
|
||||
add_sdl_example_executable(renderer-rectangles SOURCES renderer/05-rectangles/rectangles.c)
|
||||
add_sdl_example_executable(renderer-textures SOURCES renderer/06-textures/textures.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-streaming-textures SOURCES renderer/07-streaming-textures/streaming-textures.c)
|
||||
add_sdl_example_executable(renderer-rotating-textures SOURCES renderer/08-rotating-textures/rotating-textures.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-scaling-textures SOURCES renderer/09-scaling-textures/scaling-textures.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-geometry SOURCES renderer/10-geometry/geometry.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-color-mods SOURCES renderer/11-color-mods/color-mods.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-viewport SOURCES renderer/14-viewport/viewport.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-cliprect SOURCES renderer/15-cliprect/cliprect.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-read-pixels SOURCES renderer/17-read-pixels/read-pixels.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(renderer-debug-text SOURCES renderer/18-debug-text/debug-text.c)
|
||||
add_sdl_example_executable(renderer-affine-textures SOURCES renderer/19-affine-textures/affine-textures.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp)
|
||||
add_sdl_example_executable(audio-simple-playback SOURCES audio/01-simple-playback/simple-playback.c)
|
||||
add_sdl_example_executable(audio-simple-playback-callback SOURCES audio/02-simple-playback-callback/simple-playback-callback.c)
|
||||
add_sdl_example_executable(audio-load-wav SOURCES audio/03-load-wav/load-wav.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.wav)
|
||||
add_sdl_example_executable(audio-multiple-streams SOURCES audio/04-multiple-streams/multiple-streams.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.wav ${CMAKE_CURRENT_SOURCE_DIR}/../test/sword.wav)
|
||||
add_sdl_example_executable(audio-planar-data SOURCES audio/05-planar-data/planar-data.c)
|
||||
add_sdl_example_executable(input-joystick-polling SOURCES input/01-joystick-polling/joystick-polling.c)
|
||||
add_sdl_example_executable(input-joystick-events SOURCES input/02-joystick-events/joystick-events.c)
|
||||
add_sdl_example_executable(camera-read-and-draw SOURCES camera/01-read-and-draw/read-and-draw.c)
|
||||
add_sdl_example_executable(pen-drawing-lines SOURCES pen/01-drawing-lines/drawing-lines.c)
|
||||
add_sdl_example_executable(asyncio-load-bitmaps SOURCES asyncio/01-load-bitmaps/load-bitmaps.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/gamepad_front.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/speaker.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/icon2x.bmp)
|
||||
add_sdl_example_executable(demo-snake SOURCES demo/01-snake/snake.c)
|
||||
add_sdl_example_executable(demo-woodeneye-008 SOURCES demo/02-woodeneye-008/woodeneye-008.c)
|
||||
add_sdl_example_executable(demo-infinite-monkeys SOURCES demo/03-infinite-monkeys/infinite-monkeys.c)
|
||||
add_sdl_example_executable(demo-bytepusher SOURCES demo/04-bytepusher/bytepusher.c)
|
||||
|
||||
# When you add an example, remember to add the Visual Studio project as well:
|
||||
# - Add a new example in examples/
|
||||
# - Run python VisualC/examples/generate.py
|
||||
# - Take note of the newly generated .vcxproj files
|
||||
# - Modify the .vcxproj files if necessary (adding content such as BMP or WAV files)
|
||||
# - Open VisualC/SDL.sln in Visual Studio or JetBrains Rider
|
||||
# - Locate the appropriate folder in the Solution Explorer
|
||||
# - Add the newly generated projects: Right click -> Add -> Existing project...
|
||||
# - Test if they work
|
||||
# - Save the SDL.sln solution
|
||||
|
||||
if(PSP)
|
||||
# Build EBOOT files if building for PSP
|
||||
foreach(APP ${SDL_EXAMPLE_EXECUTABLES})
|
||||
create_pbp_file(
|
||||
TARGET ${APP}
|
||||
TITLE SDL-${APP}
|
||||
ICON_PATH NULL
|
||||
BACKGROUND_PATH NULL
|
||||
PREVIEW_PATH NULL
|
||||
OUTPUT_DIR $<TARGET_FILE_DIR:${APP}>/sdl-${APP}
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(N3DS)
|
||||
set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
|
||||
file(MAKE_DIRECTORY "${ROMFS_DIR}")
|
||||
file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")
|
||||
|
||||
foreach(APP ${SDL_EXAMPLE_EXECUTABLES})
|
||||
get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
|
||||
set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
|
||||
ctr_generate_smdh("${SMDH_FILE}"
|
||||
NAME "SDL-${APP}"
|
||||
DESCRIPTION "SDL3 Test suite"
|
||||
AUTHOR "SDL3 Contributors"
|
||||
ICON "${CMAKE_CURRENT_SOURCE_DIR}/../test/n3ds/logo48x48.png"
|
||||
)
|
||||
ctr_create_3dsx(
|
||||
${APP}
|
||||
ROMFS "${ROMFS_DIR}"
|
||||
SMDH "${SMDH_FILE}"
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(RISCOS)
|
||||
set(SDL_EXAMPLE_EXECUTABLES_AIF)
|
||||
foreach(APP ${SDL_EXAMPLE_EXECUTABLES})
|
||||
set_property(TARGET ${APP} APPEND_STRING PROPERTY LINK_FLAGS " -static")
|
||||
add_custom_command(
|
||||
OUTPUT ${APP},ff8
|
||||
COMMAND elf2aif ${APP} ${APP},ff8
|
||||
DEPENDS ${APP}
|
||||
)
|
||||
add_custom_target(${APP}-aif ALL DEPENDS ${APP},ff8)
|
||||
list(APPEND SDL_EXAMPLE_EXECUTABLES_AIF ${CMAKE_CURRENT_BINARY_DIR}/${APP},ff8)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Set Apple App ID / Bundle ID. This is needed to launch apps on some Apple
|
||||
# platforms (iOS, for example).
|
||||
if(APPLE)
|
||||
foreach(CURRENT_TARGET ${SDL_EXAMPLE_EXECUTABLES})
|
||||
set_target_properties("${CURRENT_TARGET}" PROPERTIES
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "org.libsdl.${CURRENT_TARGET}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${SDL3_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${SDL3_VERSION}"
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(SDL_INSTALL_EXAMPLES)
|
||||
if(RISCOS)
|
||||
install(
|
||||
FILES ${SDL_EXAMPLE_EXECUTABLES_AIF}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-examples/SDL3
|
||||
)
|
||||
else()
|
||||
install(
|
||||
TARGETS ${SDL_EXAMPLE_EXECUTABLES}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-examples/SDL3
|
||||
)
|
||||
endif()
|
||||
if(MSVC)
|
||||
foreach(example IN LISTS SDL_EXAMPLE_EXECUTABLES)
|
||||
SDL_install_pdb(${example} "${CMAKE_INSTALL_LIBEXECDIR}/installed-examples/SDL3")
|
||||
endforeach()
|
||||
endif()
|
||||
install(
|
||||
FILES ${RESOURCE_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-examples/SDL3
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ANDROID AND TARGET SDL3::Jar)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake/android")
|
||||
find_package(SdlAndroid MODULE)
|
||||
if(SdlAndroid_FOUND)
|
||||
set(apks "")
|
||||
set(packages "")
|
||||
|
||||
include(SdlAndroidFunctions)
|
||||
sdl_create_android_debug_keystore(SDL_example-debug-keystore)
|
||||
sdl_android_compile_resources(SDL_example-resources RESFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/../test/android/res)
|
||||
add_custom_target(sdl-example-apks)
|
||||
foreach(EXAMPLE ${SDL_EXAMPLE_EXECUTABLES})
|
||||
set(ANDROID_MANIFEST_APP_NAME "${EXAMPLE}")
|
||||
set(ANDROID_MANIFEST_LABEL "${EXAMPLE}")
|
||||
set(ANDROID_MANIFEST_LIB_NAME "$<TARGET_FILE_BASE_NAME:${EXAMPLE}>")
|
||||
set(ANDROID_MANIFEST_PACKAGE "org.libsdl.sdl.example.${EXAMPLE}")
|
||||
set(generated_manifest_path "${CMAKE_CURRENT_BINARY_DIR}/android/${EXAMPLE}-src/AndroidManifest.xml")
|
||||
string(REPLACE "." "/" JAVA_PACKAGE_DIR "${ANDROID_MANIFEST_PACKAGE}")
|
||||
set(GENERATED_SRC_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/android/${EXAMPLE}-src")
|
||||
set(GENERATED_RES_FOLDER "${GENERATED_SRC_FOLDER}/res")
|
||||
set(JAVA_PACKAGE_DIR "${GENERATED_SRC_FOLDER}/${JAVA_PACKAGE_DIR}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../test/android/cmake/SDLEntryTestActivity.java.cmake "${JAVA_PACKAGE_DIR}/SDLEntryTestActivity.java" @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../test/android/cmake/SDLTestActivity.java.cmake "${JAVA_PACKAGE_DIR}/SDLTestActivity.java" @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../test/android/cmake/res/values/strings.xml.cmake android/res/values/strings-${EXAMPLE}.xml @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../test/android/cmake/res/xml/shortcuts.xml.cmake "${GENERATED_RES_FOLDER}/xml/shortcuts.xml" @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../test/android/cmake/AndroidManifest.xml.cmake "${generated_manifest_path}" @ONLY)
|
||||
file(GENERATE
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/android/${EXAMPLE}-$<CONFIG>/res/values/strings.xml"
|
||||
INPUT "${CMAKE_CURRENT_BINARY_DIR}/android/res/values/strings-${EXAMPLE}.xml"
|
||||
)
|
||||
|
||||
sdl_android_compile_resources(${EXAMPLE}-resources
|
||||
RESOURCES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/android/${EXAMPLE}-$<CONFIG>/res/values/strings.xml"
|
||||
"${GENERATED_RES_FOLDER}/xml/shortcuts.xml"
|
||||
)
|
||||
|
||||
sdl_android_link_resources(${EXAMPLE}-apk-linked
|
||||
MANIFEST "${generated_manifest_path}"
|
||||
PACKAGE ${ANDROID_MANIFEST_PACKAGE}
|
||||
RES_TARGETS SDL_example-resources ${EXAMPLE}-resources
|
||||
TARGET_SDK_VERSION 31
|
||||
)
|
||||
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS "-encoding;utf-8")
|
||||
set(classes_path "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${EXAMPLE}-java.dir/classes")
|
||||
# Some CMake versions have a slow `cmake -E make_directory` implementation
|
||||
if(NOT IS_DIRECTORY "${classes_path}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${classes_path}")
|
||||
endif()
|
||||
set(OUT_JAR "${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.jar")
|
||||
add_custom_command(
|
||||
OUTPUT "${OUT_JAR}"
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${classes_path}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${classes_path}"
|
||||
COMMAND ${Java_JAVAC_EXECUTABLE}
|
||||
-source 1.8 -target 1.8
|
||||
-bootclasspath "$<TARGET_PROPERTY:SDL3::Jar,JAR_FILE>"
|
||||
"${JAVA_PACKAGE_DIR}/SDLEntryTestActivity.java"
|
||||
"${JAVA_PACKAGE_DIR}/SDLTestActivity.java"
|
||||
$<TARGET_PROPERTY:${EXAMPLE}-apk-linked,JAVA_R>
|
||||
-cp "$<TARGET_PROPERTY:SDL3::Jar,JAR_FILE>:${SDL_ANDROID_PLATFORM_ANDROID_JAR}"
|
||||
-d "${classes_path}"
|
||||
COMMAND ${Java_JAR_EXECUTABLE} cf "${OUT_JAR}" -C "${classes_path}" .
|
||||
DEPENDS $<TARGET_PROPERTY:${EXAMPLE}-apk-linked,OUTPUTS> "$<TARGET_PROPERTY:SDL3::Jar,JAR_FILE>" "${JAVA_PACKAGE_DIR}/SDLTestActivity.java" "${JAVA_PACKAGE_DIR}/SDLEntryTestActivity.java"
|
||||
)
|
||||
add_custom_target(${EXAMPLE}-jar DEPENDS "${OUT_JAR}")
|
||||
set_property(TARGET ${EXAMPLE}-jar PROPERTY OUTPUT "${OUT_JAR}")
|
||||
|
||||
set(dexworkdir "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${EXAMPLE}-dex.dir")
|
||||
# Some CMake versions have a slow `cmake -E make_directory` implementation
|
||||
if(NOT IS_DIRECTORY "${dexworkdir}")
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${dexworkdir}")
|
||||
endif()
|
||||
set(classes_dex_base_name "classes.dex")
|
||||
set(classes_dex "${dexworkdir}/${classes_dex_base_name}")
|
||||
add_custom_command(
|
||||
OUTPUT "${classes_dex}"
|
||||
COMMAND SdlAndroid::d8
|
||||
$<TARGET_PROPERTY:${EXAMPLE}-jar,OUTPUT>
|
||||
$<TARGET_PROPERTY:SDL3::Jar,JAR_FILE>
|
||||
--lib "${SDL_ANDROID_PLATFORM_ANDROID_JAR}"
|
||||
--output "${dexworkdir}"
|
||||
DEPENDS $<TARGET_PROPERTY:${EXAMPLE}-jar,OUTPUT> $<TARGET_PROPERTY:SDL3::Jar,JAR_FILE>
|
||||
)
|
||||
add_custom_target(${EXAMPLE}-dex DEPENDS "${classes_dex}")
|
||||
set_property(TARGET ${EXAMPLE}-dex PROPERTY OUTPUT "${classes_dex}")
|
||||
set_property(TARGET ${EXAMPLE}-dex PROPERTY OUTPUT_BASE_NAME "${classes_dex_base_name}")
|
||||
|
||||
sdl_add_to_apk_unaligned(${EXAMPLE}-unaligned-apk
|
||||
APK_IN ${EXAMPLE}-apk-linked
|
||||
OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/intermediates"
|
||||
ASSETS ${RESOURCE_FILES}
|
||||
NATIVE_LIBS SDL3::SDL3-shared ${EXAMPLE}
|
||||
DEX ${EXAMPLE}-dex
|
||||
)
|
||||
|
||||
sdl_apk_align(${EXAMPLE}-aligned-apk ${EXAMPLE}-unaligned-apk
|
||||
OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/intermediates"
|
||||
)
|
||||
sdl_apk_sign(${EXAMPLE}-apk ${EXAMPLE}-aligned-apk
|
||||
KEYSTORE SDL_example-debug-keystore
|
||||
)
|
||||
add_dependencies(sdl-example-apks ${EXAMPLE}-apk)
|
||||
|
||||
if(TARGET SdlAndroid::adb)
|
||||
add_custom_target(install-${EXAMPLE}
|
||||
COMMAND "${CMAKE_COMMAND}" -DACTION=install "-DAPKS=$<TARGET_PROPERTY:${EXAMPLE}-apk,OUTPUT>" -P "${SDL3_SOURCE_DIR}/cmake/android/SdlAndroidScript.cmake"
|
||||
DEPENDS "${EXAMPLE}-apk"
|
||||
)
|
||||
add_custom_target(start-${EXAMPLE}
|
||||
COMMAND "${ADB_BIN}" shell am start-activity -S "${ANDROID_MANIFEST_PACKAGE}/.SDLTestActivity"
|
||||
)
|
||||
add_custom_target(build-install-start-${EXAMPLE}
|
||||
COMMAND "${CMAKE_COMMAND}" -DACTION=build-install-run "-DEXECUTABLES=${EXAMPLE}" "-DBUILD_FOLDER=${CMAKE_BINARY_DIR}" -P "${SDL3_SOURCE_DIR}/cmake/android/SdlAndroidScript.cmake"
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND packages "${ANDROID_MANIFEST_PACKAGE}")
|
||||
list(APPEND install_targets install-${EXAMPLE})
|
||||
endforeach()
|
||||
|
||||
if(TARGET SdlAndroid::adb)
|
||||
add_custom_target(install-sdl-example-apks
|
||||
DEPENDS ${install_targets}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(uninstall-sdl-example-apks
|
||||
COMMAND "${CMAKE_COMMAND}" "-DADB=$<TARGET_FILE:SdlAndroid::adb>" -DACTION=uninstall "-DPACKAGES=${packages}" -P "${SDL3_SOURCE_DIR}/cmake/android/SdlAndroidScript.cmake"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
Vendored
-67
@@ -1,67 +0,0 @@
|
||||
# Examples
|
||||
|
||||
## What is this?
|
||||
|
||||
In here are a collection of standalone SDL application examples. Unless
|
||||
otherwise stated, they should work on all supported platforms out of the box.
|
||||
If they don't [please file a bug to let us know](https://github.com/libsdl-org/SDL/issues/new).
|
||||
|
||||
|
||||
## What is this SDL_AppIterate thing?
|
||||
|
||||
SDL can optionally build apps as a collection of callbacks instead of the
|
||||
usual program structure that starts and ends in a function called `main`.
|
||||
The examples use this format for two reasons.
|
||||
|
||||
First, it allows the examples to work when built as web applications without
|
||||
a pile of ugly `#ifdef`s, and all of these examples are published on the web
|
||||
at [examples.libsdl.org](https://examples.libsdl.org/), so you can easily see
|
||||
them in action.
|
||||
|
||||
Second, it's example code! The callbacks let us cleanly break the program up
|
||||
into the four logical pieces most apps care about:
|
||||
|
||||
- Program startup
|
||||
- Event handling
|
||||
- What the program actually does in a single frame
|
||||
- Program shutdown
|
||||
|
||||
A detailed technical explanation of these callbacks is in
|
||||
docs/README-main-functions.md (or view that page on the web on
|
||||
[the wiki](https://wiki.libsdl.org/SDL3/README/main-functions#main-callbacks-in-sdl3)).
|
||||
|
||||
|
||||
## I would like to build and run these examples myself.
|
||||
|
||||
When you build SDL with CMake, you can add `-DSDL_EXAMPLES=On` to the
|
||||
CMake command line. When you build SDL, these examples will be built with it.
|
||||
|
||||
But most of these can just be built as a single .c file, as long as you point
|
||||
your compiler at SDL3's headers and link against SDL.
|
||||
|
||||
|
||||
## What is the license on the example code? Can I paste this into my project?
|
||||
|
||||
All code in the examples directory is considered public domain! You can do
|
||||
anything you like with it, including copy/paste it into your closed-source
|
||||
project, sell it, and pretend you wrote it yourself. We do not require you to
|
||||
give us credit for this code (but we always appreciate if you do!).
|
||||
|
||||
This is only true for the examples directory. The rest of SDL falls under the
|
||||
[zlib license](https://github.com/libsdl-org/SDL/blob/main/LICENSE.txt).
|
||||
|
||||
|
||||
## What is template.html and highlight-plugin.lua in this directory?
|
||||
|
||||
This is what [examples.libsdl.org](https://examples.libsdl.org/) uses when
|
||||
generating the web versions of these example programs. You can ignore this,
|
||||
unless you are improving it, in which case we definitely would love to hear
|
||||
from you!
|
||||
|
||||
|
||||
## What is template.c in this directory?
|
||||
|
||||
If writing new examples, this is the skeleton code we start from, to keep
|
||||
everything consistent. You can ignore it.
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 MiB |
@@ -1,3 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture from a
|
||||
.bmp file, and then draws it a few times each frame.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture from a .bmp
|
||||
file, and then draws it, rotating around the center of the screen.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture from a .bmp
|
||||
file, and then draws it, scaling it up and down.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture from a .bmp
|
||||
file, and then draws geometry (arbitrary polygons) using it.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture from a
|
||||
.bmp file, and then draws it a few times each frame, adjusting the colors.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture
|
||||
from a .bmp file, and then draws it a few times each frame, adjusting
|
||||
the viewport before each draw.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
This example creates an SDL window and renderer, loads a texture
|
||||
from a .bmp file, and stretches it across the window. Each frame, we move
|
||||
the clipping rectangle around, so only a small square of the texture is
|
||||
actually drawn.
|
||||
|
||||
Vendored
-127
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryPen
|
||||
*
|
||||
* SDL pen event handling.
|
||||
*
|
||||
* SDL provides an API for pressure-sensitive pen (stylus and/or eraser)
|
||||
* handling, e.g., for input and drawing tablets or suitably equipped mobile /
|
||||
* tablet devices.
|
||||
*
|
||||
* To get started with pens, simply handle SDL_EVENT_PEN_* events. When a pen
|
||||
* starts providing input, SDL will assign it a unique SDL_PenID, which will
|
||||
* remain for the life of the process, as long as the pen stays connected.
|
||||
*
|
||||
* Pens may provide more than simple touch input; they might have other axes,
|
||||
* such as pressure, tilt, rotation, etc.
|
||||
*/
|
||||
|
||||
#ifndef SDL_pen_h_
|
||||
#define SDL_pen_h_
|
||||
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_mouse.h>
|
||||
#include <SDL3/SDL_touch.h>
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SDL pen instance IDs.
|
||||
*
|
||||
* Zero is used to signify an invalid/null device.
|
||||
*
|
||||
* These show up in pen events when SDL sees input from them. They remain
|
||||
* consistent as long as SDL can recognize a tool to be the same pen; but if a
|
||||
* pen physically leaves the area and returns, it might get a new ID.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef Uint32 SDL_PenID;
|
||||
|
||||
/**
|
||||
* The SDL_MouseID for mouse events simulated with pen input.
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_PEN_MOUSEID ((SDL_MouseID)-2)
|
||||
|
||||
/**
|
||||
* The SDL_TouchID for touch events simulated with pen input.
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_PEN_TOUCHID ((SDL_TouchID)-2)
|
||||
|
||||
|
||||
/**
|
||||
* Pen input flags, as reported by various pen events' `pen_state` field.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef Uint32 SDL_PenInputFlags;
|
||||
|
||||
#define SDL_PEN_INPUT_DOWN (1u << 0) /**< pen is pressed down */
|
||||
#define SDL_PEN_INPUT_BUTTON_1 (1u << 1) /**< button 1 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_2 (1u << 2) /**< button 2 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_3 (1u << 3) /**< button 3 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_4 (1u << 4) /**< button 4 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_5 (1u << 5) /**< button 5 is pressed */
|
||||
#define SDL_PEN_INPUT_ERASER_TIP (1u << 30) /**< eraser tip is used */
|
||||
|
||||
/**
|
||||
* Pen axis indices.
|
||||
*
|
||||
* These are the valid values for the `axis` field in SDL_PenAxisEvent. All
|
||||
* axes are either normalised to 0..1 or report a (positive or negative) angle
|
||||
* in degrees, with 0.0 representing the centre. Not all pens/backends support
|
||||
* all axes: unsupported axes are always zero.
|
||||
*
|
||||
* To convert angles for tilt and rotation into vector representation, use
|
||||
* SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:
|
||||
*
|
||||
* `SDL_sinf(xtilt * SDL_PI_F / 180.0)`.
|
||||
*
|
||||
* \since This enum is available since SDL 3.2.0.
|
||||
*/
|
||||
typedef enum SDL_PenAxis
|
||||
{
|
||||
SDL_PEN_AXIS_PRESSURE, /**< Pen pressure. Unidirectional: 0 to 1.0 */
|
||||
SDL_PEN_AXIS_XTILT, /**< Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right). */
|
||||
SDL_PEN_AXIS_YTILT, /**< Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down). */
|
||||
SDL_PEN_AXIS_DISTANCE, /**< Pen distance to drawing surface. Unidirectional: 0.0 to 1.0 */
|
||||
SDL_PEN_AXIS_ROTATION, /**< Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down). */
|
||||
SDL_PEN_AXIS_SLIDER, /**< Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0 */
|
||||
SDL_PEN_AXIS_TANGENTIAL_PRESSURE, /**< Pressure from squeezing the pen ("barrel pressure"). */
|
||||
SDL_PEN_AXIS_COUNT /**< Total known pen axis types in this version of SDL. This number may grow in future releases! */
|
||||
} SDL_PenAxis;
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SDL_pen_h_ */
|
||||
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: Version */
|
||||
|
||||
/*
|
||||
* SDL_revision.h contains the SDL revision, which might be defined on the
|
||||
* compiler command line, or generated right into the header itself by the
|
||||
* build system.
|
||||
*/
|
||||
|
||||
#ifndef SDL_revision_h_
|
||||
#define SDL_revision_h_
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
/**
|
||||
* This macro is a string describing the source at a particular point in
|
||||
* development.
|
||||
*
|
||||
* This string is often generated from revision control's state at build time.
|
||||
*
|
||||
* This string can be quite complex and does not follow any standard. For
|
||||
* example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732".
|
||||
* It might also be user-defined at build time, so it's best to treat it as a
|
||||
* clue in debugging forensics and not something the app will parse in any
|
||||
* way.
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
|
||||
#elif defined(SDL_VENDOR_INFO)
|
||||
#define SDL_REVISION SDL_VENDOR_INFO
|
||||
#else
|
||||
#define SDL_REVISION ""
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
@@ -1,508 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifdef SDL_CAMERA_DRIVER_COREMEDIA
|
||||
|
||||
#include "../SDL_syscamera.h"
|
||||
#include "../SDL_camera_c.h"
|
||||
#include "../../thread/SDL_systhread.h"
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <CoreMedia/CoreMedia.h>
|
||||
|
||||
/*
|
||||
* Need to link with:: CoreMedia CoreVideo
|
||||
*
|
||||
* Add in pInfo.list:
|
||||
* <key>NSCameraUsageDescription</key> <string>Access camera</string>
|
||||
*
|
||||
*
|
||||
* MACOSX:
|
||||
* Add to the Code Sign Entitlement file:
|
||||
* <key>com.apple.security.device.camera</key> <true/>
|
||||
*/
|
||||
|
||||
static void CoreMediaFormatToSDL(FourCharCode fmt, SDL_PixelFormat *pixel_format, SDL_Colorspace *colorspace)
|
||||
{
|
||||
switch (fmt) {
|
||||
#define CASE(x, y, z) case x: *pixel_format = y; *colorspace = z; return
|
||||
// the 16LE ones should use 16BE if we're on a Bigendian system like PowerPC,
|
||||
// but at current time there is no bigendian Apple platform that has CoreMedia.
|
||||
CASE(kCMPixelFormat_16LE555, SDL_PIXELFORMAT_XRGB1555, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_16LE5551, SDL_PIXELFORMAT_RGBA5551, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_16LE565, SDL_PIXELFORMAT_RGB565, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_24RGB, SDL_PIXELFORMAT_RGB24, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_32ARGB, SDL_PIXELFORMAT_ARGB32, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_32BGRA, SDL_PIXELFORMAT_BGRA32, SDL_COLORSPACE_SRGB);
|
||||
CASE(kCMPixelFormat_422YpCbCr8, SDL_PIXELFORMAT_UYVY, SDL_COLORSPACE_BT709_LIMITED);
|
||||
CASE(kCMPixelFormat_422YpCbCr8_yuvs, SDL_PIXELFORMAT_YUY2, SDL_COLORSPACE_BT709_LIMITED);
|
||||
CASE(kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, SDL_PIXELFORMAT_NV12, SDL_COLORSPACE_BT709_LIMITED);
|
||||
CASE(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, SDL_PIXELFORMAT_NV12, SDL_COLORSPACE_BT709_FULL);
|
||||
CASE(kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange, SDL_PIXELFORMAT_P010, SDL_COLORSPACE_BT2020_LIMITED);
|
||||
CASE(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange, SDL_PIXELFORMAT_P010, SDL_COLORSPACE_BT2020_FULL);
|
||||
#undef CASE
|
||||
default:
|
||||
#if DEBUG_CAMERA
|
||||
SDL_Log("CAMERA: Unknown format FourCharCode '%d'", (int) fmt);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
*pixel_format = SDL_PIXELFORMAT_UNKNOWN;
|
||||
*colorspace = SDL_COLORSPACE_UNKNOWN;
|
||||
}
|
||||
|
||||
@class SDLCaptureVideoDataOutputSampleBufferDelegate;
|
||||
|
||||
// just a simple wrapper to help ARC manage memory...
|
||||
@interface SDLPrivateCameraData : NSObject
|
||||
@property(nonatomic, retain) AVCaptureSession *session;
|
||||
@property(nonatomic, retain) SDLCaptureVideoDataOutputSampleBufferDelegate *delegate;
|
||||
@property(nonatomic, assign) CMSampleBufferRef current_sample;
|
||||
@end
|
||||
|
||||
@implementation SDLPrivateCameraData
|
||||
@end
|
||||
|
||||
|
||||
static bool CheckCameraPermissions(SDL_Camera *device)
|
||||
{
|
||||
if (device->permission == 0) { // still expecting a permission result.
|
||||
if (@available(macOS 14, *)) {
|
||||
const AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
|
||||
if (status != AVAuthorizationStatusNotDetermined) { // NotDetermined == still waiting for an answer from the user.
|
||||
SDL_CameraPermissionOutcome(device, (status == AVAuthorizationStatusAuthorized) ? true : false);
|
||||
}
|
||||
} else {
|
||||
SDL_CameraPermissionOutcome(device, true); // always allowed (or just unqueryable...?) on older macOS.
|
||||
}
|
||||
}
|
||||
|
||||
return (device->permission > 0);
|
||||
}
|
||||
|
||||
// this delegate just receives new video frames on a Grand Central Dispatch queue, and fires off the
|
||||
// main device thread iterate function directly to consume it.
|
||||
@interface SDLCaptureVideoDataOutputSampleBufferDelegate : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate>
|
||||
@property SDL_Camera *device;
|
||||
-(id) init:(SDL_Camera *) dev;
|
||||
-(void) captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection;
|
||||
@end
|
||||
|
||||
@implementation SDLCaptureVideoDataOutputSampleBufferDelegate
|
||||
|
||||
-(id) init:(SDL_Camera *) dev {
|
||||
if ( self = [super init] ) {
|
||||
_device = dev;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
|
||||
{
|
||||
SDL_Camera *device = self.device;
|
||||
if (!device || !device->hidden) {
|
||||
return; // oh well.
|
||||
}
|
||||
|
||||
if (!CheckCameraPermissions(device)) {
|
||||
return; // nothing to do right now, dump what is probably a completely black frame.
|
||||
}
|
||||
|
||||
SDLPrivateCameraData *hidden = (__bridge SDLPrivateCameraData *) device->hidden;
|
||||
hidden.current_sample = sampleBuffer;
|
||||
SDL_CameraThreadIterate(device);
|
||||
hidden.current_sample = NULL;
|
||||
}
|
||||
|
||||
- (void)captureOutput:(AVCaptureOutput *)output didDropSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
|
||||
{
|
||||
#if DEBUG_CAMERA
|
||||
SDL_Log("CAMERA: Drop frame.");
|
||||
#endif
|
||||
}
|
||||
@end
|
||||
|
||||
static bool COREMEDIA_WaitDevice(SDL_Camera *device)
|
||||
{
|
||||
return true; // this isn't used atm, since we run our own thread out of Grand Central Dispatch.
|
||||
}
|
||||
|
||||
static SDL_CameraFrameResult COREMEDIA_AcquireFrame(SDL_Camera *device, SDL_Surface *frame, Uint64 *timestampNS)
|
||||
{
|
||||
SDL_CameraFrameResult result = SDL_CAMERA_FRAME_READY;
|
||||
SDLPrivateCameraData *hidden = (__bridge SDLPrivateCameraData *) device->hidden;
|
||||
CMSampleBufferRef sample_buffer = hidden.current_sample;
|
||||
hidden.current_sample = NULL;
|
||||
SDL_assert(sample_buffer != NULL); // should only have been called from our delegate with a new frame.
|
||||
|
||||
CMSampleTimingInfo timinginfo;
|
||||
if (CMSampleBufferGetSampleTimingInfo(sample_buffer, 0, &timinginfo) == noErr) {
|
||||
*timestampNS = (Uint64) (CMTimeGetSeconds(timinginfo.presentationTimeStamp) * ((Float64) SDL_NS_PER_SECOND));
|
||||
} else {
|
||||
SDL_assert(!"this shouldn't happen, I think.");
|
||||
*timestampNS = 0;
|
||||
}
|
||||
|
||||
CVImageBufferRef image = CMSampleBufferGetImageBuffer(sample_buffer); // does not retain `image` (and we don't want it to).
|
||||
const int numPlanes = (int) CVPixelBufferGetPlaneCount(image);
|
||||
const int planar = (int) CVPixelBufferIsPlanar(image);
|
||||
|
||||
#if DEBUG_CAMERA
|
||||
const int w = (int) CVPixelBufferGetWidth(image);
|
||||
const int h = (int) CVPixelBufferGetHeight(image);
|
||||
const int sz = (int) CVPixelBufferGetDataSize(image);
|
||||
const int pitch = (int) CVPixelBufferGetBytesPerRow(image);
|
||||
SDL_Log("CAMERA: buffer planar=%d numPlanes=%d %d x %d sz=%d pitch=%d", planar, numPlanes, w, h, sz, pitch);
|
||||
#endif
|
||||
|
||||
// !!! FIXME: this currently copies the data to the surface (see FIXME about non-contiguous planar surfaces, but in theory we could just keep this locked until ReleaseFrame...
|
||||
CVPixelBufferLockBaseAddress(image, 0);
|
||||
|
||||
frame->w = (int)CVPixelBufferGetWidth(image);
|
||||
frame->h = (int)CVPixelBufferGetHeight(image);
|
||||
|
||||
if ((planar == 0) && (numPlanes == 0)) {
|
||||
const int pitch = (int) CVPixelBufferGetBytesPerRow(image);
|
||||
const size_t buflen = pitch * frame->h;
|
||||
frame->pixels = SDL_aligned_alloc(SDL_GetSIMDAlignment(), buflen);
|
||||
if (frame->pixels == NULL) {
|
||||
result = SDL_CAMERA_FRAME_ERROR;
|
||||
} else {
|
||||
frame->pitch = pitch;
|
||||
SDL_memcpy(frame->pixels, CVPixelBufferGetBaseAddress(image), buflen);
|
||||
}
|
||||
} else {
|
||||
// !!! FIXME: we have an open issue in SDL3 to allow SDL_Surface to support non-contiguous planar data, but we don't have it yet.
|
||||
size_t buflen = 0;
|
||||
for (int i = 0; i < numPlanes; i++) {
|
||||
size_t plane_height = CVPixelBufferGetHeightOfPlane(image, i);
|
||||
size_t plane_pitch = CVPixelBufferGetBytesPerRowOfPlane(image, i);
|
||||
size_t plane_size = (plane_pitch * plane_height);
|
||||
buflen += plane_size;
|
||||
}
|
||||
|
||||
frame->pitch = (int)CVPixelBufferGetBytesPerRowOfPlane(image, 0); // this is what SDL3 currently expects
|
||||
frame->pixels = SDL_aligned_alloc(SDL_GetSIMDAlignment(), buflen);
|
||||
if (frame->pixels == NULL) {
|
||||
result = SDL_CAMERA_FRAME_ERROR;
|
||||
} else {
|
||||
Uint8 *dst = frame->pixels;
|
||||
for (int i = 0; i < numPlanes; i++) {
|
||||
const void *src = CVPixelBufferGetBaseAddressOfPlane(image, i);
|
||||
size_t plane_height = CVPixelBufferGetHeightOfPlane(image, i);
|
||||
size_t plane_pitch = CVPixelBufferGetBytesPerRowOfPlane(image, i);
|
||||
size_t plane_size = (plane_pitch * plane_height);
|
||||
SDL_memcpy(dst, src, plane_size);
|
||||
dst += plane_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CVPixelBufferUnlockBaseAddress(image, 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void COREMEDIA_ReleaseFrame(SDL_Camera *device, SDL_Surface *frame)
|
||||
{
|
||||
// !!! FIXME: this currently copies the data to the surface, but in theory we could just keep this locked until ReleaseFrame...
|
||||
SDL_aligned_free(frame->pixels);
|
||||
}
|
||||
|
||||
static void COREMEDIA_CloseDevice(SDL_Camera *device)
|
||||
{
|
||||
if (device && device->hidden) {
|
||||
SDLPrivateCameraData *hidden = (SDLPrivateCameraData *) CFBridgingRelease(device->hidden);
|
||||
device->hidden = NULL;
|
||||
|
||||
AVCaptureSession *session = hidden.session;
|
||||
if (session) {
|
||||
hidden.session = nil;
|
||||
[session stopRunning];
|
||||
[session removeInput:[session.inputs objectAtIndex:0]];
|
||||
[session removeOutput:(AVCaptureVideoDataOutput *)[session.outputs objectAtIndex:0]];
|
||||
session = nil;
|
||||
}
|
||||
|
||||
hidden.delegate = NULL;
|
||||
hidden.current_sample = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static bool COREMEDIA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *spec)
|
||||
{
|
||||
AVCaptureDevice *avdevice = (__bridge AVCaptureDevice *) device->handle;
|
||||
|
||||
// Pick format that matches the spec
|
||||
const int w = spec->width;
|
||||
const int h = spec->height;
|
||||
const float rate = (float)spec->framerate_numerator / spec->framerate_denominator;
|
||||
AVCaptureDeviceFormat *spec_format = nil;
|
||||
NSArray<AVCaptureDeviceFormat *> *formats = [avdevice formats];
|
||||
for (AVCaptureDeviceFormat *format in formats) {
|
||||
CMFormatDescriptionRef formatDescription = [format formatDescription];
|
||||
SDL_PixelFormat device_format = SDL_PIXELFORMAT_UNKNOWN;
|
||||
SDL_Colorspace device_colorspace = SDL_COLORSPACE_UNKNOWN;
|
||||
CoreMediaFormatToSDL(CMFormatDescriptionGetMediaSubType(formatDescription), &device_format, &device_colorspace);
|
||||
if (device_format != spec->format || device_colorspace != spec->colorspace) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const CMVideoDimensions dim = CMVideoFormatDescriptionGetDimensions(formatDescription);
|
||||
if ((int)dim.width != w || (int)dim.height != h) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const float FRAMERATE_EPSILON = 0.01f;
|
||||
for (AVFrameRateRange *framerate in format.videoSupportedFrameRateRanges) {
|
||||
if (rate > (framerate.minFrameRate - FRAMERATE_EPSILON) &&
|
||||
rate < (framerate.maxFrameRate + FRAMERATE_EPSILON)) {
|
||||
spec_format = format;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (spec_format != nil) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (spec_format == nil) {
|
||||
return SDL_SetError("camera spec format not available");
|
||||
} else if (![avdevice lockForConfiguration:NULL]) {
|
||||
return SDL_SetError("Cannot lockForConfiguration");
|
||||
}
|
||||
|
||||
avdevice.activeFormat = spec_format;
|
||||
[avdevice unlockForConfiguration];
|
||||
|
||||
AVCaptureSession *session = [[AVCaptureSession alloc] init];
|
||||
if (session == nil) {
|
||||
return SDL_SetError("Failed to allocate/init AVCaptureSession");
|
||||
}
|
||||
|
||||
session.sessionPreset = AVCaptureSessionPresetHigh;
|
||||
#if defined(SDL_PLATFORM_IOS)
|
||||
if (@available(iOS 10.0, tvOS 17.0, *)) {
|
||||
session.automaticallyConfiguresCaptureDeviceForWideColor = NO;
|
||||
}
|
||||
#endif
|
||||
|
||||
NSError *error = nil;
|
||||
AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:avdevice error:&error];
|
||||
if (!input) {
|
||||
return SDL_SetError("Cannot create AVCaptureDeviceInput");
|
||||
}
|
||||
|
||||
AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
|
||||
if (!output) {
|
||||
return SDL_SetError("Cannot create AVCaptureVideoDataOutput");
|
||||
}
|
||||
|
||||
output.videoSettings = @{
|
||||
(id)kCVPixelBufferWidthKey : @(spec->width),
|
||||
(id)kCVPixelBufferHeightKey : @(spec->height),
|
||||
(id)kCVPixelBufferPixelFormatTypeKey : @(CMFormatDescriptionGetMediaSubType([spec_format formatDescription]))
|
||||
};
|
||||
|
||||
char threadname[64];
|
||||
SDL_GetCameraThreadName(device, threadname, sizeof (threadname));
|
||||
dispatch_queue_t queue = dispatch_queue_create(threadname, NULL);
|
||||
//dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
if (!queue) {
|
||||
return SDL_SetError("dispatch_queue_create() failed");
|
||||
}
|
||||
|
||||
SDLCaptureVideoDataOutputSampleBufferDelegate *delegate = [[SDLCaptureVideoDataOutputSampleBufferDelegate alloc] init:device];
|
||||
if (delegate == nil) {
|
||||
return SDL_SetError("Cannot create SDLCaptureVideoDataOutputSampleBufferDelegate");
|
||||
}
|
||||
[output setSampleBufferDelegate:delegate queue:queue];
|
||||
|
||||
if (![session canAddInput:input]) {
|
||||
return SDL_SetError("Cannot add AVCaptureDeviceInput");
|
||||
}
|
||||
[session addInput:input];
|
||||
|
||||
if (![session canAddOutput:output]) {
|
||||
return SDL_SetError("Cannot add AVCaptureVideoDataOutput");
|
||||
}
|
||||
[session addOutput:output];
|
||||
|
||||
[session commitConfiguration];
|
||||
|
||||
SDLPrivateCameraData *hidden = [[SDLPrivateCameraData alloc] init];
|
||||
if (hidden == nil) {
|
||||
return SDL_SetError("Cannot create SDLPrivateCameraData");
|
||||
}
|
||||
|
||||
hidden.session = session;
|
||||
hidden.delegate = delegate;
|
||||
hidden.current_sample = NULL;
|
||||
device->hidden = (struct SDL_PrivateCameraData *)CFBridgingRetain(hidden);
|
||||
|
||||
[session startRunning]; // !!! FIXME: docs say this can block while camera warms up and shouldn't be done on main thread. Maybe push through `queue`?
|
||||
|
||||
CheckCameraPermissions(device); // check right away, in case the process is already granted permission.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void COREMEDIA_FreeDeviceHandle(SDL_Camera *device)
|
||||
{
|
||||
if (device && device->handle) {
|
||||
CFBridgingRelease(device->handle);
|
||||
}
|
||||
}
|
||||
|
||||
static void GatherCameraSpecs(AVCaptureDevice *device, CameraFormatAddData *add_data)
|
||||
{
|
||||
SDL_zerop(add_data);
|
||||
|
||||
for (AVCaptureDeviceFormat *fmt in device.formats) {
|
||||
if (CMFormatDescriptionGetMediaType(fmt.formatDescription) != kCMMediaType_Video) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//NSLog(@"Available camera format: %@\n", fmt);
|
||||
SDL_PixelFormat device_format = SDL_PIXELFORMAT_UNKNOWN;
|
||||
SDL_Colorspace device_colorspace = SDL_COLORSPACE_UNKNOWN;
|
||||
CoreMediaFormatToSDL(CMFormatDescriptionGetMediaSubType(fmt.formatDescription), &device_format, &device_colorspace);
|
||||
if (device_format == SDL_PIXELFORMAT_UNKNOWN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const CMVideoDimensions dims = CMVideoFormatDescriptionGetDimensions(fmt.formatDescription);
|
||||
const int w = (int) dims.width;
|
||||
const int h = (int) dims.height;
|
||||
for (AVFrameRateRange *framerate in fmt.videoSupportedFrameRateRanges) {
|
||||
int min_numerator = 0, min_denominator = 1;
|
||||
int max_numerator = 0, max_denominator = 1;
|
||||
|
||||
SDL_CalculateFraction(framerate.minFrameRate, &min_numerator, &min_denominator);
|
||||
SDL_AddCameraFormat(add_data, device_format, device_colorspace, w, h, min_numerator, min_denominator);
|
||||
SDL_CalculateFraction(framerate.maxFrameRate, &max_numerator, &max_denominator);
|
||||
if (max_numerator != min_numerator || max_denominator != min_denominator) {
|
||||
SDL_AddCameraFormat(add_data, device_format, device_colorspace, w, h, max_numerator, max_denominator);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool FindCoreMediaCameraByUniqueID(SDL_Camera *device, void *userdata)
|
||||
{
|
||||
NSString *uniqueid = (__bridge NSString *) userdata;
|
||||
AVCaptureDevice *avdev = (__bridge AVCaptureDevice *) device->handle;
|
||||
return ([uniqueid isEqualToString:avdev.uniqueID]) ? true : false;
|
||||
}
|
||||
|
||||
static void MaybeAddDevice(AVCaptureDevice *avdevice)
|
||||
{
|
||||
if (!avdevice.connected) {
|
||||
return; // not connected.
|
||||
} else if (![avdevice hasMediaType:AVMediaTypeVideo]) {
|
||||
return; // not a camera.
|
||||
} else if (SDL_FindPhysicalCameraByCallback(FindCoreMediaCameraByUniqueID, (__bridge void *) avdevice.uniqueID)) {
|
||||
return; // already have this one.
|
||||
}
|
||||
|
||||
CameraFormatAddData add_data;
|
||||
GatherCameraSpecs(avdevice, &add_data);
|
||||
if (add_data.num_specs > 0) {
|
||||
SDL_CameraPosition position = SDL_CAMERA_POSITION_UNKNOWN;
|
||||
if (avdevice.position == AVCaptureDevicePositionFront) {
|
||||
position = SDL_CAMERA_POSITION_FRONT_FACING;
|
||||
} else if (avdevice.position == AVCaptureDevicePositionBack) {
|
||||
position = SDL_CAMERA_POSITION_BACK_FACING;
|
||||
}
|
||||
SDL_AddCamera(avdevice.localizedName.UTF8String, position, add_data.num_specs, add_data.specs, (void *) CFBridgingRetain(avdevice));
|
||||
}
|
||||
|
||||
SDL_free(add_data.specs);
|
||||
}
|
||||
|
||||
static void COREMEDIA_DetectDevices(void)
|
||||
{
|
||||
NSArray<AVCaptureDevice *> *devices = nil;
|
||||
|
||||
if (@available(macOS 10.15, iOS 13, *)) {
|
||||
// kind of annoying that there isn't a "give me anything that looks like a camera" option,
|
||||
// so this list will need to be updated when Apple decides to add
|
||||
// AVCaptureDeviceTypeBuiltInQuadrupleCamera some day.
|
||||
NSArray *device_types = @[
|
||||
#ifdef SDL_PLATFORM_IOS
|
||||
AVCaptureDeviceTypeBuiltInTelephotoCamera,
|
||||
AVCaptureDeviceTypeBuiltInDualCamera,
|
||||
AVCaptureDeviceTypeBuiltInDualWideCamera,
|
||||
AVCaptureDeviceTypeBuiltInTripleCamera,
|
||||
AVCaptureDeviceTypeBuiltInUltraWideCamera,
|
||||
#else
|
||||
AVCaptureDeviceTypeExternalUnknown,
|
||||
#endif
|
||||
AVCaptureDeviceTypeBuiltInWideAngleCamera
|
||||
];
|
||||
|
||||
AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession
|
||||
discoverySessionWithDeviceTypes:device_types
|
||||
mediaType:AVMediaTypeVideo
|
||||
position:AVCaptureDevicePositionUnspecified];
|
||||
|
||||
devices = discoverySession.devices;
|
||||
// !!! FIXME: this can use Key Value Observation to get hotplug events.
|
||||
} else {
|
||||
// this is deprecated but works back to macOS 10.7; 10.15 added AVCaptureDeviceDiscoverySession as a replacement.
|
||||
devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
|
||||
// !!! FIXME: this can use AVCaptureDeviceWasConnectedNotification and AVCaptureDeviceWasDisconnectedNotification with NSNotificationCenter to get hotplug events.
|
||||
}
|
||||
|
||||
for (AVCaptureDevice *device in devices) {
|
||||
MaybeAddDevice(device);
|
||||
}
|
||||
}
|
||||
|
||||
static void COREMEDIA_Deinitialize(void)
|
||||
{
|
||||
// !!! FIXME: disable hotplug.
|
||||
}
|
||||
|
||||
static bool COREMEDIA_Init(SDL_CameraDriverImpl *impl)
|
||||
{
|
||||
impl->DetectDevices = COREMEDIA_DetectDevices;
|
||||
impl->OpenDevice = COREMEDIA_OpenDevice;
|
||||
impl->CloseDevice = COREMEDIA_CloseDevice;
|
||||
impl->WaitDevice = COREMEDIA_WaitDevice;
|
||||
impl->AcquireFrame = COREMEDIA_AcquireFrame;
|
||||
impl->ReleaseFrame = COREMEDIA_ReleaseFrame;
|
||||
impl->FreeDeviceHandle = COREMEDIA_FreeDeviceHandle;
|
||||
impl->Deinitialize = COREMEDIA_Deinitialize;
|
||||
|
||||
impl->ProvidesOwnCallbackThread = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CameraBootStrap COREMEDIA_bootstrap = {
|
||||
"coremedia", "SDL Apple CoreMedia camera driver", COREMEDIA_Init, false
|
||||
};
|
||||
|
||||
#endif // SDL_CAMERA_DRIVER_COREMEDIA
|
||||
|
||||
-213
@@ -1,213 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifndef SDL_VIDEO_DRIVER_X11
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
|
||||
void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef SDL_PLATFORM_LINUX
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
|
||||
bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority)
|
||||
{
|
||||
(void)threadID;
|
||||
(void)priority;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
|
||||
bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy)
|
||||
{
|
||||
(void)threadID;
|
||||
(void)sdlPriority;
|
||||
(void)schedPolicy;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef SDL_PLATFORM_GDK
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
|
||||
void SDL_GDKSuspendComplete(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(void *outUserHandle); /* XUserHandle *outUserHandle */
|
||||
bool SDL_GetGDKDefaultUser(void *outUserHandle)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
|
||||
void SDL_GDKSuspendGPU(SDL_GPUDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
|
||||
void SDL_GDKResumeGPU(SDL_GPUDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(SDL_PLATFORM_WINDOWS)
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
|
||||
bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
|
||||
{
|
||||
(void)name;
|
||||
(void)style;
|
||||
(void)hInst;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(void *callback, void *userdata); // SDL_WindowsMessageHook callback
|
||||
void SDL_SetWindowsMessageHook(void *callback, void *userdata)
|
||||
{
|
||||
(void)callback;
|
||||
(void)userdata;
|
||||
SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
void SDL_UnregisterApp(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef SDL_PLATFORM_ANDROID
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
|
||||
void SDL_SendAndroidBackButton(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
|
||||
void *SDL_GetAndroidActivity(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void);
|
||||
const char *SDL_GetAndroidCachePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void);
|
||||
const char *SDL_GetAndroidExternalStoragePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
|
||||
Uint32 SDL_GetAndroidExternalStorageState(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return 0;
|
||||
}
|
||||
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void);
|
||||
const char *SDL_GetAndroidInternalStoragePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void);
|
||||
void *SDL_GetAndroidJNIEnv(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, const char *permission, bool granted);
|
||||
SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);
|
||||
bool SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata)
|
||||
{
|
||||
(void)permission;
|
||||
(void)cb;
|
||||
(void)userdata;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param);
|
||||
bool SDL_SendAndroidMessage(Uint32 command, int param)
|
||||
{
|
||||
(void)command;
|
||||
(void)param;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);
|
||||
bool SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset)
|
||||
{
|
||||
(void)message;
|
||||
(void)duration;
|
||||
(void)gravity;
|
||||
(void)xoffset;
|
||||
(void)yoffset;
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
|
||||
int SDL_GetAndroidSDKVersion(void)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
|
||||
bool SDL_IsChromebook(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return false;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
|
||||
bool SDL_IsDeXMode(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return false;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC Sint32 SDLCALL JNI_OnLoad(void *vm, void *reserved);
|
||||
Sint32 JNI_OnLoad(void *vm, void *reserved)
|
||||
{
|
||||
(void)vm;
|
||||
(void)reserved;
|
||||
SDL_Unsupported();
|
||||
return -1; // JNI_ERR
|
||||
}
|
||||
#endif
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#include "SDL_poll.h"
|
||||
|
||||
#ifdef HAVE_POLL
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
int SDL_IOReady(int fd, int flags, Sint64 timeoutNS)
|
||||
{
|
||||
int result;
|
||||
|
||||
SDL_assert(flags & (SDL_IOR_READ | SDL_IOR_WRITE));
|
||||
|
||||
// Note: We don't bother to account for elapsed time if we get EINTR
|
||||
do {
|
||||
#ifdef HAVE_POLL
|
||||
struct pollfd info;
|
||||
int timeoutMS;
|
||||
|
||||
info.fd = fd;
|
||||
info.events = 0;
|
||||
if (flags & SDL_IOR_READ) {
|
||||
info.events |= POLLIN | POLLPRI;
|
||||
}
|
||||
if (flags & SDL_IOR_WRITE) {
|
||||
info.events |= POLLOUT;
|
||||
}
|
||||
// FIXME: Add support for ppoll() for nanosecond precision
|
||||
if (timeoutNS > 0) {
|
||||
timeoutMS = (int)SDL_NS_TO_MS(timeoutNS + (SDL_NS_PER_MS - 1));
|
||||
} else if (timeoutNS == 0) {
|
||||
timeoutMS = 0;
|
||||
} else {
|
||||
timeoutMS = -1;
|
||||
}
|
||||
result = poll(&info, 1, timeoutMS);
|
||||
#else
|
||||
fd_set rfdset, *rfdp = NULL;
|
||||
fd_set wfdset, *wfdp = NULL;
|
||||
struct timeval tv, *tvp = NULL;
|
||||
|
||||
// If this assert triggers we'll corrupt memory here
|
||||
SDL_assert(fd >= 0 && fd < FD_SETSIZE);
|
||||
|
||||
if (flags & SDL_IOR_READ) {
|
||||
FD_ZERO(&rfdset);
|
||||
FD_SET(fd, &rfdset);
|
||||
rfdp = &rfdset;
|
||||
}
|
||||
if (flags & SDL_IOR_WRITE) {
|
||||
FD_ZERO(&wfdset);
|
||||
FD_SET(fd, &wfdset);
|
||||
wfdp = &wfdset;
|
||||
}
|
||||
|
||||
if (timeoutNS >= 0) {
|
||||
tv.tv_sec = (timeoutNS / SDL_NS_PER_SECOND);
|
||||
tv.tv_usec = SDL_NS_TO_US((timeoutNS % SDL_NS_PER_SECOND) + (SDL_NS_PER_US - 1));
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
result = select(fd + 1, rfdp, wfdp, NULL, tvp);
|
||||
#endif // HAVE_POLL
|
||||
|
||||
} while (result < 0 && errno == EINTR && !(flags & SDL_IOR_NO_RETRY));
|
||||
|
||||
return result;
|
||||
}
|
||||
-375
@@ -1,375 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if defined(SDL_PLATFORM_WINDOWS)
|
||||
|
||||
#include "SDL_windows.h"
|
||||
|
||||
#include <objbase.h> // for CoInitialize/CoUninitialize (Win32 only)
|
||||
#ifdef HAVE_ROAPI_H
|
||||
#include <roapi.h> // For RoInitialize/RoUninitialize (Win32 only)
|
||||
#else
|
||||
typedef enum RO_INIT_TYPE
|
||||
{
|
||||
RO_INIT_SINGLETHREADED = 0,
|
||||
RO_INIT_MULTITHREADED = 1
|
||||
} RO_INIT_TYPE;
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT_VISTA
|
||||
#define _WIN32_WINNT_VISTA 0x0600
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT_WIN7
|
||||
#define _WIN32_WINNT_WIN7 0x0601
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT_WIN8
|
||||
#define _WIN32_WINNT_WIN8 0x0602
|
||||
#endif
|
||||
|
||||
#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32
|
||||
#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
|
||||
#endif
|
||||
|
||||
#ifndef WC_ERR_INVALID_CHARS
|
||||
#define WC_ERR_INVALID_CHARS 0x00000080
|
||||
#endif
|
||||
|
||||
// Sets an error message based on an HRESULT
|
||||
bool WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr)
|
||||
{
|
||||
TCHAR buffer[1024];
|
||||
char *message;
|
||||
TCHAR *p = buffer;
|
||||
DWORD c = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, hr, 0,
|
||||
buffer, SDL_arraysize(buffer), NULL);
|
||||
buffer[c] = 0;
|
||||
// kill CR/LF that FormatMessage() sticks at the end
|
||||
while (*p) {
|
||||
if (*p == '\r') {
|
||||
*p = 0;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
message = WIN_StringToUTF8(buffer);
|
||||
SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
|
||||
SDL_free(message);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Sets an error message based on GetLastError()
|
||||
bool WIN_SetError(const char *prefix)
|
||||
{
|
||||
return WIN_SetErrorFromHRESULT(prefix, GetLastError());
|
||||
}
|
||||
|
||||
HRESULT
|
||||
WIN_CoInitialize(void)
|
||||
{
|
||||
/* SDL handles any threading model, so initialize with the default, which
|
||||
is compatible with OLE and if that doesn't work, try multi-threaded mode.
|
||||
|
||||
If you need multi-threaded mode, call CoInitializeEx() before SDL_Init()
|
||||
*/
|
||||
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
|
||||
// On Xbox, there's no need to call CoInitializeEx (and it's not implemented)
|
||||
return S_OK;
|
||||
#else
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
if (hr == RPC_E_CHANGED_MODE) {
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
}
|
||||
|
||||
// S_FALSE means success, but someone else already initialized.
|
||||
// You still need to call CoUninitialize in this case!
|
||||
if (hr == S_FALSE) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return hr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WIN_CoUninitialize(void)
|
||||
{
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
FARPROC WIN_LoadComBaseFunction(const char *name)
|
||||
{
|
||||
static bool s_bLoaded;
|
||||
static HMODULE s_hComBase;
|
||||
|
||||
if (!s_bLoaded) {
|
||||
s_hComBase = LoadLibraryEx(TEXT("combase.dll"), NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
s_bLoaded = true;
|
||||
}
|
||||
if (s_hComBase) {
|
||||
return GetProcAddress(s_hComBase, name);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT
|
||||
WIN_RoInitialize(void)
|
||||
{
|
||||
typedef HRESULT(WINAPI * RoInitialize_t)(RO_INIT_TYPE initType);
|
||||
RoInitialize_t RoInitializeFunc = (RoInitialize_t)WIN_LoadComBaseFunction("RoInitialize");
|
||||
if (RoInitializeFunc) {
|
||||
// RO_INIT_SINGLETHREADED is equivalent to COINIT_APARTMENTTHREADED
|
||||
HRESULT hr = RoInitializeFunc(RO_INIT_SINGLETHREADED);
|
||||
if (hr == RPC_E_CHANGED_MODE) {
|
||||
hr = RoInitializeFunc(RO_INIT_MULTITHREADED);
|
||||
}
|
||||
|
||||
// S_FALSE means success, but someone else already initialized.
|
||||
// You still need to call RoUninitialize in this case!
|
||||
if (hr == S_FALSE) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return hr;
|
||||
} else {
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
}
|
||||
|
||||
void WIN_RoUninitialize(void)
|
||||
{
|
||||
typedef void(WINAPI * RoUninitialize_t)(void);
|
||||
RoUninitialize_t RoUninitializeFunc = (RoUninitialize_t)WIN_LoadComBaseFunction("RoUninitialize");
|
||||
if (RoUninitializeFunc) {
|
||||
RoUninitializeFunc();
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||
static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
|
||||
{
|
||||
OSVERSIONINFOEXW osvi;
|
||||
DWORDLONG const dwlConditionMask = VerSetConditionMask(
|
||||
VerSetConditionMask(
|
||||
VerSetConditionMask(
|
||||
0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
VER_MINORVERSION, VER_GREATER_EQUAL),
|
||||
VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
|
||||
|
||||
SDL_zero(osvi);
|
||||
osvi.dwOSVersionInfoSize = sizeof(osvi);
|
||||
osvi.dwMajorVersion = wMajorVersion;
|
||||
osvi.dwMinorVersion = wMinorVersion;
|
||||
osvi.wServicePackMajor = wServicePackMajor;
|
||||
|
||||
return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// apply some static variables so we only call into the Win32 API once per process for each check.
|
||||
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
|
||||
#define CHECKWINVER(notdesktop_platform_result, test) return (notdesktop_platform_result);
|
||||
#else
|
||||
#define CHECKWINVER(notdesktop_platform_result, test) \
|
||||
static bool checked = false; \
|
||||
static BOOL result = FALSE; \
|
||||
if (!checked) { \
|
||||
result = (test); \
|
||||
checked = true; \
|
||||
} \
|
||||
return result;
|
||||
#endif
|
||||
|
||||
// this is the oldest thing we run on (and we may lose support for this in SDL3 at any time!),
|
||||
// so there's no "OrGreater" as that would always be TRUE. The other functions are here to
|
||||
// ask "can we support a specific feature?" but this function is here to ask "do we need to do
|
||||
// something different for an OS version we probably should abandon?" :)
|
||||
BOOL WIN_IsWindowsXP(void)
|
||||
{
|
||||
CHECKWINVER(FALSE, !WIN_IsWindowsVistaOrGreater() && IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0));
|
||||
}
|
||||
|
||||
BOOL WIN_IsWindowsVistaOrGreater(void)
|
||||
{
|
||||
CHECKWINVER(TRUE, IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0));
|
||||
}
|
||||
|
||||
BOOL WIN_IsWindows7OrGreater(void)
|
||||
{
|
||||
CHECKWINVER(TRUE, IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 0));
|
||||
}
|
||||
|
||||
BOOL WIN_IsWindows8OrGreater(void)
|
||||
{
|
||||
CHECKWINVER(TRUE, IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0));
|
||||
}
|
||||
|
||||
#undef CHECKWINVER
|
||||
|
||||
|
||||
/*
|
||||
WAVExxxCAPS gives you 31 bytes for the device name, and just truncates if it's
|
||||
longer. However, since WinXP, you can use the WAVExxxCAPS2 structure, which
|
||||
will give you a name GUID. The full name is in the Windows Registry under
|
||||
that GUID, located here: HKLM\System\CurrentControlSet\Control\MediaCategories
|
||||
|
||||
Note that drivers can report GUID_NULL for the name GUID, in which case,
|
||||
Windows makes a best effort to fill in those 31 bytes in the usual place.
|
||||
This info summarized from MSDN:
|
||||
|
||||
http://web.archive.org/web/20131027093034/http://msdn.microsoft.com/en-us/library/windows/hardware/ff536382(v=vs.85).aspx
|
||||
|
||||
Always look this up in the registry if possible, because the strings are
|
||||
different! At least on Win10, I see "Yeti Stereo Microphone" in the
|
||||
Registry, and a unhelpful "Microphone(Yeti Stereo Microph" in winmm. Sigh.
|
||||
|
||||
(Also, DirectSound shouldn't be limited to 32 chars, but its device enum
|
||||
has the same problem.)
|
||||
|
||||
WASAPI doesn't need this. This is just for DirectSound/WinMM.
|
||||
*/
|
||||
char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid)
|
||||
{
|
||||
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
|
||||
return WIN_StringToUTF8W(name); // No registry access on Xbox, go with what we've got.
|
||||
#else
|
||||
static const GUID nullguid = { 0 };
|
||||
const unsigned char *ptr;
|
||||
char keystr[128];
|
||||
WCHAR *strw = NULL;
|
||||
bool rc;
|
||||
HKEY hkey;
|
||||
DWORD len = 0;
|
||||
char *result = NULL;
|
||||
|
||||
if (WIN_IsEqualGUID(guid, &nullguid)) {
|
||||
return WIN_StringToUTF8W(name); // No GUID, go with what we've got.
|
||||
}
|
||||
|
||||
ptr = (const unsigned char *)guid;
|
||||
(void)SDL_snprintf(keystr, sizeof(keystr),
|
||||
"System\\CurrentControlSet\\Control\\MediaCategories\\{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||
ptr[3], ptr[2], ptr[1], ptr[0], ptr[5], ptr[4], ptr[7], ptr[6],
|
||||
ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]);
|
||||
|
||||
strw = WIN_UTF8ToStringW(keystr);
|
||||
rc = (RegOpenKeyExW(HKEY_LOCAL_MACHINE, strw, 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS);
|
||||
SDL_free(strw);
|
||||
if (!rc) {
|
||||
return WIN_StringToUTF8W(name); // oh well.
|
||||
}
|
||||
|
||||
rc = (RegQueryValueExW(hkey, L"Name", NULL, NULL, NULL, &len) == ERROR_SUCCESS);
|
||||
if (!rc) {
|
||||
RegCloseKey(hkey);
|
||||
return WIN_StringToUTF8W(name); // oh well.
|
||||
}
|
||||
|
||||
strw = (WCHAR *)SDL_malloc(len + sizeof(WCHAR));
|
||||
if (!strw) {
|
||||
RegCloseKey(hkey);
|
||||
return WIN_StringToUTF8W(name); // oh well.
|
||||
}
|
||||
|
||||
rc = (RegQueryValueExW(hkey, L"Name", NULL, NULL, (LPBYTE)strw, &len) == ERROR_SUCCESS);
|
||||
RegCloseKey(hkey);
|
||||
if (!rc) {
|
||||
SDL_free(strw);
|
||||
return WIN_StringToUTF8W(name); // oh well.
|
||||
}
|
||||
|
||||
strw[len / 2] = 0; // make sure it's null-terminated.
|
||||
|
||||
result = WIN_StringToUTF8W(strw);
|
||||
SDL_free(strw);
|
||||
return result ? result : WIN_StringToUTF8W(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL WIN_IsEqualGUID(const GUID *a, const GUID *b)
|
||||
{
|
||||
return (SDL_memcmp(a, b, sizeof(*a)) == 0);
|
||||
}
|
||||
|
||||
BOOL WIN_IsEqualIID(REFIID a, REFIID b)
|
||||
{
|
||||
return (SDL_memcmp(a, b, sizeof(*a)) == 0);
|
||||
}
|
||||
|
||||
void WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect)
|
||||
{
|
||||
sdlrect->x = winrect->left;
|
||||
sdlrect->w = (winrect->right - winrect->left) + 1;
|
||||
sdlrect->y = winrect->top;
|
||||
sdlrect->h = (winrect->bottom - winrect->top) + 1;
|
||||
}
|
||||
|
||||
void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect)
|
||||
{
|
||||
winrect->left = sdlrect->x;
|
||||
winrect->right = sdlrect->x + sdlrect->w - 1;
|
||||
winrect->top = sdlrect->y;
|
||||
winrect->bottom = sdlrect->y + sdlrect->h - 1;
|
||||
}
|
||||
|
||||
bool WIN_WindowRectValid(const RECT *rect)
|
||||
{
|
||||
// A window can be resized to zero height, but not zero width
|
||||
return (rect->right > 0);
|
||||
}
|
||||
|
||||
// Some GUIDs we need to know without linking to libraries that aren't available before Vista.
|
||||
/* *INDENT-OFF* */ // clang-format off
|
||||
static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } };
|
||||
static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } };
|
||||
/* *INDENT-ON* */ // clang-format on
|
||||
|
||||
SDL_AudioFormat SDL_WaveFormatExToSDLFormat(WAVEFORMATEX *waveformat)
|
||||
{
|
||||
if ((waveformat->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) && (waveformat->wBitsPerSample == 32)) {
|
||||
return SDL_AUDIO_F32;
|
||||
} else if ((waveformat->wFormatTag == WAVE_FORMAT_PCM) && (waveformat->wBitsPerSample == 16)) {
|
||||
return SDL_AUDIO_S16;
|
||||
} else if ((waveformat->wFormatTag == WAVE_FORMAT_PCM) && (waveformat->wBitsPerSample == 32)) {
|
||||
return SDL_AUDIO_S32;
|
||||
} else if (waveformat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
|
||||
const WAVEFORMATEXTENSIBLE *ext = (const WAVEFORMATEXTENSIBLE *)waveformat;
|
||||
if ((SDL_memcmp(&ext->SubFormat, &SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID)) == 0) && (waveformat->wBitsPerSample == 32)) {
|
||||
return SDL_AUDIO_F32;
|
||||
} else if ((SDL_memcmp(&ext->SubFormat, &SDL_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID)) == 0) && (waveformat->wBitsPerSample == 16)) {
|
||||
return SDL_AUDIO_S16;
|
||||
} else if ((SDL_memcmp(&ext->SubFormat, &SDL_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID)) == 0) && (waveformat->wBitsPerSample == 32)) {
|
||||
return SDL_AUDIO_S32;
|
||||
}
|
||||
}
|
||||
return SDL_AUDIO_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
int WIN_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar)
|
||||
{
|
||||
if (WIN_IsWindowsXP()) {
|
||||
dwFlags &= ~WC_ERR_INVALID_CHARS; // not supported before Vista. Without this flag, it will just replace bogus chars with U+FFFD. You're on your own, WinXP.
|
||||
}
|
||||
return WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpDefaultChar, lpUsedDefaultChar);
|
||||
}
|
||||
|
||||
#endif // defined(SDL_PLATFORM_WINDOWS)
|
||||
-619
@@ -1,619 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
#include "../SDL_dialog.h"
|
||||
#include "../SDL_dialog_utils.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <commdlg.h>
|
||||
#include <shlobj.h>
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include "../../thread/SDL_systhread.h"
|
||||
|
||||
// If this number is too small, selecting too many files will give an error
|
||||
#define SELECTLIST_SIZE 65536
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool is_save;
|
||||
wchar_t *filters_str;
|
||||
char *default_file;
|
||||
SDL_Window *parent;
|
||||
DWORD flags;
|
||||
SDL_DialogFileCallback callback;
|
||||
void *userdata;
|
||||
char *title;
|
||||
char *accept;
|
||||
char *cancel;
|
||||
} winArgs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SDL_Window *parent;
|
||||
SDL_DialogFileCallback callback;
|
||||
char *default_folder;
|
||||
void *userdata;
|
||||
char *title;
|
||||
char *accept;
|
||||
char *cancel;
|
||||
} winFArgs;
|
||||
|
||||
void freeWinArgs(winArgs *args)
|
||||
{
|
||||
SDL_free(args->default_file);
|
||||
SDL_free(args->filters_str);
|
||||
SDL_free(args->title);
|
||||
SDL_free(args->accept);
|
||||
SDL_free(args->cancel);
|
||||
|
||||
SDL_free(args);
|
||||
}
|
||||
|
||||
void freeWinFArgs(winFArgs *args)
|
||||
{
|
||||
SDL_free(args->default_folder);
|
||||
SDL_free(args->title);
|
||||
SDL_free(args->accept);
|
||||
SDL_free(args->cancel);
|
||||
|
||||
SDL_free(args);
|
||||
}
|
||||
|
||||
/** Converts dialog.nFilterIndex to SDL-compatible value */
|
||||
int getFilterIndex(int as_reported_by_windows)
|
||||
{
|
||||
return as_reported_by_windows - 1;
|
||||
}
|
||||
|
||||
char *clear_filt_names(const char *filt)
|
||||
{
|
||||
char *cleared = SDL_strdup(filt);
|
||||
|
||||
for (char *c = cleared; *c; c++) {
|
||||
/* 0x01 bytes are used as temporary replacement for the various 0x00
|
||||
bytes required by Win32 (one null byte between each filter, two at
|
||||
the end of the filters). Filter out these bytes from the filter names
|
||||
to avoid early-ending the filters if someone puts two consecutive
|
||||
0x01 bytes in their filter names. */
|
||||
if (*c == '\x01') {
|
||||
*c = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
return cleared;
|
||||
}
|
||||
|
||||
// TODO: The new version of file dialogs
|
||||
void windows_ShowFileDialog(void *ptr)
|
||||
{
|
||||
winArgs *args = (winArgs *) ptr;
|
||||
bool is_save = args->is_save;
|
||||
const char *default_file = args->default_file;
|
||||
SDL_Window *parent = args->parent;
|
||||
DWORD flags = args->flags;
|
||||
SDL_DialogFileCallback callback = args->callback;
|
||||
void *userdata = args->userdata;
|
||||
const char *title = args->title;
|
||||
wchar_t *filter_wchar = args->filters_str;
|
||||
|
||||
/* GetOpenFileName and GetSaveFileName have the same signature
|
||||
(yes, LPOPENFILENAMEW even for the save dialog) */
|
||||
typedef BOOL (WINAPI *pfnGetAnyFileNameW)(LPOPENFILENAMEW);
|
||||
typedef DWORD (WINAPI *pfnCommDlgExtendedError)(void);
|
||||
HMODULE lib = LoadLibraryW(L"Comdlg32.dll");
|
||||
pfnGetAnyFileNameW pGetAnyFileName = NULL;
|
||||
pfnCommDlgExtendedError pCommDlgExtendedError = NULL;
|
||||
|
||||
if (lib) {
|
||||
pGetAnyFileName = (pfnGetAnyFileNameW) GetProcAddress(lib, is_save ? "GetSaveFileNameW" : "GetOpenFileNameW");
|
||||
pCommDlgExtendedError = (pfnCommDlgExtendedError) GetProcAddress(lib, "CommDlgExtendedError");
|
||||
} else {
|
||||
SDL_SetError("Couldn't load Comdlg32.dll");
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pGetAnyFileName) {
|
||||
SDL_SetError("Couldn't load GetOpenFileName/GetSaveFileName from library");
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pCommDlgExtendedError) {
|
||||
SDL_SetError("Couldn't load CommDlgExtendedError from library");
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
HWND window = NULL;
|
||||
|
||||
if (parent) {
|
||||
window = (HWND) SDL_GetPointerProperty(SDL_GetWindowProperties(parent), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
|
||||
}
|
||||
|
||||
wchar_t *filebuffer; // lpstrFile
|
||||
wchar_t initfolder[MAX_PATH] = L""; // lpstrInitialDir
|
||||
|
||||
/* If SELECTLIST_SIZE is too large, putting filebuffer on the stack might
|
||||
cause an overflow */
|
||||
filebuffer = (wchar_t *) SDL_malloc(SELECTLIST_SIZE * sizeof(wchar_t));
|
||||
|
||||
// Necessary for the return code below
|
||||
SDL_memset(filebuffer, 0, SELECTLIST_SIZE * sizeof(wchar_t));
|
||||
|
||||
if (default_file) {
|
||||
/* On Windows 10, 11 and possibly others, lpstrFile can be initialized
|
||||
with a path and the dialog will start at that location, but *only if
|
||||
the path contains a filename*. If it ends with a folder (directory
|
||||
separator), it fails with 0x3002 (12290) FNERR_INVALIDFILENAME. For
|
||||
that specific case, lpstrInitialDir must be used instead, but just
|
||||
for that case, because lpstrInitialDir doesn't support file names.
|
||||
|
||||
On top of that, lpstrInitialDir hides a special algorithm that
|
||||
decides which folder to actually use as starting point, which may or
|
||||
may not be the one provided, or some other unrelated folder. Also,
|
||||
the algorithm changes between platforms. Assuming the documentation
|
||||
is correct, the algorithm is there under 'lpstrInitialDir':
|
||||
|
||||
https://learn.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamew
|
||||
|
||||
Finally, lpstrFile does not support forward slashes. lpstrInitialDir
|
||||
does, though. */
|
||||
|
||||
char last_c = default_file[SDL_strlen(default_file) - 1];
|
||||
|
||||
if (last_c == '\\' || last_c == '/') {
|
||||
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, default_file, -1, initfolder, MAX_PATH);
|
||||
} else {
|
||||
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, default_file, -1, filebuffer, MAX_PATH);
|
||||
|
||||
for (int i = 0; i < SELECTLIST_SIZE; i++) {
|
||||
if (filebuffer[i] == L'/') {
|
||||
filebuffer[i] = L'\\';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t *title_w = NULL;
|
||||
|
||||
if (title) {
|
||||
title_w = WIN_UTF8ToStringW(title);
|
||||
if (!title_w) {
|
||||
SDL_free(filebuffer);
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
OPENFILENAMEW dialog;
|
||||
dialog.lStructSize = sizeof(OPENFILENAME);
|
||||
dialog.hwndOwner = window;
|
||||
dialog.hInstance = 0;
|
||||
dialog.lpstrFilter = filter_wchar;
|
||||
dialog.lpstrCustomFilter = NULL;
|
||||
dialog.nMaxCustFilter = 0;
|
||||
dialog.nFilterIndex = 0;
|
||||
dialog.lpstrFile = filebuffer;
|
||||
dialog.nMaxFile = SELECTLIST_SIZE;
|
||||
dialog.lpstrFileTitle = NULL;
|
||||
dialog.lpstrInitialDir = *initfolder ? initfolder : NULL;
|
||||
dialog.lpstrTitle = title_w;
|
||||
dialog.Flags = flags | OFN_EXPLORER | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
|
||||
dialog.nFileOffset = 0;
|
||||
dialog.nFileExtension = 0;
|
||||
dialog.lpstrDefExt = NULL;
|
||||
dialog.lCustData = 0;
|
||||
dialog.lpfnHook = NULL;
|
||||
dialog.lpTemplateName = NULL;
|
||||
// Skipped many mac-exclusive and reserved members
|
||||
dialog.FlagsEx = 0;
|
||||
|
||||
BOOL result = pGetAnyFileName(&dialog);
|
||||
|
||||
SDL_free(title_w);
|
||||
|
||||
if (result) {
|
||||
if (!(flags & OFN_ALLOWMULTISELECT)) {
|
||||
// File is a C string stored in dialog.lpstrFile
|
||||
char *chosen_file = WIN_StringToUTF8W(dialog.lpstrFile);
|
||||
const char *opts[2] = { chosen_file, NULL };
|
||||
callback(userdata, opts, getFilterIndex(dialog.nFilterIndex));
|
||||
SDL_free(chosen_file);
|
||||
} else {
|
||||
/* File is either a C string if the user chose a single file, else
|
||||
it's a series of strings formatted like:
|
||||
|
||||
"C:\\path\\to\\folder\0filename1.ext\0filename2.ext\0\0"
|
||||
|
||||
The code below will only stop on a double NULL in all cases, so
|
||||
it is important that the rest of the buffer has been zeroed. */
|
||||
char chosen_folder[MAX_PATH];
|
||||
char chosen_file[MAX_PATH];
|
||||
wchar_t *file_ptr = dialog.lpstrFile;
|
||||
size_t nfiles = 0;
|
||||
size_t chosen_folder_size;
|
||||
char **chosen_files_list = (char **) SDL_malloc(sizeof(char *) * (nfiles + 1));
|
||||
|
||||
if (!chosen_files_list) {
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
chosen_files_list[nfiles] = NULL;
|
||||
|
||||
if (WideCharToMultiByte(CP_UTF8, 0, file_ptr, -1, chosen_folder, MAX_PATH, NULL, NULL) == 0) {
|
||||
SDL_SetError("Path too long or invalid character in path");
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
chosen_folder_size = SDL_strlen(chosen_folder);
|
||||
SDL_strlcpy(chosen_file, chosen_folder, MAX_PATH);
|
||||
chosen_file[chosen_folder_size] = '\\';
|
||||
|
||||
file_ptr += SDL_wcslen(file_ptr) + 1;
|
||||
|
||||
while (*file_ptr) {
|
||||
nfiles++;
|
||||
char **new_cfl = (char **) SDL_realloc(chosen_files_list, sizeof(char *) * (nfiles + 1));
|
||||
|
||||
if (!new_cfl) {
|
||||
for (size_t i = 0; i < nfiles - 1; i++) {
|
||||
SDL_free(chosen_files_list[i]);
|
||||
}
|
||||
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
chosen_files_list = new_cfl;
|
||||
chosen_files_list[nfiles] = NULL;
|
||||
|
||||
int diff = ((int) chosen_folder_size) + 1;
|
||||
|
||||
if (WideCharToMultiByte(CP_UTF8, 0, file_ptr, -1, chosen_file + diff, MAX_PATH - diff, NULL, NULL) == 0) {
|
||||
SDL_SetError("Path too long or invalid character in path");
|
||||
|
||||
for (size_t i = 0; i < nfiles - 1; i++) {
|
||||
SDL_free(chosen_files_list[i]);
|
||||
}
|
||||
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
file_ptr += SDL_wcslen(file_ptr) + 1;
|
||||
|
||||
chosen_files_list[nfiles - 1] = SDL_strdup(chosen_file);
|
||||
|
||||
if (!chosen_files_list[nfiles - 1]) {
|
||||
for (size_t i = 0; i < nfiles - 1; i++) {
|
||||
SDL_free(chosen_files_list[i]);
|
||||
}
|
||||
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If the user chose only one file, it's all just one string
|
||||
if (nfiles == 0) {
|
||||
nfiles++;
|
||||
char **new_cfl = (char **) SDL_realloc(chosen_files_list, sizeof(char *) * (nfiles + 1));
|
||||
|
||||
if (!new_cfl) {
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
chosen_files_list = new_cfl;
|
||||
chosen_files_list[nfiles] = NULL;
|
||||
chosen_files_list[nfiles - 1] = SDL_strdup(chosen_folder);
|
||||
|
||||
if (!chosen_files_list[nfiles - 1]) {
|
||||
SDL_free(chosen_files_list);
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(filebuffer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
callback(userdata, (const char * const *) chosen_files_list, getFilterIndex(dialog.nFilterIndex));
|
||||
|
||||
for (size_t i = 0; i < nfiles; i++) {
|
||||
SDL_free(chosen_files_list[i]);
|
||||
}
|
||||
|
||||
SDL_free(chosen_files_list);
|
||||
}
|
||||
} else {
|
||||
DWORD error = pCommDlgExtendedError();
|
||||
// Error code 0 means the user clicked the cancel button.
|
||||
if (error == 0) {
|
||||
/* Unlike SDL's handling of errors, Windows does reset the error
|
||||
code to 0 after calling GetOpenFileName if another Windows
|
||||
function before set a different error code, so it's safe to
|
||||
check for success. */
|
||||
const char *opts[1] = { NULL };
|
||||
callback(userdata, opts, getFilterIndex(dialog.nFilterIndex));
|
||||
} else {
|
||||
SDL_SetError("Windows error, CommDlgExtendedError: %ld", pCommDlgExtendedError());
|
||||
callback(userdata, NULL, -1);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_free(filebuffer);
|
||||
}
|
||||
|
||||
int windows_file_dialog_thread(void *ptr)
|
||||
{
|
||||
windows_ShowFileDialog(ptr);
|
||||
freeWinArgs(ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CALLBACK browse_callback_proc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
|
||||
{
|
||||
switch (uMsg) {
|
||||
case BFFM_INITIALIZED:
|
||||
if (lpData) {
|
||||
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);
|
||||
}
|
||||
break;
|
||||
case BFFM_SELCHANGED:
|
||||
break;
|
||||
case BFFM_VALIDATEFAILED:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void windows_ShowFolderDialog(void *ptr)
|
||||
{
|
||||
winFArgs *args = (winFArgs *) ptr;
|
||||
SDL_Window *window = args->parent;
|
||||
SDL_DialogFileCallback callback = args->callback;
|
||||
void *userdata = args->userdata;
|
||||
HWND parent = NULL;
|
||||
const char *title = args->title;
|
||||
|
||||
if (window) {
|
||||
parent = (HWND) SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
|
||||
}
|
||||
|
||||
wchar_t *title_w = NULL;
|
||||
|
||||
if (title) {
|
||||
title_w = WIN_UTF8ToStringW(title);
|
||||
if (!title_w) {
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t buffer[MAX_PATH];
|
||||
|
||||
BROWSEINFOW dialog;
|
||||
dialog.hwndOwner = parent;
|
||||
dialog.pidlRoot = NULL;
|
||||
dialog.pszDisplayName = buffer;
|
||||
dialog.lpszTitle = title_w;
|
||||
dialog.ulFlags = BIF_USENEWUI;
|
||||
dialog.lpfn = browse_callback_proc;
|
||||
dialog.lParam = (LPARAM)args->default_folder;
|
||||
dialog.iImage = 0;
|
||||
|
||||
LPITEMIDLIST lpItem = SHBrowseForFolderW(&dialog);
|
||||
|
||||
SDL_free(title_w);
|
||||
|
||||
if (lpItem != NULL) {
|
||||
SHGetPathFromIDListW(lpItem, buffer);
|
||||
char *chosen_file = WIN_StringToUTF8W(buffer);
|
||||
const char *files[2] = { chosen_file, NULL };
|
||||
callback(userdata, (const char * const *) files, -1);
|
||||
SDL_free(chosen_file);
|
||||
} else {
|
||||
const char *files[1] = { NULL };
|
||||
callback(userdata, (const char * const *) files, -1);
|
||||
}
|
||||
}
|
||||
|
||||
int windows_folder_dialog_thread(void *ptr)
|
||||
{
|
||||
windows_ShowFolderDialog(ptr);
|
||||
freeWinFArgs((winFArgs *)ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
wchar_t *win_get_filters(const SDL_DialogFileFilter *filters, int nfilters)
|
||||
{
|
||||
wchar_t *filter_wchar = NULL;
|
||||
|
||||
if (filters) {
|
||||
// '\x01' is used in place of a null byte
|
||||
// suffix needs two null bytes in case the filter list is empty
|
||||
char *filterlist = convert_filters(filters, nfilters, clear_filt_names,
|
||||
"", "", "\x01\x01", "", "\x01",
|
||||
"\x01", "*.", ";*.", "");
|
||||
|
||||
if (!filterlist) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int filter_len = (int)SDL_strlen(filterlist);
|
||||
|
||||
for (char *c = filterlist; *c; c++) {
|
||||
if (*c == '\x01') {
|
||||
*c = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
int filter_wlen = MultiByteToWideChar(CP_UTF8, 0, filterlist, filter_len, NULL, 0);
|
||||
filter_wchar = (wchar_t *)SDL_malloc(filter_wlen * sizeof(wchar_t));
|
||||
if (!filter_wchar) {
|
||||
SDL_free(filterlist);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MultiByteToWideChar(CP_UTF8, 0, filterlist, filter_len, filter_wchar, filter_wlen);
|
||||
|
||||
SDL_free(filterlist);
|
||||
}
|
||||
|
||||
return filter_wchar;
|
||||
}
|
||||
|
||||
static void ShowFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location, bool allow_many, bool is_save, const char *title, const char *accept, const char *cancel)
|
||||
{
|
||||
winArgs *args;
|
||||
SDL_Thread *thread;
|
||||
wchar_t *filters_str;
|
||||
|
||||
if (SDL_GetHint(SDL_HINT_FILE_DIALOG_DRIVER) != NULL) {
|
||||
SDL_SetError("File dialog driver unsupported");
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
args = (winArgs *)SDL_malloc(sizeof(*args));
|
||||
if (args == NULL) {
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
filters_str = win_get_filters(filters, nfilters);
|
||||
|
||||
DWORD flags = 0;
|
||||
if (allow_many) {
|
||||
flags |= OFN_ALLOWMULTISELECT;
|
||||
}
|
||||
if (is_save) {
|
||||
flags |= OFN_OVERWRITEPROMPT;
|
||||
}
|
||||
|
||||
if (!filters_str && filters) {
|
||||
callback(userdata, NULL, -1);
|
||||
SDL_free(args);
|
||||
return;
|
||||
}
|
||||
|
||||
args->is_save = is_save;
|
||||
args->filters_str = filters_str;
|
||||
args->default_file = default_location ? SDL_strdup(default_location) : NULL;
|
||||
args->parent = window;
|
||||
args->flags = flags;
|
||||
args->callback = callback;
|
||||
args->userdata = userdata;
|
||||
args->title = title ? SDL_strdup(title) : NULL;
|
||||
args->accept = accept ? SDL_strdup(accept) : NULL;
|
||||
args->cancel = cancel ? SDL_strdup(cancel) : NULL;
|
||||
|
||||
thread = SDL_CreateThread(windows_file_dialog_thread, "SDL_Windows_ShowFileDialog", (void *) args);
|
||||
|
||||
if (thread == NULL) {
|
||||
callback(userdata, NULL, -1);
|
||||
// The thread won't have run, therefore the data won't have been freed
|
||||
freeWinArgs(args);
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_DetachThread(thread);
|
||||
}
|
||||
|
||||
void ShowFolderDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, bool allow_many, const char *title, const char *accept, const char *cancel)
|
||||
{
|
||||
winFArgs *args;
|
||||
SDL_Thread *thread;
|
||||
|
||||
if (SDL_GetHint(SDL_HINT_FILE_DIALOG_DRIVER) != NULL) {
|
||||
SDL_SetError("File dialog driver unsupported");
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
args = (winFArgs *)SDL_malloc(sizeof(*args));
|
||||
if (args == NULL) {
|
||||
callback(userdata, NULL, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
args->parent = window;
|
||||
args->callback = callback;
|
||||
args->default_folder = default_location ? SDL_strdup(default_location) : NULL;
|
||||
args->userdata = userdata;
|
||||
args->title = title ? SDL_strdup(title) : NULL;
|
||||
args->accept = accept ? SDL_strdup(accept) : NULL;
|
||||
args->cancel = cancel ? SDL_strdup(cancel) : NULL;
|
||||
|
||||
thread = SDL_CreateThread(windows_folder_dialog_thread, "SDL_Windows_ShowFolderDialog", (void *) args);
|
||||
|
||||
if (thread == NULL) {
|
||||
callback(userdata, NULL, -1);
|
||||
// The thread won't have run, therefore the data won't have been freed
|
||||
freeWinFArgs(args);
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_DetachThread(thread);
|
||||
}
|
||||
|
||||
void SDL_SYS_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFileCallback callback, void *userdata, SDL_PropertiesID props)
|
||||
{
|
||||
/* The internal functions will start threads, and the properties may be freed as soon as this function returns.
|
||||
Save a copy of what we need before invoking the functions and starting the threads. */
|
||||
SDL_Window *window = SDL_GetPointerProperty(props, SDL_PROP_FILE_DIALOG_WINDOW_POINTER, NULL);
|
||||
SDL_DialogFileFilter *filters = SDL_GetPointerProperty(props, SDL_PROP_FILE_DIALOG_FILTERS_POINTER, NULL);
|
||||
int nfilters = (int) SDL_GetNumberProperty(props, SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER, 0);
|
||||
bool allow_many = SDL_GetBooleanProperty(props, SDL_PROP_FILE_DIALOG_MANY_BOOLEAN, false);
|
||||
const char *default_location = SDL_GetStringProperty(props, SDL_PROP_FILE_DIALOG_LOCATION_STRING, NULL);
|
||||
const char *title = SDL_GetStringProperty(props, SDL_PROP_FILE_DIALOG_TITLE_STRING, NULL);
|
||||
const char *accept = SDL_GetStringProperty(props, SDL_PROP_FILE_DIALOG_ACCEPT_STRING, NULL);
|
||||
const char *cancel = SDL_GetStringProperty(props, SDL_PROP_FILE_DIALOG_CANCEL_STRING, NULL);
|
||||
bool is_save = false;
|
||||
|
||||
switch (type) {
|
||||
case SDL_FILEDIALOG_SAVEFILE:
|
||||
is_save = true;
|
||||
SDL_FALLTHROUGH;
|
||||
case SDL_FILEDIALOG_OPENFILE:
|
||||
ShowFileDialog(callback, userdata, window, filters, nfilters, default_location, allow_many, is_save, title, accept, cancel);
|
||||
break;
|
||||
|
||||
case SDL_FILEDIALOG_OPENFOLDER:
|
||||
ShowFolderDialog(callback, userdata, window, default_location, allow_many, title, accept, cancel);
|
||||
break;
|
||||
};
|
||||
}
|
||||
Vendored
-512
@@ -1,512 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
// General touch handling code for SDL
|
||||
|
||||
#include "SDL_events_c.h"
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
|
||||
static int SDL_num_touch = 0;
|
||||
static SDL_Touch **SDL_touchDevices = NULL;
|
||||
|
||||
// for mapping touch events to mice
|
||||
static bool finger_touching = false;
|
||||
static SDL_FingerID track_fingerid;
|
||||
static SDL_TouchID track_touchid;
|
||||
|
||||
// Public functions
|
||||
bool SDL_InitTouch(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SDL_TouchDevicesAvailable(void)
|
||||
{
|
||||
return SDL_num_touch > 0;
|
||||
}
|
||||
|
||||
SDL_TouchID *SDL_GetTouchDevices(int *count)
|
||||
{
|
||||
if (count) {
|
||||
*count = 0;
|
||||
}
|
||||
|
||||
const int total = SDL_num_touch;
|
||||
SDL_TouchID *result = (SDL_TouchID *) SDL_malloc(sizeof (SDL_TouchID) * (total + 1));
|
||||
if (result) {
|
||||
for (int i = 0; i < total; i++) {
|
||||
result[i] = SDL_touchDevices[i]->id;
|
||||
}
|
||||
result[total] = 0;
|
||||
if (count) {
|
||||
*count = SDL_num_touch;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int SDL_GetTouchIndex(SDL_TouchID id)
|
||||
{
|
||||
int index;
|
||||
SDL_Touch *touch;
|
||||
|
||||
for (index = 0; index < SDL_num_touch; ++index) {
|
||||
touch = SDL_touchDevices[index];
|
||||
if (touch->id == id) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_Touch *SDL_GetTouch(SDL_TouchID id)
|
||||
{
|
||||
int index = SDL_GetTouchIndex(id);
|
||||
if (index < 0 || index >= SDL_num_touch) {
|
||||
if ((id == SDL_MOUSE_TOUCHID) || (id == SDL_PEN_TOUCHID)) {
|
||||
// this is a virtual touch device, but for some reason they aren't added to the system. Just ignore it.
|
||||
} else if ( SDL_GetVideoDevice()->ResetTouch) {
|
||||
SDL_SetError("Unknown touch id %d, resetting", (int)id);
|
||||
SDL_GetVideoDevice()->ResetTouch(SDL_GetVideoDevice());
|
||||
} else {
|
||||
SDL_SetError("Unknown touch device id %d, cannot reset", (int)id);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return SDL_touchDevices[index];
|
||||
}
|
||||
|
||||
const char *SDL_GetTouchDeviceName(SDL_TouchID id)
|
||||
{
|
||||
SDL_Touch *touch = SDL_GetTouch(id);
|
||||
if (!touch) {
|
||||
return NULL;
|
||||
}
|
||||
return SDL_GetPersistentString(touch->name);
|
||||
}
|
||||
|
||||
SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID id)
|
||||
{
|
||||
SDL_Touch *touch = SDL_GetTouch(id);
|
||||
return touch ? touch->type : SDL_TOUCH_DEVICE_INVALID;
|
||||
}
|
||||
|
||||
static int SDL_GetFingerIndex(const SDL_Touch *touch, SDL_FingerID fingerid)
|
||||
{
|
||||
int index;
|
||||
for (index = 0; index < touch->num_fingers; ++index) {
|
||||
if (touch->fingers[index]->id == fingerid) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static SDL_Finger *SDL_GetFinger(const SDL_Touch *touch, SDL_FingerID id)
|
||||
{
|
||||
int index = SDL_GetFingerIndex(touch, id);
|
||||
if (index < 0 || index >= touch->num_fingers) {
|
||||
return NULL;
|
||||
}
|
||||
return touch->fingers[index];
|
||||
}
|
||||
|
||||
SDL_Finger **SDL_GetTouchFingers(SDL_TouchID touchID, int *count)
|
||||
{
|
||||
SDL_Finger **fingers;
|
||||
SDL_Finger *finger_data;
|
||||
|
||||
if (count) {
|
||||
*count = 0;
|
||||
}
|
||||
|
||||
SDL_Touch *touch = SDL_GetTouch(touchID);
|
||||
if (!touch) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Create a snapshot of the current finger state
|
||||
fingers = (SDL_Finger **)SDL_malloc((touch->num_fingers + 1) * sizeof(*fingers) + touch->num_fingers * sizeof(**fingers));
|
||||
if (!fingers) {
|
||||
return NULL;
|
||||
}
|
||||
finger_data = (SDL_Finger *)(fingers + (touch->num_fingers + 1));
|
||||
|
||||
for (int i = 0; i < touch->num_fingers; ++i) {
|
||||
fingers[i] = &finger_data[i];
|
||||
SDL_copyp(fingers[i], touch->fingers[i]);
|
||||
}
|
||||
fingers[touch->num_fingers] = NULL;
|
||||
|
||||
if (count) {
|
||||
*count = touch->num_fingers;
|
||||
}
|
||||
return fingers;
|
||||
}
|
||||
|
||||
int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name)
|
||||
{
|
||||
SDL_Touch **touchDevices;
|
||||
int index;
|
||||
|
||||
SDL_assert(touchID != 0);
|
||||
|
||||
index = SDL_GetTouchIndex(touchID);
|
||||
if (index >= 0) {
|
||||
return index;
|
||||
}
|
||||
|
||||
// Add the touch to the list of touch
|
||||
touchDevices = (SDL_Touch **)SDL_realloc(SDL_touchDevices,
|
||||
(SDL_num_touch + 1) * sizeof(*touchDevices));
|
||||
if (!touchDevices) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_touchDevices = touchDevices;
|
||||
index = SDL_num_touch;
|
||||
|
||||
SDL_touchDevices[index] = (SDL_Touch *)SDL_malloc(sizeof(*SDL_touchDevices[index]));
|
||||
if (!SDL_touchDevices[index]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Added touch to list
|
||||
++SDL_num_touch;
|
||||
|
||||
// we're setting the touch properties
|
||||
SDL_touchDevices[index]->id = touchID;
|
||||
SDL_touchDevices[index]->type = type;
|
||||
SDL_touchDevices[index]->num_fingers = 0;
|
||||
SDL_touchDevices[index]->max_fingers = 0;
|
||||
SDL_touchDevices[index]->fingers = NULL;
|
||||
SDL_touchDevices[index]->name = SDL_strdup(name ? name : "");
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
// Set or update the name of a touch.
|
||||
void SDL_SetTouchName(SDL_TouchID id, const char *name)
|
||||
{
|
||||
SDL_Touch *touch = SDL_GetTouch(id);
|
||||
if (touch) {
|
||||
SDL_free(touch->name);
|
||||
touch->name = SDL_strdup(name ? name : "");
|
||||
}
|
||||
}
|
||||
|
||||
static bool SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure)
|
||||
{
|
||||
SDL_Finger *finger;
|
||||
|
||||
SDL_assert(fingerid != 0);
|
||||
|
||||
if (touch->num_fingers == touch->max_fingers) {
|
||||
SDL_Finger **new_fingers;
|
||||
new_fingers = (SDL_Finger **)SDL_realloc(touch->fingers, (touch->max_fingers + 1) * sizeof(*touch->fingers));
|
||||
if (!new_fingers) {
|
||||
return false;
|
||||
}
|
||||
touch->fingers = new_fingers;
|
||||
touch->fingers[touch->max_fingers] = (SDL_Finger *)SDL_malloc(sizeof(*finger));
|
||||
if (!touch->fingers[touch->max_fingers]) {
|
||||
return false;
|
||||
}
|
||||
touch->max_fingers++;
|
||||
}
|
||||
|
||||
finger = touch->fingers[touch->num_fingers++];
|
||||
finger->id = fingerid;
|
||||
finger->x = x;
|
||||
finger->y = y;
|
||||
finger->pressure = pressure;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void SDL_DelFinger(SDL_Touch *touch, SDL_FingerID fingerid)
|
||||
{
|
||||
int index = SDL_GetFingerIndex(touch, fingerid);
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
--touch->num_fingers;
|
||||
if (index < (touch->num_fingers)) {
|
||||
// Move the deleted finger to just past the end of the active fingers array and shift the active fingers by one.
|
||||
// This ensures that the descriptor for the now-deleted finger is located at `touch->fingers[touch->num_fingers]`
|
||||
// and is ready for use in SDL_AddFinger.
|
||||
SDL_Finger *deleted_finger = touch->fingers[index];
|
||||
SDL_memmove(&touch->fingers[index], &touch->fingers[index + 1], (touch->num_fingers - index) * sizeof(touch->fingers[index]));
|
||||
touch->fingers[touch->num_fingers] = deleted_finger;
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_SendTouch(Uint64 timestamp, SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, SDL_EventType type, float x, float y, float pressure)
|
||||
{
|
||||
SDL_Finger *finger;
|
||||
bool down = (type == SDL_EVENT_FINGER_DOWN);
|
||||
|
||||
SDL_Touch *touch = SDL_GetTouch(id);
|
||||
if (!touch) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
// SDL_HINT_TOUCH_MOUSE_EVENTS: controlling whether touch events should generate synthetic mouse events
|
||||
// SDL_HINT_VITA_TOUCH_MOUSE_DEVICE: controlling which touchpad should generate synthetic mouse events, PSVita-only
|
||||
{
|
||||
// FIXME: maybe we should only restrict to a few SDL_TouchDeviceType
|
||||
if ((id != SDL_MOUSE_TOUCHID) && (id != SDL_PEN_TOUCHID)) {
|
||||
#ifdef SDL_PLATFORM_VITA
|
||||
if (mouse->touch_mouse_events && ((mouse->vita_touch_mouse_device == id) || (mouse->vita_touch_mouse_device == 3))) {
|
||||
#else
|
||||
if (mouse->touch_mouse_events) {
|
||||
#endif
|
||||
if (window) {
|
||||
if (down) {
|
||||
if (finger_touching == false) {
|
||||
float pos_x = (x * (float)window->w);
|
||||
float pos_y = (y * (float)window->h);
|
||||
if (pos_x < 0) {
|
||||
pos_x = 0;
|
||||
}
|
||||
if (pos_x > (float)(window->w - 1)) {
|
||||
pos_x = (float)(window->w - 1);
|
||||
}
|
||||
if (pos_y < 0.0f) {
|
||||
pos_y = 0.0f;
|
||||
}
|
||||
if (pos_y > (float)(window->h - 1)) {
|
||||
pos_y = (float)(window->h - 1);
|
||||
}
|
||||
SDL_SendMouseMotion(timestamp, window, SDL_TOUCH_MOUSEID, false, pos_x, pos_y);
|
||||
SDL_SendMouseButton(timestamp, window, SDL_TOUCH_MOUSEID, SDL_BUTTON_LEFT, true);
|
||||
}
|
||||
} else {
|
||||
if (finger_touching == true && track_touchid == id && track_fingerid == fingerid) {
|
||||
SDL_SendMouseButton(timestamp, window, SDL_TOUCH_MOUSEID, SDL_BUTTON_LEFT, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (down) {
|
||||
if (finger_touching == false) {
|
||||
finger_touching = true;
|
||||
track_touchid = id;
|
||||
track_fingerid = fingerid;
|
||||
}
|
||||
} else {
|
||||
if (finger_touching == true && track_touchid == id && track_fingerid == fingerid) {
|
||||
finger_touching = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SDL_HINT_MOUSE_TOUCH_EVENTS: if not set, discard synthetic touch events coming from platform layer
|
||||
if (!mouse->mouse_touch_events && (id == SDL_MOUSE_TOUCHID)) {
|
||||
return;
|
||||
} else if (!mouse->pen_touch_events && (id == SDL_PEN_TOUCHID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
finger = SDL_GetFinger(touch, fingerid);
|
||||
if (down) {
|
||||
if (finger) {
|
||||
/* This finger is already down.
|
||||
Assume the finger-up for the previous touch was lost, and send it. */
|
||||
SDL_SendTouch(timestamp, id, fingerid, window, SDL_EVENT_FINGER_CANCELED, x, y, pressure);
|
||||
}
|
||||
|
||||
if (!SDL_AddFinger(touch, fingerid, x, y, pressure)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SDL_EventEnabled(type)) {
|
||||
SDL_Event event;
|
||||
event.type = type;
|
||||
event.common.timestamp = timestamp;
|
||||
event.tfinger.touchID = id;
|
||||
event.tfinger.fingerID = fingerid;
|
||||
event.tfinger.x = x;
|
||||
event.tfinger.y = y;
|
||||
event.tfinger.dx = 0;
|
||||
event.tfinger.dy = 0;
|
||||
event.tfinger.pressure = pressure;
|
||||
event.tfinger.windowID = window ? SDL_GetWindowID(window) : 0;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
} else {
|
||||
if (!finger) {
|
||||
// This finger is already up
|
||||
return;
|
||||
}
|
||||
|
||||
if (SDL_EventEnabled(type)) {
|
||||
SDL_Event event;
|
||||
event.type = type;
|
||||
event.common.timestamp = timestamp;
|
||||
event.tfinger.touchID = id;
|
||||
event.tfinger.fingerID = fingerid;
|
||||
// I don't trust the coordinates passed on fingerUp
|
||||
event.tfinger.x = finger->x;
|
||||
event.tfinger.y = finger->y;
|
||||
event.tfinger.dx = 0;
|
||||
event.tfinger.dy = 0;
|
||||
event.tfinger.pressure = pressure;
|
||||
event.tfinger.windowID = window ? SDL_GetWindowID(window) : 0;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
SDL_DelFinger(touch, fingerid);
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_SendTouchMotion(Uint64 timestamp, SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window,
|
||||
float x, float y, float pressure)
|
||||
{
|
||||
SDL_Touch *touch;
|
||||
SDL_Finger *finger;
|
||||
float xrel, yrel, prel;
|
||||
|
||||
touch = SDL_GetTouch(id);
|
||||
if (!touch) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
// SDL_HINT_TOUCH_MOUSE_EVENTS: controlling whether touch events should generate synthetic mouse events
|
||||
{
|
||||
if ((id != SDL_MOUSE_TOUCHID) && (id != SDL_PEN_TOUCHID)) {
|
||||
if (mouse->touch_mouse_events) {
|
||||
if (window) {
|
||||
if (finger_touching == true && track_touchid == id && track_fingerid == fingerid) {
|
||||
float pos_x = (x * (float)window->w);
|
||||
float pos_y = (y * (float)window->h);
|
||||
if (pos_x < 0.0f) {
|
||||
pos_x = 0.0f;
|
||||
}
|
||||
if (pos_x > (float)(window->w - 1)) {
|
||||
pos_x = (float)(window->w - 1);
|
||||
}
|
||||
if (pos_y < 0.0f) {
|
||||
pos_y = 0.0f;
|
||||
}
|
||||
if (pos_y > (float)(window->h - 1)) {
|
||||
pos_y = (float)(window->h - 1);
|
||||
}
|
||||
SDL_SendMouseMotion(timestamp, window, SDL_TOUCH_MOUSEID, false, pos_x, pos_y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SDL_HINT_MOUSE_TOUCH_EVENTS: if not set, discard synthetic touch events coming from platform layer
|
||||
if (mouse->mouse_touch_events == 0) {
|
||||
if (id == SDL_MOUSE_TOUCHID) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
finger = SDL_GetFinger(touch, fingerid);
|
||||
if (!finger) {
|
||||
SDL_SendTouch(timestamp, id, fingerid, window, SDL_EVENT_FINGER_DOWN, x, y, pressure);
|
||||
return;
|
||||
}
|
||||
|
||||
xrel = x - finger->x;
|
||||
yrel = y - finger->y;
|
||||
prel = pressure - finger->pressure;
|
||||
|
||||
// Drop events that don't change state
|
||||
if (xrel == 0.0f && yrel == 0.0f && prel == 0.0f) {
|
||||
#if 0
|
||||
printf("Touch event didn't change state - dropped!\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// Update internal touch coordinates
|
||||
finger->x = x;
|
||||
finger->y = y;
|
||||
finger->pressure = pressure;
|
||||
|
||||
// Post the event, if desired
|
||||
if (SDL_EventEnabled(SDL_EVENT_FINGER_MOTION)) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_EVENT_FINGER_MOTION;
|
||||
event.common.timestamp = timestamp;
|
||||
event.tfinger.touchID = id;
|
||||
event.tfinger.fingerID = fingerid;
|
||||
event.tfinger.x = x;
|
||||
event.tfinger.y = y;
|
||||
event.tfinger.dx = xrel;
|
||||
event.tfinger.dy = yrel;
|
||||
event.tfinger.pressure = pressure;
|
||||
event.tfinger.windowID = window ? SDL_GetWindowID(window) : 0;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_DelTouch(SDL_TouchID id)
|
||||
{
|
||||
int i, index;
|
||||
SDL_Touch *touch;
|
||||
|
||||
if (SDL_num_touch == 0) {
|
||||
// We've already cleaned up, we won't find this device
|
||||
return;
|
||||
}
|
||||
|
||||
index = SDL_GetTouchIndex(id);
|
||||
touch = SDL_GetTouch(id);
|
||||
if (!touch) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < touch->max_fingers; ++i) {
|
||||
SDL_free(touch->fingers[i]);
|
||||
}
|
||||
SDL_free(touch->fingers);
|
||||
SDL_free(touch->name);
|
||||
SDL_free(touch);
|
||||
|
||||
SDL_num_touch--;
|
||||
SDL_touchDevices[index] = SDL_touchDevices[SDL_num_touch];
|
||||
}
|
||||
|
||||
void SDL_QuitTouch(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = SDL_num_touch; i--;) {
|
||||
SDL_DelTouch(SDL_touchDevices[i]->id);
|
||||
}
|
||||
SDL_assert(SDL_num_touch == 0);
|
||||
|
||||
SDL_free(SDL_touchDevices);
|
||||
SDL_touchDevices = NULL;
|
||||
}
|
||||
-301
@@ -1,301 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
// Window event handling code for SDL
|
||||
|
||||
#include "SDL_events_c.h"
|
||||
#include "SDL_eventwatch_c.h"
|
||||
#include "SDL_mouse_c.h"
|
||||
#include "../tray/SDL_tray_utils.h"
|
||||
|
||||
|
||||
#define NUM_WINDOW_EVENT_WATCH_PRIORITIES (SDL_WINDOW_EVENT_WATCH_NORMAL + 1)
|
||||
|
||||
static SDL_EventWatchList SDL_window_event_watchers[NUM_WINDOW_EVENT_WATCH_PRIORITIES];
|
||||
|
||||
void SDL_InitWindowEventWatch(void)
|
||||
{
|
||||
for (int i = 0; i < SDL_arraysize(SDL_window_event_watchers); ++i) {
|
||||
SDL_InitEventWatchList(&SDL_window_event_watchers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_QuitWindowEventWatch(void)
|
||||
{
|
||||
for (int i = 0; i < SDL_arraysize(SDL_window_event_watchers); ++i) {
|
||||
SDL_QuitEventWatchList(&SDL_window_event_watchers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_AddWindowEventWatch(SDL_WindowEventWatchPriority priority, SDL_EventFilter filter, void *userdata)
|
||||
{
|
||||
SDL_AddEventWatchList(&SDL_window_event_watchers[priority], filter, userdata);
|
||||
}
|
||||
|
||||
void SDL_RemoveWindowEventWatch(SDL_WindowEventWatchPriority priority, SDL_EventFilter filter, void *userdata)
|
||||
{
|
||||
SDL_RemoveEventWatchList(&SDL_window_event_watchers[priority], filter, userdata);
|
||||
}
|
||||
|
||||
static bool SDLCALL RemoveSupercededWindowEvents(void *userdata, SDL_Event *event)
|
||||
{
|
||||
SDL_Event *new_event = (SDL_Event *)userdata;
|
||||
|
||||
if (event->type == new_event->type &&
|
||||
event->window.windowID == new_event->window.windowID) {
|
||||
// We're about to post a new move event, drop the old one
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SDL_SendWindowEvent(SDL_Window *window, SDL_EventType windowevent, int data1, int data2)
|
||||
{
|
||||
bool posted = false;
|
||||
|
||||
if (!window) {
|
||||
return false;
|
||||
}
|
||||
SDL_assert(SDL_ObjectValid(window, SDL_OBJECT_TYPE_WINDOW));
|
||||
|
||||
if (window->is_destroying && windowevent != SDL_EVENT_WINDOW_DESTROYED) {
|
||||
return false;
|
||||
}
|
||||
switch (windowevent) {
|
||||
case SDL_EVENT_WINDOW_SHOWN:
|
||||
if (!(window->flags & SDL_WINDOW_HIDDEN)) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~(SDL_WINDOW_HIDDEN | SDL_WINDOW_MINIMIZED);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_HIDDEN:
|
||||
if (window->flags & SDL_WINDOW_HIDDEN) {
|
||||
return false;
|
||||
}
|
||||
window->flags |= SDL_WINDOW_HIDDEN;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_EXPOSED:
|
||||
window->flags &= ~SDL_WINDOW_OCCLUDED;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOVED:
|
||||
window->undefined_x = false;
|
||||
window->undefined_y = false;
|
||||
window->last_position_pending = false;
|
||||
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
|
||||
window->windowed.x = data1;
|
||||
window->windowed.y = data2;
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->tiled) {
|
||||
window->floating.x = data1;
|
||||
window->floating.y = data2;
|
||||
}
|
||||
}
|
||||
if (data1 == window->x && data2 == window->y) {
|
||||
return false;
|
||||
}
|
||||
window->x = data1;
|
||||
window->y = data2;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESIZED:
|
||||
window->last_size_pending = false;
|
||||
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
|
||||
window->windowed.w = data1;
|
||||
window->windowed.h = data2;
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->tiled) {
|
||||
window->floating.w = data1;
|
||||
window->floating.h = data2;
|
||||
}
|
||||
}
|
||||
if (data1 == window->w && data2 == window->h) {
|
||||
SDL_CheckWindowPixelSizeChanged(window);
|
||||
return false;
|
||||
}
|
||||
window->w = data1;
|
||||
window->h = data2;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED:
|
||||
if (data1 == window->last_pixel_w && data2 == window->last_pixel_h) {
|
||||
return false;
|
||||
}
|
||||
window->last_pixel_w = data1;
|
||||
window->last_pixel_h = data2;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MINIMIZED:
|
||||
if (window->flags & SDL_WINDOW_MINIMIZED) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~SDL_WINDOW_MAXIMIZED;
|
||||
window->flags |= SDL_WINDOW_MINIMIZED;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MAXIMIZED:
|
||||
if (window->flags & SDL_WINDOW_MAXIMIZED) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~SDL_WINDOW_MINIMIZED;
|
||||
window->flags |= SDL_WINDOW_MAXIMIZED;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESTORED:
|
||||
if (!(window->flags & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED))) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~(SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOUSE_ENTER:
|
||||
if (window->flags & SDL_WINDOW_MOUSE_FOCUS) {
|
||||
return false;
|
||||
}
|
||||
window->flags |= SDL_WINDOW_MOUSE_FOCUS;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOUSE_LEAVE:
|
||||
if (!(window->flags & SDL_WINDOW_MOUSE_FOCUS)) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~SDL_WINDOW_MOUSE_FOCUS;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_FOCUS_GAINED:
|
||||
if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
|
||||
return false;
|
||||
}
|
||||
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_FOCUS_LOST:
|
||||
if (!(window->flags & SDL_WINDOW_INPUT_FOCUS)) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~SDL_WINDOW_INPUT_FOCUS;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_DISPLAY_CHANGED:
|
||||
if (data1 == 0 || (SDL_DisplayID)data1 == window->last_displayID) {
|
||||
return false;
|
||||
}
|
||||
window->update_fullscreen_on_display_changed = true;
|
||||
window->last_displayID = (SDL_DisplayID)data1;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_OCCLUDED:
|
||||
if (window->flags & SDL_WINDOW_OCCLUDED) {
|
||||
return false;
|
||||
}
|
||||
window->flags |= SDL_WINDOW_OCCLUDED;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_ENTER_FULLSCREEN:
|
||||
if (window->flags & SDL_WINDOW_FULLSCREEN) {
|
||||
return false;
|
||||
}
|
||||
window->flags |= SDL_WINDOW_FULLSCREEN;
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_LEAVE_FULLSCREEN:
|
||||
if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
|
||||
return false;
|
||||
}
|
||||
window->flags &= ~SDL_WINDOW_FULLSCREEN;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Post the event, if desired
|
||||
SDL_Event event;
|
||||
event.type = windowevent;
|
||||
event.common.timestamp = 0;
|
||||
event.window.data1 = data1;
|
||||
event.window.data2 = data2;
|
||||
event.window.windowID = window->id;
|
||||
|
||||
SDL_DispatchEventWatchList(&SDL_window_event_watchers[SDL_WINDOW_EVENT_WATCH_EARLY], &event);
|
||||
SDL_DispatchEventWatchList(&SDL_window_event_watchers[SDL_WINDOW_EVENT_WATCH_NORMAL], &event);
|
||||
|
||||
if (SDL_EventEnabled(windowevent)) {
|
||||
// Fixes queue overflow with move/resize events that aren't processed
|
||||
if (windowevent == SDL_EVENT_WINDOW_MOVED ||
|
||||
windowevent == SDL_EVENT_WINDOW_RESIZED ||
|
||||
windowevent == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED ||
|
||||
windowevent == SDL_EVENT_WINDOW_SAFE_AREA_CHANGED ||
|
||||
windowevent == SDL_EVENT_WINDOW_EXPOSED ||
|
||||
windowevent == SDL_EVENT_WINDOW_OCCLUDED) {
|
||||
SDL_FilterEvents(RemoveSupercededWindowEvents, &event);
|
||||
}
|
||||
posted = SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
switch (windowevent) {
|
||||
case SDL_EVENT_WINDOW_SHOWN:
|
||||
SDL_OnWindowShown(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_HIDDEN:
|
||||
SDL_OnWindowHidden(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOVED:
|
||||
SDL_OnWindowMoved(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESIZED:
|
||||
SDL_OnWindowResized(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED:
|
||||
SDL_OnWindowPixelSizeChanged(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MINIMIZED:
|
||||
SDL_OnWindowMinimized(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MAXIMIZED:
|
||||
SDL_OnWindowMaximized(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESTORED:
|
||||
SDL_OnWindowRestored(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOUSE_ENTER:
|
||||
SDL_OnWindowEnter(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_MOUSE_LEAVE:
|
||||
SDL_OnWindowLeave(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_FOCUS_GAINED:
|
||||
SDL_OnWindowFocusGained(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_FOCUS_LOST:
|
||||
SDL_OnWindowFocusLost(window);
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_DISPLAY_CHANGED:
|
||||
SDL_OnWindowDisplayChanged(window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (windowevent == SDL_EVENT_WINDOW_CLOSE_REQUESTED && !window->parent && !SDL_HasActiveTrays()) {
|
||||
int toplevel_count = 0;
|
||||
SDL_Window *n;
|
||||
for (n = SDL_GetVideoDevice()->windows; n; n = n->next) {
|
||||
if (!n->parent && !(n->flags & SDL_WINDOW_HIDDEN)) {
|
||||
++toplevel_count;
|
||||
}
|
||||
}
|
||||
|
||||
if (toplevel_count <= 1) {
|
||||
if (SDL_GetHintBoolean(SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE, true)) {
|
||||
SDL_SendQuit(); // This is the last toplevel window in the list so send the SDL_EVENT_QUIT event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return posted;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_ANDROID
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
// System dependent filesystem routines
|
||||
|
||||
#include "../SDL_sysfilesystem.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
char *SDL_SYS_GetBasePath(void)
|
||||
{
|
||||
// The current working directory is / on Android
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetPrefPath(const char *org, const char *app)
|
||||
{
|
||||
const char *path = SDL_GetAndroidInternalStoragePath();
|
||||
if (path) {
|
||||
size_t pathlen = SDL_strlen(path) + 2;
|
||||
char *fullpath = (char *)SDL_malloc(pathlen);
|
||||
if (!fullpath) {
|
||||
return NULL;
|
||||
}
|
||||
SDL_snprintf(fullpath, pathlen, "%s/", path);
|
||||
return fullpath;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetUserFolder(SDL_Folder folder)
|
||||
{
|
||||
/* TODO: see https://developer.android.com/reference/android/os/Environment#lfields
|
||||
and https://stackoverflow.com/questions/39332085/get-path-to-pictures-directory */
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // SDL_FILESYSTEM_ANDROID
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if defined(SDL_FILESYSTEM_DUMMY) || defined(SDL_FILESYSTEM_DISABLED)
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
// System dependent filesystem routines
|
||||
|
||||
#include "../SDL_sysfilesystem.h"
|
||||
|
||||
char *SDL_SYS_GetBasePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetPrefPath(const char *org, const char *app)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetUserFolder(SDL_Folder folder)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetCurrentDirectory(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // SDL_FILESYSTEM_DUMMY || SDL_FILESYSTEM_DISABLED
|
||||
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
// System dependent filesystem routines
|
||||
|
||||
#include "../SDL_sysfilesystem.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <emscripten/emscripten.h>
|
||||
|
||||
char *SDL_SYS_GetBasePath(void)
|
||||
{
|
||||
return SDL_strdup("/");
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetPrefPath(const char *org, const char *app)
|
||||
{
|
||||
const char *append = "/libsdl/";
|
||||
char *result;
|
||||
char *ptr = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
if (!app) {
|
||||
SDL_InvalidParamError("app");
|
||||
return NULL;
|
||||
}
|
||||
if (!org) {
|
||||
org = "";
|
||||
}
|
||||
|
||||
len = SDL_strlen(append) + SDL_strlen(org) + SDL_strlen(app) + 3;
|
||||
result = (char *)SDL_malloc(len);
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (*org) {
|
||||
SDL_snprintf(result, len, "%s%s/%s/", append, org, app);
|
||||
} else {
|
||||
SDL_snprintf(result, len, "%s%s/", append, app);
|
||||
}
|
||||
|
||||
for (ptr = result + 1; *ptr; ptr++) {
|
||||
if (*ptr == '/') {
|
||||
*ptr = '\0';
|
||||
if (mkdir(result, 0700) != 0 && errno != EEXIST) {
|
||||
goto error;
|
||||
}
|
||||
*ptr = '/';
|
||||
}
|
||||
}
|
||||
|
||||
if (mkdir(result, 0700) != 0 && errno != EEXIST) {
|
||||
error:
|
||||
SDL_SetError("Couldn't create directory '%s': '%s'", result, strerror(errno));
|
||||
SDL_free(result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
char *SDL_SYS_GetUserFolder(SDL_Folder folder)
|
||||
{
|
||||
const char *home = NULL;
|
||||
|
||||
if (folder != SDL_FOLDER_HOME) {
|
||||
SDL_SetError("Emscripten only supports the home folder");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
home = SDL_getenv("HOME");
|
||||
if (!home) {
|
||||
SDL_SetError("No $HOME environment variable available");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *result = SDL_malloc(SDL_strlen(home) + 2);
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (SDL_snprintf(result, SDL_strlen(home) + 2, "%s/", home) < 0) {
|
||||
SDL_SetError("Couldn't snprintf home path for Emscripten: %s", home);
|
||||
SDL_free(result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // SDL_FILESYSTEM_EMSCRIPTEN
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user