mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 12:18:28 +00:00
Switch header convention from #include "SDL.h"
to #include <SDL3/SDLh>
I ran this script in the include directory: ```sh sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h ``` I ran this script in the src directory: ```sh for i in ../include/SDL3/SDL*.h do hdr=$(basename $i) if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \; else find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \; fi done ``` Fixes https://github.com/libsdl-org/SDL/issues/6575
This commit is contained in:
parent
9a64aa6f95
commit
0a48abc860
661 changed files with 1623 additions and 2833 deletions
|
@ -10,9 +10,9 @@ if [ -e ./VERSION.txt ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
|
||||
minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
|
||||
micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
|
||||
major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL3/SDL_version.h)
|
||||
minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL3/SDL_version.h)
|
||||
micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL3/SDL_version.h)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ -x "$(command -v git)" ]; then
|
||||
|
|
|
@ -6,9 +6,9 @@ set -eu
|
|||
|
||||
cd `dirname $0`/..
|
||||
|
||||
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
|
||||
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
|
||||
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
|
||||
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL3/SDL_version.h)
|
||||
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL3/SDL_version.h)
|
||||
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL3/SDL_version.h)
|
||||
ref_version="${ref_major}.${ref_minor}.${ref_micro}"
|
||||
|
||||
tests=0
|
||||
|
|
|
@ -62,9 +62,9 @@ perl -w -pi -e 's/\A(.* SDL_MAJOR_VERSION = )\d+/${1}'$MAJOR'/;' android-project
|
|||
perl -w -pi -e 's/\A(.* SDL_MINOR_VERSION = )\d+/${1}'$MINOR'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
|
||||
perl -w -pi -e 's/\A(.* SDL_MICRO_VERSION = )\d+/${1}'$PATCH'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
|
||||
|
||||
perl -w -pi -e 's/(\#define SDL_MAJOR_VERSION\s+)\d+/${1}'$MAJOR'/;' include/SDL_version.h
|
||||
perl -w -pi -e 's/(\#define SDL_MINOR_VERSION\s+)\d+/${1}'$MINOR'/;' include/SDL_version.h
|
||||
perl -w -pi -e 's/(\#define SDL_PATCHLEVEL\s+)\d+/${1}'$PATCH'/;' include/SDL_version.h
|
||||
perl -w -pi -e 's/(\#define SDL_MAJOR_VERSION\s+)\d+/${1}'$MAJOR'/;' include/SDL3/SDL_version.h
|
||||
perl -w -pi -e 's/(\#define SDL_MINOR_VERSION\s+)\d+/${1}'$MINOR'/;' include/SDL3/SDL_version.h
|
||||
perl -w -pi -e 's/(\#define SDL_PATCHLEVEL\s+)\d+/${1}'$PATCH'/;' include/SDL3/SDL_version.h
|
||||
|
||||
perl -w -pi -e 's/(FILEVERSION\s+)\d+,\d+,\d+/${1}'$MAJOR','$MINOR','$PATCH'/;' src/main/windows/version.rc
|
||||
perl -w -pi -e 's/(PRODUCTVERSION\s+)\d+,\d+,\d+/${1}'$MAJOR','$MINOR','$PATCH'/;' src/main/windows/version.rc
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
outdir=`pwd`
|
||||
cd `dirname $0`
|
||||
srcdir=..
|
||||
header=$outdir/include/SDL_revision.h
|
||||
header=$outdir/include/SDL3/SDL_revision.h
|
||||
dist=
|
||||
vendor=
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue