mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'issue1062' of https://git.do.srb2.org/SSNTails/SRB2 into issue1062
This commit is contained in:
commit
53c6e65fd2
551 changed files with 11654 additions and 13681 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,3 +26,4 @@ Win32_LIB_ASM_Release
|
|||
/CMakeUserPresets.json
|
||||
/out
|
||||
/objs/VC10
|
||||
/thirdparty/vcpkg-overlays
|
||||
|
|
771
.gitlab-ci.yml
771
.gitlab-ci.yml
|
@ -1,766 +1,19 @@
|
|||
include:
|
||||
- '.gitlab/ci/templates/*.yml'
|
||||
- '.gitlab/ci/jobs/*.yml'
|
||||
|
||||
workflow:
|
||||
auto_cancel:
|
||||
on_new_commit: interruptible
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
|
||||
|
||||
default:
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:stable
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG
|
||||
fallback_keys:
|
||||
- cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH
|
||||
- cache-$CI_PROJECT_PATH_SLUG-default
|
||||
paths:
|
||||
- ccache
|
||||
- ccache_statslog
|
||||
|
||||
- key: apt-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apt-cache
|
||||
unprotect: true
|
||||
|
||||
- key: apk-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apk-cache
|
||||
unprotect: true
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment"
|
||||
- export DEBIAN_FRONTEND="noninteractive"
|
||||
- export DEBIAN_PRIORITY="low"
|
||||
- export DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||
- |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K"
|
||||
- - |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg"
|
||||
- dpkg --add-architecture i386
|
||||
- dpkg --add-architecture amd64
|
||||
- dpkg --add-architecture arm64
|
||||
- |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K"
|
||||
- - |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf"
|
||||
- export APT_CACHE_DIR=`pwd`/apt-cache
|
||||
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
|
||||
- touch /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt.conf
|
||||
echo Adding options to apt.conf':'
|
||||
- |
|
||||
# APT::Install-Recommends
|
||||
echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# quit
|
||||
echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# APT::Get::Assume-Yes
|
||||
echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# Dir::Cache::Archives
|
||||
echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K"
|
||||
- - |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing"
|
||||
- apt-get update
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages"
|
||||
- apt-get install apt-utils
|
||||
- |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apt-get upgrade
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apt-get install make git ccache nasm cmake ca-certificates
|
||||
- |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME_SLUG"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
||||
- apt-get autoclean
|
||||
- |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats
|
||||
- ccache --show-log-stats || true
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
GIT_DEPTH: 20
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
Debian testing GCC:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
allow_failure: true
|
||||
|
||||
default:
|
||||
interruptible: true
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "testing-gcc"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||
|
||||
variables:
|
||||
CC: gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x86:
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win32"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||
|
||||
variables:
|
||||
PREFIX: i686-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-i686-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:amd64:
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
|
||||
|
||||
variables:
|
||||
CC: x86_64-linux-gnu-gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||
OBJDUMP: x86_64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian oldstable:amd64:
|
||||
extends: Debian stable:amd64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-x86-64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:i386:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian i386"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
|
||||
|
||||
variables:
|
||||
CC: i686-linux-gnu-gcc
|
||||
OBJCOPY: i686-linux-gnu-objcopy
|
||||
OBJDUMP: i686-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-i686-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 libminiupnpc-dev:i386
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:arm64:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64"
|
||||
|
||||
variables:
|
||||
CC: aarch64-linux-gnu-gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||
OBJDUMP: aarch64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian oldstable:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
batocera:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-batocera-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x64:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
||||
|
||||
variables:
|
||||
PREFIX: x86_64-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-x86-64-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable Clang:
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
allow_failure: false
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/comptime.h"
|
||||
expose_as: "clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install clang
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.clang -D CPM_USE_LOCAL_PACKAGES:BOOL=ON -D SRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -D SRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -G "Unix Makefiles"
|
||||
- |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.clang --keep-going || make --directory=src --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian testing Clang:
|
||||
extends: Debian stable Clang
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/comptime.h"
|
||||
expose_as: "testing-clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
Alpine 3 GCC:
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
image: alpine:3
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3"
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_cache[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- export APK_CACHE_DIR=`pwd`/apk-cache
|
||||
- mkdir --parents --verbose $APK_CACHE_DIR/
|
||||
- ln -sf /etc/apk/cache $APK_CACHE_DIR
|
||||
- |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_cache\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_update[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- apk update
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apk upgrade
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apk add make git ccache nasm
|
||||
- |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev sdl2_mixer-dev libpng-dev curl-dev libgme-dev libopenmpt-dev miniupnpc-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_clean[collapsed=true]\r\e[0KCleaning of unneeded APK packages"
|
||||
- apk cache clean
|
||||
- |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
|
||||
Alpine 3 GCC Dedicated:
|
||||
extends: Alpine 3 GCC
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3-Dedicated"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3-Dedicated"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev libpng-dev curl-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
expire_in: 1 day
|
||||
|
|
34
.gitlab/ci/jobs/alpine-3-gcc-dedicated.yml
Normal file
34
.gitlab/ci/jobs/alpine-3-gcc-dedicated.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
Alpine 3 GCC Dedicated:
|
||||
extends: Alpine 3 GCC
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3-Dedicated"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3-Dedicated"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev libpng-dev curl-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
135
.gitlab/ci/jobs/alpine-3-gcc.yml
Normal file
135
.gitlab/ci/jobs/alpine-3-gcc.yml
Normal file
|
@ -0,0 +1,135 @@
|
|||
Alpine 3 GCC:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
image: alpine:3
|
||||
|
||||
allow_failure: true
|
||||
|
||||
cache:
|
||||
- key: apk-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apk-cache
|
||||
unprotect: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3"
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_cache[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- export APK_CACHE_DIR=`pwd`/apk-cache
|
||||
- mkdir --parents --verbose $APK_CACHE_DIR/
|
||||
- ln -sf /etc/apk/cache $APK_CACHE_DIR
|
||||
- |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_cache\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_update[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- apk update
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apk upgrade
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apk add make git ccache nasm
|
||||
- |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev sdl2_mixer-dev libpng-dev curl-dev libgme-dev libopenmpt-dev miniupnpc-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_clean[collapsed=true]\r\e[0KCleaning of unneeded APK packages"
|
||||
- apk cache clean
|
||||
- |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
38
.gitlab/ci/jobs/batocera-arm64.yml
Normal file
38
.gitlab/ci/jobs/batocera-arm64.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
batocera:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-batocera-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
40
.gitlab/ci/jobs/debian-oldstable-amd64.yml
Normal file
40
.gitlab/ci/jobs/debian-oldstable-amd64.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
Debian oldstable:amd64:
|
||||
extends: Debian stable:amd64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-x86-64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
40
.gitlab/ci/jobs/debian-oldstable-arm64.yml
Normal file
40
.gitlab/ci/jobs/debian-oldstable-arm64.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
Debian oldstable:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
45
.gitlab/ci/jobs/debian-stable-amd64.yml
Normal file
45
.gitlab/ci/jobs/debian-stable-amd64.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
Debian stable:amd64:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
|
||||
|
||||
variables:
|
||||
CC: x86_64-linux-gnu-gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||
OBJDUMP: x86_64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
when: on_success
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
45
.gitlab/ci/jobs/debian-stable-arm64.yml
Normal file
45
.gitlab/ci/jobs/debian-stable-arm64.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
Debian stable:arm64:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64"
|
||||
|
||||
variables:
|
||||
CC: aarch64-linux-gnu-gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||
OBJDUMP: aarch64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
55
.gitlab/ci/jobs/debian-stable-clang-amd64.yml
Normal file
55
.gitlab/ci/jobs/debian-stable-clang-amd64.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
Debian stable Clang:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
allow_failure: false
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install clang
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.clang -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.clang --keep-going || make --directory=build.clang --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
44
.gitlab/ci/jobs/debian-stable-i386.yml
Normal file
44
.gitlab/ci/jobs/debian-stable-i386.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
Debian stable:i386:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian i386"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
|
||||
|
||||
variables:
|
||||
CC: i686-linux-gnu-gcc
|
||||
OBJCOPY: i686-linux-gnu-objcopy
|
||||
OBJDUMP: i686-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-i686-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 libminiupnpc-dev:i386
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
22
.gitlab/ci/jobs/debian-testing-clang-amd64.yml
Normal file
22
.gitlab/ci/jobs/debian-testing-clang-amd64.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
Debian testing Clang:
|
||||
extends: Debian stable Clang
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "testing-clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
46
.gitlab/ci/jobs/debian-testing-gcc-amd64.yml
Normal file
46
.gitlab/ci/jobs/debian-testing-gcc-amd64.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
Debian testing GCC:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "testing-gcc"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||
|
||||
variables:
|
||||
CC: gcc
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
44
.gitlab/ci/jobs/macos-arm64.yml
Normal file
44
.gitlab/ci/jobs/macos-arm64.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
osxcross arm64:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
OSXCROSS_HOST: arm64-apple-darwin21.4
|
||||
LD: arm64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install --arm64 curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
40
.gitlab/ci/jobs/macos-x86_64.yml
Normal file
40
.gitlab/ci/jobs/macos-x86_64.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
osxcross x86_64:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac x86_64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
OSXCROSS_HOST: x86_64-apple-darwin21.4
|
||||
LD: x86_64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
35
.gitlab/ci/jobs/windows-x64.yml
Normal file
35
.gitlab/ci/jobs/windows-x64.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
Windows x64:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
||||
|
||||
variables:
|
||||
PREFIX: x86_64-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-x86-64-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
35
.gitlab/ci/jobs/windows-x86.yml
Normal file
35
.gitlab/ci/jobs/windows-x86.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
Windows x86:
|
||||
extends: .srb2ci
|
||||
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win32"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||
|
||||
variables:
|
||||
PREFIX: i686-w64-mingw32
|
||||
CC: /usr/bin/i686-w64-mingw32-gcc-posix
|
||||
CXX: /usr/bin/i686-w64-mingw32-g++-posix
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-i686-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
145
.gitlab/ci/templates/srb2ci.yml
Normal file
145
.gitlab/ci/templates/srb2ci.yml
Normal file
|
@ -0,0 +1,145 @@
|
|||
.srb2ci:
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:stable
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
|
||||
fallback_keys:
|
||||
- ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
|
||||
- ccache-$CI_JOB_NAME_SLUG-master
|
||||
paths:
|
||||
- build/ccache
|
||||
- build/ccache_statslog
|
||||
|
||||
- key: apt-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- build/apt-cache
|
||||
unprotect: true
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment"
|
||||
- export DEBIAN_FRONTEND="noninteractive"
|
||||
- export DEBIAN_PRIORITY="low"
|
||||
- export DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||
- |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K"
|
||||
- - |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg"
|
||||
- dpkg --add-architecture i386
|
||||
- dpkg --add-architecture amd64
|
||||
- dpkg --add-architecture arm64
|
||||
- |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K"
|
||||
- - |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf"
|
||||
- export APT_CACHE_DIR=$CI_PROJECT_DIR/build/apt-cache
|
||||
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
|
||||
- touch /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt.conf
|
||||
echo Adding options to apt.conf':'
|
||||
- |
|
||||
# APT::Install-Recommends
|
||||
echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# quit
|
||||
echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# APT::Get::Assume-Yes
|
||||
echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# Dir::Cache::Archives
|
||||
echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K"
|
||||
- - |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing"
|
||||
- apt-get update
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages"
|
||||
- apt-get install apt-utils
|
||||
- |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apt-get upgrade
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apt-get install make git ccache nasm cmake ca-certificates
|
||||
- |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $CI_PROJECT_DIR | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $CI_PROJECT_DIR/build/ccache | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $CI_PROJECT_DIR/build/ccache_statslog | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 300M | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
||||
- apt-get autoclean
|
||||
- |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats
|
||||
- ccache --show-log-stats || true
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
|
@ -8,7 +8,6 @@ endif()
|
|||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
include(CMakeDependentOption)
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
file(STRINGS src/version.h SRB2_VERSION)
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
||||
|
@ -46,30 +45,26 @@ SET(CPACK_OUTPUT_FILE_PREFIX package)
|
|||
include(CPack)
|
||||
|
||||
# Options
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Linux)
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||
if(DEFINED VCPKG_TARGET_TRIPLET)
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||
else()
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT OFF)
|
||||
endif()
|
||||
else()
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
# Clang tidy options will be ignored if CMAKE_<LANG>_CLANG_TIDY are set.
|
||||
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_C "Enable default clang-tidy check configuration for C" OFF)
|
||||
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_CXX "Enable default clang-tidy check configuration for C++" OFF)
|
||||
option(
|
||||
SRB2_CONFIG_SYSTEM_LIBRARIES
|
||||
"Link dependencies using CMake's find_package and do not use internal builds"
|
||||
${SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT}
|
||||
)
|
||||
option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" ON)
|
||||
# This option isn't recommended for distribution builds and probably won't work (yet).
|
||||
cmake_dependent_option(
|
||||
SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES
|
||||
"Use dynamic libraries when compiling internal dependencies"
|
||||
OFF "NOT SRB2_CONFIG_SYSTEM_LIBRARIES"
|
||||
OFF
|
||||
SRB2_CONFIG_STATIC_STDLIB
|
||||
"Link static version of standard library. All dependencies must also be static"
|
||||
ON
|
||||
)
|
||||
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
|
||||
option(SRB2_CONFIG_USE_GME "Enable GME playback support" OFF)
|
||||
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
|
||||
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
|
||||
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
|
||||
|
@ -81,63 +76,27 @@ option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
|
|||
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
|
||||
set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
|
||||
|
||||
if(SRB2_CONFIG_ENABLE_TESTS)
|
||||
# https://github.com/catchorg/Catch2
|
||||
CPMAddPackage(
|
||||
NAME Catch2
|
||||
VERSION 3.4.0
|
||||
GITHUB_REPOSITORY catchorg/Catch2
|
||||
OPTIONS
|
||||
"CATCH_INSTALL_DOCS OFF"
|
||||
)
|
||||
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
add_executable(srb2tests)
|
||||
# To add tests, use target_sources to add individual test files to the target in subdirs.
|
||||
target_link_libraries(srb2tests PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
|
||||
target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)
|
||||
catch_discover_tests(srb2tests)
|
||||
endif()
|
||||
|
||||
# Enable CCache
|
||||
# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
|
||||
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
|
||||
option(USE_CCACHE "Enable ccache support" OFF)
|
||||
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_TOOL_PATH ccache)
|
||||
if(CCACHE_TOOL_PATH)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||||
else()
|
||||
message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
CPMAddPackage(
|
||||
NAME Ccache.cmake
|
||||
GITHUB_REPOSITORY TheLartians/Ccache.cmake
|
||||
VERSION 1.2
|
||||
)
|
||||
endif()
|
||||
|
||||
# Dependencies
|
||||
add_subdirectory(thirdparty)
|
||||
|
||||
if("${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
if(SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES)
|
||||
set(SRB2_INTERNAL_LIBRARY_TYPE SHARED)
|
||||
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES OFF)
|
||||
else()
|
||||
set(SRB2_INTERNAL_LIBRARY_TYPE STATIC)
|
||||
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES ON)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(OPENMPT REQUIRED)
|
||||
|
||||
# libgme defaults to "Nuked" YM2612 emulator, which is
|
||||
# very SLOW. The system library probably uses the
|
||||
# default so just always build it.
|
||||
#find_package(GME REQUIRED)
|
||||
find_package(libopenmpt QUIET)
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
find_package(libgme QUIET)
|
||||
endif()
|
||||
find_package(miniupnpc QUIET)
|
||||
|
||||
|
||||
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
|
||||
|
|
|
@ -2,26 +2,263 @@
|
|||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"description": "Build using default generator",
|
||||
"binaryDir": "build",
|
||||
"name": "__debug",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__develop",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "debug",
|
||||
"description": "Build for development (no optimizations)",
|
||||
"inherits": "default",
|
||||
"name": "__release",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__testers",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"SRB2_CONFIG_TESTERS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__ninja",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_COLOR_DIAGNOSTICS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__vcpkg-toolchain",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__compiler-mingw-w64-i686",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "i686-w64-mingw32-gcc",
|
||||
"CMAKE_CXX_COMPILER": "i686-w64-mingw32-g++"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__mingw-dynamic",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x86-mingw-dynamic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__mingw-static",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_HOST_TRIPLET": "x86-mingw-static",
|
||||
"VCPKG_TARGET_TRIPLET": "x86-mingw-static"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__osx_x64",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x64-osx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__osx_arm64",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "arm64-osx"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__ninja"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
}
|
||||
],
|
||||
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default"
|
||||
"name": "ninja-debug",
|
||||
"configurePreset": "ninja-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-develop",
|
||||
"configurePreset": "ninja-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-release",
|
||||
"configurePreset": "ninja-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-release",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-testers"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-debug",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-develop",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-release",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-debug",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-develop",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-release",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-release"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
set(CPM_DOWNLOAD_VERSION 0.38.7)
|
||||
|
||||
if(CPM_SOURCE_CACHE)
|
||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
else()
|
||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
endif()
|
||||
|
||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
|
||||
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
|
||||
file(DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
|
@ -1,33 +0,0 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(GME_PKGCONF GME)
|
||||
|
||||
find_path(GME_INCLUDE_DIR
|
||||
NAMES gme.h
|
||||
PATHS
|
||||
${GME_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/gme"
|
||||
"/usr/local/include/gme"
|
||||
)
|
||||
|
||||
find_library(GME_LIBRARY
|
||||
NAMES gme
|
||||
PATHS
|
||||
${GME_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
|
||||
set(GME_PROCESS_LIBS GME_LIBRARY)
|
||||
libfind_process(GME)
|
||||
|
||||
if(GME_FOUND AND NOT TARGET gme)
|
||||
add_library(gme UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
gme
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${GME_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GME_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
|
@ -1,33 +0,0 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(OPENMPT_PKGCONF OPENMPT)
|
||||
|
||||
find_path(OPENMPT_INCLUDE_DIR
|
||||
NAMES libopenmpt.h
|
||||
PATHS
|
||||
${OPENMPT_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/libopenmpt"
|
||||
"/usr/local/include/libopenmpt"
|
||||
)
|
||||
|
||||
find_library(OPENMPT_LIBRARY
|
||||
NAMES openmpt
|
||||
PATHS
|
||||
${OPENMPT_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
set(OPENMPT_PROCESS_INCLUDES OPENMPT_INCLUDE_DIR)
|
||||
set(OPENMPT_PROCESS_LIBS OPENMPT_LIBRARY)
|
||||
libfind_process(OPENMPT)
|
||||
|
||||
if(OPENMPT_FOUND AND NOT TARGET openmpt)
|
||||
add_library(openmpt UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
openmpt
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${OPENMPT_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPENMPT_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
38
cmake/Modules/Findlibgme.cmake
Normal file
38
cmake/Modules/Findlibgme.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libgme_PKGCONF gme libgme)
|
||||
|
||||
find_path(libgme_INCLUDE_DIR
|
||||
NAMES gme.h
|
||||
PATHS
|
||||
${libgme_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include"
|
||||
"/usr/local/include"
|
||||
PATH_SUFFIXES
|
||||
gme
|
||||
)
|
||||
|
||||
find_library(libgme_LIBRARY
|
||||
NAMES gme
|
||||
PATHS
|
||||
${libgme_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgme
|
||||
REQUIRED_VARS libgme_LIBRARY libgme_INCLUDE_DIR)
|
||||
|
||||
if(libgme_FOUND AND NOT TARGET gme)
|
||||
add_library(gme UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
gme
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libgme_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libgme_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(gme::gme ALIAS gme)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libgme_LIBRARY libgme_INCLUDE_DIR)
|
37
cmake/Modules/Findlibopenmpt.cmake
Normal file
37
cmake/Modules/Findlibopenmpt.cmake
Normal file
|
@ -0,0 +1,37 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libopenmpt_PKGCONF openmpt)
|
||||
|
||||
find_path(libopenmpt_INCLUDE_DIR
|
||||
NAMES libopenmpt.h
|
||||
PATHS
|
||||
${libopenmpt_PKGCONF_INCLUDE_DIRS}
|
||||
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/libopenmpt"
|
||||
"/usr/include/libopenmpt"
|
||||
"/usr/local/include/libopenmpt"
|
||||
)
|
||||
|
||||
find_library(libopenmpt_LIBRARY
|
||||
NAMES openmpt
|
||||
PATHS
|
||||
${libopenmpt_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libopenmpt
|
||||
REQUIRED_VARS libopenmpt_LIBRARY libopenmpt_INCLUDE_DIR)
|
||||
|
||||
if(libopenmpt_FOUND AND NOT TARGET openmpt)
|
||||
add_library(openmpt UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
openmpt
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libopenmpt_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libopenmpt_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(libopenmpt::libopenmpt ALIAS openmpt)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libopenmpt_LIBRARY libopenmpt_INCLUDE_DIR)
|
39
cmake/Modules/Findminiupnpc.cmake
Normal file
39
cmake/Modules/Findminiupnpc.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libminiupnpc_PKGCONF miniupnpc libminiupnpc)
|
||||
|
||||
find_path(libminiupnpc_INCLUDE_DIR
|
||||
NAMES miniupnpc.h
|
||||
PATHS
|
||||
${libminiupnpc_PKGCONF_INCLUDE_DIRS}
|
||||
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include"
|
||||
"/usr/include"
|
||||
"/usr/local/include"
|
||||
PATH_SUFFIXES
|
||||
miniupnpc
|
||||
)
|
||||
|
||||
find_library(libminiupnpc_LIBRARY
|
||||
NAMES miniupnpc
|
||||
PATHS
|
||||
${libminiupnpc_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(miniupnpc
|
||||
REQUIRED_VARS libminiupnpc_LIBRARY libminiupnpc_INCLUDE_DIR)
|
||||
|
||||
if(miniupnpc_FOUND AND NOT TARGET miniupnpc)
|
||||
add_library(miniupnpc UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
miniupnpc
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libminiupnpc_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libminiupnpc_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(miniupnpc::miniupnpc ALIAS miniupnpc)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libminiupnpc_LIBRARY libminiupnpc_INCLUDE_DIR)
|
30
cmake/PatchFile.cmake
Normal file
30
cmake/PatchFile.cmake
Normal file
|
@ -0,0 +1,30 @@
|
|||
# use GNU Patch from any platform
|
||||
|
||||
if(WIN32)
|
||||
# prioritize Git Patch on Windows as other Patches may be very old and incompatible.
|
||||
find_package(Git)
|
||||
if(Git_FOUND)
|
||||
get_filename_component(GIT_DIR ${GIT_EXECUTABLE} DIRECTORY)
|
||||
get_filename_component(GIT_DIR ${GIT_DIR} DIRECTORY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(PATCH
|
||||
NAMES patch
|
||||
HINTS ${GIT_DIR}
|
||||
PATH_SUFFIXES usr/bin
|
||||
)
|
||||
|
||||
if(NOT PATCH)
|
||||
message(FATAL_ERROR "Did not find GNU Patch")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${PATCH} ${in_file} --input=${patch_file} --output=${out_file} --ignore-whitespace
|
||||
TIMEOUT 15
|
||||
COMMAND_ECHO STDOUT
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
|
||||
if(NOT ret EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to apply patch ${patch_file} to ${in_file} with ${PATCH}")
|
||||
endif()
|
16
cmake/Toolchains/mingw-w64-i686.cmake
Normal file
16
cmake/Toolchains/mingw-w64-i686.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(TOOLCHAIN_PREFIX i686-w64-mingw32)
|
||||
|
||||
# cross compilers to use for C, C++ and Fortran
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
|
||||
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||
|
||||
# target environment on the build host system
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
16
cmake/Toolchains/mingw-w64-x86_64.cmake
Normal file
16
cmake/Toolchains/mingw-w64-x86_64.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
||||
|
||||
# cross compilers to use for C, C++ and Fortran
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
|
||||
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||
|
||||
# target environment on the build host system
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -228,6 +228,8 @@ Sonic Robo Blast 2 defines the following standardized fields:
|
|||
ropehang = <bool>; // Sector is a rope hang. Must be applied to a 3D floor.
|
||||
jumpflip = <bool>; // Sector flips the gravity of players who jump from it.
|
||||
gravityoverride = <bool>; // Reverse gravity effect is only applied when an object is in the sector.
|
||||
nophysics_floor = <bool>; // Disables floor slope physics if created through a plane equation.
|
||||
nophysics_ceiling = <bool>; // Disables ceiling slope physics if created through a plane equation.
|
||||
|
||||
friction = <float>; // Sector's friction factor.
|
||||
gravity = <float>; // Sector's gravity. Default is 1.0.
|
||||
|
|
|
@ -39,6 +39,7 @@ common
|
|||
defaulttexturescale = 1.0f;
|
||||
defaultflatscale = 1.0f;
|
||||
scaledtextureoffsets = true;
|
||||
scaledflatoffsets = true;
|
||||
|
||||
// Colormap/fade related options
|
||||
maxcolormapalpha = 25;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -78,6 +78,8 @@ sectorflags
|
|||
ropehang = "Rope Hang";
|
||||
jumpflip = "Flip Gravity on Jump";
|
||||
gravityoverride = "Make Reverse Gravity Temporary";
|
||||
nophysics_floor = "Disable Floor Slope Physics";
|
||||
nophysics_ceiling = "Disable Ceiling Slope Physics";
|
||||
flipspecial_nofloor = "No Trigger on Floor Touch";
|
||||
flipspecial_ceiling = "Trigger on Ceiling Touch";
|
||||
triggerspecial_touch = "Trigger on Edge Touch";
|
||||
|
@ -114,6 +116,8 @@ sectorflagscategories
|
|||
ropehang = "special";
|
||||
jumpflip = "special";
|
||||
gravityoverride = "special";
|
||||
nophysics_floor = "special";
|
||||
nophysics_ceiling = "special";
|
||||
flipspecial_nofloor = "trigger";
|
||||
flipspecial_ceiling = "trigger";
|
||||
triggerspecial_touch = "trigger";
|
||||
|
@ -586,6 +590,12 @@ universalfields
|
|||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
|
||||
triggertag
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3938,6 +3938,7 @@ udmf
|
|||
width = 30;
|
||||
height = 32;
|
||||
color = 17;
|
||||
hangs = 1;
|
||||
arg0
|
||||
{
|
||||
title = "Initial delay";
|
||||
|
|
|
@ -1,28 +1,9 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.30.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added support for 2 bits-per-pixel indexed surface formats
|
||||
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam API handle for a controller, if available
|
||||
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when the Steam API handle for a controller changes. This could also change the name, VID, and PID of the controller.
|
||||
* Added the environment variable SDL_LOGGING to control default log output
|
||||
|
||||
macOS:
|
||||
* Added the hint SDL_HINT_JOYSTICK_IOKIT to control whether the IOKit controller driver should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_MFI to control whether the GCController controller driver should be used
|
||||
* Added the hint SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE to choose whether high or low power GPU should be used for rendering, in the case where there are multiple GPUs available
|
||||
|
||||
Xbox:
|
||||
* Added the function SDL_GDKGetDefaultUser()
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.28.2:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ SDL now has, internally, a table of function pointers. So, this is what SDL_Init
|
|||
now looks like:
|
||||
|
||||
```c
|
||||
Uint32 SDL_Init(Uint32 flags)
|
||||
UInt32 SDL_Init(Uint32 flags)
|
||||
{
|
||||
return jump_table.SDL_Init(flags);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ a shared library of its own). If so, it loads that library and looks for and
|
|||
calls a single function:
|
||||
|
||||
```c
|
||||
Sint32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
|
||||
SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
|
||||
```
|
||||
|
||||
That function takes a version number (more on that in a moment), the address of
|
||||
|
|
|
@ -1,187 +1,27 @@
|
|||
# Emscripten
|
||||
|
||||
## The state of things
|
||||
(This documentation is not very robust; we will update and expand this later.)
|
||||
|
||||
(As of September 2023, but things move quickly and we don't update this
|
||||
document often.)
|
||||
|
||||
In modern times, all the browsers you probably care about (Chrome, Firefox,
|
||||
Edge, and Safari, on Windows, macOS, Linux, iOS and Android), support some
|
||||
reasonable base configurations:
|
||||
|
||||
- WebAssembly (don't bother with asm.js any more)
|
||||
- WebGL (which will look like OpenGL ES 2 or 3 to your app).
|
||||
- Threads (see caveats, though!)
|
||||
- Game controllers
|
||||
- Autoupdating (so you can assume they have a recent version of the browser)
|
||||
|
||||
All this to say we're at the point where you don't have to make a lot of
|
||||
concessions to get even a fairly complex SDL-based game up and running.
|
||||
|
||||
|
||||
## RTFM
|
||||
|
||||
This document is a quick rundown of some high-level details. The
|
||||
documentation at [emscripten.org](https://emscripten.org/) is vast
|
||||
and extremely detailed for a wide variety of topics, and you should at
|
||||
least skim through it at some point.
|
||||
|
||||
|
||||
## Porting your app to Emscripten
|
||||
|
||||
Many many things just need some simple adjustments and they'll compile
|
||||
like any other C/C++ code, as long as SDL was handling the platform-specific
|
||||
work for your program.
|
||||
|
||||
First, you probably need this in at least one of your source files:
|
||||
|
||||
```c
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
```
|
||||
|
||||
Second: assembly language code has to go. Replace it with C. You can even use
|
||||
[x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)!
|
||||
|
||||
Third: Middleware has to go. If you have a third-party library you link
|
||||
against, you either need an Emscripten port of it, or the source code to it
|
||||
to compile yourself, or you need to remove it.
|
||||
|
||||
Fourth: You still start in a function called main(), but you need to get out of
|
||||
it and into a function that gets called repeatedly, and returns quickly,
|
||||
called a mainloop.
|
||||
|
||||
Somewhere in your program, you probably have something that looks like a more
|
||||
complicated version of this:
|
||||
|
||||
```c
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
while (game_is_still_running) {
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
deinitialize_the_game();
|
||||
}
|
||||
```
|
||||
|
||||
This will not work on Emscripten, because the main thread needs to be free
|
||||
to do stuff and can't sit in this loop forever. So Emscripten lets you set up
|
||||
a [mainloop](https://emscripten.org/docs/porting/emscripten-runtime-environment.html#browser-main-loop).
|
||||
|
||||
```c
|
||||
static void mainloop(void) /* this will run often, possibly at the monitor's refresh rate */
|
||||
{
|
||||
if (!game_is_still_running) {
|
||||
deinitialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
||||
#else
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
check_for_new_input();
|
||||
think_about_stuff();
|
||||
draw_the_next_frame();
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
initialize_the_game();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop(mainloop, 0, 1);
|
||||
#else
|
||||
while (1) { mainloop(); }
|
||||
#endif
|
||||
}
|
||||
```
|
||||
|
||||
Basically, `emscripten_set_main_loop(mainloop, 0, 1);` says "run
|
||||
`mainloop` over and over until I end the program." The function will
|
||||
run, and return, freeing the main thread for other tasks, and then
|
||||
run again when it's time. The `1` parameter does some magic to make
|
||||
your main() function end immediately; this is useful because you
|
||||
don't want any shutdown code that might be sitting below this code
|
||||
to actually run if main() were to continue on, since we're just
|
||||
getting started.
|
||||
|
||||
There's a lot of little details that are beyond the scope of this
|
||||
document, but that's the biggest intial set of hurdles to porting
|
||||
your app to the web.
|
||||
|
||||
|
||||
## Do you need threads?
|
||||
|
||||
If you plan to use threads, they work on all major browsers now. HOWEVER,
|
||||
they bring with them a lot of careful considerations. Rendering _must_
|
||||
be done on the main thread. This is a general guideline for many
|
||||
platforms, but a hard requirement on the web.
|
||||
|
||||
Many other things also must happen on the main thread; often times SDL
|
||||
and Emscripten make efforts to "proxy" work to the main thread that
|
||||
must be there, but you have to be careful (and read more detailed
|
||||
documentation than this for the finer points).
|
||||
|
||||
Even when using threads, your main thread needs to set an Emscripten
|
||||
mainloop that runs quickly and returns, or things will fail to work
|
||||
correctly.
|
||||
|
||||
You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html)
|
||||
for all the finer points. Mostly SDL's thread API will work as expected,
|
||||
but is built on pthreads, so it shares the same little incompatibilities
|
||||
that are documented there, such as where you can use a mutex, and when
|
||||
a thread will start running, etc.
|
||||
|
||||
|
||||
IMPORTANT: You have to decide to either build something that uses
|
||||
threads or something that doesn't; you can't have one build
|
||||
that works everywhere. This is an Emscripten (or maybe WebAssembly?
|
||||
Or just web browsers in general?) limitation. If you aren't using
|
||||
threads, it's easier to not enable them at all, at build time.
|
||||
|
||||
If you use threads, you _have to_ run from a web server that has
|
||||
[COOP/COEP headers set correctly](https://web.dev/why-coop-coep/)
|
||||
or your program will fail to start at all.
|
||||
|
||||
If building with threads, `__EMSCRIPTEN_PTHREADS__` will be defined
|
||||
for checking with the C preprocessor, so you can build something
|
||||
different depending on what sort of build you're compiling.
|
||||
|
||||
|
||||
## Audio
|
||||
|
||||
Audio works as expected at the API level, but not exactly like other
|
||||
platforms.
|
||||
|
||||
You'll only see a single default audio device. Audio capture also works;
|
||||
if the browser pops up a prompt to ask for permission to access the
|
||||
microphone, the SDL_OpenAudioDevice call will succeed and start producing
|
||||
silence at a regular interval. Once the user approves the request, real
|
||||
audio data will flow. If the user denies it, the app is not informed and
|
||||
will just continue to receive silence.
|
||||
## A quick note about audio
|
||||
|
||||
Modern web browsers will not permit web pages to produce sound before the
|
||||
user has interacted with them (clicked or tapped on them, usually); this is
|
||||
for several reasons, not the least of which being that no one likes when a
|
||||
random browser tab suddenly starts making noise and the user has to scramble
|
||||
to figure out which and silence it.
|
||||
user has interacted with them; this is for several reasons, not the least
|
||||
of which being that no one likes when a random browser tab suddenly starts
|
||||
making noise and the user has to scramble to figure out which and silence
|
||||
it.
|
||||
|
||||
SDL will allow you to open the audio device for playback in this
|
||||
circumstance, and your audio callback will fire, but SDL will throw the audio
|
||||
data away until the user interacts with the page. This helps apps that depend
|
||||
on the audio callback to make progress, and also keeps audio playback in sync
|
||||
once the app is finally allowed to make noise.
|
||||
To solve this, most browsers will refuse to let a web app use the audio
|
||||
subsystem at all before the user has interacted with (clicked on) the page
|
||||
in a meaningful way. SDL-based apps also have to deal with this problem; if
|
||||
the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
|
||||
|
||||
There are two reasonable ways to deal with the silence at the app level:
|
||||
if you are writing some sort of media player thing, where the user expects
|
||||
there to be a volume control when you mouseover the canvas, just default
|
||||
that control to a muted state; if the user clicks on the control to unmute
|
||||
it, on this first click, open the audio device. This allows the media to
|
||||
play at start, and the user can reasonably opt-in to listening.
|
||||
There are two reasonable ways to deal with this: if you are writing some
|
||||
sort of media player thing, where the user expects there to be a volume
|
||||
control when you mouseover the canvas, just default that control to a muted
|
||||
state; if the user clicks on the control to unmute it, on this first click,
|
||||
open the audio device. This allows the media to play at start, the user can
|
||||
reasonably opt-in to listening, and you never get access denied to the audio
|
||||
device.
|
||||
|
||||
Many games do not have this sort of UI, and are more rigid about starting
|
||||
audio along with everything else at the start of the process. For these, your
|
||||
|
@ -196,179 +36,41 @@ Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
|||
for some Javascript code to steal for this approach.
|
||||
|
||||
|
||||
## Rendering
|
||||
|
||||
If you use SDL's 2D render API, it will use GLES2 internally, which
|
||||
Emscripten will turn into WebGL calls. You can also use OpenGL ES 2
|
||||
directly by creating a GL context and drawing into it.
|
||||
|
||||
Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
|
||||
present anything on the screen until your return from your mainloop
|
||||
function.
|
||||
|
||||
|
||||
## Building SDL/emscripten
|
||||
|
||||
First: do you _really_ need to build SDL from source?
|
||||
|
||||
If you aren't developing SDL itself, have a desire to mess with its source
|
||||
code, or need something on the bleeding edge, don't build SDL. Just use
|
||||
Emscripten's packaged version!
|
||||
|
||||
Compile and link your app with `-sUSE_SDL=2` and it'll use a build of
|
||||
SDL packaged with Emscripten. This comes from the same source code and
|
||||
fixes the Emscripten project makes to SDL are generally merged into SDL's
|
||||
revision control, so often this is much easier for app developers.
|
||||
|
||||
`-sUSE_SDL=1` will select Emscripten's JavaScript reimplementation of SDL
|
||||
1.2 instead; if you need SDL 1.2, this might be fine, but we generally
|
||||
recommend you don't use SDL 1.2 in modern times.
|
||||
|
||||
|
||||
If you want to build SDL, though...
|
||||
|
||||
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
|
||||
are likely to work, as well.
|
||||
|
||||
|
||||
Build:
|
||||
|
||||
This works on Linux/Unix and macOS. Please send comments about Windows.
|
||||
|
||||
Make sure you've [installed emsdk](https://emscripten.org/docs/getting_started/downloads.html)
|
||||
first, and run `source emsdk_env.sh` at the command line so it finds the
|
||||
tools.
|
||||
|
||||
(These configure options might be overkill, but this has worked for me.)
|
||||
|
||||
```bash
|
||||
cd SDL
|
||||
mkdir build
|
||||
cd build
|
||||
emconfigure ../configure --host=wasm32-unknown-emscripten --disable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3"
|
||||
emmake make -j4
|
||||
```
|
||||
|
||||
If you want to build with thread support, something like this works:
|
||||
|
||||
```bash
|
||||
emconfigure ../configure --host=wasm32-unknown-emscripten --enable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3 -pthread" LDFLAGS="-pthread"
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2"
|
||||
$ emmake make
|
||||
|
||||
Or with cmake:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake ..
|
||||
emmake make -j4
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ emcmake cmake ..
|
||||
$ emmake make
|
||||
|
||||
To build one of the tests:
|
||||
|
||||
```bash
|
||||
cd test/
|
||||
emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
||||
```
|
||||
$ cd test/
|
||||
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
||||
|
||||
## Building your app
|
||||
Uses GLES2 renderer or software
|
||||
|
||||
You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but
|
||||
mostly it uses the same command line arguments as Clang.
|
||||
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
||||
|
||||
Link against the SDL/build/.libs/libSDL2.a file you generated by building SDL,
|
||||
link with `-sUSE_SDL=2` to use Emscripten's prepackaged SDL2 build.
|
||||
|
||||
Usually you would produce a binary like this:
|
||||
|
||||
```bash
|
||||
gcc -o mygame mygame.c # or whatever
|
||||
```
|
||||
|
||||
But for Emscripten, you want to output something else:
|
||||
|
||||
```bash
|
||||
emcc -o index.html mygame.c
|
||||
```
|
||||
|
||||
This will produce several files...support Javascript and WebAssembly (.wasm)
|
||||
files. The `-o index.html` will produce a simple HTML page that loads and
|
||||
runs your app. You will (probably) eventually want to replace or customize
|
||||
that file and do `-o index.js` instead to just build the code pieces.
|
||||
|
||||
If you're working on a program of any serious size, you'll likely need to
|
||||
link with `-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb` to get access
|
||||
to more memory. If using pthreads, you'll need the `-sMAXIMUM_MEMORY=1gb`
|
||||
or the app will fail to start on iOS browsers, but this might be a bug that
|
||||
goes away in the future.
|
||||
|
||||
|
||||
## Data files
|
||||
|
||||
Your game probably has data files. Here's how to access them.
|
||||
|
||||
Filesystem access works like a Unix filesystem; you have a single directory
|
||||
tree, possibly interpolated from several mounted locations, no drive letters,
|
||||
'/' for a path separator. You can access them with standard file APIs like
|
||||
open() or fopen() or SDL_RWops. You can read or write from the filesystem.
|
||||
|
||||
By default, you probably have a "MEMFS" filesystem (all files are stored in
|
||||
memory, but access to them is immediate and doesn't need to block). There are
|
||||
other options, like "IDBFS" (files are stored in a local database, so they
|
||||
don't need to be in RAM all the time and they can persist between runs of the
|
||||
program, but access is not synchronous). You can mix and match these file
|
||||
systems, mounting a MEMFS filesystem at one place and idbfs elsewhere, etc,
|
||||
but that's beyond the scope of this document. Please refer to Emscripten's
|
||||
[page on the topic](https://emscripten.org/docs/porting/files/file_systems_overview.html)
|
||||
for more info.
|
||||
|
||||
The _easiest_ (but not the best) way to get at your data files is to embed
|
||||
them in the app itself. Emscripten's linker has support for automating this.
|
||||
|
||||
```bash
|
||||
emcc -o index.html loopwave.c --embed-file=../test/sample.wav@/sounds/sample.wav
|
||||
```
|
||||
|
||||
This will pack ../test/sample.wav in your app, and make it available at
|
||||
"/sounds/sample.wav" at runtime. Emscripten makes sure this data is available
|
||||
before your main() function runs, and since it's in MEMFS, you can just
|
||||
read it like you do on other platforms. `--embed-file` can also accept a
|
||||
directory to pack an entire tree, and you can specify the argument multiple
|
||||
times to pack unrelated things into the final installation.
|
||||
|
||||
Note that this is absolutely the best approach if you have a few small
|
||||
files to include and shouldn't worry about the issue further. However, if you
|
||||
have hundreds of megabytes and/or thousands of files, this is not so great,
|
||||
since the user will download it all every time they load your page, and it
|
||||
all has to live in memory at runtime.
|
||||
|
||||
[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
|
||||
gives other options and details, and is worth a read.
|
||||
|
||||
|
||||
## Debugging
|
||||
|
||||
Debugging web apps is a mixed bag. You should compile and link with
|
||||
`-gsource-map`, which embeds a ton of source-level debugging information into
|
||||
the build, and make sure _the app source code is available on the web server_,
|
||||
which is often a scary proposition for various reasons.
|
||||
|
||||
When you debug from the browser's tools and hit a breakpoint, you can step
|
||||
through the actual C/C++ source code, though, which can be nice.
|
||||
|
||||
If you try debugging in Firefox and it doesn't work well for no apparent
|
||||
reason, try Chrome, and vice-versa. These tools are still relatively new,
|
||||
and improving all the time.
|
||||
|
||||
SDL_Log() (or even plain old printf) will write to the Javascript console,
|
||||
and honestly I find printf-style debugging to be easier than setting up a build
|
||||
for proper debugging, so use whatever tools work best for you.
|
||||
|
||||
|
||||
## Questions?
|
||||
|
||||
Please give us feedback on this document at [the SDL bug tracker](https://github.com/libsdl-org/SDL/issues).
|
||||
If something is wrong or unclear, we want to know!
|
||||
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
|
||||
|
||||
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
||||
build as usual...
|
||||
|
||||
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
||||
|
||||
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
||||
build as usual...
|
||||
|
|
|
@ -3,7 +3,7 @@ GDK
|
|||
|
||||
This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
|
||||
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are both supported and all the required code is included in this public SDL release. However, only licensed Xbox developers have access to the GDKX libraries which will allow you to build the Xbox targets.
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
|
||||
|
||||
|
||||
Requirements
|
||||
|
@ -11,7 +11,6 @@ Requirements
|
|||
|
||||
* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
|
||||
* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
|
||||
* For Xbox, you will need the corresponding GDKX version (licensed developers only)
|
||||
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
|
||||
|
||||
|
||||
|
@ -30,12 +29,6 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
|
|||
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
|
||||
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
|
||||
|
||||
* Single-player games have some additional features available:
|
||||
* Call `SDL_GDKGetDefaultUser` to get the default XUserHandle pointer.
|
||||
* `SDL_GetPrefPath` still works, but only for single-player titles.
|
||||
|
||||
These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
|
||||
|
||||
* What doesn't work:
|
||||
* Compilation with anything other than through the included Visual C++ solution file
|
||||
|
||||
|
@ -146,20 +139,6 @@ To create the package:
|
|||
6. Once the package is installed, you can run it from the start menu.
|
||||
7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
|
||||
|
||||
Xbox GDKX Setup
|
||||
---------------------
|
||||
In general, the same process in the Windows GDK instructions work. There are just a few additional notes:
|
||||
* For Xbox One consoles, use the Gaming.Xbox.XboxOne.x64 target
|
||||
* For Xbox Series consoles, use the Gaming.Xbox.Scarlett.x64 target
|
||||
* The Xbox One target sets the `__XBOXONE__` define and the Xbox Series target sets the `__XBOXSERIES__` define
|
||||
* You don't need to link against the Xbox.Services Thunks lib nor include that dll in your package (it doesn't exist for Xbox)
|
||||
* The shader blobs for Xbox are created in a pre-build step for the Xbox targets, rather than included in the source (due to NDA and version compatability reasons)
|
||||
* To create a package, use:
|
||||
`makepkg pack /f PackageLayout.xml /lt /d . /pd Package`
|
||||
* To install the package, use:
|
||||
`xbapp install [PACKAGE].xvc`
|
||||
* For some reason, if you make changes that require SDL2.dll to build, and you are running through the debugger (instead of a package), you have to rebuild your .exe target for the debugger to recognize the dll has changed and needs to be transferred to the console again
|
||||
* While there are successful releases of Xbox titles using this port, it is not as extensively tested as other targets
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
|
|
@ -273,7 +273,7 @@ e.g.
|
|||
{
|
||||
... initialize game ...
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#if __IPHONEOS__
|
||||
// Initialize the Game Center for scoring and matchmaking
|
||||
InitGameCenter();
|
||||
|
||||
|
|
Binary file not shown.
|
@ -43,7 +43,7 @@ while test $# -gt 0; do
|
|||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo 2.30.0
|
||||
echo 2.28.5
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -209,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
|||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -65,8 +65,8 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -131,8 +131,6 @@ typedef enum
|
|||
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
|
||||
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
|
||||
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
|
||||
SDL_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3,
|
||||
SDL_CONTROLLERSTEAMHANDLEUPDATED, /**< Game controller Steam handle has changed */
|
||||
|
||||
/* Touch events */
|
||||
SDL_FINGERDOWN = 0x700,
|
||||
|
@ -448,7 +446,7 @@ typedef struct SDL_ControllerButtonEvent
|
|||
*/
|
||||
typedef struct SDL_ControllerDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, ::SDL_CONTROLLERDEVICEREMAPPED, or ::SDL_CONTROLLERSTEAMHANDLEUPDATED */
|
||||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
@ -582,6 +580,15 @@ typedef struct SDL_QuitEvent
|
|||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_QuitEvent;
|
||||
|
||||
/**
|
||||
* \brief OS Specific event
|
||||
*/
|
||||
typedef struct SDL_OSEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_OSEvent;
|
||||
|
||||
/**
|
||||
* \brief A user-defined event type (event.user.*)
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -64,7 +64,7 @@ extern "C" {
|
|||
* directory of the application as it is uncommon to store resources outside
|
||||
* the executable. As such it is not a writable directory.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||
* The returned path is guaranteed to end with a path separator ('\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
|
@ -120,7 +120,7 @@ extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
|||
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
|
||||
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||
* The returned path is guaranteed to end with a path separator ('\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -73,8 +73,7 @@ typedef enum
|
|||
SDL_CONTROLLER_TYPE_NVIDIA_SHIELD,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
|
||||
SDL_CONTROLLER_TYPE_MAX
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR
|
||||
} SDL_GameControllerType;
|
||||
|
||||
typedef enum
|
||||
|
@ -524,20 +523,6 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetFirmwareVersion(SDL_GameCont
|
|||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the Steam Input handle of an opened controller, if available.
|
||||
*
|
||||
* Returns an InputHandle_t for the controller that can be used with Steam Input API:
|
||||
* https://partner.steamgames.com/doc/api/ISteamInput
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \returns the gamepad handle, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.30.0.
|
||||
*/
|
||||
extern DECLSPEC Uint64 SDLCALL SDL_GameControllerGetSteamHandle(SDL_GameController *gamecontroller);
|
||||
|
||||
|
||||
/**
|
||||
* Check if a controller has been opened and is currently connected.
|
||||
*
|
||||
|
@ -613,9 +598,7 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
|
|||
* and are centered within ~8000 of zero, though advanced UI will allow users to set
|
||||
* or autodetect the dead zone, which varies between controllers.
|
||||
*
|
||||
* Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX
|
||||
* (fully pressed) when reported by SDL_GameControllerGetAxis(). Note that this is not the
|
||||
* same range that will be reported by the lower-level SDL_GetJoystickAxis().
|
||||
* Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
@ -704,13 +687,8 @@ SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameController
|
|||
*
|
||||
* The axis indices start at index 0.
|
||||
*
|
||||
* For thumbsticks, the state is a value ranging from -32768 (up/left)
|
||||
* to 32767 (down/right).
|
||||
*
|
||||
* Triggers range from 0 when released to 32767 when fully pressed, and
|
||||
* never return a negative value. Note that this differs from the value
|
||||
* reported by the lower-level SDL_GetJoystickAxis(), which normally uses
|
||||
* the full range.
|
||||
* The state is a value ranging from -32768 to 32767. Triggers, however, range
|
||||
* from 0 to 32767 (they never return a negative value).
|
||||
*
|
||||
* \param gamecontroller a game controller
|
||||
* \param axis an axis index (one of the SDL_GameControllerAxis values)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -631,110 +631,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||
|
||||
/**
|
||||
* A variable containing a list of arcade stick style controllers.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that are not arcade stick style controllers. This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that should not be considerd joysticks.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that should be considered joysticks. This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* A variable containing a list of flightstick style controllers.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that are not flightstick style controllers. This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices known to have a GameCube form factor.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices known not to have a GameCube form factor. This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
|
||||
*
|
||||
|
@ -943,17 +839,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for the Steam Deck builtin controller should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
|
||||
*
|
||||
|
@ -1080,24 +965,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
|
||||
|
||||
/**
|
||||
* A variable controlling whether IOKit should be used for controller handling.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - IOKit is not used
|
||||
* "1" - IOKit is used (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
|
||||
|
||||
/**
|
||||
* A variable controlling whether GCController should be used for controller handling.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - GCController is not used
|
||||
* "1" - GCController is used (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
|
||||
*
|
||||
|
@ -1140,32 +1007,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
|
||||
|
||||
/**
|
||||
* A variable containing a list of throttle style controllers.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that are not throttle style controllers. This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether Windows.Gaming.Input should be used for controller handling.
|
||||
*
|
||||
|
@ -1175,45 +1016,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
|
||||
|
||||
/**
|
||||
* A variable containing a list of wheel style controllers.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that are not wheel style controllers. This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices known to have all axes centered at zero.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
|
||||
|
||||
/**
|
||||
* \brief Determines whether SDL enforces that DRM master is required in order
|
||||
* to initialize the KMSDRM video backend.
|
||||
|
@ -1282,22 +1084,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the default SDL log levels.
|
||||
*
|
||||
* This variable is a comma separated set of category=level tokens that define the default logging levels for SDL applications.
|
||||
*
|
||||
* The category can be a numeric category, one of "app", "error", "assert", "system", "audio", "video", "render", "input", "test", or `*` for any unspecified category.
|
||||
*
|
||||
* The level can be a numeric level, one of "verbose", "debug", "info", "warn", "error", "critical", or "quiet" to disable that category.
|
||||
*
|
||||
* You can omit the category if you want to set the logging level for all categories.
|
||||
*
|
||||
* If this hint isn't set, the default log levels are equivalent to:
|
||||
* "app=info,assert=warn,test=verbose,*=error"
|
||||
*/
|
||||
#define SDL_HINT_LOGGING "SDL_LOGGING"
|
||||
|
||||
/**
|
||||
* \brief When set don't force the SDL app to become a foreground process
|
||||
*
|
||||
|
@ -1699,32 +1485,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
|
||||
|
||||
/**
|
||||
* A variable containing a list of ROG gamepad capable mice.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
|
||||
|
||||
/**
|
||||
* A variable containing a list of devices that are not ROG gamepad capable mice. This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
|
||||
*
|
||||
|
@ -2682,22 +2442,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
|
||||
|
||||
/**
|
||||
* Cause SDL to call dbus_shutdown() on quit.
|
||||
*
|
||||
* This is useful as a debug tool to validate memory leaks, but shouldn't ever
|
||||
* be set in production applications, as other libraries used by the application
|
||||
* might use dbus under the hood and this cause cause crashes if they continue
|
||||
* after SDL_Quit().
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - SDL will not call dbus_shutdown() on quit (default)
|
||||
* "1" - SDL will call dbus_shutdown() on quit
|
||||
*
|
||||
* This hint is available since SDL 2.30.0.
|
||||
*/
|
||||
#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -298,9 +298,7 @@ extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
|
|||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
|
||||
|
||||
/**
|
||||
* Set the rectangle used to type Unicode text inputs. Native input methods
|
||||
* will place a window with word suggestions near it, without covering the
|
||||
* text being inputted.
|
||||
* Set the rectangle used to type Unicode text inputs.
|
||||
*
|
||||
* To start text input in a given location, this function is intended to be
|
||||
* called before SDL_StartTextInput, although some platforms support moving
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
* By default the application category is enabled at the INFO level,
|
||||
* the assert category is enabled at the WARN level, test is enabled
|
||||
* at the VERBOSE level and all other categories are enabled at the
|
||||
* ERROR level.
|
||||
* CRITICAL level.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
@ -352,7 +352,7 @@ extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
||||
SDL_LogPriority priority,
|
||||
SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(3);
|
||||
const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* The prototype for the log output callback function.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -61,10 +61,7 @@ typedef enum
|
|||
SDL_PIXELTYPE_ARRAYU16,
|
||||
SDL_PIXELTYPE_ARRAYU32,
|
||||
SDL_PIXELTYPE_ARRAYF16,
|
||||
SDL_PIXELTYPE_ARRAYF32,
|
||||
|
||||
/* This must be at the end of the list to avoid breaking the existing ABI */
|
||||
SDL_PIXELTYPE_INDEX2
|
||||
SDL_PIXELTYPE_ARRAYF32
|
||||
} SDL_PixelType;
|
||||
|
||||
/** Bitmap pixel order, high bit -> low bit. */
|
||||
|
@ -137,7 +134,6 @@ typedef enum
|
|||
#define SDL_ISPIXELFORMAT_INDEXED(format) \
|
||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX2) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
|
||||
|
||||
|
@ -181,12 +177,6 @@ typedef enum
|
|||
SDL_PIXELFORMAT_INDEX1MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
|
||||
1, 0),
|
||||
SDL_PIXELFORMAT_INDEX2LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_4321, 0,
|
||||
2, 0),
|
||||
SDL_PIXELFORMAT_INDEX2MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_1234, 0,
|
||||
2, 0),
|
||||
SDL_PIXELFORMAT_INDEX4LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
|
||||
4, 0),
|
||||
|
@ -286,19 +276,11 @@ typedef enum
|
|||
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
|
||||
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
|
||||
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_RGBX8888,
|
||||
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_XRGB8888,
|
||||
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_BGRX8888,
|
||||
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_XBGR8888,
|
||||
#else
|
||||
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
|
||||
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
|
||||
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
|
||||
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888,
|
||||
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888,
|
||||
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888,
|
||||
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888,
|
||||
#endif
|
||||
|
||||
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -166,12 +166,6 @@
|
|||
#define WINAPI_FAMILY_WINRT 0
|
||||
#endif /* HAVE_WINAPIFAMILY_H */
|
||||
|
||||
#if (HAVE_WINAPIFAMILY_H) && defined(WINAPI_FAMILY_PHONE_APP)
|
||||
#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
#else
|
||||
#define SDL_WINAPI_FAMILY_PHONE 0
|
||||
#endif
|
||||
|
||||
#if WINAPI_FAMILY_WINRT
|
||||
#undef __WINRT__
|
||||
#define __WINRT__ 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -42,7 +42,7 @@
|
|||
* of the many good 3D engines.
|
||||
*
|
||||
* These functions must be called from the main thread.
|
||||
* See this bug for details: https://github.com/libsdl-org/SDL/issues/986
|
||||
* See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
|
||||
*/
|
||||
|
||||
#ifndef SDL_render_h_
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Generated by updaterev.sh, do not edit */
|
||||
#ifdef SDL_VENDOR_INFO
|
||||
#define SDL_REVISION "SDL-release-2.30.0-0-g859844eae (" SDL_VENDOR_INFO ")"
|
||||
#define SDL_REVISION "SDL-release-2.28.5-0-g15ead9a40 (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "SDL-release-2.30.0-0-g859844eae"
|
||||
#define SDL_REVISION "SDL-release-2.28.5-0-g15ead9a40"
|
||||
#endif
|
||||
#define SDL_REVISION_NUMBER 0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -257,7 +257,7 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRIs64 PRIs64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIs64 "I64d"
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIs64 "ld"
|
||||
#else
|
||||
#define SDL_PRIs64 "lld"
|
||||
|
@ -268,7 +268,7 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRIu64 PRIu64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIu64 "I64u"
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIu64 "lu"
|
||||
#else
|
||||
#define SDL_PRIu64 "llu"
|
||||
|
@ -279,7 +279,7 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRIx64 PRIx64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIx64 "I64x"
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIx64 "lx"
|
||||
#else
|
||||
#define SDL_PRIx64 "llx"
|
||||
|
@ -290,7 +290,7 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRIX64 PRIX64
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
#define SDL_PRIX64 "I64X"
|
||||
#elif defined(__LP64__) && !defined(__APPLE__)
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIX64 "lX"
|
||||
#else
|
||||
#define SDL_PRIX64 "llX"
|
||||
|
@ -336,9 +336,7 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRINTF_FORMAT_STRING
|
||||
#define SDL_SCANF_FORMAT_STRING
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNCV( fmtargnumber )
|
||||
#else
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
|
||||
#include <sal.h>
|
||||
|
@ -364,14 +362,10 @@ typedef uint64_t Uint64;
|
|||
#endif
|
||||
#if defined(__GNUC__)
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
|
||||
#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __printf__, fmtargnumber, 0 )))
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
|
||||
#define SDL_SCANF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __scanf__, fmtargnumber, 0 )))
|
||||
#else
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNCV( fmtargnumber )
|
||||
#endif
|
||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
|
@ -609,11 +603,11 @@ extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
|||
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, va_list ap) SDL_SCANF_VARARG_FUNCV(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
||||
extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
|
||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(3);
|
||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||
extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
|
||||
#ifndef HAVE_M_PI
|
||||
#ifndef M_PI
|
||||
|
@ -694,8 +688,8 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
|||
size_t * outbytesleft);
|
||||
|
||||
/**
|
||||
* This function converts a buffer or string between encodings in one pass,
|
||||
* returning a string that must be freed with SDL_free() or NULL on error.
|
||||
* This function converts a buffer or string between encodings in one pass, returning a
|
||||
* string that must be freed with SDL_free() or NULL on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
|
@ -704,8 +698,8 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
const char *inbuf,
|
||||
size_t inbytesleft);
|
||||
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
|
||||
|
||||
/* force builds using Clang's static analysis tools to use literal C runtime
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
@ -594,7 +594,6 @@ extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void
|
|||
/* Functions used only by GDK */
|
||||
#if defined(__GDK__)
|
||||
typedef struct XTaskQueueObject * XTaskQueueHandle;
|
||||
typedef struct XUser *XUserHandle;
|
||||
|
||||
/**
|
||||
* Gets a reference to the global async task queue handle for GDK,
|
||||
|
@ -611,20 +610,6 @@ typedef struct XUser *XUserHandle;
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GDKGetTaskQueue(XTaskQueueHandle * outTaskQueue);
|
||||
|
||||
/**
|
||||
* Gets a reference to the default user handle for GDK.
|
||||
*
|
||||
* This is effectively a synchronous version of XUserAddAsync, which always
|
||||
* prefers the default user and allows a sign-in UI.
|
||||
*
|
||||
* \param outUserHandle a pointer to be filled in with the default user
|
||||
* handle.
|
||||
* \returns 0 if success, -1 if any error occurs.
|
||||
*
|
||||
* \since This function is available since SDL 2.28.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GDKGetDefaultUser(XUserHandle * outUserHandle);
|
||||
|
||||
#endif
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue