mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 06:13:18 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
d232ebafc3
29 changed files with 391 additions and 382 deletions
|
@ -58,26 +58,24 @@ Alpine 3 GCC Makefile:
|
||||||
- - |
|
- - |
|
||||||
# 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 = $PWD | tee -a ~/.ccache/ccache.conf
|
ccache --set-config base_dir=$CI_PROJECT_DIR
|
||||||
- |
|
- |
|
||||||
# cache_dir
|
# cache_dir
|
||||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache
|
||||||
- |
|
- |
|
||||||
# compiler_check
|
# compiler_check
|
||||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
ccache --set-config compiler_check=content
|
||||||
- |
|
- |
|
||||||
# stats_log
|
# stats_log
|
||||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog
|
||||||
- |
|
- |
|
||||||
# max_size
|
# max_size
|
||||||
echo max_size = 50M | tee -a ~/.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"
|
||||||
|
|
|
@ -58,26 +58,24 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# 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 = $PWD | tee -a ~/.ccache/ccache.conf
|
ccache --set-config base_dir=$CI_PROJECT_DIR
|
||||||
- |
|
- |
|
||||||
# cache_dir
|
# cache_dir
|
||||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache
|
||||||
- |
|
- |
|
||||||
# compiler_check
|
# compiler_check
|
||||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
ccache --set-config compiler_check=content
|
||||||
- |
|
- |
|
||||||
# stats_log
|
# stats_log
|
||||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog
|
||||||
- |
|
- |
|
||||||
# max_size
|
# max_size
|
||||||
echo max_size = 50M | tee -a ~/.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"
|
||||||
|
@ -111,7 +109,7 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -119,7 +117,7 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
batocera:arm64 Makefile:
|
batocera:arm64 Makefile:
|
||||||
extends: Debian stable:arm64 Makefile
|
extends: Debian stable:arm64 Makefile
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
batocera:arm64:
|
batocera:arm64:
|
||||||
extends: Debian stable:arm64
|
extends: Debian stable:arm64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
@ -32,7 +34,7 @@ batocera: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.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -40,7 +42,7 @@ batocera: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"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:amd64 Makefile:
|
Debian oldstable:amd64 Makefile:
|
||||||
extends: Debian stable:amd64 Makefile
|
extends: Debian stable:amd64 Makefile
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:amd64:
|
Debian oldstable:amd64:
|
||||||
extends: Debian stable:amd64
|
extends: Debian stable:amd64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
@ -34,7 +36,7 @@ Debian oldstable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -42,7 +44,7 @@ Debian oldstable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:arm64 Makefile:
|
Debian oldstable:arm64 Makefile:
|
||||||
extends: Debian stable:arm64 Makefile
|
extends: Debian stable:arm64 Makefile
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:arm64:
|
Debian oldstable:arm64:
|
||||||
extends: Debian stable:arm64
|
extends: Debian stable:arm64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
@ -34,7 +36,7 @@ Debian oldstable: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.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -42,7 +44,7 @@ Debian oldstable: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"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -13,7 +13,6 @@ Debian stable:amd64 Makefile:
|
||||||
variables:
|
variables:
|
||||||
CC: x86_64-linux-gnu-gcc
|
CC: x86_64-linux-gnu-gcc
|
||||||
CXX: x86_64-linux-gnu-g++
|
CXX: x86_64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||||
OBJDUMP: x86_64-linux-gnu-objdump
|
OBJDUMP: x86_64-linux-gnu-objdump
|
||||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||||
|
|
|
@ -13,7 +13,6 @@ Debian stable:amd64:
|
||||||
variables:
|
variables:
|
||||||
CC: x86_64-linux-gnu-gcc
|
CC: x86_64-linux-gnu-gcc
|
||||||
CXX: x86_64-linux-gnu-g++
|
CXX: x86_64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||||
OBJDUMP: x86_64-linux-gnu-objdump
|
OBJDUMP: x86_64-linux-gnu-objdump
|
||||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||||
|
@ -40,7 +39,7 @@ Debian stable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -48,7 +47,7 @@ Debian stable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -15,7 +15,6 @@ Debian stable:arm64 Makefile:
|
||||||
variables:
|
variables:
|
||||||
CC: aarch64-linux-gnu-gcc
|
CC: aarch64-linux-gnu-gcc
|
||||||
CXX: aarch64-linux-gnu-g++
|
CXX: aarch64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||||
OBJDUMP: aarch64-linux-gnu-objdump
|
OBJDUMP: aarch64-linux-gnu-objdump
|
||||||
LD: aarch64-linux-gnu-ld
|
LD: aarch64-linux-gnu-ld
|
||||||
|
|
|
@ -15,7 +15,6 @@ Debian stable:arm64:
|
||||||
variables:
|
variables:
|
||||||
CC: aarch64-linux-gnu-gcc
|
CC: aarch64-linux-gnu-gcc
|
||||||
CXX: aarch64-linux-gnu-g++
|
CXX: aarch64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||||
OBJDUMP: aarch64-linux-gnu-objdump
|
OBJDUMP: aarch64-linux-gnu-objdump
|
||||||
LD: aarch64-linux-gnu-ld
|
LD: aarch64-linux-gnu-ld
|
||||||
|
@ -41,7 +40,7 @@ Debian stable: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.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -49,7 +48,7 @@ Debian stable: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"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -16,10 +16,9 @@ Debian stable Clang:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang
|
CXX: clang++
|
||||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
||||||
|
@ -41,7 +40,7 @@ Debian stable Clang:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -49,7 +48,7 @@ Debian stable Clang:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -40,7 +40,7 @@ Debian stable:i386:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -48,7 +48,7 @@ Debian stable:i386:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -16,7 +16,6 @@ Debian testing Clang:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang
|
CXX: clang++
|
||||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ Debian testing GCC Makefile:
|
||||||
variables:
|
variables:
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
||||||
|
|
|
@ -19,7 +19,6 @@ Debian testing GCC:
|
||||||
variables:
|
variables:
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
||||||
|
@ -41,7 +40,7 @@ Debian testing GCC:
|
||||||
- - |
|
- - |
|
||||||
# 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 -DSRB2_CONFIG_USE_GME:BOOL=ON
|
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -49,7 +48,7 @@ Debian testing GCC:
|
||||||
- - |
|
- - |
|
||||||
# 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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
||||||
|
|
|
@ -3,24 +3,29 @@ osxcross arm64:
|
||||||
|
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "build.arm64/bin/"
|
- "build.arm64/bin/"
|
||||||
- "build.arm64/dist/arm64.h"
|
- "build.arm64/dist/arm64.h"
|
||||||
- "build.arm64/src/config.h"
|
- "build.arm64/src/config.h"
|
||||||
expose_as: "Mac arm64"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4"
|
|
||||||
|
|
||||||
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 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile
|
- osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true
|
||||||
- osxcross-macports install --static --arm64 curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 curl libsdl2_mixer libpng
|
- 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 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl 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"
|
||||||
|
@ -28,7 +33,7 @@ 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.arm64 --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 -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID
|
- cmake -B build.arm64 -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 -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
@ -36,7 +41,7 @@ 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"
|
||||||
- cmake --build build.arm64 --parallel 1 --verbose
|
- cmake --build build.arm64 --parallel 1 --verbose -- --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"
|
||||||
|
@ -49,3 +54,22 @@ osxcross arm64:
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
|
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,69 +3,29 @@ 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.x86_64/bin/"
|
- "build.x86_64/bin/"
|
||||||
- "build.x86_64/dist/x86_64.h"
|
- "build.x86_64/dist/x86_64.h"
|
||||||
- "build.x86_64/src/config.h"
|
- "build.x86_64/src/config.h"
|
||||||
expose_as: "Mac x86_64"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4"
|
|
||||||
|
|
||||||
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 libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile
|
- osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true
|
||||||
- osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng
|
- 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 miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl 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"
|
||||||
|
@ -73,7 +33,7 @@ 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.x86_64 --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 -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID
|
- cmake -B build.x86_64 -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 -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
@ -81,7 +41,7 @@ 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"
|
||||||
- cmake --build build.x86_64 --parallel 1 --verbose
|
- cmake --build build.x86_64 --parallel 1 --verbose -- --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"
|
||||||
|
@ -105,18 +65,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:"
|
||||||
|
|
|
@ -10,12 +10,14 @@ osxcross universal:
|
||||||
|
|
||||||
stage: osxcross
|
stage: osxcross
|
||||||
|
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "dist/bin"
|
- "dist/bin"
|
||||||
- "dist/src"
|
- "dist/src"
|
||||||
expose_as: "Mac Universal"
|
expose_as: "Mac Universal"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin21.4"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
|
@ -16,6 +16,8 @@ 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:
|
||||||
- - |
|
- - |
|
||||||
|
|
|
@ -21,11 +21,6 @@ Windows x64:
|
||||||
- build/apt-cache
|
- build/apt-cache
|
||||||
unprotect: true
|
unprotect: true
|
||||||
|
|
||||||
- key: vcpkg-root
|
|
||||||
paths:
|
|
||||||
- build/vcpkg-root
|
|
||||||
unprotect: true
|
|
||||||
|
|
||||||
- key: vcpkg-binary-cache-x64-mingw-static
|
- key: vcpkg-binary-cache-x64-mingw-static
|
||||||
paths:
|
paths:
|
||||||
- build/vcpkg-binary-cache
|
- build/vcpkg-binary-cache
|
||||||
|
@ -39,27 +34,17 @@ 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: /usr/lib/ccache/x86_64-w64-mingw32-gcc
|
CC: x86_64-w64-mingw32-gcc
|
||||||
CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++
|
CXX: x86_64-w64-mingw32-g++
|
||||||
|
LD: x86_64-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,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
|
||||||
|
|
||||||
mkdir -p "build/vcpkg-binary-cache"
|
mkdir -p "build/vcpkg-binary-cache"
|
||||||
|
|
||||||
|
@ -84,7 +69,7 @@ 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=NO -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 -G "Unix Makefiles"
|
- cmake -B build.cmake -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 -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -92,37 +77,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"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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"
|
|
||||||
|
|
|
@ -17,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
|
||||||
|
@ -35,27 +30,17 @@ Windows x86:
|
||||||
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/lib/ccache/i686-w64-mingw32-gcc
|
CC: i686-w64-mingw32-gcc
|
||||||
CXX: /usr/lib/ccache/i686-w64-mingw32-g++
|
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,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
|
||||||
|
|
||||||
mkdir -p "build/vcpkg-binary-cache"
|
mkdir -p "build/vcpkg-binary-cache"
|
||||||
|
|
||||||
|
@ -80,7 +65,7 @@ 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 -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles"
|
- cmake -B build.cmake -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 -G "Unix Makefiles"
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
@ -88,37 +73,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 build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --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 @@
|
||||||
- - |
|
- - |
|
||||||
# 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"
|
||||||
|
|
|
@ -3892,6 +3892,9 @@ void M_Ticker(void)
|
||||||
M_SetupScreenshotMenu();
|
M_SetupScreenshotMenu();
|
||||||
|
|
||||||
#if defined (MASTERSERVER) && defined (HAVE_THREADS)
|
#if defined (MASTERSERVER) && defined (HAVE_THREADS)
|
||||||
|
if (!netgame)
|
||||||
|
return;
|
||||||
|
|
||||||
I_lock_mutex(&ms_ServerList_mutex);
|
I_lock_mutex(&ms_ServerList_mutex);
|
||||||
{
|
{
|
||||||
if (ms_ServerList)
|
if (ms_ServerList)
|
||||||
|
|
|
@ -63,7 +63,11 @@ consvar_t cv_masterserver_token = CVAR_INIT
|
||||||
|
|
||||||
static int hms_started;
|
static int hms_started;
|
||||||
|
|
||||||
|
static boolean hms_args_checked;
|
||||||
|
#ifndef NO_IPV6
|
||||||
static boolean hms_allow_ipv6;
|
static boolean hms_allow_ipv6;
|
||||||
|
#endif
|
||||||
|
static boolean hms_allow_ipv4;
|
||||||
|
|
||||||
static char *hms_api;
|
static char *hms_api;
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
|
@ -134,6 +138,18 @@ HMS_on_read (char *s, size_t _1, size_t n, void *userdata)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void HMS_check_args_once(void)
|
||||||
|
{
|
||||||
|
if (hms_args_checked)
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef NO_IPV6
|
||||||
|
hms_allow_ipv6 = !M_CheckParm("-noipv6");
|
||||||
|
#endif
|
||||||
|
hms_allow_ipv4 = !M_CheckParm("-noipv4");
|
||||||
|
hms_args_checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
FUNCDEBUG static struct HMS_buffer *
|
FUNCDEBUG static struct HMS_buffer *
|
||||||
HMS_connect (int proto, const char *format, ...)
|
HMS_connect (int proto, const char *format, ...)
|
||||||
{
|
{
|
||||||
|
@ -152,7 +168,6 @@ HMS_connect (int proto, const char *format, ...)
|
||||||
|
|
||||||
if (! hms_started)
|
if (! hms_started)
|
||||||
{
|
{
|
||||||
hms_allow_ipv6 = !M_CheckParm("-noipv6");
|
|
||||||
if (curl_global_init(CURL_GLOBAL_ALL) != 0)
|
if (curl_global_init(CURL_GLOBAL_ALL) != 0)
|
||||||
{
|
{
|
||||||
Contact_error();
|
Contact_error();
|
||||||
|
@ -225,20 +240,27 @@ HMS_connect (int proto, const char *format, ...)
|
||||||
curl_easy_setopt(curl, CURLOPT_STDERR, logstream);
|
curl_easy_setopt(curl, CURLOPT_STDERR, logstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (M_CheckParm("-bindaddr") && M_IsNextParm())
|
|
||||||
{
|
|
||||||
curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm());
|
|
||||||
}
|
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
|
|
||||||
#ifndef NO_IPV6
|
#ifndef NO_IPV6
|
||||||
if (proto == PROTO_V6)
|
if (proto == PROTO_V6 || (proto == PROTO_ANY && !hms_allow_ipv4))
|
||||||
|
{
|
||||||
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
|
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
|
||||||
if (proto == PROTO_V4)
|
if (M_CheckParm("-bindaddr6") && M_IsNextParm())
|
||||||
|
{
|
||||||
|
curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (proto == PROTO_V4 || (proto == PROTO_ANY && !hms_allow_ipv6))
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||||
|
if (M_CheckParm("-bindaddr") && M_IsNextParm())
|
||||||
|
{
|
||||||
|
curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
||||||
|
@ -326,6 +348,8 @@ HMS_fetch_rooms (int joining, int query_id)
|
||||||
|
|
||||||
(void)query_id;
|
(void)query_id;
|
||||||
|
|
||||||
|
HMS_check_args_once();
|
||||||
|
|
||||||
hms = HMS_connect(PROTO_ANY, "rooms");
|
hms = HMS_connect(PROTO_ANY, "rooms");
|
||||||
|
|
||||||
if (! hms)
|
if (! hms)
|
||||||
|
@ -420,18 +444,15 @@ int
|
||||||
HMS_register (void)
|
HMS_register (void)
|
||||||
{
|
{
|
||||||
struct HMS_buffer *hms;
|
struct HMS_buffer *hms;
|
||||||
int ok;
|
int ok = 0;
|
||||||
|
|
||||||
char post[256];
|
char post[256];
|
||||||
|
|
||||||
char *title;
|
char *title;
|
||||||
|
|
||||||
hms = HMS_connect(PROTO_V4, "rooms/%d/register", cv_masterserver_room_id.value);
|
HMS_check_args_once();
|
||||||
|
|
||||||
if (! hms)
|
title = curl_easy_escape(NULL, cv_servername.string, 0);
|
||||||
return 0;
|
|
||||||
|
|
||||||
title = curl_easy_escape(hms->curl, cv_servername.string, 0);
|
|
||||||
|
|
||||||
snprintf(post, sizeof post,
|
snprintf(post, sizeof post,
|
||||||
"port=%d&"
|
"port=%d&"
|
||||||
|
@ -447,16 +468,24 @@ HMS_register (void)
|
||||||
|
|
||||||
curl_free(title);
|
curl_free(title);
|
||||||
|
|
||||||
curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post);
|
if (hms_allow_ipv4)
|
||||||
|
|
||||||
ok = HMS_do(hms);
|
|
||||||
|
|
||||||
if (ok)
|
|
||||||
{
|
{
|
||||||
hms_server_token = strdup(strtok(hms->buffer, "\n"));
|
hms = HMS_connect(PROTO_V4, "rooms/%d/register", cv_masterserver_room_id.value);
|
||||||
}
|
|
||||||
|
|
||||||
HMS_end(hms);
|
if (! hms)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post);
|
||||||
|
|
||||||
|
ok = HMS_do(hms);
|
||||||
|
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
hms_server_token = strdup(strtok(hms->buffer, "\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
HMS_end(hms);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_IPV6
|
#ifndef NO_IPV6
|
||||||
if (!hms_allow_ipv6)
|
if (!hms_allow_ipv6)
|
||||||
|
@ -488,7 +517,9 @@ HMS_unlist (void)
|
||||||
struct HMS_buffer *hms;
|
struct HMS_buffer *hms;
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
|
||||||
if (hms_server_token)
|
HMS_check_args_once();
|
||||||
|
|
||||||
|
if (hms_server_token && hms_allow_ipv4)
|
||||||
{
|
{
|
||||||
hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token);
|
hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token);
|
||||||
|
|
||||||
|
@ -535,6 +566,7 @@ HMS_update (void)
|
||||||
|
|
||||||
char *title;
|
char *title;
|
||||||
|
|
||||||
|
HMS_check_args_once();
|
||||||
title = curl_easy_escape(NULL, cv_servername.string, 0);
|
title = curl_easy_escape(NULL, cv_servername.string, 0);
|
||||||
|
|
||||||
snprintf(post, sizeof post,
|
snprintf(post, sizeof post,
|
||||||
|
@ -544,7 +576,7 @@ HMS_update (void)
|
||||||
|
|
||||||
curl_free(title);
|
curl_free(title);
|
||||||
|
|
||||||
if (hms_server_token)
|
if (hms_server_token && hms_allow_ipv4)
|
||||||
{
|
{
|
||||||
hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token);
|
hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token);
|
||||||
|
|
||||||
|
@ -583,6 +615,8 @@ HMS_list_servers (void)
|
||||||
char *list;
|
char *list;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
HMS_check_args_once();
|
||||||
|
|
||||||
hms = HMS_connect(PROTO_ANY, "servers");
|
hms = HMS_connect(PROTO_ANY, "servers");
|
||||||
|
|
||||||
if (! hms)
|
if (! hms)
|
||||||
|
@ -628,6 +662,8 @@ HMS_fetch_servers (msg_server_t *list, int room_number, int query_id)
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
HMS_check_args_once();
|
||||||
|
|
||||||
(void)query_id;
|
(void)query_id;
|
||||||
|
|
||||||
if (room_number > 0)
|
if (room_number > 0)
|
||||||
|
@ -739,6 +775,8 @@ HMS_compare_mod_version (char *buffer, size_t buffer_size)
|
||||||
char *version;
|
char *version;
|
||||||
char *version_name;
|
char *version_name;
|
||||||
|
|
||||||
|
HMS_check_args_once();
|
||||||
|
|
||||||
hms = HMS_connect(PROTO_ANY, "versions/%d", MODID);
|
hms = HMS_connect(PROTO_ANY, "versions/%d", MODID);
|
||||||
|
|
||||||
if (! hms)
|
if (! hms)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2024 by Sonic Team Junior.
|
// Copyright (C) 1999-2025 by Sonic Team Junior.
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
@ -386,6 +386,7 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk)
|
||||||
int v6 = 0;
|
int v6 = 0;
|
||||||
#endif
|
#endif
|
||||||
void *addr;
|
void *addr;
|
||||||
|
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
|
||||||
|
|
||||||
if(sk->any.sa_family == AF_INET)
|
if(sk->any.sa_family == AF_INET)
|
||||||
addr = &sk->ip4.sin_addr;
|
addr = &sk->ip4.sin_addr;
|
||||||
|
@ -399,7 +400,10 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk)
|
||||||
if(addr == NULL)
|
if(addr == NULL)
|
||||||
sprintf(s, "No address");
|
sprintf(s, "No address");
|
||||||
else if(inet_ntop(sk->any.sa_family, addr, &s[v6], sizeof (s) - v6) == NULL)
|
else if(inet_ntop(sk->any.sa_family, addr, &s[v6], sizeof (s) - v6) == NULL)
|
||||||
sprintf(s, "Unknown family type, error #%u", errno);
|
{
|
||||||
|
e = errno;
|
||||||
|
sprintf(s, "Unknown family type, error #%u: %s", e, strerror(e));
|
||||||
|
}
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
else if(sk->any.sa_family == AF_INET6)
|
else if(sk->any.sa_family == AF_INET6)
|
||||||
{
|
{
|
||||||
|
@ -456,6 +460,8 @@ static boolean SOCK_cmpipv6(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
||||||
{
|
{
|
||||||
UINT8 bitmask;
|
UINT8 bitmask;
|
||||||
I_Assert(mask <= 128);
|
I_Assert(mask <= 128);
|
||||||
|
if (mask == 0)
|
||||||
|
mask = 128;
|
||||||
if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0)
|
if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0)
|
||||||
return false;
|
return false;
|
||||||
if (mask % 8 == 0)
|
if (mask % 8 == 0)
|
||||||
|
@ -650,11 +656,12 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr
|
||||||
return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d);
|
return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH)
|
#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH || (x) == EADDRNOTAVAIL)
|
||||||
|
|
||||||
static void SOCK_Send(void)
|
static void SOCK_Send(void)
|
||||||
{
|
{
|
||||||
ssize_t c = ERRSOCKET;
|
ssize_t c = ERRSOCKET;
|
||||||
|
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
|
||||||
|
|
||||||
if (!nodeconnected[doomcom->remotenode])
|
if (!nodeconnected[doomcom->remotenode])
|
||||||
return;
|
return;
|
||||||
|
@ -668,8 +675,12 @@ static void SOCK_Send(void)
|
||||||
if (myfamily[i] == broadcastaddress[j].any.sa_family)
|
if (myfamily[i] == broadcastaddress[j].any.sa_family)
|
||||||
{
|
{
|
||||||
c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]);
|
c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]);
|
||||||
if (c == ERRSOCKET && !ALLOWEDERROR(errno))
|
if (c == ERRSOCKET)
|
||||||
break;
|
{
|
||||||
|
e = errno;
|
||||||
|
if (!ALLOWEDERROR(e))
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -681,21 +692,28 @@ static void SOCK_Send(void)
|
||||||
if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family)
|
if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family)
|
||||||
{
|
{
|
||||||
c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]);
|
c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]);
|
||||||
if (c == ERRSOCKET && !ALLOWEDERROR(errno))
|
if (c == ERRSOCKET)
|
||||||
break;
|
{
|
||||||
|
e = errno;
|
||||||
|
if (!ALLOWEDERROR(e))
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c = SOCK_SendToAddr(nodesocket[doomcom->remotenode], &clientaddress[doomcom->remotenode]);
|
c = SOCK_SendToAddr(nodesocket[doomcom->remotenode], &clientaddress[doomcom->remotenode]);
|
||||||
|
if (c == ERRSOCKET)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == ERRSOCKET)
|
if (c == ERRSOCKET && e != 0) // 0 means no socket for the address family was found
|
||||||
{
|
{
|
||||||
int e = errno; // save error code so it can't be modified later
|
|
||||||
if (!ALLOWEDERROR(e))
|
if (!ALLOWEDERROR(e))
|
||||||
I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode,
|
I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode,
|
||||||
SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e));
|
SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -726,6 +744,8 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
{
|
{
|
||||||
SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP);
|
SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
int opt;
|
int opt;
|
||||||
|
int rc;
|
||||||
|
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
|
||||||
socklen_t opts;
|
socklen_t opts;
|
||||||
#ifdef FIONBIO
|
#ifdef FIONBIO
|
||||||
unsigned long trueval = true;
|
unsigned long trueval = true;
|
||||||
|
@ -740,12 +760,17 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
#ifdef USE_WINSOCK2
|
#ifdef USE_WINSOCK2
|
||||||
DWORD dwBytesReturned = 0;
|
DWORD dwBytesReturned = 0;
|
||||||
BOOL bfalse = FALSE;
|
BOOL bfalse = FALSE;
|
||||||
WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse),
|
rc = WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse),
|
||||||
NULL, 0, &dwBytesReturned, NULL, NULL);
|
NULL, 0, &dwBytesReturned, NULL, NULL);
|
||||||
#else
|
#else
|
||||||
unsigned long falseval = false;
|
unsigned long falseval = false;
|
||||||
ioctl(s, SIO_UDP_CONNRESET, &falseval);
|
rc = ioctl(s, SIO_UDP_CONNRESET, &falseval);
|
||||||
#endif
|
#endif
|
||||||
|
if (rc == -1)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("SIO_UDP_CONNRESET failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -758,14 +783,22 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
{
|
{
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts);
|
rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts);
|
||||||
|
if (rc <= -1)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// make it broadcastable
|
// make it broadcastable
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts))
|
rc = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts);
|
||||||
|
if (rc <= -1)
|
||||||
{
|
{
|
||||||
|
e = errno;
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not get broadcast rights\n")); // I do not care anymore
|
CONS_Alert(CONS_WARNING, M_GetText("Could not get broadcast rights\n")); // I do not care anymore
|
||||||
|
I_OutputMsg("setting SO_BROADCAST failed: #%u, %s\n", e, strerror(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
|
@ -775,24 +808,34 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
{
|
{
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts);
|
rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts);
|
||||||
|
if (rc <= -1)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef IPV6_V6ONLY
|
#ifdef IPV6_V6ONLY
|
||||||
// make it IPv6 ony
|
// make it IPv6 ony
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts))
|
rc = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts);
|
||||||
|
if (rc <= -1)
|
||||||
{
|
{
|
||||||
|
e = errno;
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not limit IPv6 bind\n")); // I do not care anymore
|
CONS_Alert(CONS_WARNING, M_GetText("Could not limit IPv6 bind\n")); // I do not care anymore
|
||||||
|
I_OutputMsg("setting IPV6_V6ONLY failed: #%u, %s\n", e, strerror(e));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (bind(s, addr, addrlen) == ERRSOCKET)
|
rc = bind(s, addr, addrlen);
|
||||||
|
if (rc == ERRSOCKET)
|
||||||
{
|
{
|
||||||
|
e = errno;
|
||||||
close(s);
|
close(s);
|
||||||
I_OutputMsg("Binding failed\n");
|
I_OutputMsg("Binding failed: #%u, %s\n", e, strerror(e));
|
||||||
return (SOCKET_TYPE)ERRSOCKET;
|
return (SOCKET_TYPE)ERRSOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -806,9 +849,18 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
|
|
||||||
inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr);
|
inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr);
|
||||||
maddr.ipv6mr_interface = 0;
|
maddr.ipv6mr_interface = 0;
|
||||||
if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)) != 0)
|
rc = setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr));
|
||||||
|
if (rc <= -1)
|
||||||
{
|
{
|
||||||
|
e = errno;
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n"));
|
||||||
|
if (e == ENODEV)
|
||||||
|
{
|
||||||
|
close(s);
|
||||||
|
I_OutputMsg("Binding failed: no IPv6 device\n");
|
||||||
|
return (SOCKET_TYPE)ERRSOCKET;
|
||||||
|
}
|
||||||
|
I_OutputMsg("setting IPV6_JOIN_GROUP failed: #%u, %s \n", e, strerror(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -816,33 +868,56 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
||||||
|
|
||||||
#ifdef FIONBIO
|
#ifdef FIONBIO
|
||||||
// make it non blocking
|
// make it non blocking
|
||||||
opt = true;
|
rc = ioctl(s, FIONBIO, &trueval);
|
||||||
if (ioctl(s, FIONBIO, &trueval) != 0)
|
if (rc == -1)
|
||||||
{
|
{
|
||||||
|
e = errno;
|
||||||
close(s);
|
close(s);
|
||||||
I_OutputMsg("Seting FIOBIO on failed\n");
|
I_OutputMsg("FIOBIO failed: #%u, %s\n", e, strerror(e));
|
||||||
return (SOCKET_TYPE)ERRSOCKET;
|
return (SOCKET_TYPE)ERRSOCKET;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
opt = 0;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts);
|
rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts);
|
||||||
|
if (rc <= -1)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
CONS_Printf(M_GetText("Network system buffer: %dKb\n"), opt>>10);
|
CONS_Printf(M_GetText("Network system buffer: %dKb\n"), opt>>10);
|
||||||
|
|
||||||
if (opt < 64<<10) // 64k
|
if (opt < 64<<10) // 64k
|
||||||
{
|
{
|
||||||
opt = 64<<10;
|
opt = 64<<10;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts);
|
rc = setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts);
|
||||||
getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts);
|
if (rc <= -1)
|
||||||
if (opt < 64<<10)
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("setting SO_RCVBUF failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
|
opt = 0;
|
||||||
|
rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts);
|
||||||
|
if (rc <= -1)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
|
I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
|
if (opt <= 64<<10)
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Can't set buffer length to 64k, file transfer will be bad\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Can't set buffer length to 64k, file transfer will be bad\n"));
|
||||||
else
|
else
|
||||||
CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10);
|
CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getsockname(s, &straddr.any, &len) == -1)
|
rc = getsockname(s, &straddr.any, &len);
|
||||||
|
if (rc != 0)
|
||||||
|
{
|
||||||
|
e = errno;
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Failed to get port number\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Failed to get port number\n"));
|
||||||
|
I_OutputMsg("getsockname failed: #%u, %s\n", e, strerror(e));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (family == AF_INET)
|
if (family == AF_INET)
|
||||||
|
@ -864,6 +939,7 @@ static boolean UDP_Socket(void)
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
const INT32 b_ipv6 = !M_CheckParm("-noipv6");
|
const INT32 b_ipv6 = !M_CheckParm("-noipv6");
|
||||||
#endif
|
#endif
|
||||||
|
const INT32 b_ipv4 = !M_CheckParm("-noipv4");
|
||||||
const char *serv;
|
const char *serv;
|
||||||
|
|
||||||
|
|
||||||
|
@ -879,16 +955,45 @@ static boolean UDP_Socket(void)
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
hints.ai_protocol = IPPROTO_UDP;
|
hints.ai_protocol = IPPROTO_UDP;
|
||||||
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
if (!b_ipv6)
|
||||||
|
I_OutputMsg("Disabling IPv6 support at runtime\n");
|
||||||
|
#else
|
||||||
|
I_OutputMsg("Compiled without IPv6 support\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (serverrunning)
|
if (serverrunning)
|
||||||
serv = serverport_name;
|
serv = serverport_name;
|
||||||
else
|
else
|
||||||
serv = clientport_name;
|
serv = clientport_name;
|
||||||
|
|
||||||
if (M_CheckParm("-bindaddr"))
|
if (b_ipv4)
|
||||||
{
|
{
|
||||||
while (M_IsNextParm())
|
if (M_CheckParm("-bindaddr"))
|
||||||
{
|
{
|
||||||
gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai);
|
while (M_IsNextParm())
|
||||||
|
{
|
||||||
|
gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai);
|
||||||
|
if (gaie == 0)
|
||||||
|
{
|
||||||
|
runp = ai;
|
||||||
|
while (runp != NULL && s < MAXNETNODES+1)
|
||||||
|
{
|
||||||
|
mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen);
|
||||||
|
if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET)
|
||||||
|
{
|
||||||
|
myfamily[s] = hints.ai_family;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
runp = runp->ai_next;
|
||||||
|
}
|
||||||
|
I_freeaddrinfo(ai);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai);
|
||||||
if (gaie == 0)
|
if (gaie == 0)
|
||||||
{
|
{
|
||||||
runp = ai;
|
runp = ai;
|
||||||
|
@ -899,6 +1004,13 @@ static boolean UDP_Socket(void)
|
||||||
{
|
{
|
||||||
myfamily[s] = hints.ai_family;
|
myfamily[s] = hints.ai_family;
|
||||||
s++;
|
s++;
|
||||||
|
#ifdef HAVE_MINIUPNPC
|
||||||
|
if (UPNP_support)
|
||||||
|
{
|
||||||
|
I_UPnP_rem(serverport_name, "UDP");
|
||||||
|
I_UPnP_add(NULL, serverport_name, "UDP");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
runp = runp->ai_next;
|
runp = runp->ai_next;
|
||||||
}
|
}
|
||||||
|
@ -906,32 +1018,6 @@ static boolean UDP_Socket(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai);
|
|
||||||
if (gaie == 0)
|
|
||||||
{
|
|
||||||
runp = ai;
|
|
||||||
while (runp != NULL && s < MAXNETNODES+1)
|
|
||||||
{
|
|
||||||
mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen);
|
|
||||||
if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET)
|
|
||||||
{
|
|
||||||
myfamily[s] = hints.ai_family;
|
|
||||||
s++;
|
|
||||||
#ifdef HAVE_MINIUPNPC
|
|
||||||
if (UPNP_support)
|
|
||||||
{
|
|
||||||
I_UPnP_rem(serverport_name, "UDP");
|
|
||||||
I_UPnP_add(NULL, serverport_name, "UDP");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
runp = runp->ai_next;
|
|
||||||
}
|
|
||||||
I_freeaddrinfo(ai);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
if (b_ipv6)
|
if (b_ipv6)
|
||||||
{
|
{
|
||||||
|
@ -996,11 +1082,14 @@ static boolean UDP_Socket(void)
|
||||||
|
|
||||||
s = 0;
|
s = 0;
|
||||||
|
|
||||||
// setup broadcast adress to BROADCASTADDR entry
|
if (b_ipv4)
|
||||||
broadcastaddress[s].any.sa_family = AF_INET;
|
{
|
||||||
broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT));
|
// setup broadcast adress to BROADCASTADDR entry
|
||||||
broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST);
|
broadcastaddress[s].any.sa_family = AF_INET;
|
||||||
s++;
|
broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT));
|
||||||
|
broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
if (b_ipv6)
|
if (b_ipv6)
|
||||||
|
@ -1129,7 +1218,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
|
||||||
DEBFILE(va("Creating new node: %s@%s\n", address, port));
|
DEBFILE(va("Creating new node: %s@%s\n", address, port));
|
||||||
|
|
||||||
memset (&hints, 0x00, sizeof (hints));
|
memset (&hints, 0x00, sizeof (hints));
|
||||||
hints.ai_flags = 0;
|
hints.ai_flags = AI_ADDRCONFIG;
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
hints.ai_protocol = IPPROTO_UDP;
|
hints.ai_protocol = IPPROTO_UDP;
|
||||||
|
@ -1159,7 +1248,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < mysocketses)
|
if (i >= mysocketses)
|
||||||
runp = runp->ai_next;
|
runp = runp->ai_next;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -135,7 +135,7 @@ static void Midiplayer_Onchange(void)
|
||||||
if (Mix_GetMidiPlayer() != cv_midiplayer.value)
|
if (Mix_GetMidiPlayer() != cv_midiplayer.value)
|
||||||
{
|
{
|
||||||
if (Mix_SetMidiPlayer(cv_midiplayer.value)) // <> 0 means error
|
if (Mix_SetMidiPlayer(cv_midiplayer.value)) // <> 0 means error
|
||||||
CONS_Alert(CONS_ERROR, "Midi player error: %s", Mix_GetError());
|
CONS_Alert(CONS_ERROR, "Midi player error: %s\n", Mix_GetError());
|
||||||
else
|
else
|
||||||
restart = true;
|
restart = true;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ static void Midiplayer_Onchange(void)
|
||||||
if (!Mix_GetSoundFonts() || stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
if (!Mix_GetSoundFonts() || stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
||||||
{
|
{
|
||||||
if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) // == 0 means error
|
if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) // == 0 means error
|
||||||
CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError());
|
CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError());
|
||||||
else
|
else
|
||||||
restart = true;
|
restart = true;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ static void MidiSoundfontPath_Onchange(void)
|
||||||
if (proceed)
|
if (proceed)
|
||||||
{
|
{
|
||||||
if (!Mix_SetSoundFonts(cv_midisoundfontpath.string))
|
if (!Mix_SetSoundFonts(cv_midisoundfontpath.string))
|
||||||
CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError());
|
CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError());
|
||||||
else
|
else
|
||||||
S_StartEx(true);
|
S_StartEx(true);
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,18 @@ static void MidiSoundfontPath_Onchange(void)
|
||||||
|
|
||||||
// make sure that s_sound.c does not already verify these
|
// make sure that s_sound.c does not already verify these
|
||||||
// which happens when: defined(HAVE_MIXERX) && !defined(HAVE_MIXER)
|
// which happens when: defined(HAVE_MIXERX) && !defined(HAVE_MIXER)
|
||||||
static CV_PossibleValue_t midiplayer_cons_t[] = {{MIDI_OPNMIDI, "OPNMIDI"}, {MIDI_Fluidsynth, "Fluidsynth"}, {MIDI_Timidity, "Timidity"}, {MIDI_Native, "Native"}, {0, NULL}};
|
static CV_PossibleValue_t midiplayer_cons_t[] = {
|
||||||
|
{MIDI_ADLMIDI, "ADLMIDI"},
|
||||||
|
{MIDI_OPNMIDI, "OPNMIDI"},
|
||||||
|
{MIDI_Timidity, "Timidity"},
|
||||||
|
{MIDI_Fluidsynth, "Fluidsynth"},
|
||||||
|
#if SDL_MIXER_VERSION_ATLEAST(2,6,0)
|
||||||
|
{MIDI_EDMIDI, "EDMIDI"},
|
||||||
|
#endif
|
||||||
|
{MIDI_Native, "Native"},
|
||||||
|
{MIDI_ANY, "Any"},
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
consvar_t cv_midiplayer = CVAR_INIT ("midiplayer", "OPNMIDI" /*MIDI_OPNMIDI*/, CV_CALL|CV_NOINIT|CV_SAVE, midiplayer_cons_t, Midiplayer_Onchange);
|
consvar_t cv_midiplayer = CVAR_INIT ("midiplayer", "OPNMIDI" /*MIDI_OPNMIDI*/, CV_CALL|CV_NOINIT|CV_SAVE, midiplayer_cons_t, Midiplayer_Onchange);
|
||||||
consvar_t cv_midisoundfontpath = CVAR_INIT ("midisoundfont", "sf2/8bitsf.SF2", CV_CALL|CV_NOINIT|CV_SAVE, NULL, MidiSoundfontPath_Onchange);
|
consvar_t cv_midisoundfontpath = CVAR_INIT ("midisoundfont", "sf2/8bitsf.SF2", CV_CALL|CV_NOINIT|CV_SAVE, NULL, MidiSoundfontPath_Onchange);
|
||||||
consvar_t cv_miditimiditypath = CVAR_INIT ("midisoundbank", "./timidity", CV_SAVE, NULL, NULL);
|
consvar_t cv_miditimiditypath = CVAR_INIT ("midisoundbank", "./timidity", CV_SAVE, NULL, NULL);
|
||||||
|
|
110
vcpkg.json
110
vcpkg.json
|
@ -2,84 +2,68 @@
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||||
"name": "srb2",
|
"name": "srb2",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"builtin-baseline": "c823fd3e57035b10d970a96da2796a2db55e5df5",
|
"builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"curl",
|
|
||||||
{
|
{
|
||||||
"name": "libgme",
|
"name": "curl",
|
||||||
"platform": "!(windows & mingw) & !native"
|
"platform": "!wasm32"
|
||||||
},
|
},
|
||||||
|
"libgme",
|
||||||
{
|
{
|
||||||
"name": "libopenmpt",
|
"name":"libopenmpt",
|
||||||
"platform": "!(windows & mingw)"
|
"platform": "!wasm32"
|
||||||
},
|
},
|
||||||
"libpng",
|
"libpng",
|
||||||
"miniupnpc",
|
"miniupnpc",
|
||||||
"sdl2",
|
|
||||||
{
|
{
|
||||||
"name": "sdl2-mixer-ext",
|
"name": "sdl2",
|
||||||
|
"default-features": false,
|
||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
"name": "cmd",
|
"name": "wayland",
|
||||||
"platform": "linux"
|
"platform": "linux"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libflac",
|
"name": "x11",
|
||||||
"platform": "!(windows & mingw & !static)"
|
"platform": "!windows"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libgme",
|
|
||||||
"platform": "!(windows & mingw) & !native"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libmodplug",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libopnmidi",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libvorbis",
|
|
||||||
"platform": "!(windows & mingw & !static)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libxmp",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mpg123",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "nativemidi",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "opusfile",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pxtone",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "timidity",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "wavpack",
|
|
||||||
"platform": "!(windows & mingw)"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"platform": "!wasm32",
|
||||||
|
"version>=": "2.30.6#2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sdl2-mixer-ext",
|
||||||
|
"features": [
|
||||||
|
"ffmpeg",
|
||||||
|
{
|
||||||
|
"name":"fluidsynth",
|
||||||
|
"platform": "!static"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"libflac",
|
||||||
|
"platform": "!wasm32"
|
||||||
|
},
|
||||||
|
"libgme",
|
||||||
|
"libmodplug",
|
||||||
|
{
|
||||||
|
"name":"libvorbis",
|
||||||
|
"platform": "!wasm32"
|
||||||
|
},
|
||||||
|
"libxmp",
|
||||||
|
{
|
||||||
|
"name":"mpg123",
|
||||||
|
"platform": "!wasm32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"opusfile",
|
||||||
|
"platform": "!wasm32"
|
||||||
|
},
|
||||||
|
"pxtone",
|
||||||
|
"timidity"
|
||||||
|
],
|
||||||
|
"platform": "!wasm32",
|
||||||
|
"version>=": "2.6.0#0"
|
||||||
},
|
},
|
||||||
"zlib"
|
"zlib"
|
||||||
],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"name": "sdl2",
|
|
||||||
"version": "2.28.5",
|
|
||||||
"port-version": 1
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue