Port build-script from SDL3
[ci skip]
This commit is contained in:
parent
15bc3f25ee
commit
48aa1cccf7
7 changed files with 816 additions and 360 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -15,7 +15,7 @@ build
|
|||
gen
|
||||
Build
|
||||
buildbot
|
||||
/VERSION.txt
|
||||
/REVISION.txt
|
||||
dist
|
||||
|
||||
*.so
|
||||
|
|
|
@ -3081,8 +3081,8 @@ endif()
|
|||
|
||||
# Compat helpers for the configuration files
|
||||
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION.txt")
|
||||
file(READ "${PROJECT_SOURCE_DIR}/VERSION.txt" SDL_SOURCE_VERSION)
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/REVISION.txt")
|
||||
file(READ "${PROJECT_SOURCE_DIR}/REVISION.txt" SDL_SOURCE_VERSION)
|
||||
string(STRIP "${SDL_SOURCE_VERSION}" SDL_SOURCE_VERSION)
|
||||
endif()
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
@ -10,17 +10,18 @@ import subprocess
|
|||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def determine_project() -> str:
|
||||
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 project
|
||||
return f"libsdl-org/{project}"
|
||||
|
||||
|
||||
def main():
|
||||
project = determine_project()
|
||||
default_remote = f"libsdl-org/{project}"
|
||||
default_remote = determine_remote()
|
||||
|
||||
current_commit = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=ROOT, text=True).strip()
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "SDL2",
|
||||
"remote": "libsdl-org/SDL",
|
||||
"version": {
|
||||
"file": "include/SDL_version.h",
|
||||
"re_major": "^#define SDL_MAJOR_VERSION\\s+([0-9]+)$",
|
||||
|
@ -23,10 +24,15 @@
|
|||
"autotools": {
|
||||
"archs": ["x86", "x64"],
|
||||
"args": [
|
||||
],
|
||||
"files": {
|
||||
"@<@TRIPLET@>@/include/SDL2": [
|
||||
"include/SDL_config*.h"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"/": [
|
||||
"": [
|
||||
"mingw/pkg-support/INSTALL.txt",
|
||||
"mingw/pkg-support/Makefile",
|
||||
"BUGS.txt",
|
||||
|
@ -36,15 +42,12 @@
|
|||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"/cmake/": [
|
||||
"cmake": [
|
||||
"mingw/pkg-support/cmake/sdl2-config.cmake",
|
||||
"mingw/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
],
|
||||
"/docs/": [
|
||||
"docs": [
|
||||
"docs/*"
|
||||
],
|
||||
"/@TRIPLET@/include/SDL2/": [
|
||||
"include/SDL_config*.h"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -59,61 +62,44 @@
|
|||
"VisualC/SDLmain/SDLmain.vcxproj",
|
||||
"VisualC/SDLtest/SDLtest.vcxproj"
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"lib": "",
|
||||
"devel": "lib/@ARCH@",
|
||||
"paths": [
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.dll"
|
||||
"files-lib": {
|
||||
"": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.dll"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "lib/@ARCH@",
|
||||
"paths": [
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.lib",
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.pdb",
|
||||
"VisualC/SDLmain/@PLATFORM@/@CONFIGURATION@/SDL2main.lib",
|
||||
"VisualC/SDLtest/@PLATFORM@/@CONFIGURATION@/SDL2test.lib"
|
||||
"files-devel": {
|
||||
"lib/@<@ARCH@>@": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.dll",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.lib",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.pdb",
|
||||
"VisualC/SDLmain/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2main.lib",
|
||||
"VisualC/SDLtest/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2test.lib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"devel": "",
|
||||
"lib": "",
|
||||
"paths": [
|
||||
"files-lib": {
|
||||
"": [
|
||||
"README-SDL.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "",
|
||||
"paths": [
|
||||
"files-devel": {
|
||||
"": [
|
||||
"README-SDL.txt",
|
||||
"BUGS.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md",
|
||||
"WhatsNew.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "cmake",
|
||||
"paths": [
|
||||
],
|
||||
"cmake": [
|
||||
"VisualC/pkg-support/cmake/sdl2-config.cmake",
|
||||
"VisualC/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "docs",
|
||||
"paths": [
|
||||
],
|
||||
"docs": [
|
||||
"docs/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "include",
|
||||
"paths": [
|
||||
],
|
||||
"include": [
|
||||
"include/*.h"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
SDL_ROOT=$(dirname $0)/..
|
||||
cd $SDL_ROOT
|
||||
|
||||
if [ -e ./VERSION.txt ]; then
|
||||
cat ./VERSION.txt
|
||||
if [ -e ./REVISION.txt ]; then
|
||||
cat ./REVISION.txt
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ done
|
|||
rev=`sh showrev.sh 2>/dev/null`
|
||||
if [ "$rev" != "" ]; then
|
||||
if [ -n "$dist" ]; then
|
||||
echo "$rev" > "$outdir/VERSION.txt"
|
||||
echo "$rev" > "$outdir/REVISION.txt"
|
||||
fi
|
||||
echo "/* Generated by updaterev.sh, do not edit */" >"$header.new"
|
||||
if [ -n "$vendor" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue