Merge remote-tracking branch 'public/next' into discord-rpc-support

This commit is contained in:
Sally Coolatta 2020-08-16 20:57:31 -04:00
commit c8fa1dcfb5
812 changed files with 60908 additions and 32180 deletions

View file

@ -3,7 +3,7 @@ jobs:
build: build:
working_directory: /root/SRB2 working_directory: /root/SRB2
docker: docker:
- image: debian:jessie - image: debian:stretch
environment: environment:
CC: ccache gcc -m32 CC: ccache gcc -m32
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
@ -36,14 +36,20 @@ jobs:
- v1-SRB2-APT - v1-SRB2-APT
- run: - run:
name: Install SDK name: Install SDK
command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
- save_cache: - save_cache:
key: v1-SRB2-APT key: v1-SRB2-APT
paths: paths:
- /var/cache/apt/archives - /var/cache/apt/archives
- checkout - checkout
- run: - run:
name: Clean build name: Compile without network support and BLUA
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
- run:
name: wipe build
command: make -C src LINUX=1 cleandep
- run:
name: rebuild depend
command: make -C src LINUX=1 clean command: make -C src LINUX=1 clean
- restore_cache: - restore_cache:
keys: keys:

2
.gitignore vendored
View file

@ -19,3 +19,5 @@ Win32_LIB_ASM_Release
*.db *.db
*.opendb *.opendb
/.vs /.vs
/debian
/assets/debian

View file

@ -1,9 +1,20 @@
# Travis-CI Config
#
# You may use the Deployer to upload packages and builds to external servers.
# See deployer/travis/deployer_defaults.sh for environment variables to configure.
language: c language: c
sudo: required sudo: required
dist: trusty dist: trusty
matrix: matrix:
include: include:
################################
# Test Buildbots
# Deployer does not operate on these. See Deployer Buildbots, below.
# These bots are disabled when a deployment is triggered by 'deployer' branch name AND DPL_TERMINATE_TESTS=1.
# These bots remain enabled when a deployment is triggered by release tag.
################################
- os: linux - os: linux
addons: addons:
apt: apt:
@ -12,9 +23,12 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- gcc-4.4 - gcc-4.4
compiler: gcc-4.4 compiler: gcc-4.4
env: GCC44=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7 #gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7
- os: linux - os: linux
addons: addons:
@ -24,9 +38,12 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- gcc-4.6 - gcc-4.6
compiler: gcc-4.6 compiler: gcc-4.6
env: GCC46=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4 #gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4
- os: linux - os: linux
addons: addons:
@ -36,12 +53,17 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- gcc-4.7 - gcc-4.7
compiler: gcc-4.7 compiler: gcc-4.7
env: GCC47=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.7 #gcc-4.7
- os: linux - os: linux
compiler: gcc compiler: gcc
env: GCC48=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 #gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
- os: linux - os: linux
addons: addons:
@ -53,9 +75,12 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- gcc-4.8 - gcc-4.8
compiler: gcc-4.8 compiler: gcc-4.8
env: GCC48=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5 #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux - os: linux
addons: addons:
@ -67,13 +92,33 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- gcc-7 - gcc-7
compiler: gcc-7 compiler: gcc-7
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3" env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough" GCC72=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802 #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-8
compiler: gcc-8
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow -Wno-error=format-truncation" GCC81=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
- os: linux - os: linux
compiler: clang compiler: clang
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.5.0 (tags/RELEASE_350/final) #clang version 3.5.0 (tags/RELEASE_350/final)
- os: linux - os: linux
addons: addons:
@ -85,9 +130,11 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- clang-3.5 - clang-3.5
compiler: clang-3.5 compiler: clang-3.5
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0) #Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
- os: linux - os: linux
addons: addons:
@ -100,9 +147,11 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- clang-3.6 - clang-3.6
compiler: clang-3.6 compiler: clang-3.6
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.6.2-svn240577-1~exp1 (branches/release_36) (based on LLVM 3.6.2) #Ubuntu clang version 3.6.2-svn240577-1~exp1 (branches/release_36) (based on LLVM 3.6.2)
- os: linux - os: linux
addons: addons:
@ -115,9 +164,11 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- clang-3.7 - clang-3.7
compiler: clang-3.7 compiler: clang-3.7
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.7.1-svn253571-1~exp1 (branches/release_37) (based on LLVM 3.7.1) #Ubuntu clang version 3.7.1-svn253571-1~exp1 (branches/release_37) (based on LLVM 3.7.1)
- os: linux - os: linux
addons: addons:
@ -130,9 +181,11 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- clang-3.8 - clang-3.8
compiler: clang-3.8 compiler: clang-3.8
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.8.1-svn271127-1~exp1 (branches/release_38) #clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
- os: linux - os: linux
addons: addons:
@ -145,9 +198,11 @@ matrix:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
- clang-3.9 - clang-3.9
compiler: clang-3.9 compiler: clang-3.9
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.9.X #clang version 3.9.X
# - os: linux # - os: linux
# addons: # addons:
@ -163,6 +218,7 @@ matrix:
# - p7zip-full # - p7zip-full
# - clang-4.0 # - clang-4.0
# compiler: clang-4.0 # compiler: clang-4.0
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #clang version 4.0.X # #clang version 4.0.X
# - os: linux # - os: linux
# addons: # addons:
@ -178,32 +234,331 @@ matrix:
# - p7zip-full # - p7zip-full
# - clang-5.0 # - clang-5.0
# compiler: clang-5.0 # compiler: clang-5.0
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #clang version 5.0.X # #clang version 5.0.X
# - os: osx # - os: osx
# osx_image: beta-xcode6.1 # osx_image: beta-xcode6.1
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) # #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
# - os: osx # - os: osx
# osx_image: beta-xcode6.2 # osx_image: beta-xcode6.2
# compiler: gcc # compiler: gcc
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) # #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
## - os: osx ## - os: osx
## osx_image: beta-xcode6.3 ## osx_image: beta-xcode6.3
## if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
## #I think xcode.6.3 VM is broken, it does not boot ## #I think xcode.6.3 VM is broken, it does not boot
# - os: osx # - os: osx
# osx_image: xcode6.4 # osx_image: xcode6.4
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) # #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
# - os: osx # - os: osx
# osx_image: xcode7 # osx_image: xcode7
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.0 (clang-700.0.72) # #Apple LLVM version 7.0.0 (clang-700.0.72)
# - os: osx # - os: osx
# osx_image: xcode7.1 # osx_image: xcode7.1
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.0 (clang-700.1.76) # #Apple LLVM version 7.0.0 (clang-700.1.76)
# - os: osx # - os: osx
# osx_image: xcode7.2 # osx_image: xcode7.2
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.2 (clang-700.1.81) # #Apple LLVM version 7.0.2 (clang-700.1.81)
# - os: osx
# osx_image: xcode7.3
# #Apple LLVM version 7.3.0 (clang-703.0.31)
# - os: osx
# osx_image: xcode7.3
# #Apple LLVM version 7.3.0 (clang-703.0.31)
- os: osx - os: osx
osx_image: xcode7.3 if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Default: macOS 10.13 and Xcode 9.4.1
################################
# Deployer Buildbots - OSX
################################
- os: osx
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=osx
- _DPL_FTP_TARGET=1
- _DPL_PACKAGE_BINARY=1
#Apple LLVM version 7.3.0 (clang-703.0.31) #Apple LLVM version 7.3.0 (clang-703.0.31)
################################
# Deployer Buildbots - Linux assets
# Set DPL_TERMINATE_ASSETS to disable all of these
# List Ubuntu LTS next, newest to oldest
# Then list non-LTS, newest to oldest
################################
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_ASSETS) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=bionic-asset
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- _DPL_PACKAGE_MAIN=0
- _DPL_PACKAGE_ASSET=1
- PACKAGE_DISTRO=bionic
#- PACKAGE_SUBVERSION=~18.04bionic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
################################
# The below asset bots produce packages that occupy too much space.
# It would be nice if the asset files were not included in the source package itself,
# so these can deploy to each Ubuntu target without manual intervention.
#
# Currently, to get around Launchpad's space limitation,
# copy the packages from *one* bot and the space usage is not increased.
################################
# - os: linux
# addons:
# apt:
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - gcc-4.8
# compiler: gcc-4.8
# dist: trusty
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
# AND env(DPL_TERMINATE_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=trusty-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=trusty
# #- PACKAGE_SUBVERSION=~14.04trusty
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
# - os: linux
# addons:
# apt:
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - gcc-4.8
# compiler: gcc-4.8
# dist: xenial
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
# AND env(DPL_TERMINATE_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=disco-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=disco
# #- PACKAGE_SUBVERSION=~19.04disco
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
# - os: linux
# addons:
# apt:
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - gcc-4.8
# compiler: gcc-4.8
# dist: xenial
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
# AND env(DPL_TERMINATE_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=cosmic-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=cosmic
# #- PACKAGE_SUBVERSION=~18.10cosmic
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
# - os: linux
# addons:
# apt:
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - gcc-4.8
# compiler: gcc-4.8
# dist: xenial
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
# AND env(DPL_TERMINATE_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=xenial-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=xenial
# #- PACKAGE_SUBVERSION=~16.04xenial
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
################################
# Deployer Buildbots - Linux binaries
# List Ubuntu LTS, newest to oldest
# Then list non-LTS, newest to oldest
################################
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=focal
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=focal
- PACKAGE_SUBVERSION=~20.04focal
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=bionic
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=bionic
- PACKAGE_SUBVERSION=~18.04bionic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=xenial
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=xenial
- PACKAGE_SUBVERSION=~16.04xenial
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: trusty
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=trusty
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=trusty
- PACKAGE_SUBVERSION=~14.04trusty
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=eoan
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=eoan
- PACKAGE_SUBVERSION=~19.10eoan
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
allow_failures: allow_failures:
- compiler: clang-3.5 - compiler: clang-3.5
- compiler: clang-3.6 - compiler: clang-3.6
@ -213,12 +568,14 @@ matrix:
- compiler: clang-4.0 - compiler: clang-4.0
- compiler: clang-5.0 - compiler: clang-5.0
cache: cache:
apt: true apt: true
ccache: true ccache: true
directories: directories:
- $HOME/srb2_cache - $HOME/srb2_cache
addons: addons:
apt: apt:
packages: packages:
@ -226,23 +583,130 @@ addons:
- libpng-dev - libpng-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libgme-dev - libgme-dev
- zlib1g-dev
- libcurl4-openssl-dev
- p7zip-full - p7zip-full
homebrew:
taps:
- mazmazz/srb2
packages:
- sdl2_mixer
- game-music-emu
- p7zip
- cmake
- curl
update: true
before_script:
- wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O $HOME/srb2_cache/SRB2-v2115-assets-2.7z
- 7z x $HOME/srb2_cache/SRB2-v2115-assets-2.7z -oassets
- mkdir build
- cd build
- export CFLAGS="-Wall -W -Werror $WFLAGS"
- export CCACHE_COMPRESS=true
- cmake .. -DCMAKE_BUILD_TYPE=Release
before_install: before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi # Initialize Deployer defaults
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 sdl2_mixer game-music-emu p7zip; fi - . ./deployer/travis/deployer_defaults.sh
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi # Initialize Deployer; check if Deployer is enabled
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi # This needs to be run in the current shell so that $__DPL_ACTIVE is set for this session
- . ./deployer/travis/deployer.sh
# Also check if we should now terminate -- see `deployer.sh` for conditions.
# This should never happen on non-release buildbots when Deployer is not triggered.
- if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]]; then
if [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Exiting early because this job is not deploying.";
exit;
fi;
fi
# If we're triggered by release tag, force ASSET_FILES_OPTIONAL_GET=1
- if [[ "$__DPL_TAG_ELIGIBLE" = "1" ]]; then
ASSET_FILES_OPTIONAL_GET=1;
fi;
install:
# Install OS X library dependencies via Homebrew
# Do this differently for release buildbots:
# * `brew install --build-bottle` builds libraries for x86_64's lowest common denominator CPU, core2
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
# * `brew postinstall` runs post-install scripts after building a bottle
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$__DPL_ACTIVE" == "1" ]]; then
brew install --build-bottle sdl2 game-music-emu;
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
fi;
fi
- mkdir -p $HOME/srb2_cache - mkdir -p $HOME/srb2_cache
script: make -k
before_script:
# OLDPWD is root repo folder
- OLDPWD=$PWD
- __ASSET_DIRECTORY="$OLDPWD/assets/installer"
- mkdir -p "$__ASSET_DIRECTORY"
- cd "$HOME/srb2_cache"
# Get stat command so we know what the cached archive date is.
# stat is different for OSX
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
STATCMD="stat -f %m";
else
STATCMD="stat -c %y";
fi
# Get asset files (required for MD5)
# See `deployer_defaults.sh` for asset download path
- if [[ "$ASSET_ARCHIVE_PATH" != "" ]]; then
if [ -f "$(basename $ASSET_ARCHIVE_PATH)" ]; then
echo "$(basename $ASSET_ARCHIVE_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_PATH))";
fi;
wget --verbose --server-response -N "$ASSET_ARCHIVE_PATH";
7z x "$(basename $ASSET_ARCHIVE_PATH)" -o"$__ASSET_DIRECTORY" -aos;
fi;
# Get optional files too
- if [[ "$__DPL_ACTIVE" == "1" ]] && [[ "$ASSET_FILES_OPTIONAL_GET" == "1" ]] && [[ "$ASSET_ARCHIVE_OPTIONAL_PATH" != "" ]]; then
if [ -f "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" ]; then
echo "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_OPTIONAL_PATH))";
fi;
wget --verbose --server-response -N "$ASSET_ARCHIVE_OPTIONAL_PATH";
7z x "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" -o"$__ASSET_DIRECTORY" -aos;
fi;
# Go back to root repo folder
- cd "$OLDPWD"
# Prepare CMake asset lists
- SRB2_ASSET_HASHED=$(echo ${ASSET_FILES_HASHED// /\;})
- SRB2_ASSET_DOCS=$(echo ${ASSET_FILES_DOCS// /\;})
- SRB2_ASSET_DIRECTORY="$__ASSET_DIRECTORY"
# Prepare CMake
- mkdir build
- cd build
- mkdir package
- export CFLAGS="-Wall -W -Werror $WFLAGS"
- export CCACHE_COMPRESS=true
# If OS X, set -march=core2 to build compatible binaries with old Macs
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CFLAGS="${CFLAGS} -march=core2";
fi;
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/bin -DCPACK_PACKAGE_DIRECTORY=$PWD/package
-DSRB2_ASSET_HASHED="${SRB2_ASSET_HASHED}" -DSRB2_ASSET_DOCS="${SRB2_ASSET_DOCS}"
-DSRB2_ASSET_DIRECTORY="${SRB2_ASSET_DIRECTORY}"
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY="${PROGRAM_NAME}"
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
script:
# Build our Makefile from Cmake!
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
. ../deployer/travis/deployer_build.sh;
else
make -k;
fi;
after_success:
# Run the upload scripts
# These do nothing if Deployer is not triggered
- . ../deployer/travis/deployer_ftp.sh
- . ../deployer/travis/deployer_dput.sh

View file

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project(SRB2 project(SRB2
VERSION 2.1.20 VERSION 1.2
LANGUAGES C) LANGUAGES C)
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR}) if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
@ -54,13 +56,19 @@ macro(copy_files_to_build_dir target dlllist_var)
endif() endif()
endmacro() endmacro()
# 64-bit check # bitness check
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(SRB2_SYSTEM_BITS 0)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "Target is 64-bit") message(STATUS "Target is 64-bit")
set(SRB2_SYSTEM_BITS 64) set(SRB2_SYSTEM_BITS 64)
else() endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
message(STATUS "Target is 32-bit")
set(SRB2_SYSTEM_BITS 32) set(SRB2_SYSTEM_BITS 32)
endif() endif()
if(${SRB2_SYSTEM_BITS} EQUAL 0)
message(STATUS "Target bitness is unknown")
endif()
# OS macros # OS macros
if (UNIX) if (UNIX)
@ -86,8 +94,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Set EXE names so the assets CMakeLists can refer to its target # Set EXE names so the assets CMakeLists can refer to its target
set(SRB2_SDL2_EXE_NAME srb2) set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
set(SRB2_WIN_EXE_NAME srb2dd) set(SRB2_WIN_EXE_NAME srb2kartdd CACHE STRING "Executable binary output name for DirectDraw build")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
@ -98,10 +106,10 @@ add_subdirectory(assets)
## config.h generation ## config.h generation
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary") set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
include(GitUtilities) include(GitUtilities)
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}") git_latest_commit(SRB2_COMP_COMMIT "${CMAKE_SOURCE_DIR}")
git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}") git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}") set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}") set(SRB2_COMP_REVISION "${SRB2_COMP_COMMIT}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
##### PACKAGE CONFIGURATION ##### ##### PACKAGE CONFIGURATION #####
@ -116,8 +124,8 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin")
set(CPACK_GENERATOR "DragNDrop") set(CPACK_GENERATOR "DragNDrop")
endif() endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Sonic Team Jr.") set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE ) #set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})

View file

