Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 21-installer-nodd
  • 2210-pre1
  • 2210-pre2
  • 2210-rc1
  • 2210-rc2
  • 2210-rc3
  • 2211-pre1
  • 2211-pre2
  • 2211-rc1
  • 2212-pre1
  • 2212-pre2
  • 2212-pre3
  • 2212-rc1
  • 2213
  • 2214-pre1
  • 2214-pre2
  • 2214-pre3
  • 2214-pre4
  • 2_2_12
  • 64-gl-log
  • COM_ImmedExecute-lua
  • DJGPP
  • accel-momentum
  • acs
  • action-args
  • alpha-fixes
  • any-resolution
  • appveyor
  • better-distance-math
  • blend-locking
  • blentran
  • blua-unary-not-fix
  • boost-tickrate
  • bustablesoundz
  • classic-netcode-fixes
  • cleanup-opengl
  • cleanupmusic
  • clipmidtex
  • cmake-valgrind
  • crawlacommander-sprites
  • custom-map-names
  • custom-teams
  • cutscene-cleanup
  • dd-music-bypass
  • dd-music-fix
  • delfile2
  • deprecate-lua-dedicated-server
  • dpl-2
  • dropshadows-spawning
  • dynabsp
  • emblem-drawing
  • exchndl-xp-fix
  • extra-textures
  • few-kart-lua-changes
  • ffloorclip
  • fix-167
  • fix-cvar-conflicts
  • fix-dedi-pthread
  • fix-enemy-target
  • fix-opengl-parameter-crash
  • fix-opengl-shear-roll
  • flipfuncpointers
  • fof-lightlist-fixes
  • font-FUCK
  • frictionrefactor
  • fuck-macros-1
  • gamepad-luakeydown
  • gamepad-morefixes
  • gamepad_experiments
  • gametype-refactor
  • gametype-refactor-1
  • gametype-refactor-player-spawns
  • ghost-networking
  • gif-splitting
  • grr-lj
  • hitboxviewer
  • hwr-texture-cache-refactor
  • hwrender2
  • improve-439
  • increase-maxconditionsets
  • increase-packet-tics
  • input-display
  • input-display-translucency
  • io
  • joystick-juggling-maz
  • just-in-case
  • keycodes-only
  • ksf-wadfiles
  • ld413-mp-fix
  • levelstruct
  • libpng-version-support
  • linedef-actions
  • lj-test
  • lol-states
  • loopedsounds
  • lower-unpegged-fix
  • lua-change-gametype
  • lua-command-netids
  • lua-gfx-2
  • lua-gfx-sprites
  • SRB2_release_2.1
  • SRB2_release_2.1.1
  • SRB2_release_2.1.10
  • SRB2_release_2.1.11
  • SRB2_release_2.1.12
  • SRB2_release_2.1.14
  • SRB2_release_2.1.15
  • SRB2_release_2.1.16
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.17
  • SRB2_release_2.1.18
  • SRB2_release_2.1.19
  • SRB2_release_2.1.2
  • SRB2_release_2.1.20
  • SRB2_release_2.1.21
  • SRB2_release_2.1.22
  • SRB2_release_2.1.23
  • SRB2_release_2.1.24
  • SRB2_release_2.1.25
  • SRB2_release_2.1.3
  • SRB2_release_2.1.4
  • SRB2_release_2.1.5
  • SRB2_release_2.1.6
  • SRB2_release_2.1.7
  • SRB2_release_2.1.8
  • SRB2_release_2.1.9
  • SRB2_release_2.2.0
  • SRB2_release_2.2.1
  • SRB2_release_2.2.10
  • SRB2_release_2.2.11
  • SRB2_release_2.2.12
  • SRB2_release_2.2.13
  • SRB2_release_2.2.15
  • SRB2_release_2.2.2
  • SRB2_release_2.2.3
  • SRB2_release_2.2.4
  • SRB2_release_2.2.5
  • SRB2_release_2.2.6
  • SRB2_release_2.2.7
  • SRB2_release_2.2.8
  • SRB2_release_2.2.9
  • td-release-v1.0.0
142 results

Target