@ -1,10 +1,6 @@
# Sonic Robo Blast 2 # SRB2Kart
[![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2) [SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
[![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2)
[![CircleCI](https://circleci.com/gh/STJr/SRB2/tree/master.svg?style=svg)](https://circleci.com/gh/STJr/SRB2/tree/master)
[Sonic Robo Blast 2](https://srb2.org/) is a 3D Sonic the Hedgehog fangame based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
## Dependencies ## Dependencies
- NASM (x86 builds only) - NASM (x86 builds only)
@ -13,11 +9,9 @@
- libupnp (Linux/OS X only) - libupnp (Linux/OS X only)
- libgme (Linux/OS X only) - libgme (Linux/OS X only)
Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at your own risk.
## Compiling ## Compiling
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling) See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
## Disclaimer ## Disclaimer
Sonic Team Junior is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2. Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.

View file

@ -1174,6 +1174,39 @@ HW3SOUND for 3D hardware sound support
<Option target="Debug Mingw64/DirectX" /> <Option target="Debug Mingw64/DirectX" />
<Option target="Release Mingw64/DirectX" /> <Option target="Release Mingw64/DirectX" />
</Unit> </Unit>
<Unit filename="src/hardware/hw_clip.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Mingw/DirectX" />
<Option target="Release Mingw/DirectX" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw64/DirectX" />
<Option target="Release Mingw64/DirectX" />
</Unit>
<Unit filename="src/hardware/hw_clip.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Mingw/DirectX" />
<Option target="Release Mingw/DirectX" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw64/DirectX" />
<Option target="Release Mingw64/DirectX" />
</Unit>
<Unit filename="src/hardware/hw_data.h"> <Unit filename="src/hardware/hw_data.h">
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
@ -1512,10 +1545,17 @@ HW3SOUND for 3D hardware sound support
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="src/info.h" /> <Unit filename="src/info.h" />
<Unit filename="src/k_kart.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/k_kart.h" />
<Unit filename="src/keys.h" /> <Unit filename="src/keys.h" />
<Unit filename="src/lua_baselib.c"> <Unit filename="src/lua_baselib.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="src/lua_blockmaplib.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/lua_consolelib.c"> <Unit filename="src/lua_consolelib.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>

View file

@ -22,6 +22,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>Debug</GenerateDebugInformation> <GenerateDebugInformation>Debug</GenerateDebugInformation>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup /> <ItemGroup />

View file

@ -24,6 +24,7 @@
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup /> <ItemGroup />

View file

@ -18,7 +18,7 @@
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings> <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>advapi32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress> <RandomizedBaseAddress>false</RandomizedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View file

@ -1,92 +1,141 @@
version: 2.1.20.{branch}-{build} version: 1.2.{branch}-{build}
os: MinGW os: MinGW
environment: environment:
CC: ccache CC: ccache
CCACHE_CC: i686-w64-mingw32-gcc CCACHE_CC: i686-w64-mingw32-gcc
WINDRES: windres CCACHE_CC_64: x86_64-w64-mingw32-gcc
MINGW_SDK: c:\msys64\mingw32 WINDRES: windres
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn # c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
NASM_ZIP: nasm-2.12.01 MINGW_SDK: c:\msys64\mingw32
NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip # c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
UPX_ZIP: upx391w MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
UPX_URL: http://upx.sourceforge.net/download/upx391w.zip CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
CCACHE_EXE: ccache.exe NASM_ZIP: nasm-2.12.01
CCACHE_URL: http://alam.srb2.org/ccache.exe NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
CCACHE_COMPRESS: true UPX_ZIP: upx391w
CCACHE_DIR: C:\Users\appveyor\.ccache UPX_URL: http://upx.sourceforge.net/download/upx391w.zip
CCACHE_EXE: ccache.exe
cache: CCACHE_URL: http://alam.srb2.org/ccache.exe
- nasm-2.12.01.zip CCACHE_COMPRESS: true
- upx391w.zip CCACHE_DIR: C:\Users\appveyor\.ccache
- ccache.exe # Disable UPX by default. The user can override this in their Appveyor project settings
- C:\Users\appveyor\.ccache NOUPX: 1
##############################
install: # DEPLOYER VARIABLES
- if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip" # DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
- 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null # DPL_TAG_ENABLED=1 will also build installers for release tags. DPL_ENABLED=1 must also be set.
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs %TMP%\%NASM_ZIP% %MINGW_SDK%\bin nasm.exe || exit 0 # Set these in the Appveyor project settings
##############################
- if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip" DPL_ENABLED: 0
- 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null DPL_TAG_ENABLED: 0
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs %TMP%\%UPX_ZIP% %MINGW_SDK%\bin upx.exe || exit 0 DPL_INSTALLER_NAME: srb2kart-v12
# Asset handling is barebones vs. Travis Deployer. We operate on 7z only.
- if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%" # Include the README files and the OpenGL batch in the main and patch archives.
- ccache -M 99M # The x86/x64 archives contain the DLL binaries.
- xcopy /Y /V /I ccache.exe %MINGW_SDK%\bin ASSET_ARCHIVE_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z
ASSET_ARCHIVE_PATCH_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-patch-assets.7z
configuration: ASSET_ARCHIVE_X86_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x86-assets.7z
- SDL ASSET_ARCHIVE_X64_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x64-assets.7z
- DD ASSET_ARCHIVE_OPTIONAL_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z
# This is overridden to 1 for release tag builds
matrix: ASSET_FILES_OPTIONAL_GET: 0
allow_failures: # For patches, also include the X86/X64 DLLs.
- configuration: DD PACKAGE_PATCH_DLL_GET: 0
# Delete all asset downloads so they can be redownloaded
before_build: ASSET_CLEAN: 0
- set Path=%MINGW_SDK%\bin;%Path%
- i686-w64-mingw32-gcc --version cache:
- mingw32-make --version - nasm-2.12.01.zip
- nasm -v - upx391w.zip
- upx -V - ccache.exe
- ccache -V - C:\Users\appveyor\.ccache
- ccache -s - C:\Users\appveyor\srb2_cache
- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 GCC72=1 CCACHE=1 NOOBJDUMP=1
install:
build_script: - if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean - if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k - if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
after_build:
- ccache -s - if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip"
- cmd: git rev-parse --short %APPVEYOR_REPO_COMMIT%>%TMP%/gitshort.txt - 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt - robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%NASM_ZIP%" "%MINGW_SDK%\bin" nasm.exe || exit 0
- set BUILD_ARCHIVE=%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%.7z
- set BUILDSARCHIVE=%APPVEYOR_REPO_BRANCH%-%CONFIGURATION%.7z - if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip"
- cmd: 7z a %BUILD_ARCHIVE% bin\Mingw\Release -xr!.gitignore - 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null
- appveyor PushArtifact %BUILD_ARCHIVE% - robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
- appveyor PushArtifact %BUILDSARCHIVE% - if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%"
- ccache -M 99M
test: off - xcopy /Y /V /I ccache.exe "%MINGW_SDK%\bin"
#deploy: configuration:
# - provider: FTP - SDL
# protocol: ftps #- SDL64
# host:
# secure: NsLJEPIBvmwCOj8Tg8RoRQ== before_build:
# username: - set "Path=%MINGW_SDK%\bin;%Path%"
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA= - if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
# password: - mingw32-make --version
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w== - if not [%X86_64%] == [1] ( nasm -v )
# folder: appveyor - if not [%NOUPX%] == [1] ( upx -V )
# application: - ccache -V
# active_mode: false - ccache -s
# on: - if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
# branch: master - if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
# appveyor_repo_tag: true - cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
# for pull requests, take the owner's name only, if this isn't the same repo of course
on_finish: - set "REPO=%APPVEYOR_REPO_BRANCH%"
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port> - if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
build_script:
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
after_build:
- if [%X86_64%] == [1] (
set "BUILD_PATH=bin\Mingw64\Release"
) else (
set "BUILD_PATH=bin\Mingw\Release"
)
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
- ccache -s
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
- cmd: 7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
- appveyor PushArtifact %BUILD_ARCHIVE%
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
- appveyor PushArtifact %BUILDSARCHIVE%
##############################
# DEPLOYER SCRIPT
##############################
- if [%DPL_ENABLED%] == [1] ( call "deployer\appveyor\deployer.bat" )
test: off
#deploy:
# - provider: FTP
# protocol: ftps
# host:
# secure: NsLJEPIBvmwCOj8Tg8RoRQ==
# username:
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
# password:
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
# folder: appveyor
# application:
# active_mode: false
# on:
# branch: master
# appveyor_repo_tag: true
on_finish:
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

14
assets/.gitignore vendored
View file

@ -1,2 +1,12 @@
* *.srb
*.* *.pk3
*.dta
*.wad
*.txt
*.kart
!README.txt
!HISTORY.txt
!LICENSE.txt
!LICENSE-3RD-PARTY.txt
!CMakeLists.txt
!debian-template/*

View file

@ -1,38 +1,60 @@
## Assets Target Configuration ## ## Assets Target Configuration ##
# MD5 generation # For prepending the current source path, later
set(SRB2_ASSET_ALL FUNCTION(PREPEND var prefix)
${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb SET(listVar "")
${CMAKE_CURRENT_SOURCE_DIR}/chars.kart FOREACH(f ${ARGN})
${CMAKE_CURRENT_SOURCE_DIR}/gfx.kart LIST(APPEND listVar "${prefix}/${f}")
${CMAKE_CURRENT_SOURCE_DIR}/maps.kart ENDFOREACH(f)
${CMAKE_CURRENT_SOURCE_DIR}/sounds.kart SET(${var} "${listVar}" PARENT_SCOPE)
${CMAKE_CURRENT_SOURCE_DIR}/music.dta ENDFUNCTION(PREPEND)
${CMAKE_CURRENT_SOURCE_DIR}/music.kart
) set(SRB2_ASSET_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/installer"
CACHE STRING "Path to directory that contains all asset files for the installer.")
set(SRB2_ASSET_HASHED set(SRB2_ASSET_HASHED
srb2.srb "srb2.srb;\
chars.kart patch.kart;\
gfx.kart gfx.kart;\
maps.kart textures.kart;\
sounds.kart chars.kart;\
maps.kart"
CACHE STRING "Asset filenames to apply MD5 checks. No spaces between entries!"
) )
set(SRB2_ASSET_DOCS
"README.txt;\
HISTORY.txt;\
LICENSE.txt;\
LICENSE-3RD-PARTY.txt"
CACHE STRING "Documentation filenames. In OS X, these are packaged separately from other assets. No spaces between entries!"
)
PREPEND(SRB2_ASSET_DOCS ${SRB2_ASSET_DIRECTORY} ${SRB2_ASSET_DOCS})
foreach(SRB2_ASSET ${SRB2_ASSET_HASHED}) foreach(SRB2_ASSET ${SRB2_ASSET_HASHED})
file(MD5 ${CMAKE_CURRENT_SOURCE_DIR}/${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH") file(MD5 ${SRB2_ASSET_DIRECTORY}/${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH")
set(SRB2_ASSET_${SRB2_ASSET}_HASH ${SRB2_ASSET_${SRB2_ASSET}_HASH} PARENT_SCOPE) set(SRB2_ASSET_${SRB2_ASSET}_HASH ${SRB2_ASSET_${SRB2_ASSET}_HASH} PARENT_SCOPE)
endforeach() endforeach()
# Installation # Installation
if(CLANG) if(${CMAKE_SYSTEM} MATCHES Darwin)
get_target_property(outname SRB2SDL2 OUTPUT_NAME) get_target_property(outname SRB2SDL2 OUTPUT_NAME)
install(FILES ${SRB2_ASSET_ALL} install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
DESTINATION "${outname}.app/Contents/Resources" DESTINATION "${outname}.app/Contents/Resources"
) )
install(FILES ${SRB2_ASSET_DOCS}
DESTINATION .
OPTIONAL
)
else() else()
install(FILES ${SRB2_ASSET_ALL} install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
DESTINATION . DESTINATION .
) )
# Docs are assumed to be located in SRB2_ASSET_DIRECTORY, so don't install again
#install(FILES ${SRB2_ASSET_DOCS}
# DESTINATION .
# OPTIONAL
#)
endif() endif()

202
assets/HISTORY.txt Normal file
View file

@ -0,0 +1,202 @@
KartKrew: Chapter 1.0 - Who Would Actually Read All This???? [LIVE DOC]
-beep-
[Chromatian dual-wields onto the interview set, stage left, and takes a seat next to VelocitOni. Oni stands up to look at the confused camera-men before opening a binder to stoically show both of his redone Tails sprites for Kart 1.0 and Vanilla 2.2. He closes it and sits back down, the three sofa cushions being Sryder, toaster, and Lats limp timezoned bodies respectively; throwing arm over the side of the Fooruman pillow]
Chrome: Uh…......anyway Chaos Zero 64, a Vanilla SRB2 Developer at the time, during the “heyday” of Sonic Riders started working on his own side project of recreating that game in SRB2 v1.09.4. After programming a functional recreation, he went a step further and threw together a new race mode for all of the characters in the playable exe. After THAT, he took it another step further and made a Mario Kart game type as well. A bunch of young mappers (Including current KartKrew™ dev members Blade & I) tossed him a few maps and he called it a complete exe.
While fully functional, it was as barebones as you could get. Character stats were altered Vanilla stats (lowered jump, speed, no spindash, and no drifting!) weapon rings reskinned into mario items, and a bunch of checkpoints that you had to hit to count as a lap around the course. It was pretty jank, but seeing all of those dents in the core gameplay is what gave way to the inspiration to push it further than what it initially was.
Oni: Theres only one way to describe how I found it in 1.09.4, and the phrasing kinda caught on (to my pleasure), “ghetto footrace”. It was definitely an absolute MIRACLE at the time to even have SRB2 do anything different from its main gameplay scheme, bare ass open maps with collapsing FOFs; and the entire community as a whole was younger… so we all ate it up anyways. Standards were lower, times were simpler, we still really appreciate CZ for trying something new. When you pulled the wool off though, it was just ghetto footrace with reskinned buttons and totally unique…but also totally random weapon panels.
[FlareBlade pops out of loose pipe in the room for some reason and hits his head on a kitchen sink.]
Blade: While most of the maps back then harkened back to the simpler style of the 1.09.4 era; and were scrapped as SRB2 as a whole improved, Pipe Speedway has survived all the way to the present, although with a heavy style change, including a new name! (Now Daytona Speedway)
Oni: [laughs] You really like that map, dont you?
Random Audience Member:[shouting] PICK, PICK STARDUST!!
[The audience member is immediately shot through the heart with striking accuracy... the vote-screen SFX of a map being picked and Palmtree Panic Zone kids screaming "Yeah!" sounds. Cut to SeventhSentinel who just logged into the middle of the room with a shocked expression, smoking quality-controlling Desert Eagle in hand. The audience member's mask falls off, turning out to be Stardust Speedway Battle himself, now dead from the rotation.]
Sev: Why would Blade do this…?
Chrome: Pipe Speedway opened the PIPES for Karts 2.0 development, you could say. [laughs]
Blade: Well, it WAS the first one to be slope-ified! Mostly as a proof-of-concept to show what could be done. (the rest of you lot were too busy with that “TD” thing…) And then you all went and upstaged it anyway with some of the other maps. [chuckles] //shade
Oni: Yeah, while we finished ANOTHER full fledged mod, you actually got about 54% done with Pipe Speedway after 4 years! I was impressed. ////clapback
Chrome: Still, Blade kept the campfire lit while we went in search of food, that takes some dedication.
Oni: No. That was Blitz-T who continued making entire maps the whole time--
Blade --Thank you. Overall though, the original kart was more-or-less a side feature of Riders. Never really the main focus of the mod, but without a doubt the most popular part of it. The other two modes never really caught on. (Though we did have that ill-fated “Rivals” mod…) =P
Oni: [Holding a knife up to the two] The “what” mod?? Anywho, I was a frequent player of 1.09.4 but never really in the community much until 2.0. It wasnt until CZ ported his mod to be up to date, that I jumped in with the idea that I actually had enough of a brain to contribute to things… the problem was that my standards from the get-go were way way too high, and my skill as a spriter and general design experience were a lot lower. Nevertheless, when SRB2Riders hype died down, I approached him in DMs with all my expectations and ideas for his mod...and… surprisingly he didnt laugh me out! I guess hed never had anyone directly tell him theyd help outright before (besides Ground The Fox), but he was a bit noticeably bummed that I only cared for what hed considered the minor Mario mod within the mod.
This is what kickstarted the chain of events. All my plans that I bugged CZ for every other day in PMs never came to fruition, he actually lost interest and began to slowly fade out of the SRB2 community as a whole. Instead out of LITERALLY nowhere, D00D64 decided to revive the SRB2Riders mod himself by releasing a pretty expansive mod...of a mod within a mod OF a mod himself. Naturally, everyone jumped onto this, it exploded in popularity pretty much right away, because there were finally more than just a few mediocre maps to play “kart mode” on. There were PORTS, glorious glorious ports. Of course, I flocked to D00D to help out.
Blade: Flat, boring, ports. Though the crazy item spam helped. Also we FINALLY got DRIFTING! Separating the characters from the bloat of the other 2 modes also made making custom racers easier to make.
Oni: ...yeah, the truth is, once the “D00DKart” era started, it didnt help that there were so many more por-- er, maps to play kart-mode on that people realized the formula for a kart racer was just inherently more exciting than what CZd pulled off with the Riders half of it. I remember a LOT of content for kart, and then like 2 maps for the more fleshed out and polished main focus of the thing. Everyone just sorta... forgot about Riders mode, sadly. It didnt help that someone else also exploded onto the scene in a siamese feedback loop once D00D churned out enough maps a day to actually make a full game out of; ZarroTsu, who also saw opportunity too.
D00DKart and “Super SRB2Kart Z”, a continuation of ChaosZeros mod, combined into one super project. A team just kinda assembled naturally out of this, and more original content started to, slowly but surely, get made by a wider variety of people. The train continued to accelerate, lots of familiar faces coming into play. All the basics youd expect out of a Mario Kart clone were coded by Zarro, basically updates every single day, stuff just kept getting done by this specific group of people.
Chrome: Thats about when things for kart started to die down. D00DKart kept the entire game afloat, but Kart was always a sideline to Vanilla. Once D00DKart finally got comfortable, people moved back to Vanilla to see what else they could do with that. Servers stopped popping up as quickly as they used to, and eventually Super SRB2 Kart Z fell into obscurity. It was at this point that the small group still excited for the game tried to push for an even better project.
Oni: Yep. When steam on this makeshift game finally died, Zarro lost interest too, and outright just vanished for a year or two(?) and when then, when he returned, he had very little momentum to continue. So in the meanwhile we kinda came closer together under the team “Kart Krew”, and in his place Sryder took the helm. Zarros vision was always to be a Mario clone, so when he was absent I wanted to push my idea of getting rid of most if not all references to Mario pronto, going for a Sonic aesthetic instead. The idea was that well never be as good as a Nintendo game, and comparisons will always be drawn, so why not do something more unique?
Progress boomed again, but in private this time. 2013 ended up being the “2.0 indev” period. Standards kept increasing and increasing internally, because no one was satisfied with “ghetto footrace” anymore, we grew out of it and wanted an actual game this time… not play-pretend with all the instathrust hacks and poor game design decisions we were left with. Like shields.
NOBODY liked those shields. We just couldnt force Zarro to do what he didnt want with his mod of a mod in a mod of a mod.
Chrome: [laughs] Whirlwind was just a bit too broken for everyone.
Oni: Using a Whirlwind Shield felt like playing a game of fucking Twister with my fingers just to reach the convoluted buttons, and youre rewarded with the equivalent of bomb-jumping into the sky, except your kart is a runaway shower tub on pig grease. Awful. But good going, you ruined the entire race! Your slap on the wrist is now an unavoidable Armageddon Shield to the entire server by that Brazilian player who accidentally somehow made it to Lap 2 by RNG.
Mechanics were being edited, handling changed a bit, sprites were getting updated (notably the karts themselves), videos were being released from each of our channels, maps were bloating, notorious bug fixes at light speed. Unfortunately, literally at the same time, the new “Kart Krew” decided to sink their teeth into the Top Down experiment (we were on a high of too much confidence from all the progress) WHILE the release of Vanilla 2.1 invalidated all thre-- BOTH of our projects in one fell swoop. These were the dark ages, and it only got worse when I decided to disappear TOO before TD even got done. The story behind that development cycle (Top Down took all our Kart focus away when it was in progress) is known by now, but the real unexpected meat happened when we finally pushed that abortion out the door.
Chrome: You probably should have listened to Blade and stuck with our guns on Kart, and not take a “break” for a new experiment. [laughs]
[A silhouette outside the window in the rain can be seen with glowing cones, waving. Before anyone can process it, American Airlines smashes through the studio. For some reason Charybdizs walks out of the left-frontmost hatch]
Charyb: For the record, Top Down wasn't bad by any means! People are just jumping on it because its dev cycle was complicated and a big learning experience for everyone. There were numerous members who poured their hearts into it! Im proud of them! But yeah… the dev cycle…
[wolfs can be seen frantically searching for a point in this interview to be relevant, unscheduled anime forcing him to miss most of it]
wolfs: Oh man, TDs dev cycle. What a shitshow. Youd either get a response in 3 seconds or 3 days depending on who was around. Motivation was at an all-time low back then. I felt like I was talking into a vacuum sometime--
Oni: Why the fuck would you interrupt THIS moment, talking about 3 day responses when youll be “online” and wont say anything until Konys live fucking body is found. Get outta here.
wolfs: says the guy who disappeared for two years
Oni: 'ey fuk you mane
[Oni can be seen across the room from the plane, his TD_PTSD.td filled breathing into a brown paper bag]
Oni: No, if Top Down were bad it wouldnt have made half the hype of what Kart is doing now by ITSELF and manage to make it on Retros front page. But the dev cycle was purgatory, a big explosion at the start that dwindled to a candlefire, put out by the rain of inactivity...and then reignited by the power of Discord Chat. The actual product itself was pretty decent, and another fresh multiplayer experience not ever done in SRB2. It had hype.
Blade: ...When you say the karts were updated, you mean “Oni nit-picked them to death and redid them like 10 times”.
Oni: I wish he were joking about that number.
Chrome: It all worked out for the better though. That (rather lengthy!) experiment taught us a lot about time management and what not to do for the far more important modification. Discord got popular around this time, and Top Down hopped into that plane, and quickly parachuted out into the community. This gathered a few new, very important members into KartKrew™. TehRealSalt, host of the Sugoi series, Seventh Sentinel, a new mapper with a fresh take on level design, and toaster, a Vanilla dev programmer with a fire for Kart so hot keeping up with her pace is a job in itself. Seriously, without these three members, Kart wouldnt have the polish it does now.
Its around this time that the pioneer in Kart level design returned, Blitz-T. Every map he made for 2.0 indev kart was a jawdropper to everyone on the team, and his attention to the small details were more than impressive. On top of all of this, SRB2 version 2.1 supported sloped planes, something that was as unbelievable for this game as cell phones were back in the 50s.
This is where 2.1 Kart really started to shine, Zarro ported the entire game in the span of a few weeks, Blitz-T took his old maps and revamped them with slopes to nearly unrecognizable new iterations, TehRealSalt made the entire Battle mode in the span of a *single* night, and Seventh Sentinel finally gave us looped music and consistent sound quality.
Blade: Yeah, they really picked up the slack of some of the older members that lost steam, such as myself.
Oni: Sev, Sal, and toast were the most unexpected things to ever happen to this thing. This shit was literally overnight. Its really crazy how new blood can help bring a new perspective and vision to the game, along with skills you didnt know the team was lacking. SO much pressure was taken off of Sryder as Sal and toaster literally slapped the exe until it cried, like frame-perfect Ice Climber handoffs into a 300% wobble. EVERYONE was overwhelmed. I saw the chance and took it, so we decided to go with my vision while Zarro took a backseat. Most, if not all the remaining broken code was just thrown out the window at this point, the game was rapidly feeling cleaner in just nights.
If you took your eyes off of it for a few hours, something changed massively. The physics went from instathrust to momentum based, Zarro coded new acceleration code, toaster put in 2.2 friction physics as a test that turned out overwhelmingly positive...and also divisive with the previous vision of the mod. These changes were all happening so fast, despite being in kinda stored with me idea-wise for years, that it caused a bit of a rift in what this game was supposed to be. Zarro decided to take a step back and dip because itd changed so much in just the span of 4 months, he took one good look at 4-Player Splitscreen… a never seen before feat, and just breathed. It didnt feel like his mod anymore, his personal connection with it felt lost…
[Oni wiping sweat off his brow] Things only got more drastically revamped… very very rapidly.
The Mario aesthetic was entirely tossed out, as Sal was willing to work with me night and day on redoing most of everything about items… and then sounds. My power level for sprites massively jumped during TD development, so I decided to take it upon myself to do almost everything. Theyre such friendly and cooperative coders that I cant help but push a little harder than I used to (I was WAY lazier before they got here) to keep up.
Chrome: Those kart sprites took a good 6 months longer than they needed to for sure! [laughs]
Oni: [laughs in Latin] Its not as easy as sloping a single sector in Misty Maze, thats for sure!
The mappers went bonkers, especially Blitz-T and TyrannoChao aka “Ezo” (previously ChaoticChao) whos content probably makes up half the game combined. The creative freedom and supportive style/mentality of how the team is led pretty much went to an unstoppable feedback loop of content AND polish, surprisingly. We got to a point where we could not only lay any remaining ChaosZero64 code that mightve seeped to rest, but also throw out almost every direct Mario port or reference right down to the sounds. It became a Sonic game, in one year.
Blade: Stuff was added so rapidly, even right up to release it always felt like there was something new being added. Bonuschars alone got 2 extra characters added in the week before release!
Oni: Really, if you asked me, Id say that most of kart just happened since TD released til now, and the rest was just a confused fever dream of passing torches until it all just got thrown out and re-done anyway. Thats why a changelog is pretty pointless, its like going to a shop...sitting down…and getting a recommendation for your vehicle; but the papers blank and just reads “get new car”. Honestly, playing this and playing the old 2.0 public builds that people like Super Chris still host for some reason is like aging backwards, except youre really just amputating your skeleton to appear small and young again, its HORRIBLE. So if they all liked that… hopefully theyll like an actually good game...even more??
[Sounds of an angry midnight release crowd erupting outside, muffled. D00D64 can be seen at the forefront...slapping yet another unnaturally high quality gif meme onto the glass window. The camera pans out, theres hundreds of gif memes all over the outer walls]
Oni: Is it midnight?? I told them to fuck off, theres no midnight release! @Chromatian FIND SOMETHING TO SAY AFTER ME TO CLOSE THIS UP ALREADY
Chrome: [this shitty Iwata Asks atmosphere cracking at the seams of its own immersion, reality warping his professional and calm demeanor, but he laughs regardless...shakily] You just dont know when to stop!!
[TehRealSalt struggles trying to get into the room through the tiny doggy door for 5 awkward minutes, before giving up and just opening the door] … [she doesnt know what to say.]
Oni: EZO
[The towering dinosaur just nonchalantly sits in his chair on-stage, legs crossed, resting his head on his hand]
Ezo: Sticky Kart was a shitshow. [referring to the old controls/physics]
Oni: holy shit YOU CANT SAY THAT ZARRO MIGHT BE READING
Ezo: I have no regretties. Except for maybe Arid S--wait, thats a secret, isnt it? Hm. Anyway, yeah, working on this was fun. Usually. Learning to sprite was annoying but it paid off since I got to cram Wonder Boy in everyones faces like the scaly fucko I am. Though Gammas pretty cool too. I hope you all enjoy my Sonic Adventure references and that you all suffer an appropriately huge amount in Egg Quarters and Spotlight Syndicate.
Oni: THIS IS A NON FURRY DOCUMENT :boi:
Ezo: Speciesism UwU
Boinciel: [screaming from a speaker contained offstage] HI MY NAME IS BOINCIEL I DESIGNED KART MAPS TO DESTROY YOUR EYES AND/OR YOUR SOUL OKAY BYE I HAVE TO DO MY JOB NOW
Oni: With a map like Kodachrome…..clearly...
[Off in the corner, a lone wooden coat rack stands, although upon further inspection... It turns out to be, well, CoatRack in a disguise!]
[The entire server pauses for Coat to come up with something]
Coat: You know, these guys all did an awesome job. The controls, the graphics, music too! I just, uh… Had an engine stall on my map, sad how many times I ran out of fuel at a petroleum refinery when making it. Huh. But as one of the more outside members of the krew, just ask anyone, I could be placed under the decorative ornament members with how rarely I dropped in. But each time I did I was blown away by the leaps and bounds, filling me with joy to see this racer come to life. Even if I am a living example of why inanimate objects shouldnt drive!
[The entire Krew stares at the literal coat rack, smiling wholesomely until Blade opens his mouth]
Blade: Whatever. Enough talking, LETS GO AWAY!!!!!!!! DAYTONNNAAAAAAAAAAAAAAAA
[...the .txt file itself cringes to a halt.]
doot

1710
assets/LICENSE-3RD-PARTY.txt Normal file

File diff suppressed because it is too large Load diff

339
assets/LICENSE.txt Normal file
View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

65
assets/README.txt Normal file
View file

@ -0,0 +1,65 @@
SONIC ROBO BLAST 2 KART
SRB2Kart is a kart racer based on SRB2, the 3D Sonic the Hedgehog
fangame based on a modified version of Doom Legacy.
LICENSE
The source code for SRB2 & SRB2Kart is licensed under the GNU General
Public License, Version 2. See LICENSE.txt for the full text of this
license.
SRB2 & SRB2Kart uses various third-party libraries, including SDL, SDL
Mixer, and their dependencies. See LICENSE-3RD-PARTY.txt for the
licenses of these libraries.
SOURCE CODE
You may obtain the source code for SRB2Kart, including the source code
for specific version releases, at the following web site:
STJr GitLab:
https://git.magicalgirl.moe/KartKrew/Kart-Public
You may obtain the source code for the parent game, SRB2, at the
following web sites:
STJr GitLab:
https://git.magicalgirl.moe/STJr/SRB2
GitHub:
https://github.com/STJr/SRB2
CONTACT
You may contact Kart Krew via the following web site:
Kart Krew Official Discord:
https://discord.gg/WJmqDtN
You may contact Sonic Team Junior via the following web sites:
SRB2.ORG:
https://www.srb2.org
SRB2 Message Board:
https://mb.srb2.org
SRB2 Official Discord:
https://discord.gg/pYDXzpX
COPYRIGHT AND DISCLAIMER
Design and content on SRB2Kart is copyright 2018 by Kart Krew.
Design and content on SRB2 is copyright 1998-2018 by Sonic Team Junior.
All non-original material on SRB2.ORG is copyrighted by their
respective owners, and no copyright infringement is intended. The owner
of the SRB2.ORG domain is only acting as an ISP, and is therefore not
responsible for any content on SRB2.ORG under the 1998 DMCA. This
site, its webmaster, and its staff make no profit whatsoever (in fact,
we lose money). Sonic Team Junior assumes no responsibility for the
content on any Sonic Team Junior fan sites.
Kart Krew nor Sonic Team Junior is in no way affiliated with SEGA or
Sonic Team. We do not claim ownership of any of SEGA's intellectual
property used in SRB2 or SRB2Kart.

View file

@ -0,0 +1,73 @@
srb2 for Debian
---------------
SRB2 Debian package!
Hi there, to rebuild this package just use the SRB2 Makefile system, or, optionally, run
dpkg-buildpackage in the in /assets directory. You can build these with or without a key
if you want, but if you want to put these on a repo, generate your own GnuPG key as per the
https://help.ubuntu.com/community/GnuPrivacyGuardHowto instructions and pass the -k<keyid>
command to debuild. Make sure you export the key footprint and give them to your users to install
with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
---------------
Templating
Note that you MUST run [repo-root]/debian_template.sh before running debuild
on these scripts! debian_template.sh fills these template files with working values.
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
the identity of the key you will use to sign the package.
Building for Launchpad PPA
Run this step first:
1. source [repo-root]/debian_template.sh
* Initializes defaults for the package variables and fills in templates.
Use these steps to prepare building a source package for Launchpad:
1. cd [repo-root]/assets/
2. debuild -T clean-all (optional; if you already have asset files, this clears them)
Build the source package:
1. debuild -T build (this downloads the asset files from srb2.org if necessary)
2. debuild -S (builds the source package for Launchpad, including the asset files)
Signing for Launchpad PPA
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
to publish the fingerprint of that key to Ubuntu's key server.
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
upload signed source packages and publish them onto your PPA.
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
means your key is not set up correctly with your Launchpad account.
Finally, if your packages have not already been signed, follow these steps:
1. cd ..
* Packages are located in the parent folder of where debuild was called
2. debsign "srb2-data_[version]_source.changes"
* You may need to specify -k [key-fingerprint]
Uploading for Launchpad PPA
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages.
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500

View file

@ -0,0 +1,5 @@
${PACKAGE_NAME}-data (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
* ${PROGRAM_NAME} v${PROGRAM_VERSION} asset data
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}

View file

@ -1,22 +1,22 @@
# SRB2-data Debian package control file. # SRB2-data Debian package control file.
Source: srb2-data Source: ${PACKAGE_NAME}-data
Section: games Section: games
Priority: extra Priority: extra
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com> Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
Build-Depends: debhelper (>= 7.0.50~) Build-Depends: debhelper (>= 7.0.50~),
wget
Standards-Version: 3.8.4 Standards-Version: 3.8.4
Homepage: http://www.srb2.org Homepage: ${PACKAGE_WEBSITE}
Package: srb2-data Package: ${PACKAGE_NAME}-data
Architecture: all Architecture: all
Description: A cross-platform 3D Sonic fangame Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. While SRB2 isn't fully completed, it already the design in 3D. It features tons of levels, enemies, speed,
features tons of levels, enemies, speed, and quite a lot and quite a lot of the fun that the original Sonic games provided.
of the fun that the original Sonic games provided.
This is the data package that provides the data files that This is the data package that provides the data files that
SRB2 requires to run, it will not work without it. SRB2 requires to run; it will not work without it.

View file

@ -1,18 +1,18 @@
This work was packaged for Debian by: This work was packaged for Debian by:
Callum Dickinson <gcfreak_ag20@hotmail.com> on Fri, 26 Nov 2010 15:19:16 +1300 ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
It was downloaded from: It was downloaded from:
<http://srb2.org> ${PACKAGE_WEBSITE}
Upstream Author(s): Upstream Author(s):
Sonic Team Junior <stjr@srb2.org> ${PACKAGE_GROUP_NAME_EMAIL}
Copyright: Copyright:
Copyright (C) 1998-2010 Sonic Team Junior Copyright (C) 1998-2018 by Sonic Team Junior
License: License:
@ -21,6 +21,7 @@ License:
The Debian packaging is: The Debian packaging is:
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com> Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
and is licensed under the GPL version 2, and is licensed under the GPL version 2,
see "/usr/share/common-licenses/GPL-2". see "/usr/share/common-licenses/GPL-2".

62
assets/debian/rules → assets/debian-template/rules Executable file → Normal file
View file

@ -23,6 +23,16 @@
# #
############################################################################# #############################################################################
#############################################################################
#
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
#
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
# Variables used by the rules script are parenthese'd $(DATADIR)
# See [repo-root]/debian_template.sh
#
#############################################################################
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1 #export DH_VERBOSE=1
@ -37,25 +47,32 @@ RM := rm -rf
DIR := $(shell pwd) DIR := $(shell pwd)
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g') PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta ARCHIVEPATH := ${ASSET_ARCHIVE_PATH}
ARCHIVEOPTIONALPATH := ${ASSET_ARCHIVE_OPTIONAL_PATH}
GETOPTIONALFILES := ${ASSET_FILES_OPTIONAL_GET}
DATADIR := usr/games/SRB2 DATADIR := $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
RESOURCEDIR := . RESOURCEDIR := .
STAGINGDIR := $(RESOURCEDIR)/installer
WGET := wget -P $(RESOURCEDIR) -c -nc WGET := wget -P $(RESOURCEDIR) -c -nc
build: build:
$(MKDIR) $(DIR)/debian/tmp/$(DATADIR) $(MKDIR) $(DIR)/debian/tmp/$(DATADIR)
# This will need to be updated every time SRB2 official version is > $(DIR)/debian/source/include-binaries
# Copy data files to their install locations, and add data files to include-binaries # Copy data files to their install locations, and add data files to include-binaries
for file in $(DATAFILES); do \ if [ ! -d $(STAGINGDIR) ]; then \
$(WGET) http://alam.srb2.org/SRB2/2.1.14-Final/Resources/$$file; \ mkdir -p "$(STAGINGDIR)"; \
if test "$$file" = "srb2.wad"; then \ $(WGET) $(ARCHIVEPATH); \
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/srb2.srb; \ 7z x "$(RESOURCEDIR)/$(shell basename $(ARCHIVEPATH))" -aos; \
else \ if [ "$(GETOPTIONALFILES)" = "1" ]; then \
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/$$file; \ $(WGET) $(ARCHIVEOPTIONALPATH); \
7z x "$(RESOURCEDIR)/$(shell basename $(ARCHIVEOPTIONALPATH))" -aos; \
fi; \ fi; \
echo $(RESOURCEDIR)/$$file >> $(DIR)/debian/source/include-binaries; \ fi
done # Install asset directory and add asset file to include-binaries
cp -vr "$(STAGINGDIR)/." "$(DIR)/debian/tmp/$(DATADIR)"
find "$(STAGINGDIR)" >> $(DIR)/debian/source/include-binaries
binary-indep: binary-indep:
# Generate install folder file # Generate install folder file
@ -95,15 +112,18 @@ binary: binary-indep
dh_builddeb dh_builddeb
clean: clean:
$(RM) $(RESOURCEDIR)/*.wad $(RM) $(DIR)/debian/tmp/*; \
$(RM) $(RESOURCEDIR)/*.dta $(RM) $(DIR)/debian/$(PACKAGE).install; \
$(RM) $(RESOURCEDIR)/*.plr $(RM) $(DIR)/debian/files; \
$(RM) $(RESOURCEDIR)/*.wpn
$(RM) $(RESOURCEDIR)/*.srb clean-all: clean
$(RM) $(RESOURCEDIR)/*.dll $(RM) $(RESOURCEDIR)/*.wad; \
$(RM) $(DIR)/debian/tmp/* $(RM) $(RESOURCEDIR)/*.dta; \
$(RM) $(DIR)/debian/$(PACKAGE).install $(RM) $(RESOURCEDIR)/*.plr; \
$(RM) $(DIR)/debian/files $(RM) $(RESOURCEDIR)/*.wpn; \
$(RM) $(DIR)/debian/source/include-binaries $(RM) $(RESOURCEDIR)/*.srb; \
$(RM) $(RESOURCEDIR)/*.dll; \
$(RM) $(RESOURCEDIR)/*.txt; \
$(RM) $(DIR)/debian/source/include-binaries; \
.PHONY: all clean binary binary-arch binary-indep build .PHONY: all clean binary binary-arch binary-indep build

View file

@ -0,0 +1 @@
tar-ignore = "tmp/*"

View file

@ -1,12 +0,0 @@
srb2 for Debian
---------------
SRB2 Debian package!
Hi there, to rebuild this package just use the SRB2 Makefile system, or, optionally, run
dpkg-buildpackage in the in /bin/Resources directory. You can build these with or without a key
if you want, but if you want to put these on a repo, generate your own GnuPG key as per the
https://help.ubuntu.com/community/GnuPrivacyGuardHowto instructions and pass the -k<keyid>
command to debuild. Make sure you export the key footprint and give them to your users to install
with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300

View file

@ -1,12 +0,0 @@
srb2-data (2.1.14~1) unstable; urgency=low
* Updated for SRB2 v2.1.14
-- Alam Arias <alam+debian@srb2.org> Sat, 6 Jan 2016 11:00:00 -0500
srb2-data (2.0.6-2) maverick; urgency=high
* Initial proper release..
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300

Binary file not shown.

Binary file not shown.

View file

@ -27,5 +27,17 @@ function(git_current_branch variable path)
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
set(${variable} "${output}" PARENT_SCOPE)
endfunction()
function(git_latest_commit variable path)
execute_process(COMMAND ${GIT_EXECUTABLE} "rev-parse" "--short" "HEAD"
WORKING_DIRECTORY "${path}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(${variable} "${output}" PARENT_SCOPE) set(${variable} "${output}" PARENT_SCOPE)
endfunction() endfunction()

View file

@ -0,0 +1,70 @@
srb2 for Debian
---------------
SRB2 Debian package!
Hi there, to rebuild these packages just use debuild in the root source directory (not /src!).
You can build these with or without a key if you want, but if you want to put these on a repo,
generate your own GnuPG key as per the https://help.ubuntu.com/community/GnuPrivacyGuardHowto
instructions and pass the -k<keyid> command to debuild. Make sure you export the key footprint
and give them to your users to install with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
---------------
Templating
Note that you MUST run [repo-root]/debian_template.sh before running debuild
on these scripts! debian_template.sh fills these template files with working values.
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
the identity of the key you will use to sign the package.
Building for Launchpad PPA
Use these steps to prepare building a source package for Launchpad:
1. cd [repo-root]
2. git reset --hard; git clean -fd; git clean -fx;
* Resets your repo folder to a committed state and removes untracked files
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
Build the source package:
1. source [repo-root]/debian_template.sh
* Initializes defaults for the package variables and fills in templates.
2. debuild -S (builds the source package for Launchpad)
Signing for Launchpad PPA
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
to publish the fingerprint of that key to Ubuntu's key server.
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
upload signed source packages and publish them onto your PPA.
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
means your key is not set up correctly with your Launchpad account.
Finally, if your packages have not already been signed, follow these steps:
1. cd ..
* Packages are located in the parent folder of where debuild was called
2. debsign "srb2_[version]_source.changes"
* You may need to specify -k [key-fingerprint]
Uploading for Launchpad PPA
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages.
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500

View file

@ -22,6 +22,10 @@ Build instructions:
make -C src LINUX=1 make -C src LINUX=1
Build instructions for non-X86 devices (such as X64):
make -C src LINUX=1 NONX86=1
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system, Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
follow cross-compiling instructions for cross-compiling on a x86 system: follow cross-compiling instructions for cross-compiling on a x86 system:

View file

@ -0,0 +1,5 @@
${PACKAGE_NAME} (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
* ${PROGRAM_NAME} v${PROGRAM_VERSION} program build
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}

51
debian-template/control Normal file
View file

@ -0,0 +1,51 @@
# SRB2 Debian package control file.
Source: ${PACKAGE_NAME}
Section: games
Priority: extra
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
Build-Depends: debhelper (>= 7.0.50~),
libsdl2-dev,
libsdl2-mixer-dev,
libpng-dev | libpng16-dev | libpng12-dev (>= 1.2.7),
zlib1g-dev,
libgme-dev,
libcurl4-openssl-dev,
libglu1-dev | libglu-dev,
libosmesa6-dev | libgl-dev,
nasm [i386]
Standards-Version: 3.8.4
Homepage: ${PACKAGE_WEBSITE}
Package: ${PACKAGE_NAME}
Architecture: any
Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}),
libsdl2-2.0-0,
libsdl2-mixer-2.0-0,
zlib1g,
libgme0,
libcurl4,
libpng | libpng16-16 | libpng12-0
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. It features tons of levels, enemies, speed,
and quite a lot of the fun that the original Sonic games provided.
Package: ${PACKAGE_NAME}-dbg
Architecture: any
# FIXME: should be Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
Depends: libc6, ${MISC_DEPENDS}, ${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}), ${PACKAGE_NAME}
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. It features tons of levels, enemies, speed,
and quite a lot of the fun that the original Sonic games provided.
This is a debug binary; its symbols will be loaded by gdb
when the user starts the game with gdb for debugging.

View file

@ -1,18 +1,18 @@
This work was packaged for Debian by: This work was packaged for Debian by:
Callum Dickinson <gcfreak_ag20@hotmail.com> on Fri, 26 Nov 2010 15:19:16 +1300 ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
It was downloaded from: It was downloaded from:
<http://srb2.org> ${PACKAGE_WEBSITE}
Upstream Author(s): Upstream Author(s):
Sonic Team Junior <stjr@srb2.org> ${PACKAGE_GROUP_NAME_EMAIL}
Copyright: Copyright:
Copyright (C) 1998-2010 Sonic Team Junior Copyright (C) 1998-2018 by Sonic Team Junior
License: License:
@ -21,6 +21,7 @@ License:
The Debian packaging is: The Debian packaging is:
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com> Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
and is licensed under the GPL version 2, and is licensed under the GPL version 2,
see "/usr/share/common-licenses/GPL-2". see "/usr/share/common-licenses/GPL-2".

4
debian-template/docs Normal file
View file

@ -0,0 +1,4 @@
README.md
assets/README.txt
assets/LICENSE.txt
assets/LICENSE-3RD-PARTY.txt

52
debian/rules → debian-template/rules Executable file → Normal file
View file

@ -23,6 +23,16 @@
# #
############################################################################# #############################################################################
#############################################################################
#
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
#
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
# Variables used by the rules script are parenthese'd $(PKGDIR)
# See [repo-root]/debian_template.sh
#
#############################################################################
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1 #export DH_VERBOSE=1
@ -50,28 +60,40 @@ DIR := $(shell pwd)
# FIXME: hate hate hate head/tail hack :( # FIXME: hate hate hate head/tail hack :(
CONTROLF = $(DIR)/debian/control CONTROLF = $(DIR)/debian/control
PACKAGE = srb2 PACKAGE = ${PACKAGE_NAME}
DBGPKG = $(PACKAGE)-dbg DBGPKG = ${PACKAGE}-dbg
TITLE = Sonic Robo Blast 2 TITLE = ${PROGRAM_NAME}
SECTION = Games/Action SECTION = Games/Action
EXENAME = srb2 EXENAME = ${PROGRAM_FILENAME}
DBGNAME = debug/$(EXENAME) DBGNAME = debug/$(EXENAME)
PKGDIR = usr/games PKGDIR = $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
DBGDIR = usr/lib/debug/$(PKGDIR) DBGDIR = usr/lib/debug/$(PKGDIR)
LINKDIR = $(shell echo "${PACKAGE_LINK_PATH}" | sed -e 's/^\///')
PIXMAPS_DIR = usr/share/pixmaps PIXMAPS_DIR = usr/share/pixmaps
DESKTOP_DIR = usr/share/applications DESKTOP_DIR = usr/share/applications
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)") PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
OS = LINUX=1 OS = LINUX=1
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1") NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng NOOBJDUMP=1 MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)" MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)" MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
# FIXME pkg-config dir hacks
export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
BINDIR := $(DIR)/bin/Linux/Release BINDIR := $(DIR)/bin/Linux/Release
# FIXME pkg-config dir hacks
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile
# export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)" LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
# Some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves
PKG_CONFIG?=pkg-config
LIBGME_PKGCONFIG?=libgme
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
ifeq ($(LIBGME_LDFLAGS),)
MAKEARGS += LIBGME_LDFLAGS=-lgme
endif
build: build:
$(MKDIR) $(BINDIR)/debug $(MKDIR) $(BINDIR)/debug
$(MAKE) -C $(DIR)/src $(MAKEARGS) $(MAKE) -C $(DIR)/src $(MAKEARGS)
@ -90,8 +112,8 @@ binary-arch:
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE) $(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE) $(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
# Install desktop file and banner image # Install desktop file and banner image
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps $(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps/${PROGRAM_FILENAME}.png
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications $(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications/${PROGRAM_FILENAME}.desktop
# add compiled binaries to include-binaries # add compiled binaries to include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
@ -100,8 +122,8 @@ binary-arch:
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
# Launchpad only calls binary-arch, so just move everything up
binary: binary-arch #binary: binary-arch
# Generate .desktop specifications # Generate .desktop specifications
echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu
echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu
@ -122,7 +144,7 @@ binary: binary-arch
# dh_installcron # dh_installcron
# dh_installinfo # dh_installinfo
# dh_installman # dh_installman
# dh_link dh_link $(PKGDIR)/$(EXENAME) $(LINKDIR)/$(EXENAME)
dh_compress dh_compress
dh_fixperms dh_fixperms
# dh_perl # dh_perl
@ -133,6 +155,8 @@ binary: binary-arch
dh_md5sums dh_md5sums
dh_builddeb dh_builddeb
binary: binary-arch
clean: clean:
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep $(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
$(RM) $(BINDIR)/* $(RM) $(BINDIR)/*
@ -145,4 +169,4 @@ clean:
$(RM) $(DIR)/debian/files $(RM) $(DIR)/debian/files
$(RM) $(DIR)/debian/source/include-binaries $(RM) $(DIR)/debian/source/include-binaries
.PHONY: all clean binary binary-arch binary-indep build .PHONY: all clean binary binary-indep build

View file

@ -0,0 +1,14 @@
tar-ignore = "assets/*.srb"
tar-ignore = "assets/*.pk3"
tar-ignore = "assets/*.dta"
tar-ignore = "assets/*.wad"
<<<<<<< HEAD:debian-template/source/options
tar-ignore = "assets/*.kart"
=======
>>>>>>> e251f9c230beda984cdcdea7e903d765f1c68f6f:debian-template/source/options
tar-ignore = "assets/debian/${PACKAGE_NAME}-data/*"
tar-ignore = "assets/debian/tmp/*"
tar-ignore = "*.obj"
tar-ignore = "*.dep"
tar-ignore = ".git/*"
tar-ignore = ".git*"

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Name=${PROGRAM_NAME}
Comment=${PROGRAM_DESCRIPTION}
Encoding=UTF-8
Exec=${PACKAGE_INSTALL_PATH}/${PROGRAM_FILENAME}
Icon=/usr/share/pixmaps/${PROGRAM_FILENAME}.png
Terminal=false
Type=Application
StartupNotify=false
Categories=Application;Game;

11
debian/README.Debian vendored
View file

@ -1,11 +0,0 @@
srb2 for Debian
---------------
SRB2 Debian package!
Hi there, to rebuild these packages just use debuild in the root source directory (not /src!).
You can build these with or without a key if you want, but if you want to put these on a repo,
generate your own GnuPG key as per the https://help.ubuntu.com/community/GnuPrivacyGuardHowto
instructions and pass the -k<keyid> command to debuild. Make sure you export the key footprint
and give them to your users to install with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300

5
debian/changelog vendored
View file

@ -1,5 +0,0 @@
srb2 (2.0.6-5) maverick; urgency=high
* Initial proper release..
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300

42
debian/control vendored
View file

@ -1,42 +0,0 @@
# SRB2 Debian package control file.
Source: srb2
Section: games
Priority: extra
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com>
Build-Depends: debhelper (>= 7.0.50~),
libsdl2-dev,
libsdl2-mixer-dev,
libpng12-dev (>= 1.2.7),
libglu1-dev | libglu-dev,
libosmesa6-dev | libgl-dev,
nasm [i386]
Standards-Version: 3.8.4
Homepage: http://www.srb2.org
Package: srb2
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14)
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. While SRB2 isn't fully completed, it already
features tons of levels, enemies, speed, and quite a lot
of the fun that the original Sonic games provided.
Package: srb2-dbg
Architecture: any
# FIXME: should be Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
Depends: libc6, ${misc:Depends}, srb2-data (= 2.1.14), srb2
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. While SRB2 isn't fully completed, it already
features tons of levels, enemies, speed, and quite a lot
of the fun that the original Sonic games provided.
This is a debug binary, its symbols will be loaded by gdb
when the user starts the game with gdb for debugging.

1
debian/docs vendored
View file

@ -1 +0,0 @@
README.md

10
debian/srb2.desktop vendored
View file

@ -1,10 +0,0 @@
[Desktop Entry]
Name=Sonic Robo Blast 2
Comment=A free 3D Sonic the Hedgehog fan-game built using a modified ver. of the Doom Legacy source port
Encoding=UTF-8
Exec=srb2
Icon=/usr/share/pixmaps/srb2.png
Terminal=false
Type=Application
StartupNotify=false
Categories=Application;Game;

166
debian_template.sh Normal file
View file

@ -0,0 +1,166 @@
#!/bin/bash
# Deployer for Travis-CI
# Debian package templating
#
# Call this script BEFORE running debuild!
# source ./debian_template.sh [clean] [main/asset]
#
# Before running this script,
# you should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
# the identity of the key you will use to sign the package.
#
# Get script's actual path
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Recursive function for directory crawling
# $1 = Directory root to crawl
# $2 = Code to eval on file
# $3 = Code to eval on directory
# Exposes $dirtails, $dirlevel, and $dirtailname
dirlevel=0 # initialize
dirtails=()
# Utility function to make dira/dirb/dirc string
makedirtailname () {
dirtailname=""
for tail in $dirtails; do
if [[ "$dirtailname" == "" ]]; then
dirtailname="/$tail";
else
dirtailname="$dirtailname/$tail";
fi;
done;
}
evaldirectory () {
if [ -d "$1" ]; then
# Set contextual variables
# dirtails is an array of directory basenames after the crawl root
if (( $dirlevel > 0 )); then
dirtails+=( "$(basename $1)" );
else
dirtails=();
fi;
dirlevel=$((dirlevel+1));
# Generate directory path after the crawl root
makedirtailname;
# Eval our directory with the latest contextual info
# Don't eval on root
if (( $dirlevel > 1 )) && [[ "$3" != "" ]]; then
eval "$3";
fi;
# Iterate entries
for name in $1/*; do
if [ -d "$name" ]; then
# Name is a directory, but don't eval yet
# Recurse so our vars are updated
evaldirectory "$name" "$2" "$3";
# Decrement our directory level and remove a dirtail
unset 'dirtails[ ${#dirtails[@]}-1 ]';
dirlevel=$((dirlevel-1));
makedirtailname;
else
# Name is a file
if [ -f "$name" ] && [[ "$2" != "" ]]; then
eval "$2";
fi;
fi;
done;
# Reset our variables; we're done iterating
if (( $dirlevel == 1 )); then
dirlevel=0;
fi;
fi;
}
#
# Initialize package parameter defaults
#
if [[ "$__DEBIAN_PARAMETERS_INITIALIZED" != "1" ]]; then
. ${DIR}/deployer/travis/deployer_defaults.sh;
fi;
# Clean up after ourselves; we only expect to run this script once
# during buildboting
__DEBIAN_PARAMETERS_INITIALIZED=0
# for envsubst
export __PACKAGE_DATETIME="$(date '+%a, %d %b %Y %H:%M:%S %z')"
export __PACKAGE_DATETIME_DIGIT="$(date -u '+%Y%m%d%H%M%S')"
if [[ "$PACKAGE_REVISION" == "" ]]; then
PACKAGE_REVISION="-$__PACKAGE_DATETIME_DIGIT";
__PACKAGE_REVISION_BY_DATE=1;
export PACKAGE_REVISION=${PACKAGE_REVISION}; # for envsubst
fi;
#
# Clean the old debian/ directories
#
if [[ "$1" == "clean" ]]; then
toclean=$2;
else
toclean=$1;
fi;
if [[ "$toclean" == "" ]] || [[ "$toclean" == "main" ]]; then
echo "Cleaning main package scripts";
if [[ ! -f ${DIR}/debian ]]; then
rm -rf ${DIR}/debian;
fi;
fi;
if [[ "$toclean" == "" ]] || [[ "$toclean" == "asset" ]]; then
echo "Cleaning asset package scripts";
if [[ ! -f ${DIR}/assets/debian ]]; then
rm -rf ${DIR}/assets/debian;
fi;
fi;
#
# Make new templates
#
if [[ "$1" != "clean" ]]; then
totemplate=$1;
# HACK: ${shlibs:Depends} in the templates make the templating fail
# So just define replacemment variables
export SHLIBS_DEPENDS=${SHLIBS_DEPENDS};
export MISC_DEPENDS=${MISC_DEPENDS};
export DEBFILEVAR='$$file'; # used in assets/debian/rules
# Package parameters are exported for envsubst in deployer_defaults.sh
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "main" ]]; then
echo "Generating main package scripts";
fromroot=${DIR}/debian-template;
toroot=${DIR}/debian;
mkdir ${toroot};
evaldirectory ${fromroot} \
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
"mkdir \"${toroot}\${dirtailname}\"";
fi;
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "asset" ]]; then
echo "Generating asset package scripts";
fromroot=${DIR}/assets/debian-template;
toroot=${DIR}/assets/debian;
mkdir ${toroot};
# Root dir to crawl; file eval; directory eval
evaldirectory ${fromroot} \
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
"mkdir \"${toroot}\${dirtailname}\"";
fi;
fi;
if [[ "$__DPL_ACTIVE" != "1" ]] && [[ "$__PACKAGE_REVISION_BY_DATE" == "1" ]]; then
unset PACKAGE_REVISION; # so we can reset the date on subsequent runs
fi;

View file

@ -0,0 +1,195 @@
@setlocal enableextensions enabledelayedexpansion
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Appveyor Deployer
: See appveyor.yml for default variables
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Evaluate whether we should be deploying
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if not [%DPL_ENABLED%] == [1] (
echo Deployer is not enabled...
exit /b
)
: Don't do DD installs because fmodex DLL handling is not implemented.
if [%CONFIGURATION%] == [DD] (
echo Deployer does not support DD builds...
exit /b
)
if [%CONFIGURATION%] == [DD64] (
echo Deployer does not support DD builds...
exit /b
)
: Substring match from https://stackoverflow.com/questions/7005951/batch-file-find-if-substring-is-in-string-not-in-a-file
: The below line says "if deployer is NOT in string"
: Note that APPVEYOR_REPO_BRANCH for pull request builds is the BASE branch that PR is merging INTO
if x%APPVEYOR_REPO_BRANCH:deployer=%==x%APPVEYOR_REPO_BRANCH% (
if not [%APPVEYOR_REPO_TAG%] == [true] (
echo Deployer is enabled but we are not in a release tag or a 'deployer' branch...
exit /b
) else (
if not [%DPL_TAG_ENABLED%] == [1] (
echo Deployer is not enabled for release tags...
exit /b
)
)
)
: Release tags always get optional assets (music.dta)
if [%APPVEYOR_REPO_TAG%] == [true] (
set "ASSET_FILES_OPTIONAL_GET=1"
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Get asset archives
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist "C:\Users\appveyor\srb2_cache\archives\" (
if [%ASSET_CLEAN%] == [1] (
echo Cleaning asset archives...
rmdir /s /q "C:\Users\appveyor\srb2_cache\archives"
)
)
if not exist "C:\Users\appveyor\srb2_cache\archives\" mkdir "C:\Users\appveyor\srb2_cache\archives"
goto EXTRACT_ARCHIVES
::::::::::::::::::::::::::::::::
: ARCHIVE_NAME_PARTS
: Call this like a function. %archivepath% is the path to extract parts from.
::::::::::::::::::::::::::::::::
for %%a in (%archivepath%) do (
set "file=%%~fa"
set "filepath=%%~dpa"
set "filename=%%~nxa"
)
set "localarchivepath=C:\Users\appveyor\srb2_cache\archives\%filename%"
goto EOF
::::::::::::::::::::::::::::::::
: EXTRACT_ARCHIVES
::::::::::::::::::::::::::::::::
set "archivepath=%ASSET_ARCHIVE_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_PATH_LOCAL=%localarchivepath%"
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATH%" -FileName "%localarchivepath%"
set "archivepath=%ASSET_ARCHIVE_PATCH_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_PATCH_PATH_LOCAL=%localarchivepath%"
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATCH_PATH%" -FileName "%localarchivepath%"
if not [%X86_64%] == [1] (
set "archivepath=%ASSET_ARCHIVE_X86_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_X86_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X86_PATH%" -FileName "!localarchivepath!"
)
if [%X86_64%] == [1] (
set "archivepath=%ASSET_ARCHIVE_X64_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_X64_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X64_PATH%" -FileName "!localarchivepath!"
)
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
set "archivepath=%ASSET_ARCHIVE_OPTIONAL_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_OPTIONAL_PATH%" -FileName "!localarchivepath!"
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Build the installers
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
mkdir "assets\installer"
mkdir "assets\patch"
7z x -y "%ASSET_ARCHIVE_PATH_LOCAL%" -o"assets\installer" >null
7z x -y "%ASSET_ARCHIVE_PATCH_PATH_LOCAL%" -o"assets\patch" >null
: Copy optional files to full installer (music.dta)
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
7z x -y "%ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL%" -o"assets\installer" >null
)
: Copy EXE -- BUILD_PATH is from appveyor.yml
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\installer" /XF "*.debug" ".gitignore"
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\patch" /XF "*.debug" ".gitignore"
: Are we building DD? (we were supposed to exit earlier!)
if [%CONFIGURATION%] == [DD] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
if [%CONFIGURATION%] == [DD64] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
: If we are not a release tag, suffix the filename
if not [%APPVEYOR_REPO_TAG%] == [true] (
set "INSTALLER_SUFFIX=-%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%"
) else (
set "INSTALLER_SUFFIX="
)
if not [%X86_64%] == [1] ( goto X86_INSTALL )
::::::::::::::::::::::::::::::::
: X64_INSTALL
::::::::::::::::::::::::::::::::
: Extract DLL binaries
7z x -y "%ASSET_ARCHIVE_X64_PATH_LOCAL%" -o"assets\installer" >null
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
7z x -y "!ASSET_ARCHIVE_X64_PATH_LOCAL!" -o"assets\patch" >null
)
: Build the installer
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
: Build the patch
7z a "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
: Upload artifacts
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe"
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip"
: We only do x86 OR x64, one at a time, so exit now.
goto EOF
::::::::::::::::::::::::::::::::
: X86_INSTALL
::::::::::::::::::::::::::::::::
: Extract DLL binaries
7z x -y "%ASSET_ARCHIVE_X86_PATH_LOCAL%" -o"assets\installer" >null
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
7z x -y "!ASSET_ARCHIVE_X86_PATH_LOCAL!" -o"assets\patch" >null
)
: Build the installer
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
: Build the patch
7z a "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
: Upload artifacts
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe"
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip"
: We only do x86 OR x64, one at a time, so exit now
goto EOF
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: EOF
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
endlocal

157
deployer/travis/deployer.sh Normal file
View file

@ -0,0 +1,157 @@
#!/bin/bash
# Deployer for Travis-CI
# Initialization
#
# Performs validity checks to ensure that Deployer is allowed to run
# e.g., is an FTP hostname specified? Are we whitelisted by OSNAMES and BRANCHES?
#
# Set these environment variables in your Travis-CI settings, where they are stored securely.
# See other shell scripts for more options.
#
# DPL_ENABLED = 1 (leave blank to disable)
# DPL_TAG_ENABLED = 1 (run Deployer on all tags)
# DPL_JOB_ENABLE_ALL = 1 (run Deployer on all jobs; leave blank to act on specific jobs, see below)
# DPL_JOBNAMES = name1,name2 (whitelist of job names to allow uploading; leave blank to upload from all jobs)
# DPL_OSNAMES = osx (whitelist of OS names to allow uploading; leave blank to upload from all OSes)
# DPL_BRANCHES = master,branch1,branch2 (whitelist of branches to upload; leave blank to upload all branches)
#
# To enable Deployer on specific jobs, set _DPL_JOB_ENABLED=1 for that job. Example:
# - matrix:
# - os: osx
# env:
# - _DPL_JOB_ENABLED=1
#
# DO NOT set __DPL_ACTIVE, because that would bypass these validity checks.
# Validate Deployer state
if [[ "$DPL_ENABLED" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
# Test for base eligibility:
# Are we in a deployer branch? Or
# Are we in a release tag AND DPL_TAG_ENABLED=1?
if [[ $TRAVIS_BRANCH == *"deployer"* ]]; then
__DPL_BASE_ELIGIBLE=1;
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
fi;
if [[ "$TRAVIS_TAG" != "" ]] && [[ "$DPL_TAG_ENABLED" == "1" ]]; then
__DPL_BASE_ELIGIBLE=1;
__DPL_TAG_ELIGIBLE=1;
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
fi;
# Logging message for trigger word
if [[ "$__DPL_TAG_ELIGIBLE" != "1" ]] && [[ "$DPL_TRIGGER" != "" ]]; then
echo "Testing for trigger $DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
echo "[${DPL_TRIGGER}]";
echo "[${DPL_TRIGGER}-${_DPL_JOB_NAME}]";
echo "[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]";
fi;
#
# Search for the trigger word
# Force enable if release tags are eligible
#
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_TRIGGER" == "" ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER]"* ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${_DPL_JOB_NAME}]"* ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]"* ]]; then
#
# Whitelist by branch name
# Force enable if release tags are eligible
#
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
# Set this so we only early-terminate builds when we are specifically deploying
# Trigger string and branch are encompassing conditions; the rest are job-specific
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
# because we're filtering non-deployer jobs.
#
# __DPL_TRY_TERMINATE_EARLY is invalidated in .travis.yml if __DPL_ACTIVE=1
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
__DPL_TRY_TERMINATE_EARLY=1;
fi;
#
# Is the job enabled for deployment?
#
if [[ "$DPL_JOB_ENABLE_ALL" == "1" ]] || [[ "$_DPL_JOB_ENABLED" == "1" ]]; then
#
# Whitelist by job names
#
if [[ "$DPL_JOBNAMES" == "" ]] || [[ "$_DPL_JOB_NAME" == "" ]] || [[ $DPL_JOBNAMES == *"$_DPL_JOB_NAME"* ]]; then
#
# Whitelist by OS names
#
if [[ "$DPL_OSNAMES" == "" ]] || [[ $DPL_OSNAMES == *"$TRAVIS_OS_NAME"* ]]; then
# Base Deployer is eligible for becoming active
# Are we building for Linux?
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]] || [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
__DPL_DEBIAN_ACTIVE=1;
fi;
fi;
fi;
# Now check for deployment targets
if [[ "$_DPL_FTP_TARGET" == "1" ]] && [[ "$DPL_FTP_HOSTNAME" != "" ]]; then
if [[ "$TRAVIS_OS_HOST" == "linux" ]] && [[ "$DPL_FTP_PROTOCOL" == "ftp" ]]; then
echo "Non-secure FTP will not work on Linux Travis-CI jobs!";
echo "Try SFTP or another target. Details:";
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
else
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] || [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_BINARY" == "1" ]]; then
echo "Deployer FTP target is enabled";
__DPL_FTP_ACTIVE=1;
else
echo "Deployer FTP target cannot be enabled: You must specify _DPL_PACKAGE_BINARY=1,";
echo "and/or _DPL_BINARY=1 in your job's environment variables.";
fi;
fi;
fi;
if [[ "$_DPL_DPUT_TARGET" == "1" ]] && [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] \
&& [[ "$DPL_DPUT_INCOMING" != "" ]]; then
if [[ "$DPL_DPUT_METHOD" == "ftp" ]]; then
echo "DPUT will not work with non-secure FTP on Linux Travis-CI jobs!";
echo "Try SFTP or another method for DPUT. Details:";
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
else
echo "Deployer DPUT target is enabled";
__DPL_DPUT_ACTIVE=1;
fi;
fi;
# If any deployment targets are active, then so is the Deployer at large
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
__DPL_ACTIVE=1;
fi;
fi;
fi;
fi;
fi;
else
if [[ "$DPL_TRIGGER" != "" ]]; then
echo "Testing for global trigger [$DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
fi;
if [[ "$DPL_TRIGGER" != "" ]] && [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER"* ]]; then
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
# because we're filtering non-deployer jobs.
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
# Assume that some job received the trigger, so mark this for early termination
__DPL_TRY_TERMINATE_EARLY=1;
fi;
fi;
fi;
fi;
fi;
if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Deployer is active in another job";
fi;
if [[ "$__DPL_TRY_TERMINATE_EARLY" != "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Deployer is not active";
fi;

View file

@ -0,0 +1,190 @@
#!/bin/bash
# Deployer for Travis-CI
# Build Script
#
# Builds the required targets depending on which sub-modules are enabled
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
echo "Building Debian package(s)"
sudo apt-get install devscripts debhelper fakeroot secure-delete expect;
# Build source packages first, since they zip up the entire source folder,
# binaries and all
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
. ../debian_template.sh main;
OLDPWD=$PWD; # [repo]/build
cd ..; # repo root
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
echo "Building main source Debian package";
expect <(cat <<EOD
spawn debuild -S -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building main binary Debian package";
expect <(cat <<EOD
spawn debuild -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
cd $OLDPWD;
fi;
# Also an asset package
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
. ../debian_template.sh asset;
OLDPWD=$PWD; # [repo]/build
cd ../assets;
# make sure the asset files exist, download them if they don't
#echo "Checking asset files for asset Debian package";
#debuild -T build;
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
echo "Building asset source Debian package";
expect <(cat <<EOD
spawn debuild -S -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building asset binary Debian package";
expect <(cat <<EOD
spawn debuild -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
cd $OLDPWD;
fi;
# Now sign our packages
if [[ "$DPL_PGP_KEY_PRIVATE" != "" ]] && [[ "$DPL_PGP_KEY_PASSPHRASE" != "" ]]; then
# Get the key to sign
# Do this AFTER debuild so that we can specify the passphrase in command line
echo "$DPL_PGP_KEY_PRIVATE" | base64 --decode > key.asc;
echo "$DPL_PGP_KEY_PASSPHRASE" > phrase.txt;
gpg --import key.asc;
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
echo "Signing main package(s)";
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..; # parent of repo root
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*.changes; do
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
done;
done;
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
echo "Signing asset package(s)";
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..; # repo root
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*.changes; do
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
done;
done;
cd $OLDPWD;
fi;
# Delete the keys :eyes:
srm key.asc;
srm phrase.txt;
fi;
fi;
# all other OSes
if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then
#
# Check for binary building
#
if [[ "$_DPL_BINARY" == "1" ]]; then
echo "Building a Binary";
make -k;
fi;
#
# Check for package building
#
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building a Package";
# Make an OSX package; superuser is required for library bundling
#
# HACK: OSX packaging can't write libraries to .app package unless we're superuser
# because the original library files don't have WRITE permission
# Bug may be sidestepped by using CHMOD_BUNDLE_ITEMS=TRUE
# But I don't know where this is set. Not `cmake -D...` because this var is ignored.
# https://cmake.org/Bug/view.php?id=9284
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
sudo make -k package;
else
# Some day, when Windows is supported, we'll just make a standard package
make -k package;
fi;
fi;
fi;
fi;

View file

@ -0,0 +1,105 @@
#!/bin/bash
# Deployer for Travis-CI
# Default Variables
#
# Here are all of the user-set variables used by Deployer.
# See the "Cross-platform deployment" page on SRB2 Wiki for documentation.
# Core Parameters
: ${DPL_ENABLED} # Enable Deployer behavior; must be set for any deployment activity
: ${DPL_TAG_ENABLED} # Trigger Deployer for all tag releases
: ${DPL_JOB_ENABLE_ALL} # Enable all jobs for deployment
: ${DPL_TERMINATE_TESTS} # Terminate all build test jobs (used in .travis.yml)
: ${DPL_TRIGGER} # Use a [word] in the commit message to trigger Deployer
: ${DPL_JOBNAMES} # Trigger Deployer by job name
: ${DPL_OSNAMES} # Trigger Deployer by OS name (osx,linux)
: ${DPL_BRANCHES} # Trigger Deployer by git branch name
# Job Parameters
: ${_DPL_JOB_ENABLED} # Enable Deployer for this specific job. DPL_ENABLED must be set too.
: ${_DPL_JOB_NAME} # Identifier for the job, used for logging and trigger word matching
: ${_DPL_FTP_TARGET} # Deploy to FTP
: ${_DPL_DPUT_TARGET} # Deploy to DPUT
: ${_DPL_PACKAGE_SOURCE} # Build packages into a Source distribution. Linux only.
: ${_DPL_PACKAGE_BINARY} # Build packages into a Binary distribution.
: ${_DPL_PACKAGE_MAIN:=1} # Build main installation package. Linux only; OS X assumes this.
: ${_DPL_PACKAGE_ASSET} # Build asset installation package. Linux only.
# Asset File Parameters
: ${ASSET_ARCHIVE_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z}
: ${ASSET_ARCHIVE_OPTIONAL_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z}
: ${ASSET_FILES_HASHED:=srb2.srb patch.kart gfx.kart textures.kart chars.kart maps.kart}
: ${ASSET_FILES_DOCS:=README.txt HISTORY.txt LICENSE.txt LICENSE-3RD-PARTY.txt}
: ${ASSET_FILES_OPTIONAL_GET:=0}
# FTP Parameters
: ${DPL_FTP_PROTOCOL}
: ${DPL_FTP_USER}
: ${DPL_FTP_PASS}
: ${DPL_FTP_HOSTNAME}
: ${DPL_FTP_PORT}
: ${DPL_FTP_PATH}
# DPUT Parameters
: ${DPL_DPUT_DOMAIN:=ppa.launchpad.net}
: ${DPL_DPUT_METHOD:=sftp}
: ${DPL_DPUT_INCOMING}
: ${DPL_DPUT_LOGIN:=anonymous}
: ${DPL_SSH_KEY_PRIVATE} # Base64-encoded private key file. Used to sign repository uploads
: ${DPL_SSH_KEY_PASSPHRASE} # Decodes the private key file.
# Package Parameters
: ${PACKAGE_NAME:=srb2kart}
: ${PACKAGE_VERSION:=1.0.2}
: ${PACKAGE_SUBVERSION} # Highly recommended to set this to reflect the distro series target (e.g., ~18.04bionic)
: ${PACKAGE_REVISION} # Defaults to UTC timestamp
: ${PACKAGE_INSTALL_PATH:=/usr/games/SRB2Kart}
: ${PACKAGE_LINK_PATH:=/usr/games}
: ${PACKAGE_DISTRO:=trusty}
: ${PACKAGE_URGENCY:=high}
: ${PACKAGE_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
: ${PACKAGE_GROUP_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
: ${PACKAGE_WEBSITE:=<https://mb.srb2.org/showthread.php?p=802695>}
: ${PACKAGE_ASSET_MINVERSION:=1.0.1} # Number this the version BEFORE the actual required version, because we do a > check
: ${PACKAGE_ASSET_MAXVERSION:=1.0.3} # Number this the version AFTER the actual required version, because we do a < check
: ${PROGRAM_NAME:=Sonic Robo Blast 2 Kart}
: ${PROGRAM_VENDOR:=Kart Krew}
: ${PROGRAM_VERSION:=1.0.2}
: ${PROGRAM_DESCRIPTION:=A kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2.}
: ${PROGRAM_FILENAME:=srb2kart}
: ${DPL_PGP_KEY_PRIVATE} # Base64-encoded private key file. Used to sign Debian packages
: ${DPL_PGP_KEY_PASSPHRASE} # Decodes the private key file.
# Export Asset and Package Parameters for envsubst templating
export ASSET_ARCHIVE_PATH="${ASSET_ARCHIVE_PATH}"
export ASSET_ARCHIVE_OPTIONAL_PATH="${ASSET_ARCHIVE_OPTIONAL_PATH}"
export ASSET_FILES_HASHED="${ASSET_FILES_HASHED}"
export ASSET_FILES_DOCS="${ASSET_FILES_DOCS}"
export ASSET_FILES_OPTIONAL_GET="${ASSET_FILES_OPTIONAL_GET}"
export PACKAGE_NAME="${PACKAGE_NAME}"
export PACKAGE_VERSION="${PACKAGE_VERSION}"
export PACKAGE_SUBVERSION="${PACKAGE_SUBVERSION}" # in case we have this
export PACKAGE_REVISION="${PACKAGE_REVISION}"
export PACKAGE_ASSET_MINVERSION="${PACKAGE_ASSET_MINVERSION}"
export PACKAGE_ASSET_MAXVERSION="${PACKAGE_ASSET_MAXVERSION}"
export PACKAGE_INSTALL_PATH="${PACKAGE_INSTALL_PATH}"
export PACKAGE_LINK_PATH="${PACKAGE_LINK_PATH}"
export PACKAGE_DISTRO="${PACKAGE_DISTRO}"
export PACKAGE_URGENCY="${PACKAGE_URGENCY}"
export PACKAGE_NAME_EMAIL="${PACKAGE_NAME_EMAIL}"
export PACKAGE_GROUP_NAME_EMAIL="${PACKAGE_GROUP_NAME_EMAIL}"
export PACKAGE_WEBSITE="${PACKAGE_WEBSITE}"
export PROGRAM_NAME="${PROGRAM_NAME}"
export PROGRAM_VERSION="${PROGRAM_VERSION}"
export PROGRAM_DESCRIPTION="${PROGRAM_DESCRIPTION}"
export PROGRAM_FILENAME="${PROGRAM_FILENAME}"
# This file is called in debian_template.sh, so mark our completion so we don't run it again
__DEBIAN_PARAMETERS_INITIALIZED=1

View file

@ -0,0 +1,133 @@
#!/bin/bash
# Deployer for Travis-CI
# DPUT uploader (e.g., Launchpad PPA)
#
if [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
# Install APT dependencies
# paramiko required for ssh
sudo apt-get install python-paramiko expect dput; # python-pip
#pip install paramiko;
# Output the DPUT config
# Dput only works if you're using secure FTP, so that's what we default to.
cat > "./dput.cf" << EOM
[deployer]
fqdn = ${DPL_DPUT_DOMAIN}
method = ${DPL_DPUT_METHOD}
incoming = ${DPL_DPUT_INCOMING}
login = ${DPL_DPUT_LOGIN}
allow_unsigned_uploads = 0
EOM
# Output SSH config
# Don't let SSH prompt us for untrusted hosts
cat >> "./ssh_config" << EOM
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
PubKeyAuthentication yes
IdentityFile ${PWD}/key.private
IdentitiesOnly yes
EOM
sudo sh -c "cat < ${PWD}/ssh_config >> /etc/ssh/ssh_config";
# Get the private key
echo "$DPL_SSH_KEY_PRIVATE" | base64 --decode > key.private;
chmod 700 ./key.private;
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..;
# Enter passphrase if required
for n in ${PACKAGEFILENAMES}; do
for f in $n*.changes; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
expect <(cat <<EOD
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
expect "Enter passphrase for key"
send "${DPL_SSH_KEY_PASSPHRASE}\r"
interact
EOD
);
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..;
# Enter passphrase if required
for n in ${PACKAGEFILENAMES}; do
for f in $n*.changes; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
expect <(cat <<EOD
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
expect "Enter passphrase for key"
send "${DPL_SSH_KEY_PASSPHRASE}\r"
interact
EOD
);
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
srm ./key.private;
fi;

View file

@ -0,0 +1,137 @@
#!/bin/bash
# Deployer for Travis-CI
# FTP Uploader
#
# Package files are uploaded to, e.g., ftp://username:password@example.com:21/path/to/upload/STJr/SRB2/master/460873812-151.1
# With file `commit.txt` and folder(s) `bin` and `package`
#
# Set these environment variables in your Travis-CI settings, where they are stored securely.
# See other shell scripts for more options.
#
# DPL_FTP_PROTOCOL = ftp (ftp or sftp or ftps or however your FTP URI begins)
# DPL_FTP_USER = username
# DPL_FTP_PASS = password
# DPL_FTP_HOSTNAME = example.com
# DPL_FTP_PORT = 21
# DPL_FTP_PATH = path/to/upload (do not add trailing slash)
if [[ "$__DPL_FTP_ACTIVE" == "1" ]]; then
if [[ "$TRAVIS_JOB_NAME" != "" ]]; then
JOBNAME=$TRAVIS_JOB_NAME;
else
if [[ "$_DPL_JOB_NAME" != "" ]]; then
JOBNAME=$_DPL_JOB_NAME;
else
JOBNAME=$TRAVIS_OS_NAME;
fi;
fi;
# Generate commit.txt file
echo "Travis-CI Build $TRAVIS_OS_NAME - $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH - $TRAVIS_JOB_NUMBER - $JOBNAME" > "commit.txt";
echo "Job ID $TRAVIS_JOB_ID" >> "commit.txt";
echo "" >> "commit.txt";
echo "Commit $TRAVIS_COMMIT" >> "commit.txt";
echo "$TRAVIS_COMMIT_MESSAGE" >> "commit.txt";
echo "" >> "commit.txt";
# Initialize FTP parameters
if [[ "$DPL_FTP_PORT" == "" ]]; then
DPL_FTP_PORT=21;
fi;
if [[ "$DPL_FTP_PROTOCOL" == "" ]]; then
DPL_FTP_PROTOCOL=ftp;
fi;
__DPL_FTP_LOCATION=$DPL_FTP_PROTOCOL://$DPL_FTP_HOSTNAME:$DPL_FTP_PORT/$DPL_FTP_PATH/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_JOB_ID-$TRAVIS_JOB_NUMBER-$JOBNAME;
# Upload to FTP!
echo "Uploading to FTP...";
curl --ftp-create-dirs -T "commit.txt" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/commit.txt";
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..;
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/main/$f";
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..;
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/asset/$f";
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
else
if [[ "$_DPL_BINARY" == "1" ]]; then
find bin -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
sudo rm -r package/_CPack_Packages
find package -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
fi;
fi;
fi

43
libs/DLL-README.txt Normal file
View file

@ -0,0 +1,43 @@
# SRB2Kart - Which DLLs do I need to bundle?
Updated 12/4/2018 (v2.1.21)
Here are the required DLLs, per build. For each architecture, copy all the binaries from these folders:
* libs\dll-binaries\[i686/x86_64]
* libs\SDL2\[i686/x86_64]...\bin
* libs\SDL2_mixer\[i686/x86_64]...\bin
and don't forget to build r_opengl.dll for srb2dd.
## srb2kart, 32-bit
* libs\dll-binaries\i686\exchndl.dll
* libs\dll-binaries\i686\libgme.dll
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
* libs\SDL2\i686-w64-mingw32\bin\SDL2.dll
* libs\SDL2_mixer\i686-w64-mingw32\bin\*.dll (get everything)
## srb2kart, 64-bit
* libs\dll-binaries\x86_64\exchndl.dll
* libs\dll-binaries\x86_64\libgme.dll
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
* libs\SDL2\x86_64-w64-mingw32\bin\SDL2.dll
* libs\SDL2_mixer\x86_64-w64-mingw32\bin\*.dll (get everything)
## srb2kartdd, 32-bit
* libs\dll-binaries\i686\exchndl.dll
* libs\dll-binaries\i686\fmodex.dll
* libs\dll-binaries\i686\libgme.dll
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
* r_opengl.dll (build this from make)
## srb2kartdd, 64-bit
* libs\dll-binaries\x86_64\exchndl.dll
* libs\dll-binaries\x86_64\fmodex.dll
* libs\dll-binaries\x86_64\libgme.dll
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
* r_opengl.dll (build this from make)

View file

@ -1,6 +1,6 @@
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,12 +1,12 @@
# #
# Makefile for installing the mingw32 version of the SDL library # Makefile for installing the mingw32 version of the SDL library
CROSS_PATH := /usr/local/cross-tools CROSS_PATH := /usr/local
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32 ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
all install: all install:
@echo "Type \"make native\" to install 32-bit to /usr" @echo "Type \"make native\" to install 32-bit to /usr"
@echo "Type \"make cross\" to install 32-bit and 64-bit to CROSS_PATH ($(CROSS_PATH))" @echo "Type \"make cross\" to install 32-bit and 64-bit to $(CROSS_PATH)"
native: native:
make install-package arch=i686-w64-mingw32 prefix=/usr make install-package arch=i686-w64-mingw32 prefix=/usr
@ -22,6 +22,7 @@ install-package:
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \ sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \
chmod 755 $(prefix)/bin/sdl2-config; \ chmod 755 $(prefix)/bin/sdl2-config; \
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \ sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2main.la >$(prefix)/lib/libSDL2main.la; \
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \ sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
else \ else \
echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \ echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \

15
libs/SDL2/SRB2NOTE.txt Normal file
View file

@ -0,0 +1,15 @@
# SDL Development Libaries
Download both the VC and MinGW packages and extract them here.
https://www.libsdl.org/download-2.0.php
## VC Package
* include
* lib
## MinGW Package
* i686-w64-mingw32
* x86_64-w64-mingw32

View file

@ -1,6 +1,91 @@
This is a list of major changes in SDL's version history. This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.9:
---------------------------------------------------------------------------
General:
* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
* Added SDL_GetDisplayOrientation() to return the current display orientation
* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
* Added support for many other popular game controllers
* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
* Added SDL_HasColorKey() to return whether a surface has a colorkey active
* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
* Added SDL_IsTablet() to return whether the application is running on a tablet
* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
Mac OS X:
* Fixed black screen at start on Mac OS X Mojave
Linux:
* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
iOS:
* Fixed Asian IME input
Android:
* Updated required Android SDK to API 26, to match Google's new App Store requirements
* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
* Added support for custom mouse cursors on Android 7.0 and newer
* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX
---------------------------------------------------------------------------
2.0.8:
---------------------------------------------------------------------------
General:
* Added SDL_fmod() and SDL_log10()
* Each of the SDL math functions now has the corresponding float version
* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709
Windows:
* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
* Added resampling support on WASAPI on Windows 7 and above
Windows UWP:
* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on
Mac OS X:
* Added support for the Vulkan SDK for Mac:
https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/
* Added support for OpenGL ES using ANGLE when it's available
Mac OS X / iOS / tvOS:
* Added a Metal 2D render implementation
* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation
iOS:
* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.
iOS / Android:
* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)
Android:
* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant
* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)
* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV
Android / tvOS:
* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.
Linux:
* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to "1"
* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
2.0.7: 2.0.7:
--------------------------------------------------------------------------- ---------------------------------------------------------------------------

View file

@ -4,20 +4,24 @@ Android
Matt Styles wrote a tutorial on building SDL for Android with Visual Studio: Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
The rest of this README covers the old style build process. The rest of this README covers the Android gradle style build process.
If you are using the older ant build process, it is no longer officially
supported, but you can use the "android-project-ant" directory as a template.
================================================================================ ================================================================================
Requirements Requirements
================================================================================ ================================================================================
Android SDK (version 16 or later) Android SDK (version 26 or later)
https://developer.android.com/sdk/index.html https://developer.android.com/sdk/index.html
Android NDK r7 or later Android NDK r15c or later
https://developer.android.com/tools/sdk/ndk/index.html https://developer.android.com/tools/sdk/ndk/index.html
Minimum API level supported by SDL: 10 (Android 2.3.3) Minimum API level supported by SDL: 14 (Android 4.0.1)
Joystick support is available for API level >= 12 devices.
================================================================================ ================================================================================
How the port works How the port works
@ -31,15 +35,12 @@ Joystick support is available for API level >= 12 devices.
- This eventually produces a standard Android .apk package - This eventually produces a standard Android .apk package
The Android Java code implements an "Activity" and can be found in: The Android Java code implements an "Activity" and can be found in:
android-project/src/org/libsdl/app/SDLActivity.java android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
The Java code loads your game code, the SDL shared library, and The Java code loads your game code, the SDL shared library, and
dispatches to native functions implemented in the SDL library: dispatches to native functions implemented in the SDL library:
src/core/android/SDL_android.c src/core/android/SDL_android.c
Your project must include some glue code that starts your main() routine:
src/main/android/SDL_android_main.c
================================================================================ ================================================================================
Building an app Building an app
@ -74,71 +75,30 @@ For more complex projects, follow these instructions:
1. Copy the android-project directory wherever you want to keep your projects 1. Copy the android-project directory wherever you want to keep your projects
and rename it to the name of your project. and rename it to the name of your project.
2. Move or symlink this SDL directory into the "<project>/jni" directory 2. Move or symlink this SDL directory into the "<project>/app/jni" directory
3. Edit "<project>/jni/src/Android.mk" to include your source files 3. Edit "<project>/app/jni/src/Android.mk" to include your source files
4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
If you want to use the Eclipse IDE, skip to the Eclipse section below. 4a. If you want to use Android Studio, simply open your <project> directory and start building.
5. Create "<project>/local.properties" and use that to point to the Android SDK directory, by writing a line with the following form: 4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
sdk.dir=PATH_TO_ANDROID_SDK
6. Run 'ant debug' in android/project. This compiles the .java and eventually
creates a .apk with the native code embedded
7. 'ant debug install' will push the apk to the device or emulator (if connected)
Here's an explanation of the files in the Android project, so you can customize them: Here's an explanation of the files in the Android project, so you can customize them:
android-project/ android-project/app
AndroidManifest.xml - package manifest. Among others, it contains the class name build.gradle - build info including the application version and SDK
of the main Activity and the package name of the application. src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
build.properties - empty
build.xml - build description file, used by ant. The actual application name
is specified here.
default.properties - holds the target ABI for the application, android-10 and up
project.properties - holds the target ABI for the application, android-10 and up
local.properties - holds the SDK path, you should change this to the path to your SDK
jni/ - directory holding native code jni/ - directory holding native code
jni/Android.mk - Android makefile that can call recursively the Android.mk files jni/Application.mk - Application JNI settings, including target platform and STL library
in all subdirectories jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
jni/SDL/ - (symlink to) directory holding the SDL library files jni/SDL/ - (symlink to) directory holding the SDL library files
jni/SDL/Android.mk - Android makefile for creating the SDL shared library jni/SDL/Android.mk - Android makefile for creating the SDL shared library
jni/src/ - directory holding your C/C++ source jni/src/ - directory holding your C/C++ source
jni/src/Android.mk - Android makefile that you should customize to include your jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
source code and any library references src/main/assets/ - directory holding asset files for your application
res/ - directory holding resources for your application src/main/res/ - directory holding resources for your application
res/drawable-* - directories holding icons for different phone hardware. Could be src/main/res/mipmap-* - directories holding icons for different phone hardware
one dir called "drawable". src/main/res/values/strings.xml - strings used in your application, including the application name
res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout. src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.
We don't need it because we use the SDL video output.
res/values/strings.xml - strings used in your application, including the application name
shown on the phone.
src/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding
to SDL. Be very careful changing this, as the SDL library relies
on this implementation.
================================================================================
Build an app with static linking of libSDL
================================================================================
This build uses the Android NDK module system.
Instructions:
1. Copy the android-project directory wherever you want to keep your projects
and rename it to the name of your project.
2. Rename "<project>/jni/src/Android_static.mk" to "<project>/jni/src/Android.mk"
(overwrite the existing one)
3. Edit "<project>/jni/src/Android.mk" to include your source files
4. create and export an environment variable named NDK_MODULE_PATH that points
to the parent directory of this SDL directory. e.g.:
export NDK_MODULE_PATH="$PWD"/..
5. Edit "<project>/src/org/libsdl/app/SDLActivity.java" and remove the call to
System.loadLibrary("SDL2").
6. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
================================================================================ ================================================================================
@ -171,25 +131,23 @@ Here's an example of a minimal class file:
Then replace "SDLActivity" in AndroidManifest.xml with the name of your Then replace "SDLActivity" in AndroidManifest.xml with the name of your
class, .e.g. "MyGame" class, .e.g. "MyGame"
================================================================================ ================================================================================
Customizing your application icon Customizing your application icon
================================================================================ ================================================================================
Conceptually changing your icon is just replacing the "ic_launcher.png" files in Conceptually changing your icon is just replacing the "ic_launcher.png" files in
the drawable directories under the res directory. There are four directories for the drawable directories under the res directory. There are several directories
different screen sizes. These can be replaced with one dir called "drawable", for different screen sizes.
containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72.
You may need to change the name of your icon in AndroidManifest.xml to match
this icon filename.
================================================================================ ================================================================================
Loading assets Loading assets
================================================================================ ================================================================================
Any files you put in the "assets" directory of your android-project directory Any files you put in the "app/src/main/assets" directory of your project
will get bundled into the application package and you can load them using the directory will get bundled into the application package and you can load
standard functions in SDL_rwops.h. them using the standard functions in SDL_rwops.h.
There are also a few Android specific functions that allow you to get other There are also a few Android specific functions that allow you to get other
useful paths for saving and loading data: useful paths for saving and loading data:
@ -211,6 +169,7 @@ disable this behaviour, see for example:
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
================================================================================ ================================================================================
Pause / Resume behaviour Pause / Resume behaviour
================================================================================ ================================================================================
@ -231,6 +190,7 @@ a specific message, (which is not yet implemented!) and restore your textures
manually or quit the app (which is actually the kind of behaviour you'll see manually or quit the app (which is actually the kind of behaviour you'll see
under iOS, if the OS can not restore your GL context it will just kill your app) under iOS, if the OS can not restore your GL context it will just kill your app)
================================================================================ ================================================================================
Threads and the Java VM Threads and the Java VM
================================================================================ ================================================================================
@ -246,6 +206,7 @@ Android_JNI_SetupThread() before doing anything else otherwise SDL will attach
your thread automatically anyway (when you make an SDL call), but it'll never your thread automatically anyway (when you make an SDL call), but it'll never
detach it. detach it.
================================================================================ ================================================================================
Using STL Using STL
================================================================================ ================================================================================
@ -253,34 +214,10 @@ detach it.
You can use STL in your project by creating an Application.mk file in the jni You can use STL in your project by creating an Application.mk file in the jni
folder and adding the following line: folder and adding the following line:
APP_STL := stlport_static APP_STL := c++_shared
For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation. For more information go here:
https://developer.android.com/ndk/guides/cpp-support
================================================================================
Additional documentation
================================================================================
The documentation in the NDK docs directory is very helpful in understanding the
build process and how to work with native code on the Android platform.
The best place to start is with docs/OVERVIEW.TXT
================================================================================
Using Eclipse
================================================================================
First make sure that you've installed Eclipse and the Android extensions as described here:
https://developer.android.com/tools/sdk/eclipse-adt.html
Once you've copied the SDL android project and customized it, you can create an Eclipse project from it:
* File -> New -> Other
* Select the Android -> Android Project wizard and click Next
* Enter the name you'd like your project to have
* Select "Create project from existing source" and browse for your project directory
* Make sure the Build Target is set to Android 3.1 (API 12)
* Click Finish
================================================================================ ================================================================================
@ -295,13 +232,11 @@ Especially useful is the info on setting up OpenGL ES 2.0 emulation.
Notice that this software emulator is incredibly slow and needs a lot of disk space. Notice that this software emulator is incredibly slow and needs a lot of disk space.
Using a real device works better. Using a real device works better.
================================================================================ ================================================================================
Troubleshooting Troubleshooting
================================================================================ ================================================================================
You can create and run an emulator from the Eclipse IDE:
* Window -> Android SDK and AVD Manager
You can see if adb can see any devices with the following command: You can see if adb can see any devices with the following command:
adb devices adb devices
@ -338,7 +273,10 @@ You can see the complete command line that ndk-build is using by passing V=1 on
ndk-build V=1 ndk-build V=1
If your application crashes in native code, you can use addr2line to convert the If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
https://developer.android.com/ndk/guides/ndk-stack
If you want to go through the process manually, you can use addr2line to convert the
addresses in the stack trace to lines in your code. addresses in the stack trace to lines in your code.
For example, if your crash looks like this: For example, if your crash looks like this:
@ -426,36 +364,30 @@ When you're done instrumenting with valgrind, you can disable the wrapper:
adb shell setprop wrap.org.libsdl.app "" adb shell setprop wrap.org.libsdl.app ""
================================================================================ ================================================================================
Graphics debugging Graphics debugging
================================================================================ ================================================================================
If you are developing on a compatible Tegra-based tablet, NVidia provides If you are developing on a compatible Tegra-based tablet, NVidia provides
Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
and GLES libraries, you must follow their instructions for installing the and GLES libraries, you must follow their instructions for installing the
interposer library on a rooted device. The non-rooted instructions are not interposer library on a rooted device. The non-rooted instructions are not
compatible with applications that use SDL2 for video. compatible with applications that use SDL2 for video.
The Tegra Graphics Debugger is available from NVidia here: The Tegra Graphics Debugger is available from NVidia here:
https://developer.nvidia.com/tegra-graphics-debugger https://developer.nvidia.com/tegra-graphics-debugger
================================================================================ ================================================================================
Why is API level 10 the minimum required? Why is API level 14 the minimum required?
================================================================================ ================================================================================
API level 10 is the minimum required level at runtime (that is, on the device) The latest NDK toolchain doesn't support targeting earlier than API level 14.
because SDL requires some functionality for running not
available on older devices. Since the incorporation of joystick support into SDL,
the minimum SDK required to *build* SDL is version 12. Devices running API levels
10-11 are still supported, only with the joystick functionality disabled.
Support for native OpenGL ES and ES2 applications was introduced in the NDK for
API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which
has since then been obsoleted, with the recommendation to developers to bump the
required API level to 10.
As of this writing, according to https://developer.android.com/about/dashboards/index.html As of this writing, according to https://developer.android.com/about/dashboards/index.html
about 90% of the Android devices accessing Google Play support API level 10 or about 99% of the Android devices accessing Google Play support API level 14 or
higher (March 2013). higher (October 2017).
================================================================================ ================================================================================
A note regarding the use of the "dirty rectangles" rendering technique A note regarding the use of the "dirty rectangles" rendering technique
@ -475,6 +407,7 @@ screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
================================================================================ ================================================================================
Known issues Known issues
================================================================================ ================================================================================

View file

@ -64,7 +64,7 @@ level of indirection, we can do things like this:
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0 export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
./MyGameThatIsStaticallyLinkedToSDL2 ./MyGameThatIsStaticallyLinkedToSDL2
And now, this game that is staticallly linked to SDL, can still be overridden And now, this game that is statically linked to SDL, can still be overridden
with a newer, or better, SDL. The statically linked one will only be used as with a newer, or better, SDL. The statically linked one will only be used as
far as calling into the jump table in this case. But in cases where no override far as calling into the jump table in this case. But in cases where no override
is desired, the statically linked version will provide its own jump table, is desired, the statically linked version will provide its own jump table,

View file

@ -27,6 +27,16 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
================================================================================
NEON
================================================================================
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
that SDL will select some otherwise-disabled highly-optimized code. The
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
definitely does.
================================================================================ ================================================================================
Cross compiling from x86 Linux Cross compiling from x86 Linux
================================================================================ ================================================================================

View file

@ -23,7 +23,7 @@ Requirements
typically do not include support for creating WinRT apps, to note. typically do not include support for creating WinRT apps, to note.
(The "Community" editions of Visual C++ do, however, support both (The "Community" editions of Visual C++ do, however, support both
desktop/Win32 and WinRT development). desktop/Win32 and WinRT development).
- Visual Studio 2017 can be used, however it is recommented that you install - Visual Studio 2017 can be used, however it is recommended that you install
the Visual C++ 2015 build tools. These build tools can be installed the Visual C++ 2015 build tools. These build tools can be installed
using VS 2017's installer. Be sure to also install the workload for using VS 2017's installer. Be sure to also install the workload for
"Universal Windows Platform development", its optional component, the "Universal Windows Platform development", its optional component, the
@ -33,7 +33,7 @@ Requirements
earlier versions of Windows, such as Windows 7, is not always supported earlier versions of Windows, such as Windows 7, is not always supported
by Visual Studio, and you may get error(s) when attempting to do so. by Visual Studio, and you may get error(s) when attempting to do so.
- Visual C++ 2012 can only build apps that target versions 8.0 of Windows, - Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
or Windows Phone. 8.0-targetted apps will run on devices running 8.1 or Windows Phone. 8.0-targeted apps will run on devices running 8.1
editions of Windows, however they will not be able to take advantage of editions of Windows, however they will not be able to take advantage of
8.1-specific features. 8.1-specific features.
- Visual C++ 2013 cannot create app projects that target Windows 8.0. - Visual C++ 2013 cannot create app projects that target Windows 8.0.
@ -54,7 +54,7 @@ Requirements
Status Status
------ ------
Here is a rough list of what works, and what doens't: Here is a rough list of what works, and what doesn't:
* What works: * What works:
* compilation via Visual C++ 2012 through 2015 * compilation via Visual C++ 2012 through 2015
@ -70,7 +70,10 @@ Here is a rough list of what works, and what doens't:
SDL_GetPerformanceFrequency(), etc.) SDL_GetPerformanceFrequency(), etc.)
* file I/O via SDL_RWops * file I/O via SDL_RWops
* mouse input (unsupported on Windows Phone) * mouse input (unsupported on Windows Phone)
* audio, via a modified version of SDL's XAudio2 backend * audio, via SDL's WASAPI backend (if you want to record, your app must
have "Microphone" capabilities enabled in its manifest, and the user must
not have blocked access. Otherwise, capture devices will fail to work,
presenting as a device disconnect shortly after opening it.)
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading * .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
anything outside of the app is not supported. anything outside of the app is not supported.
* system path retrieval via SDL's filesystem APIs * system path retrieval via SDL's filesystem APIs

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
prefix=/usr/local/i686-w64-mingw32 prefix=/opt/local/i686-w64-mingw32
exec_prefix=${prefix} exec_prefix=${prefix}
exec_prefix_set=no exec_prefix_set=no
libdir=${exec_prefix}/lib libdir=${exec_prefix}/lib
@ -39,17 +39,17 @@ while test $# -gt 0; do
echo $exec_prefix echo $exec_prefix
;; ;;
--version) --version)
echo 2.0.7 echo 2.0.9
;; ;;
--cflags) --cflags)
echo -I${prefix}/include/SDL2 -Dmain=SDL_main echo -I${prefix}/include/SDL2 -Dmain=SDL_main
;; ;;
--libs) --libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
;; ;;
--static-libs) --static-libs)
# --libs|--static-libs) # --libs|--static-libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
;; ;;
*) *)
echo "${usage}" 1>&2 echo "${usage}" 1>&2

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -51,6 +51,7 @@
#include "SDL_power.h" #include "SDL_power.h"
#include "SDL_render.h" #include "SDL_render.h"
#include "SDL_rwops.h" #include "SDL_rwops.h"
#include "SDL_sensor.h"
#include "SDL_shape.h" #include "SDL_shape.h"
#include "SDL_system.h" #include "SDL_system.h"
#include "SDL_thread.h" #include "SDL_thread.h"
@ -80,10 +81,11 @@ extern "C" {
#define SDL_INIT_HAPTIC 0x00001000u #define SDL_INIT_HAPTIC 0x00001000u
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
#define SDL_INIT_EVENTS 0x00004000u #define SDL_INIT_EVENTS 0x00004000u
#define SDL_INIT_SENSOR 0x00008000u
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \ #define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
) )
/* @} */ /* @} */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -158,6 +158,9 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) #if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
#elif defined(__GNUC__) && defined(__aarch64__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__) #elif defined(__GNUC__) && defined(__arm__)
#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__) #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__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE) #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
/* @} */ /* @} */
/* @} *//* Audio flags */ /* @} *//* Audio flags */
@ -527,7 +528,7 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
* *
* \param stream The stream the audio data is being added to * \param stream The stream the audio data is being added to
* \param buf A pointer to the audio data to add * \param buf A pointer to the audio data to add
* \param int The number of bytes to write to the stream * \param len The number of bytes to write to the stream
* \return 0 on success, or -1 on error. * \return 0 on success, or -1 on error.
* *
* \sa SDL_NewAudioStream * \sa SDL_NewAudioStream

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
#define HAVE_DSOUND_H 1 #define HAVE_DSOUND_H 1
#define HAVE_DXGI_H 1 #define HAVE_DXGI_H 1
#define HAVE_XINPUT_H 1 #define HAVE_XINPUT_H 1
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */ /* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC #ifdef HAVE_LIBC
@ -109,13 +112,15 @@ typedef unsigned int uintptr_t;
#define HAVE_MEMCMP 1 #define HAVE_MEMCMP 1
#define HAVE_STRLEN 1 #define HAVE_STRLEN 1
#define HAVE__STRREV 1 #define HAVE__STRREV 1
#define HAVE__STRUPR 1 /* These functions have security warnings, so we won't use them */
#define HAVE__STRLWR 1 /* #undef HAVE__STRUPR */
/* #undef HAVE__STRLWR */
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE__LTOA 1 /* These functions have security warnings, so we won't use them */
#define HAVE__ULTOA 1 /* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
#define HAVE_STRTOD 1 #define HAVE_STRTOD 1
@ -125,30 +130,45 @@ typedef unsigned int uintptr_t;
#define HAVE_STRNCMP 1 #define HAVE_STRNCMP 1
#define HAVE__STRICMP 1 #define HAVE__STRICMP 1
#define HAVE__STRNICMP 1 #define HAVE__STRNICMP 1
#define HAVE_ATAN 1 #define HAVE_ACOS 1
#define HAVE_ATAN2 1 #define HAVE_ACOSF 1
#define HAVE_ACOS 1 #define HAVE_ASIN 1
#define HAVE_ASIN 1 #define HAVE_ASINF 1
#define HAVE_CEIL 1 #define HAVE_ATAN 1
#define HAVE_COS 1 #define HAVE_ATANF 1
#define HAVE_COSF 1 #define HAVE_ATAN2 1
#define HAVE_FABS 1 #define HAVE_ATAN2F 1
#define HAVE_FLOOR 1 #define HAVE_CEILF 1
#define HAVE_LOG 1 #define HAVE__COPYSIGN 1
#define HAVE_POW 1 #define HAVE_COS 1
#define HAVE_SIN 1 #define HAVE_COSF 1
#define HAVE_SINF 1 #define HAVE_EXP 1
#define HAVE_SQRT 1 #define HAVE_EXPF 1
#define HAVE_SQRTF 1 #define HAVE_FABS 1
#define HAVE_TAN 1 #define HAVE_FABSF 1
#define HAVE_TANF 1 #define HAVE_FLOOR 1
#define HAVE__COPYSIGN 1 #define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#if defined(_MSC_VER) #if defined(_MSC_VER)
/* These functions were added with the VC++ 2013 C runtime library */ /* These functions were added with the VC++ 2013 C runtime library */
#if _MSC_VER >= 1800 #if _MSC_VER >= 1800
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
#define HAVE_VSSCANF 1 #define HAVE_VSSCANF 1
#define HAVE_SCALBN 1 #define HAVE_SCALBN 1
#define HAVE_SCALBNF 1
#endif #endif
/* This function is available with at least the VC++ 2008 C runtime library */ /* This function is available with at least the VC++ 2008 C runtime library */
#if _MSC_VER >= 1400 #if _MSC_VER >= 1400
@ -166,7 +186,6 @@ typedef unsigned int uintptr_t;
/* Enable various audio drivers */ /* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_WASAPI 1 #define SDL_AUDIO_DRIVER_WASAPI 1
#define SDL_AUDIO_DRIVER_DSOUND 1 #define SDL_AUDIO_DRIVER_DSOUND 1
#define SDL_AUDIO_DRIVER_XAUDIO2 0
#define SDL_AUDIO_DRIVER_WINMM 1 #define SDL_AUDIO_DRIVER_WINMM 1
#define SDL_AUDIO_DRIVER_DISK 1 #define SDL_AUDIO_DRIVER_DISK 1
#define SDL_AUDIO_DRIVER_DUMMY 1 #define SDL_AUDIO_DRIVER_DUMMY 1
@ -174,9 +193,13 @@ typedef unsigned int uintptr_t;
/* Enable various input drivers */ /* Enable various input drivers */
#define SDL_JOYSTICK_DINPUT 1 #define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_XINPUT 1 #define SDL_JOYSTICK_XINPUT 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_DINPUT 1
#define SDL_HAPTIC_XINPUT 1 #define SDL_HAPTIC_XINPUT 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1 #define SDL_LOADSO_WINDOWS 1
@ -194,7 +217,7 @@ typedef unsigned int uintptr_t;
#define SDL_VIDEO_RENDER_D3D 1 #define SDL_VIDEO_RENDER_D3D 1
#endif #endif
#ifndef SDL_VIDEO_RENDER_D3D11 #ifndef SDL_VIDEO_RENDER_D3D11
#define SDL_VIDEO_RENDER_D3D11 0 #define SDL_VIDEO_RENDER_D3D11 0
#endif #endif
/* Enable OpenGL support */ /* Enable OpenGL support */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -51,27 +51,35 @@
#include <intrin.h> #include <intrin.h>
#else #else
#ifdef __ALTIVEC__ #ifdef __ALTIVEC__
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) #if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
#include <altivec.h> #include <altivec.h>
#undef pixel #undef pixel
#undef bool
#endif #endif
#endif #endif
#ifdef __MMX__ #if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <mmintrin.h> #include <arm_neon.h>
#endif #endif
#ifdef __3dNOW__ #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h> #include <mm3dnow.h>
#endif #endif
#ifdef __SSE__ #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
#include <immintrin.h>
#else
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
#include <mmintrin.h>
#endif
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
#include <xmmintrin.h> #include <xmmintrin.h>
#endif #endif
#ifdef __SSE2__ #if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
#include <emmintrin.h> #include <emmintrin.h>
#endif #endif
#ifdef __SSE3__ #if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
#include <pmmintrin.h> #include <pmmintrin.h>
#endif #endif
#endif #endif /* HAVE_IMMINTRIN_H */
#endif /* compiler version */
#include "begin_code.h" #include "begin_code.h"
/* Set up for C function definitions, even when using C++ */ /* Set up for C function definitions, even when using C++ */
@ -154,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
/**
* This function returns true if the CPU has AVX-512F (foundation) features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
/** /**
* This function returns true if the CPU has NEON (ARM SIMD) features. * This function returns true if the CPU has NEON (ARM SIMD) features.
*/ */
@ -164,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
*/ */
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -24,7 +24,7 @@
* *
* This is a simple file to encapsulate the EGL API headers. * This is a simple file to encapsulate the EGL API headers.
*/ */
#ifndef _MSC_VER #if !defined(_MSC_VER) && !defined(__ANDROID__)
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h> #include <EGL/eglext.h>

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -85,6 +85,9 @@ typedef enum
Called on Android in onResume() Called on Android in onResume()
*/ */
/* Display events */
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
/* Window events */ /* Window events */
SDL_WINDOWEVENT = 0x200, /**< Window state change */ SDL_WINDOWEVENT = 0x200, /**< Window state change */
SDL_SYSWMEVENT, /**< System specific event */ SDL_SYSWMEVENT, /**< System specific event */
@ -144,6 +147,9 @@ typedef enum
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
/* Sensor events */
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
/* Render events */ /* Render events */
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_CommonEvent; } SDL_CommonEvent;
/**
* \brief Display state change event data (event.display.*)
*/
typedef struct SDL_DisplayEvent
{
Uint32 type; /**< ::SDL_DISPLAYEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 display; /**< The associated display index */
Uint8 event; /**< ::SDL_DisplayEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint32 data1; /**< event dependent data */
} SDL_DisplayEvent;
/** /**
* \brief Window state change event data (event.window.*) * \brief Window state change event data (event.window.*)
*/ */
@ -471,6 +492,17 @@ typedef struct SDL_DropEvent
} SDL_DropEvent; } SDL_DropEvent;
/**
* \brief Sensor event structure (event.sensor.*)
*/
typedef struct SDL_SensorEvent
{
Uint32 type; /**< ::SDL_SENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The instance ID of the sensor */
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
} SDL_SensorEvent;
/** /**
* \brief The "quit requested" event * \brief The "quit requested" event
*/ */
@ -526,6 +558,7 @@ typedef union SDL_Event
{ {
Uint32 type; /**< Event type, shared with all events */ Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */ SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Window event data */
SDL_WindowEvent window; /**< Window event data */ SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */ SDL_TextEditingEvent edit; /**< Text editing event data */
@ -542,6 +575,7 @@ typedef union SDL_Event
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */ SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */ SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */ SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */ SDL_SysWMEvent syswm; /**< System dependent window event data */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
* This can be called before any controllers are opened.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
/** /**
* Open a game controller for use. * Open a game controller for use.
* The index passed as an argument refers to the N'th game controller on the system. * The index passed as an argument refers to the N'th game controller on the system.
@ -196,6 +204,13 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller, or -1 if it's not available
*
* For XInput controllers this returns the XInput user index.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/** /**
* Get the USB vendor ID of an opened controller, if available. * Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0. * If the vendor ID isn't available this function returns 0.
@ -345,6 +360,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button); SDL_GameControllerButton button);
/**
* Trigger a rumble effect
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
*
* \param gamecontroller The controller to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
*
* \return 0, or -1 if rumble isn't supported on this joystick
*/
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
/** /**
* Close a controller previously opened with SDL_GameControllerOpen(). * Close a controller previously opened with SDL_GameControllerOpen().
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -117,6 +117,17 @@
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
*
* At the moment the magnitude variables are mixed between signed/unsigned, and
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
*
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
* so we should fix the inconsistency in favor of higher possible precision,
* adjusting for platforms that use different scales.
* -flibit
*/
/** /**
* \typedef SDL_Haptic * \typedef SDL_Haptic
* *
@ -656,8 +667,8 @@ typedef struct SDL_HapticRamp
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
* *
* The Left/Right effect is used to explicitly control the large and small * The Left/Right effect is used to explicitly control the large and small
* motors, commonly found in modern game controllers. One motor is high * motors, commonly found in modern game controllers. The small (right) motor
* frequency, the other is low frequency. * is high frequency, and the large (left) motor is low frequency.
* *
* \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HAPTIC_LEFTRIGHT
* \sa SDL_HapticEffect * \sa SDL_HapticEffect
@ -668,7 +679,7 @@ typedef struct SDL_HapticLeftRight
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
/* Replay */ /* Replay */
Uint32 length; /**< Duration of the effect. */ Uint32 length; /**< Duration of the effect in milliseconds. */
/* Rumble */ /* Rumble */
Uint16 large_magnitude; /**< Control of the large controller motor. */ Uint16 large_magnitude; /**< Control of the large controller motor. */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -76,6 +76,7 @@ extern "C" {
* "opengl" * "opengl"
* "opengles2" * "opengles2"
* "opengles" * "opengles"
* "metal"
* "software" * "software"
* *
* The default varies by platform, but it's the first one in the list that * The default varies by platform, but it's the first one in the list that
@ -210,6 +211,18 @@ extern "C" {
*/ */
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
/**
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
*
* This variable can be set to the following values:
* "0" - Disable _NET_WM_BYPASS_COMPOSITOR
* "1" - Enable _NET_WM_BYPASS_COMPOSITOR
*
* By default SDL will use _NET_WM_BYPASS_COMPOSITOR
*
*/
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
/** /**
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
* *
@ -249,6 +262,16 @@ extern "C" {
*/ */
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
* \brief A variable setting the double click time, in milliseconds.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
/**
* \brief A variable setting the double click radius, in pixels.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
/** /**
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
*/ */
@ -316,7 +339,7 @@ extern "C" {
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
/** /**
* \brief A variable controlling which orientations are allowed on iOS. * \brief A variable controlling which orientations are allowed on iOS/Android.
* *
* In some circumstances it is necessary to be able to explicitly control * In some circumstances it is necessary to be able to explicitly control
* which UI orientations are allowed. * which UI orientations are allowed.
@ -355,16 +378,36 @@ extern "C" {
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION" #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
/** /**
* \brief A variable controlling whether the Android / iOS built-in * \brief A variable controlling whether the home indicator bar on iPhone X
* accelerometer should be listed as a joystick device, rather than listing * should be hidden.
* actual joysticks only.
* *
* This variable can be set to the following values: * This variable can be set to the following values:
* "0" - List only real joysticks and accept input from them * "0" - The indicator bar is not hidden (default for windowed applications)
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default). * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
* "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
*/
#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device.
*
* This variable can be set to the following values:
* "0" - The accelerometer is not listed as a joystick
* "1" - The accelerometer is available as a 3 axis joystick (the default).
*/ */
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK" #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
/**
* \brief A variable controlling whether the Android / tvOS remotes
* should be listed as joystick devices, instead of sending keyboard events.
*
* This variable can be set to the following values:
* "0" - Remotes send enter/escape/arrow key events
* "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
*/
#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
/** /**
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
* *
@ -432,6 +475,88 @@ extern "C" {
*/ */
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
/**
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI drivers are not used
* "1" - HIDAPI drivers are used (the default)
*
* This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
*/
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
/**
* \brief A variable controlling whether the HIDAPI driver for PS4 controllers 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_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
/**
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
*
* This variable can be set to the following values:
* "0" - extended reports are not enabled (the default)
* "1" - extended reports
*
* Extended input reports allow rumble on Bluetooth PS4 controllers, but
* break DirectInput handling for applications that don't use SDL.
*
* Once extended reports are enabled, they can not be disabled without
* power cycling the controller.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
/**
* \brief A variable controlling whether the HIDAPI driver for Steam Controllers 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_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
/**
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers 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_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
/**
* \brief A variable controlling whether the HIDAPI driver for XBox controllers 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_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
/**
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
*
* The variable can be set to the following values:
* "0" - Do not scan for Steam Controllers
* "1" - Scan for Steam Controllers (the default)
*
* The default value is "1". This hint must be set before initializing the joystick subsystem.
*/
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
/** /**
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
* This is a debugging aid for developers and not expected to be used by end users. The default is "1" * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
@ -494,6 +619,10 @@ extern "C" {
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses). * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
* Support for this hint is currently available only in the pthread, Windows, and PSP backend. * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*
* Instead of this hint, in 2.0.9 and later, you can use
* SDL_CreateThreadWithStackSize(). This hint only works with the classic
* SDL_CreateThread().
*/ */
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
@ -719,6 +848,35 @@ extern "C" {
*/ */
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
/**
* \brief A variable to control whether we trap the Android back button to handle it manually.
* This is necessary for the right mouse button to work on some Android devices, or
* to be able to trap the back button for use in your code reliably. If set to true,
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
* SDL_SCANCODE_AC_BACK.
*
* The variable can be set to the following values:
* "0" - Back button will be handled as usual for system. (default)
* "1" - Back button will be trapped, allowing you to handle the key press
* manually. (This will also let right mouse click work on systems
* where the right mouse button functions as back.)
*
* The value of this hint is used at runtime, so it can be changed at any time.
*/
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
/**
* \brief A variable to control whether the return key on the soft keyboard
* should hide the soft keyboard on Android and iOS.
*
* The variable can be set to the following values:
* "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
* "1" - The return key will hide the keyboard.
*
* The value of this hint is used at runtime, so it can be changed at any time.
*/
#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
/** /**
* \brief override the binding element for keyboard inputs for Emscripten builds * \brief override the binding element for keyboard inputs for Emscripten builds
* *
@ -752,7 +910,7 @@ extern "C" {
* "0" - SDL will generate a window-close event when it sees Alt+F4. * "0" - SDL will generate a window-close event when it sees Alt+F4.
* "1" - SDL will only do normal key handling for Alt+F4. * "1" - SDL will only do normal key handling for Alt+F4.
*/ */
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4" #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
/** /**
* \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs. * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
@ -797,6 +955,24 @@ extern "C" {
*/ */
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER" #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
/**
* \brief Tell the video driver that we only want a double buffer.
*
* By default, most lowlevel 2D APIs will use a triple buffer scheme that
* wastes no CPU time on waiting for vsync after issuing a flip, but
* introduces a frame of latency. On the other hand, using a double buffer
* scheme instead is recommended for cases where low latency is an important
* factor because we save a whole frame of latency.
* We do so by waiting for vsync immediately after issuing a flip, usually just
* after eglSwapBuffers call in the backend's *_SwapWindow function.
*
* Since it's driver-specific, it's only supported where possible and
* implemented. Currently supported the following drivers:
* - KMSDRM (kmsdrm)
* - Raspberry Pi (raspberrypi)
*/
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
/** /**
* \brief A variable controlling what driver to use for OpenGL ES contexts. * \brief A variable controlling what driver to use for OpenGL ES contexts.
* *

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -97,10 +97,10 @@ typedef enum
typedef enum typedef enum
{ {
SDL_JOYSTICK_POWER_UNKNOWN = -1, SDL_JOYSTICK_POWER_UNKNOWN = -1,
SDL_JOYSTICK_POWER_EMPTY, SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
SDL_JOYSTICK_POWER_LOW, SDL_JOYSTICK_POWER_LOW, /* <= 20% */
SDL_JOYSTICK_POWER_MEDIUM, SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
SDL_JOYSTICK_POWER_FULL, SDL_JOYSTICK_POWER_FULL, /* <= 100% */
SDL_JOYSTICK_POWER_WIRED, SDL_JOYSTICK_POWER_WIRED,
SDL_JOYSTICK_POWER_MAX SDL_JOYSTICK_POWER_MAX
} SDL_JoystickPowerLevel; } SDL_JoystickPowerLevel;
@ -132,6 +132,12 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
*/ */
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
/**
* Get the player index of a joystick, or -1 if it's not available
* This can be called before any joysticks are opened.
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
/** /**
* Return the GUID for the joystick at this index * Return the GUID for the joystick at this index
* This can be called before any joysticks are opened. * This can be called before any joysticks are opened.
@ -194,6 +200,13 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
*/ */
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
/**
* Get the player index of an opened joystick, or -1 if it's not available
*
* For XInput controllers this returns the XInput user index.
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
/** /**
* Return the GUID for this opened joystick * Return the GUID for this opened joystick
*/ */
@ -361,6 +374,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
int button); int button);
/**
* Trigger a rumble effect
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
*
* \param joystick The joystick to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
*
* \return 0, or -1 if rumble isn't supported on this joystick
*/
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
/** /**
* Close a joystick previously opened with SDL_JoystickOpen(). * Close a joystick previously opened with SDL_JoystickOpen().
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -63,10 +63,13 @@
/* On Android SDL provides a Java class in SDLActivity.java that is the /* On Android SDL provides a Java class in SDLActivity.java that is the
main activity entry point. main activity entry point.
See README-android.md for more details on extending that class. See docs/README-android.md for more details on extending that class.
*/ */
#define SDL_MAIN_NEEDED #define SDL_MAIN_NEEDED
/* We need to export SDL_main so it can be launched from Java */
#define SDLMAIN_DECLSPEC DECLSPEC
#elif defined(__NACL__) #elif defined(__NACL__)
/* On NACL we use ppapi_simple to set up the application helper code, /* On NACL we use ppapi_simple to set up the application helper code,
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
@ -85,6 +88,10 @@
#define C_LINKAGE #define C_LINKAGE
#endif /* __cplusplus */ #endif /* __cplusplus */
#ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC
#endif
/** /**
* \file SDL_main.h * \file SDL_main.h
* *
@ -107,7 +114,7 @@
/** /**
* The prototype for the application's main() function * The prototype for the application's main() function
*/ */
extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]); extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
#include "begin_code.h" #include "begin_code.h"

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -287,7 +287,9 @@ enum
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */ SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'), SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */ SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1') SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
}; };
typedef struct SDL_Color typedef struct SDL_Color

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -121,7 +121,12 @@
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
/* Try to find out if we're compiling for WinRT or non-WinRT */ /* Try to find out if we're compiling for WinRT or non-WinRT */
#if defined(_MSC_VER) && defined(__has_include) #if defined(_MSC_VER) && defined(__has_include)
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>) #if __has_include(<winapifamily.h>)
#define HAVE_WINAPIFAMILY_H 1
#else
#define HAVE_WINAPIFAMILY_H 0
#endif
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */ /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */ #elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
#define HAVE_WINAPIFAMILY_H 1 #define HAVE_WINAPIFAMILY_H 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages 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