Select target project
  • STJr/SRB2
  • Sryder/SRB2
  • wolfy852/SRB2
  • Alpha2244/SRB2
  • Inuyasha/SRB2
  • yoshibot/SRB2
  • TehRealSalt/SRB2
  • PrisimaTF/SRB2
  • Hatninja/SRB2
  • SteelT/SRB2
  • james/SRB2
  • ShaderWraith/SRB2
  • SinnamonLat/SRB2
  • mazmazz_/SRB2
  • filpAM/SRB2
  • chaoloveicemdboy/SRB2
  • Whooa21/SRB2
  • Machturne/SRB2
  • Golden/SRB2
  • Tatsuru/SRB2
  • Snu/SRB2
  • Zwip-Zwap_Zapony/SRB2
  • fickleheart/SRB2
  • alphaRexJames/SRB2
  • JJK/SRB2
  • diskpoppy/SRB2
  • Hannu_Hanhi/SRB2
  • ZipperQR/SRB2
  • kays/SRB2
  • spherallic/SRB2
  • Zippy_Zolton/SRB2
  • namiishere/SRB2
  • Ors/SRB2
  • SMS_Alfredo/SRB2
  • sonic_edge/SRB2
  • lavla/SRB2
  • ashi/SRB2
  • X.organic/SRB2
  • Fafabis/SRB2
  • Meziu/SRB2
  • v-rob/SRB2
  • tertu/SRB2
  • bitten2up/SRB2
  • flarn2006/SRB2
  • Krabs/SRB2
  • clairebun/SRB2
  • Lactozilla/SRB2
  • thehackstack/SRB2
  • Spice/SRB2
  • win8linux/SRB2
  • JohnFrostFox/SRB2
  • talktoneon726/SRB2
  • Wane/SRB2
  • Lamibe/SRB2
  • spectrumuk2/srb-2
  • nerdyminer18/srb-2
  • 256nil/SRB2
  • ARJr/SRB2
  • Alam/SRB2
  • Zenya/srb-2-marathon-demos
  • Acelite/srb-2-archivedmodifications
  • MIDIMan/SRB2
  • Lach/SRB2
  • Frostiikin/bounce-tweaks
  • Jaden/SRB2
  • Tyron/SRB2
  • Astronight/SRB2
  • Mari0shi06/SRB2
  • aiire/SRB2
  • Galactice/SRB2
  • srb2-ports/srb2-dreamcast
  • sdasdas/SRB2
  • chreas/srb-2-vr
  • StarManiaKG/the-story-of-sinically-rocketing-and-botching-the-2nd
  • LoganAir/SRB2
  • NepDisk/srb-2
  • alufolie91/SRB2
  • Felicia.iso/SRB2
  • twi/SRB2
  • BarrelsOFun/SRB2
  • Speed2411/SRB2
  • Leather_Realms/SRB2
  • Ayemar/SRB2
  • Acelite/SRB2
  • VladDoc/SRB2
  • kaldrum/model-features
  • strawberryfox417/SRB2
  • Lugent/SRB2
  • Rem/SRB2
  • Refrag/SRB2
  • Henry_3230/srb-3230
  • TehPuertoRicanSpartan2/tprs-srb2
  • Leminn/srb-2-marathon-stuff
  • chromaticpipe2/SRB2
  • MiguelGustavo15/SRB2
  • Maru/srb-2-tests
  • SilicDev/SRB2
  • UnmatchedBracket/SRB2
  • HybridDog/SRB2
  • xordspar0/SRB2
  • jsjhbewfhh/SRB2
  • Fancy2209/SRB2
  • Lorsoen/SRB2
  • shindoukin/SRB2
  • GamerOfDays/SRB2
  • Craftyawesome/SRB2
  • tenshi-tensai-tennoji/SRB2
  • Scarfdudebalder/SRB2
  • luigi-budd/srb-2-fix-interplag-lockon
  • mskluesner/SRB2
  • johnpetersa19/SRB2
  • Pheazant/SRB2
  • chromaticpipe2/srb2classic
  • romoney5/SRB2
  • PAS/SRB2Classic
  • BlueStaggo/SRB2
  • Jisk/srb-2-beef-jerky
  • voltybystorm/SRB2
  • ZenithNeko/srb-2-xp
  • Nep2Disk/SRB2
  • Cloudeon/SRB2
  • mushe/srb-2-ps-b
122 results
Select Git revision
  • 21-installer-nodd
  • 2210-pre1
  • 2210-pre2
  • 2210-rc1
  • 2210-rc2
  • 2210-rc3
  • 2211-pre1
  • 2211-pre2
  • 622-teamlives-hud
  • 64-gl-log
  • COM_ImmedExecute-lua
  • DJGPP
  • accel-momentum
  • add-arg-passing-alias
  • add-forth-interpreter
  • add-ipv6-indicator
  • add-namechange-lua-hook
  • add-server-pm-logging
  • add-textinput-hook
  • add-unblockable-console-key
  • alien-breed-3d
  • allow-non-important-files-dedicated
  • allow-percent-ipv6-address
  • appveyor
  • avoid-double-checkmobjtrigger-call
  • avoid-frame-cap-busywait
  • bbox
  • bbox-tweaks
  • blend-locking
  • blentran
  • blua-unary-not-fix
  • boost-tickrate
  • botchanges
  • bustablemobjzfix
  • bustablesoundz
  • checksector-refactor
  • cleanup-opengl
  • cleanupmusic
  • close-connection-timeout
  • cmake-clang-tidy
  • cmake-enable-cxx
  • cmake-valgrind
  • compile-ffast-math
  • crawlacommander-sprites
  • cutscene-cleanup
  • dd-music-bypass
  • dd-music-fix
  • deprecate-lua-dedicated-server
  • doomcom-global-refactor
  • dpl-2
  • dropshadows-spawning
  • emblem-drawing
  • ensure-ackpak-response
  • exchndl-xp-fix
  • few-kart-lua-changes
  • ffloorclip
  • fix-acknum-not-incrementing
  • fix-bot-2pai-desync
  • fix-compiler-error-touch
  • fix-cvar-conflicts
  • fix-dedicated-segfault
  • fix-move-mobj-reference
  • fix-netxcmd-integer-overflow
  • fix-opengl-shear-roll
  • fix-removemobj-seesound
  • fix-silver-segfault
  • fix-tty-not-resetting-properly
  • fix-unack-lockup
  • flipfuncpointers
  • floorsprite-and-shadow-fake-planes-fix
  • fof-lightlist-fixes
  • font-FUCK
  • font_drawer
  • forceverticalflipflag
  • forkmaster
  • frictionrefactor
  • fuck-macros-1
  • fullscreen-toggle
  • gamepad-luakeydown
  • gamepad-morefixes
  • gamepad_experiments
  • ghost-networking
  • gif-splitting
  • gitlab-ci
  • grr-lj
  • hitboxviewer
  • hwr-texture-cache-refactor
  • hwrender2
  • improve-439
  • increase-packet-tics
  • increase-unlockables
  • inline-mobjwasremoved
  • input-display
  • input-display-translucency
  • io
  • io-limit
  • ipv6
  • joystick-juggling-maz
  • keycodes-only
  • ksf-wadfiles
  • SRB2_release_2.1
  • SRB2_release_2.1.1
  • SRB2_release_2.1.10
  • SRB2_release_2.1.11
  • SRB2_release_2.1.12
  • SRB2_release_2.1.14
  • SRB2_release_2.1.15
  • SRB2_release_2.1.16
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.17
  • SRB2_release_2.1.18
  • SRB2_release_2.1.19
  • SRB2_release_2.1.2
  • SRB2_release_2.1.20
  • SRB2_release_2.1.21
  • SRB2_release_2.1.22
  • SRB2_release_2.1.23
  • SRB2_release_2.1.24
  • SRB2_release_2.1.25
  • SRB2_release_2.1.3
  • SRB2_release_2.1.4
  • SRB2_release_2.1.5
  • SRB2_release_2.1.6
  • SRB2_release_2.1.7
  • SRB2_release_2.1.8
  • SRB2_release_2.1.9
  • SRB2_release_2.2.0
  • SRB2_release_2.2.1
  • SRB2_release_2.2.10
  • SRB2_release_2.2.2
  • SRB2_release_2.2.3
  • SRB2_release_2.2.4
  • SRB2_release_2.2.5
  • SRB2_release_2.2.6
  • SRB2_release_2.2.7
  • SRB2_release_2.2.8
  • SRB2_release_2.2.9
  • td-release-v1.0.0
138 results
Show changes
Showing
with 614 additions and 181 deletions
...@@ -3,26 +3,30 @@ osxcross arm64: ...@@ -3,26 +3,30 @@ osxcross arm64:
stage: build stage: build
when: manual
allow_failure: true allow_failure: true
artifacts: artifacts:
paths: paths:
- "build.osxcross/bin/" - "build.arm64/bin/"
- "build.osxcross/src/config.h" - "build.arm64/dist/arm64.h"
expose_as: "Mac arm64" - "build.arm64/src/config.h"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin"
variables: variables:
OSXCROSS_HOST: arm64-apple-darwin21.4 OSXCROSS_HOST: oa64
LD: arm64-apple-darwin21.4-ld CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake
LD: /opt/osxcross.arm64/ld
script: script:
- - | - - |
# apt_development # apt_development
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
- osxcross-macports install --arm64 curl libopenmpt libsdl2_mixer - osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true
- osxcross-macports install --arm64 wavpack || osxcross-macports install --verbose --arm64 wavpack || true
- osxcross-macports install --arm64 libxmp opusfile || osxcross-macports install --verbose --arm64 libxmp opusfile
- osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --verbose --static --arm64 libsdl2_mixer || true
- osxcross-macports install --static --arm64 curl || osxcross-macports install --verbose --static --arm64 curl || true
- osxcross-macports install --static --arm64 miniupnpc libpng || osxcross-macports install --verbose --static --arm64 miniupnpc libpng
- | - |
# apt_development # apt_development
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
...@@ -30,7 +34,20 @@ osxcross arm64: ...@@ -30,7 +34,20 @@ osxcross arm64:
- - | - - |
# cmake # cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - |
cmake \
-B build.arm64 \
-G "Unix Makefiles" \
-DCMAKE_COLOR_DIAGNOSTICS=OFF \
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
-DCPM_USE_LOCAL_PACKAGES:BOOL=ON \
-DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" \
-DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" \
-DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF \
-DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON \
-DSRB2_CONFIG_USE_GME:BOOL=OFF \
-DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID \
-DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
...@@ -38,7 +55,35 @@ osxcross arm64: ...@@ -38,7 +55,35 @@ osxcross arm64:
- - | - - |
# make # make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going - cmake --build build.arm64 --parallel 1 -- --keep-going
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
- - |
# copy config.h
echo -e "\e[0Ksection_start:`date +%s`:copy[collapsed=false]\r\e[0KCopying config.h"
- mkdir --parents --verbose build.arm64/dist
- cp --reflink=auto --sparse=always --verbose build.arm64/src/config.h build.arm64/dist/arm64.h
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
after_script:
- - |
# apt_clean
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
- apt-get autoclean
- |
# apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
- - |
# ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
- ccache --show-stats
- ccache --show-log-stats || true
- |
# ccahe_stats
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
...@@ -3,67 +3,30 @@ osxcross x86_64: ...@@ -3,67 +3,30 @@ osxcross x86_64:
stage: build stage: build
cache: allow_failure: true
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys:
- ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
- ccache-$CI_JOB_NAME_SLUG-master
paths:
- build/ccache
- build/ccache_statslog
- key: apt-$CI_JOB_IMAGE
paths:
- build/apt-cache
unprotect: true
- key: vcpkg-root
paths:
- build/vcpkg-root
unprotect: true
- key: vcpkg-binary-cache-x64-osx
paths:
- build/vcpkg-binary-cache
unprotect: true
artifacts: artifacts:
paths: paths:
- "build.osxcross/bin/" - "build.x86_64/bin/"
- "build.osxcross/src/config.h" - "build.x86_64/dist/x86_64.h"
expose_as: "Mac x86_64" - "build.x86_64/src/config.h"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin"
variables: variables:
OSXCROSS_HOST: x86_64-apple-darwin21.4 OSXCROSS_HOST: o64
LD: x86_64-apple-darwin21.4-ld CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake
LD: /opt/osxcross.x86_64/ld
script: script:
- |
# vcpkg
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg"
if [ -d "build/vcpkg-root" ]; then
pushd build/vcpkg-root
git fetch https://github.com/Microsoft/vcpkg master
git reset --hard FETCH_HEAD
popd
else
mkdir -p build
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
fi
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
mkdir -p "build/vcpkg-binary-cache"
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
- - | - - |
# apt_development # apt_development
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
- osxcross-macports install curl libopenmpt libsdl2_mixer - osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true
- osxcross-macports install wavpack || osxcross-macports install --verbose wavpack || true
- osxcross-macports install libxmp opusfile || osxcross-macports install --verbose libxmp opusfile
- osxcross-macports install --static libsdl2_mixer || osxcross-macports install --verbose --static libsdl2_mixer || true
- osxcross-macports install --static curl || osxcross-macports install --verbose --static curl || true
- osxcross-macports install --static miniupnpc libpng || osxcross-macports install --verbose --static miniupnpc libpng
- | - |
# apt_development # apt_development
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
...@@ -71,7 +34,19 @@ osxcross x86_64: ...@@ -71,7 +34,19 @@ osxcross x86_64:
- - | - - |
# cmake # cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - |
cmake \
-B build.x86_64 \
-G "Unix Makefiles" \
-DCMAKE_COLOR_DIAGNOSTICS=OFF \
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
-DCPM_USE_LOCAL_PACKAGES:BOOL=ON \
-DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" \
-DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" \
-DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF \
-DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON \
-DSRB2_CONFIG_USE_GME:BOOL=OFF \
-DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
...@@ -79,11 +54,21 @@ osxcross x86_64: ...@@ -79,11 +54,21 @@ osxcross x86_64:
- - | - - |
# make # make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going - cmake --build build.x86_64 --parallel 1 -- --keep-going
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
- - |
# copy config.h
echo -e "\e[0Ksection_start:`date +%s`:copy[collapsed=false]\r\e[0KCopying config.h"
- mkdir --parents --verbose build.x86_64/dist
- cp --reflink=auto --sparse=always --verbose build.x86_64/src/config.h build.x86_64/dist/x86_64.h
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
after_script: after_script:
- - | - - |
# apt_clean # apt_clean
...@@ -93,18 +78,6 @@ osxcross x86_64: ...@@ -93,18 +78,6 @@ osxcross x86_64:
# apt_clean # apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
- - |
# vcpkg_clean
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
if [ -d "build/vcpkg-root" ]; then
pushd "build/vcpkg-root"
git clean
popd
fi
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
- - | - - |
# ccache_stats # ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
......
osxcross universal:
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:stable
dependencies:
- osxcross arm64
- osxcross x86_64
needs:
- job: osxcross arm64
- job: osxcross x86_64
stage: osxcross
allow_failure: true
artifacts:
paths:
- "dist/bin"
- "dist/src"
expose_as: "Mac Universal"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin"
script:
- - |
# mkdir
echo -e "\e[0Ksection_start:`date +%s`:mkdir[collapsed=true]\r\e[0KMaking dist folder"
mkdir --parents --verbose dist/src dist/bin
- |
# mkdir
echo -e "\e[0Ksection_end:`date +%s`:mkdir\r\e[0K"
- - |
# copy-config
echo -e "\e[0Ksection_start:`date +%s`:x86_64-config[collapsed=true]\r\e[0KCopying x86_64 config"
- cp --reflink=auto --sparse=always --verbose --target-directory=dist/src/ build.*/dist/*.h
- |
# x86_64-config
echo -e "\e[0Ksection_end:`date +%s`:x86_64-config\r\e[0K"
- - |
# copy-build
echo -e "\e[0Ksection_start:`date +%s`:copy-build[collapsed=true]\r\e[0KCopying ALL build"
- cp --reflink=auto --sparse=always --recursive --verbose --target-directory=dist/ build.*/bin/
- |
# copy-build
echo -e "\e[0Ksection_end:`date +%s`:copy-build\r\e[0K"
- - |
# link-build
echo -e "\e[0Ksection_start:`date +%s`:link-build[collapsed=true]\r\e[0KLinking universal build"
- lipo -create -output dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID build.*/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID
- |
# universal-build
echo -e "\e[0Ksection_end:`date +%s`:link-build\r\e[0K"
- - |
# arm64-verify
echo -e "\e[0Ksection_start:`date +%s`:arm64-verify[collapsed=true]\r\e[0KVerifying arm64"
- lipo dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID -verify_arch arm64
- |
# arm64-verify
echo -e "\e[0Ksection_end:`date +%s`:arm64-verify\r\e[0K"
- - |
# x86_64-verify
echo -e "\e[0Ksection_start:`date +%s`:x86_64-verify[collapsed=true]\r\e[0KVerifying x86_64"
- lipo dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID -verify_arch x86_64
- |
# x86_64-verify
echo -e "\e[0Ksection_end:`date +%s`:x86_64-verify\r\e[0K"
...@@ -16,12 +16,14 @@ Windows x64 Makefile: ...@@ -16,12 +16,14 @@ Windows x64 Makefile:
variables: variables:
PREFIX: x86_64-w64-mingw32 PREFIX: x86_64-w64-mingw32
CC: /usr/bin/x86_64-w64-mingw32-gcc
CXX: /usr/bin/x86_64-w64-mingw32-g++
script: script:
- - | - - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-x86-64-win32 - apt-get install g++-mingw-w64-x86-64-win32
- | - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
......
...@@ -7,6 +7,25 @@ Windows x64: ...@@ -7,6 +7,25 @@ Windows x64:
allow_failure: true allow_failure: true
cache:
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys:
- ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
- ccache-$CI_JOB_NAME_SLUG-master
paths:
- build/ccache
- build/ccache_statslog
- key: apt-$CI_JOB_IMAGE
paths:
- build/apt-cache
unprotect: true
- key: vcpkg-binary-cache-x64-mingw-static
paths:
- build/vcpkg-binary-cache
unprotect: true
artifacts: artifacts:
paths: paths:
- "build.cmake/bin/" - "build.cmake/bin/"
...@@ -15,13 +34,26 @@ Windows x64: ...@@ -15,13 +34,26 @@ Windows x64:
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
variables: variables:
PREFIX: x86_64-w64-mingw32 VCPKG_TARGET_TRIPLET: x64-mingw-static
CC: x86_64-w64-mingw32-gcc
CXX: x86_64-w64-mingw32-g++
LD: x86_64-w64-mingw32-ld
script: script:
- |
# vcpkg
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache"
export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache"
mkdir -p "build/vcpkg-binary-cache"
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
- - | - - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-x86-64-win32 - apt-get install g++-mingw-w64-x86-64-win32
- | - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
...@@ -37,7 +69,16 @@ Windows x64: ...@@ -37,7 +69,16 @@ Windows x64:
- - | - - |
# cmake # cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
- cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake - |
cmake \
-B build.cmake \
-G "Unix Makefiles" \
-DCMAKE_COLOR_DIAGNOSTICS=OFF \
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
-DSRB2_CONFIG_ERRORMODE=ON \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake
- | - |
# cmake # cmake
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
...@@ -45,7 +86,7 @@ Windows x64: ...@@ -45,7 +86,7 @@ Windows x64:
- - | - - |
# make # make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going - cmake --build build.cmake --parallel 1 -- --keep-going
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
...@@ -21,7 +21,7 @@ Windows x86 Makefile: ...@@ -21,7 +21,7 @@ Windows x86 Makefile:
- - | - - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-i686-win32 - apt-get install g++-mingw-w64-i686-win32
- | - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
......
...@@ -3,10 +3,6 @@ Windows x86: ...@@ -3,10 +3,6 @@ Windows x86:
stage: build stage: build
when: manual
allow_failure: true
cache: cache:
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys: fallback_keys:
...@@ -21,11 +17,6 @@ Windows x86: ...@@ -21,11 +17,6 @@ Windows x86:
- build/apt-cache - build/apt-cache
unprotect: true unprotect: true
- key: vcpkg-root
paths:
- build/vcpkg-root
unprotect: true
- key: vcpkg-binary-cache-x86-mingw-static - key: vcpkg-binary-cache-x86-mingw-static
paths: paths:
- build/vcpkg-binary-cache - build/vcpkg-binary-cache
...@@ -33,33 +24,23 @@ Windows x86: ...@@ -33,33 +24,23 @@ Windows x86:
artifacts: artifacts:
paths: paths:
- "build/ninja-x86_mingw_static_vcpkg-debug/bin/" - "build.cmake/bin/"
- "build/ninja-x86_mingw_static_vcpkg-debug/src/config.h" - "build.cmake/src/config.h"
expose_as: "Win32" expose_as: "Win32"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
variables: variables:
PREFIX: i686-w64-mingw32 VCPKG_TARGET_TRIPLET: x86-mingw-static
CC: /usr/bin/i686-w64-mingw32-gcc-posix CC: i686-w64-mingw32-gcc
CXX: /usr/bin/i686-w64-mingw32-g++-posix CXX: i686-w64-mingw32-g++
LD: i686-w64-mingw32-ld
script: script:
- | - |
# vcpkg # vcpkg
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache"
if [ -d "build/vcpkg-root" ]; then export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache"
pushd build/vcpkg-root
git fetch https://github.com/Microsoft/vcpkg master
git reset --hard FETCH_HEAD
popd
else
mkdir -p build
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
fi
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
mkdir -p "build/vcpkg-binary-cache" mkdir -p "build/vcpkg-binary-cache"
...@@ -68,7 +49,7 @@ Windows x86: ...@@ -68,7 +49,7 @@ Windows x86:
- - | - - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-i686-win32 - apt-get install g++-mingw-w64-i686-win32
- | - |
# apt_toolchain # apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
...@@ -84,9 +65,16 @@ Windows x86: ...@@ -84,9 +65,16 @@ Windows x86:
- - | - - |
# cmake # cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
# cmake - |
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" cmake \
- cmake --preset ninja-x86_mingw_static_vcpkg-debug -G "Unix Makefiles" -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -B build.cmake \
-G "Unix Makefiles" \
-DCMAKE_COLOR_DIAGNOSTICS=OFF \
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
-DSRB2_CONFIG_ERRORMODE=ON \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake
- | - |
# cmake # cmake
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
...@@ -94,37 +82,7 @@ Windows x86: ...@@ -94,37 +82,7 @@ Windows x86:
- - | - - |
# make # make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- cmake --build --preset ninja-x86_mingw_static_vcpkg-debug --parallel 1 -- --keep-going || cmake --build --preset ninja-x86_mingw_static_vcpkg-debug --parallel 1 -- --keep-going - cmake --build build.cmake --parallel 1 -- --keep-going
- | - |
# make # make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
after_script:
- - |
# apt_clean
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
- apt-get autoclean
- |
# apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
- - |
# vcpkg_clean
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
if [ -d "build/vcpkg-root" ]; then
pushd "build/vcpkg-root"
git clean -f
popd
fi
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
- - |
# ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
- ccache --show-stats
- ccache --show-log-stats || true
- |
# ccahe_stats
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
...@@ -93,26 +93,24 @@ ...@@ -93,26 +93,24 @@
- - | - - |
# ccache_config # ccache_config
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
- mkdir --parents --verbose ~/.ccache/
- touch ~/.ccache/ccache.conf
- | - |
# cache.conf # cache.conf
echo Adding ccache configution option echo Adding ccache configution option
- | - |
# base_dir # base_dir
echo base_dir = $CI_PROJECT_DIR | tee --append ~/.ccache/ccache.conf ccache --set-config base_dir=$CI_PROJECT_DIR
- | - |
# cache_dir # cache_dir
echo cache_dir = $CI_PROJECT_DIR/build/ccache | tee --append ~/.ccache/ccache.conf ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache
- | - |
# compiler_check # compiler_check
echo compiler_check = content | tee --append ~/.ccache/ccache.conf ccache --set-config compiler_check=content
- | - |
# stats_log # stats_log
echo stats_log = $CI_PROJECT_DIR/build/ccache_statslog | tee --append ~/.ccache/ccache.conf ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog || true
- | - |
# max_size # max_size
echo max_size = 300M | tee --append ~/.ccache/ccache.conf ccache --set-config max_size=300M
- | - |
# ccache_config # ccache_config
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
......
version: 2.2.14.{branch}-{build} version: 2.2.16.{branch}-{build}
os: MinGW os: MinGW
environment: environment:
......
...@@ -33,9 +33,6 @@ https://discord.gg/b3BGb8A ...@@ -33,9 +33,6 @@ https://discord.gg/b3BGb8A
Twitter: Twitter:
https://twitter.com/SonicTeamJr https://twitter.com/SonicTeamJr
Facebook:
https://facebook.com/SonicRoboBlast2
COPYRIGHT AND DISCLAIMER COPYRIGHT AND DISCLAIMER
......
...@@ -125,6 +125,7 @@ udmf ...@@ -125,6 +125,7 @@ udmf
{ {
1 = "Skip score tally"; 1 = "Skip score tally";
2 = "Check emeralds"; 2 = "Check emeralds";
4 = "Keep post level cutscene if score tally is skipped";
} }
} }
arg2 arg2
......
...@@ -23,6 +23,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ...@@ -23,6 +23,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
i_time.c i_time.c
y_inter.c y_inter.c
st_stuff.c st_stuff.c
matrix.c
m_aatree.c m_aatree.c
m_anigif.c m_anigif.c
m_argv.c m_argv.c
...@@ -56,6 +57,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ...@@ -56,6 +57,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
p_tick.c p_tick.c
p_user.c p_user.c
p_slopes.c p_slopes.c
quaternion.c
tables.c tables.c
r_bsp.c r_bsp.c
r_data.c r_data.c
...@@ -77,6 +79,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ...@@ -77,6 +79,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
r_portal.c r_portal.c
screen.c screen.c
taglist.c taglist.c
vector3d.c
v_video.c v_video.c
s_sound.c s_sound.c
sounds.c sounds.c
...@@ -104,6 +107,11 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ...@@ -104,6 +107,11 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
lua_hudlib_drawlist.c lua_hudlib_drawlist.c
lua_colorlib.c lua_colorlib.c
lua_inputlib.c lua_inputlib.c
lua_interceptlib.c
lua_vectorlib.c
lua_matrixlib.c
lua_quaternionlib.c
lua_archive.c
) )
# This updates the modification time for comptime.c at the # This updates the modification time for comptime.c at the
...@@ -143,7 +151,7 @@ if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows") ...@@ -143,7 +151,7 @@ if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
endif() endif()
endif() endif()
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17) target_compile_features(SRB2SDL2 PRIVATE c_std_23 cxx_std_17)
### Configuration ### Configuration
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
...@@ -192,9 +200,6 @@ endif() ...@@ -192,9 +200,6 @@ endif()
target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE) target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE)
set(SRB2_HAVE_THREADS ON)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
if("${SRB2_CONFIG_HWRENDER}") if("${SRB2_CONFIG_HWRENDER}")
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER) target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
add_subdirectory(hardware) add_subdirectory(hardware)
...@@ -464,8 +469,13 @@ else() ...@@ -464,8 +469,13 @@ else()
endif() endif()
if(TARGET miniupnpc::miniupnpc) if(TARGET miniupnpc::miniupnpc)
if("${VCPKG_TARGET_TRIPLET}" MATCHES "-mingw-static$")
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC -DMINIUPNP_STATICLIB)
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc -liphlpapi)
else()
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC) target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC)
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc) target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc)
endif()
message(STATUS "miniupnpc Found") message(STATUS "miniupnpc Found")
else() else()
message(STATUS "No miniupnpc Found") message(STATUS "No miniupnpc Found")
......
...@@ -13,10 +13,7 @@ ifdef MINGW ...@@ -13,10 +13,7 @@ ifdef MINGW
libs+=-mconsole libs+=-mconsole
endif endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=dedicated/i_threads.c sources+=dedicated/i_threads.c
endif
NOOPENMPT=1 NOOPENMPT=1
NOGME=1 NOGME=1
......
...@@ -43,10 +43,7 @@ sources+=sdl/mixer_sound.c ...@@ -43,10 +43,7 @@ sources+=sdl/mixer_sound.c
endif endif
endif endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=sdl/i_threads.c sources+=sdl/i_threads.c
endif
ifdef SDL_PKGCONFIG ifdef SDL_PKGCONFIG
$(eval $(call Use_pkg_config,SDL)) $(eval $(call Use_pkg_config,SDL))
......
...@@ -17,6 +17,7 @@ hu_stuff.c ...@@ -17,6 +17,7 @@ hu_stuff.c
i_time.c i_time.c
y_inter.c y_inter.c
st_stuff.c st_stuff.c
matrix.c
m_aatree.c m_aatree.c
m_anigif.c m_anigif.c
m_argv.c m_argv.c
...@@ -50,6 +51,7 @@ p_telept.c ...@@ -50,6 +51,7 @@ p_telept.c
p_tick.c p_tick.c
p_user.c p_user.c
p_slopes.c p_slopes.c
quaternion.c
tables.c tables.c
r_bsp.c r_bsp.c
r_data.c r_data.c
...@@ -71,6 +73,7 @@ r_picformats.c ...@@ -71,6 +73,7 @@ r_picformats.c
r_portal.c r_portal.c
screen.c screen.c
taglist.c taglist.c
vector3d.c
v_video.c v_video.c
s_sound.c s_sound.c
sounds.c sounds.c
...@@ -98,3 +101,8 @@ lua_hudlib.c ...@@ -98,3 +101,8 @@ lua_hudlib.c
lua_hudlib_drawlist.c lua_hudlib_drawlist.c
lua_inputlib.c lua_inputlib.c
lua_colorlib.c lua_colorlib.c
lua_interceptlib.c
lua_vectorlib.c
lua_matrixlib.c
lua_quaternionlib.c
lua_archive.c
target_sources(SRB2SDL2 PRIVATE target_sources(SRB2SDL2 PRIVATE
lapi.c lapi.c
lbaselib.c lbaselib.c
ldblib.c
ldo.c ldo.c
lfunc.c lfunc.c
linit.c linit.c
......
lapi.c lapi.c
lbaselib.c lbaselib.c
ldo.c ldo.c
ldblib.c
lfunc.c lfunc.c
linit.c linit.c
liolib.c liolib.c
......
/*
** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ldblib_c
#define LUA_LIB
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
static void settabss (lua_State *L, const char *i, const char *v) {
lua_pushstring(L, v);
lua_setfield(L, -2, i);
}
static void settabsi (lua_State *L, const char *i, int v) {
lua_pushinteger(L, v);
lua_setfield(L, -2, i);
}
static lua_State *getthread (lua_State *L, int *arg) {
if (lua_isthread(L, 1)) {
*arg = 1;
return lua_tothread(L, 1);
}
else {
*arg = 0;
return L;
}
}
static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) {
if (L == L1) {
lua_pushvalue(L, -2);
lua_remove(L, -3);
}
else
lua_xmove(L1, L, 1);
lua_setfield(L, -2, fname);
}
static int db_getinfo (lua_State *L) {
lua_Debug ar;
int arg;
lua_State *L1 = getthread(L, &arg);
const char *options = luaL_optstring(L, arg+2, "flnSu");
if (lua_isnumber(L, arg+1)) {
if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) {
lua_pushnil(L); /* level out of range */
return 1;
}
}
else if (lua_isfunction(L, arg+1)) {
lua_pushfstring(L, ">%s", options);
options = lua_tostring(L, -1);
lua_pushvalue(L, arg+1);
lua_xmove(L, L1, 1);
}
else
return luaL_argerror(L, arg+1, "function or level expected");
if (!lua_getinfo(L1, options, &ar))
return luaL_argerror(L, arg+2, "invalid option");
lua_createtable(L, 0, 2);
if (strchr(options, 'S')) {
settabss(L, "source", ar.source);
settabss(L, "short_src", ar.short_src);
settabsi(L, "linedefined", ar.linedefined);
settabsi(L, "lastlinedefined", ar.lastlinedefined);
settabss(L, "what", ar.what);
}
if (strchr(options, 'l'))
settabsi(L, "currentline", ar.currentline);
if (strchr(options, 'u'))
settabsi(L, "nups", ar.nups);
if (strchr(options, 'n')) {
settabss(L, "name", ar.name);
settabss(L, "namewhat", ar.namewhat);
}
if (strchr(options, 'L'))
treatstackoption(L, L1, "activelines");
if (strchr(options, 'f'))
treatstackoption(L, L1, "func");
return 1; /* return table */
}
static int db_getlocal (lua_State *L) {
int arg;
lua_State *L1 = getthread(L, &arg);
lua_Debug ar;
const char *name;
if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */
return luaL_argerror(L, arg+1, "level out of range");
name = lua_getlocal(L1, &ar, luaL_checkint(L, arg+2));
if (name) {
lua_xmove(L1, L, 1);
lua_pushstring(L, name);
lua_pushvalue(L, -2);
return 2;
}
else {
lua_pushnil(L);
return 1;
}
}
static int auxupvalue (lua_State *L, int get) {
const char *name;
int n = luaL_checkint(L, 2);
luaL_checktype(L, 1, LUA_TFUNCTION);
if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */
name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
if (name == NULL) return 0;
lua_pushstring(L, name);
lua_insert(L, -(get+1));
return get + 1;
}
static int db_getupvalue (lua_State *L) {
return auxupvalue(L, 1);
}
static char KEY_HOOK = 'h';
static void hookf (lua_State *L, lua_Debug *ar) {
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail return"};
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
lua_pushlightuserdata(L, L);
lua_rawget(L, -2);
if (lua_isfunction(L, -1)) {
lua_pushstring(L, hooknames[(int)ar->event]);
if (ar->currentline >= 0)
lua_pushinteger(L, ar->currentline);
else lua_pushnil(L);
lua_assert(lua_getinfo(L, "lS", ar));
lua_call(L, 2, 0);
}
}
static int makemask (const char *smask, int count) {
int mask = 0;
if (strchr(smask, 'c')) mask |= LUA_MASKCALL;
if (strchr(smask, 'r')) mask |= LUA_MASKRET;
if (strchr(smask, 'l')) mask |= LUA_MASKLINE;
if (count > 0) mask |= LUA_MASKCOUNT;
return mask;
}
static char *unmakemask (int mask, char *smask) {
int i = 0;
if (mask & LUA_MASKCALL) smask[i++] = 'c';
if (mask & LUA_MASKRET) smask[i++] = 'r';
if (mask & LUA_MASKLINE) smask[i++] = 'l';
smask[i] = '\0';
return smask;
}
static void gethooktable (lua_State *L) {
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
if (!lua_istable(L, -1)) {
lua_pop(L, 1);
lua_createtable(L, 0, 1);
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_pushvalue(L, -2);
lua_rawset(L, LUA_REGISTRYINDEX);
}
}
static int db_sethook (lua_State *L) {
int arg, mask, count;
lua_Hook func;
lua_State *L1 = getthread(L, &arg);
if (lua_isnoneornil(L, arg+1)) {
lua_settop(L, arg+1);
func = NULL; mask = 0; count = 0; /* turn off hooks */
}
else {
const char *smask = luaL_checkstring(L, arg+2);
luaL_checktype(L, arg+1, LUA_TFUNCTION);
count = luaL_optint(L, arg+3, 0);
func = hookf; mask = makemask(smask, count);
}
gethooktable(L);
lua_pushlightuserdata(L, L1);
lua_pushvalue(L, arg+1);
lua_rawset(L, -3); /* set new hook */
lua_pop(L, 1); /* remove hook table */
lua_sethook(L1, func, mask, count); /* set hooks */
return 0;
}
static int db_gethook (lua_State *L) {
int arg;
lua_State *L1 = getthread(L, &arg);
char buff[5];
int mask = lua_gethookmask(L1);
lua_Hook hook = lua_gethook(L1);
if (hook != NULL && hook != hookf) /* external hook? */
lua_pushliteral(L, "external hook");
else {
gethooktable(L);
lua_pushlightuserdata(L, L1);
lua_rawget(L, -2); /* get hook */
lua_remove(L, -2); /* remove hook table */
}
lua_pushstring(L, unmakemask(mask, buff));
lua_pushinteger(L, lua_gethookcount(L1));
return 3;
}
#define LEVELS1 12 /* size of the first part of the stack */
#define LEVELS2 10 /* size of the second part of the stack */
static int db_errorfb (lua_State *L) {
int level;
int firstpart = 1; /* still before eventual `...' */
int arg;
lua_State *L1 = getthread(L, &arg);
lua_Debug ar;
if (lua_isnumber(L, arg+2)) {
level = (int)lua_tointeger(L, arg+2);
lua_pop(L, 1);
}
else
level = (L == L1) ? 1 : 0; /* level 0 may be this own function */
if (lua_gettop(L) == arg)
lua_pushliteral(L, "");
else if (!lua_isstring(L, arg+1)) return 1; /* message is not a string */
else lua_pushliteral(L, "\n");
lua_pushliteral(L, "stack traceback:");
while (lua_getstack(L1, level++, &ar)) {
if (level > LEVELS1 && firstpart) {
/* no more than `LEVELS2' more levels? */
if (!lua_getstack(L1, level+LEVELS2, &ar))
level--; /* keep going */
else {
lua_pushliteral(L, "\n\t..."); /* too many levels */
while (lua_getstack(L1, level+LEVELS2, &ar)) /* find last levels */
level++;
}
firstpart = 0;
continue;
}
lua_pushliteral(L, "\n\t");
lua_getinfo(L1, "Snl", &ar);
lua_pushfstring(L, "%s:", ar.short_src);
if (ar.currentline > 0)
lua_pushfstring(L, "%d:", ar.currentline);
if (*ar.namewhat != '\0') /* is there a name? */
lua_pushfstring(L, " in function " LUA_QS, ar.name);
else {
if (*ar.what == 'm') /* main? */
lua_pushfstring(L, " in main chunk");
else if (*ar.what == 'C' || *ar.what == 't')
lua_pushliteral(L, " ?"); /* C function or tail call */
else
lua_pushfstring(L, " in function <%s:%d>",
ar.short_src, ar.linedefined);
}
lua_concat(L, lua_gettop(L) - arg);
}
lua_concat(L, lua_gettop(L) - arg);
return 1;
}
static const luaL_Reg dblib[] = {
{"gethook", db_gethook},
{"getinfo", db_getinfo},
{"getlocal", db_getlocal},
{"getupvalue", db_getupvalue},
{"sethook", db_sethook},
{"traceback", db_errorfb},
{NULL, NULL}
};
LUALIB_API int luaopen_debug (lua_State *L) {
luaL_register(L, LUA_DBLIBNAME, dblib);
return 1;
}
...@@ -20,6 +20,7 @@ static const luaL_Reg lualibs[] = { ...@@ -20,6 +20,7 @@ static const luaL_Reg lualibs[] = {
{LUA_IOLIBNAME, luaopen_io}, {LUA_IOLIBNAME, luaopen_io},
{LUA_OSLIBNAME, luaopen_os}, {LUA_OSLIBNAME, luaopen_os},
{LUA_STRLIBNAME, luaopen_string}, {LUA_STRLIBNAME, luaopen_string},
{LUA_DBLIBNAME, luaopen_debug},
{NULL, NULL} {NULL, NULL}
}; };
......
...@@ -39,13 +39,26 @@ ...@@ -39,13 +39,26 @@
// Allow scripters to write files of these types to SRB2's folder // Allow scripters to write files of these types to SRB2's folder
static const char *whitelist[] = { static const char *whitelist[] = {
".bmp",
".cfg",
".csv",
".dat", ".dat",
".bin",
".bmp",
".png", ".png",
".sav2",
".obj",
".json",
".yaml",
".xml",
".csv",
".soc",
".cfg",
".ini",
".txt", ".txt",
".log",
".md",
".sav2",
}; };
...@@ -183,7 +196,7 @@ void MakePathDirs(char *path) ...@@ -183,7 +196,7 @@ void MakePathDirs(char *path)
} }
static int CheckFileName(lua_State *L, const char *filename) static int CheckFileName(lua_State* L, const char* filename, boolean extensioncheck)
{ {
int length = strlen(filename); int length = strlen(filename);
boolean pass = false; boolean pass = false;
...@@ -195,12 +208,20 @@ static int CheckFileName(lua_State *L, const char *filename) ...@@ -195,12 +208,20 @@ static int CheckFileName(lua_State *L, const char *filename)
return pushresult(L, 0, filename); return pushresult(L, 0, filename);
} }
if (extensioncheck)
{
for (i = 0; i < (sizeof(whitelist) / sizeof(const char*)); i++) for (i = 0; i < (sizeof(whitelist) / sizeof(const char*)); i++)
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i])) if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
{ {
pass = true; pass = true;
break; break;
} }
}
else
{
pass = true;
}
if (strstr(filename, "./") if (strstr(filename, "./")
|| strstr(filename, "..") || strchr(filename, ':') || strstr(filename, "..") || strchr(filename, ':')
|| filename[0] == '/' || filename[0] == '/'
...@@ -218,7 +239,7 @@ static int io_open (lua_State *L) { ...@@ -218,7 +239,7 @@ static int io_open (lua_State *L) {
const char *mode = luaL_optstring(L, 2, "r"); const char *mode = luaL_optstring(L, 2, "r");
int checkresult; int checkresult;
checkresult = CheckFileName(L, filename); checkresult = CheckFileName(L, filename, false);
if (checkresult) if (checkresult)
return checkresult; return checkresult;
...@@ -241,7 +262,10 @@ static int io_openlocal (lua_State *L) { ...@@ -241,7 +262,10 @@ static int io_openlocal (lua_State *L) {
luafiletransfer_t *filetransfer; luafiletransfer_t *filetransfer;
int checkresult; int checkresult;
checkresult = CheckFileName(L, filename); // Decision was made for normal reading (binary + text) to have no whitelist restrictions
boolean readcheck = (strchr(mode, 'w') != NULL) || (strchr(mode, 'a') != NULL) || (strchr(mode, '+') != NULL);
checkresult = CheckFileName(L, filename, readcheck);
if (checkresult) if (checkresult)
return checkresult; return checkresult;
......