mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
Fix building pt2
This commit is contained in:
parent
6b45dff0ef
commit
2689ad058d
12 changed files with 138 additions and 54 deletions
|
@ -1,6 +1,10 @@
|
|||
Debian stable:amd64 Makefile:
|
||||
extends: .srb2ci
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
stage: build
|
||||
|
||||
artifacts:
|
||||
|
|
|
@ -16,10 +16,9 @@ Debian stable Clang:
|
|||
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang
|
||||
CXX: clang++
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
- - |
|
||||
|
|
|
@ -16,7 +16,7 @@ Debian testing Clang:
|
|||
|
||||
variables:
|
||||
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
|
||||
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
|
||||
|
|
|
@ -7,6 +7,30 @@ Windows x64:
|
|||
|
||||
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-root
|
||||
paths:
|
||||
- build/vcpkg-root
|
||||
unprotect: true
|
||||
|
||||
- key: vcpkg-binary-cache-x64-mingw-static
|
||||
paths:
|
||||
- build/vcpkg-binary-cache
|
||||
unprotect: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.cmake/bin/"
|
||||
|
@ -20,6 +44,27 @@ Windows x64:
|
|||
CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++
|
||||
|
||||
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,/opt/vcpkg.bsources,read;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_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
|
@ -39,7 +84,7 @@ Windows x64:
|
|||
- - |
|
||||
# cmake
|
||||
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
|
||||
- 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
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
@ -51,3 +96,33 @@ Windows x64:
|
|||
- |
|
||||
# make
|
||||
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"
|
||||
|
|
|
@ -3,7 +3,9 @@ Windows x86 Makefile:
|
|||
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
|
@ -3,10 +3,6 @@ Windows x86:
|
|||
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
|
||||
fallback_keys:
|
||||
|
@ -33,8 +29,8 @@ Windows x86:
|
|||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build/ninja-x86_mingw_static_vcpkg-debug/bin/"
|
||||
- "build/ninja-x86_mingw_static_vcpkg-debug/src/config.h"
|
||||
- "build.cmake/bin/"
|
||||
- "build.cmake/src/config.h"
|
||||
expose_as: "Win32"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||
|
||||
|
@ -59,7 +55,7 @@ Windows x86:
|
|||
fi
|
||||
|
||||
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
|
||||
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
||||
export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
||||
|
||||
mkdir -p "build/vcpkg-binary-cache"
|
||||
|
||||
|
@ -84,7 +80,7 @@ Windows x86:
|
|||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.cmake --preset ninja-x86_mingw_static_vcpkg-debug -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON
|
||||
- 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
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
@ -92,7 +88,7 @@ Windows x86:
|
|||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- cmake -build build.cmake --parallel 1 --verbose --preset ninja-x86_mingw_static_vcpkg-debug
|
||||
- cmake --build build.cmake --parallel 1 --verbose
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
|
|
@ -463,8 +463,13 @@ else()
|
|||
endif()
|
||||
|
||||
if(TARGET miniupnpc::miniupnpc)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE 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_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc)
|
||||
endif()
|
||||
message(STATUS "miniupnpc Found")
|
||||
else()
|
||||
message(STATUS "No miniupnpc Found")
|
||||
|
|
|
@ -35,7 +35,7 @@ ifndef GCC295
|
|||
WFLAGS+=-Wendif-labels
|
||||
endif
|
||||
ifdef GCC41
|
||||
WFLAGS+=-Wshadow
|
||||
WFLAGS+=-Wno-shadow
|
||||
endif
|
||||
#WFLAGS+=-Wlarger-than-%len%
|
||||
WFLAGS+=-Wpointer-arith
|
||||
|
@ -61,7 +61,7 @@ endif
|
|||
ifdef GCC45
|
||||
WFLAGS+=-Wlogical-op
|
||||
endif
|
||||
WFLAGS+=-Waggregate-return
|
||||
WFLAGS+=-Wno-aggregate-return
|
||||
ifdef HAIKU
|
||||
ifdef GCC41
|
||||
#WFLAGS+=-Wno-attributes
|
||||
|
@ -125,6 +125,8 @@ ifdef GCC44
|
|||
endif
|
||||
ifdef GCC46
|
||||
WFLAGS+=-Wno-error=suggest-attribute=noreturn
|
||||
WFLAGS+=-Wno-error=maybe-uninitialized
|
||||
WFLAGS+=-Wno-error=inline
|
||||
endif
|
||||
ifdef GCC54
|
||||
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
|
||||
|
|
|
@ -16,35 +16,35 @@
|
|||
#ifndef __SRB2_ACSVM_HPP__
|
||||
#define __SRB2_ACSVM_HPP__
|
||||
|
||||
#include <ACSVM/Action.hpp>
|
||||
#include <ACSVM/Array.hpp>
|
||||
#include <ACSVM/BinaryIO.hpp>
|
||||
#include <ACSVM/CallFunc.hpp>
|
||||
#include <ACSVM/Code.hpp>
|
||||
#include <ACSVM/CodeData.hpp>
|
||||
#include <ACSVM/CodeList.hpp>
|
||||
#include <ACSVM/Environment.hpp>
|
||||
#include <ACSVM/Error.hpp>
|
||||
#include <ACSVM/Function.hpp>
|
||||
#include <ACSVM/HashMap.hpp>
|
||||
#include <ACSVM/HashMapFixed.hpp>
|
||||
#include <ACSVM/ID.hpp>
|
||||
#include <ACSVM/Init.hpp>
|
||||
#include <ACSVM/Jump.hpp>
|
||||
#include <ACSVM/List.hpp>
|
||||
#include <ACSVM/Module.hpp>
|
||||
#include <ACSVM/PrintBuf.hpp>
|
||||
#include <ACSVM/Scope.hpp>
|
||||
#include <ACSVM/Script.hpp>
|
||||
#include <ACSVM/Serial.hpp>
|
||||
#include <ACSVM/Stack.hpp>
|
||||
#include <ACSVM/Store.hpp>
|
||||
#include <ACSVM/String.hpp>
|
||||
#include <ACSVM/Thread.hpp>
|
||||
#include <ACSVM/Tracer.hpp>
|
||||
#include <ACSVM/Types.hpp>
|
||||
#include <ACSVM/Vector.hpp>
|
||||
#include "vm/ACSVM/Action.hpp"
|
||||
#include "vm/ACSVM/Array.hpp"
|
||||
#include "vm/ACSVM/BinaryIO.hpp"
|
||||
#include "vm/ACSVM/CallFunc.hpp"
|
||||
#include "vm/ACSVM/Code.hpp"
|
||||
#include "vm/ACSVM/CodeData.hpp"
|
||||
#include "vm/ACSVM/CodeList.hpp"
|
||||
#include "vm/ACSVM/Environment.hpp"
|
||||
#include "vm/ACSVM/Error.hpp"
|
||||
#include "vm/ACSVM/Function.hpp"
|
||||
#include "vm/ACSVM/HashMap.hpp"
|
||||
#include "vm/ACSVM/HashMapFixed.hpp"
|
||||
#include "vm/ACSVM/ID.hpp"
|
||||
#include "vm/ACSVM/Init.hpp"
|
||||
#include "vm/ACSVM/Jump.hpp"
|
||||
#include "vm/ACSVM/List.hpp"
|
||||
#include "vm/ACSVM/Module.hpp"
|
||||
#include "vm/ACSVM/PrintBuf.hpp"
|
||||
#include "vm/ACSVM/Scope.hpp"
|
||||
#include "vm/ACSVM/Script.hpp"
|
||||
#include "vm/ACSVM/Serial.hpp"
|
||||
#include "vm/ACSVM/Stack.hpp"
|
||||
#include "vm/ACSVM/Store.hpp"
|
||||
#include "vm/ACSVM/String.hpp"
|
||||
#include "vm/ACSVM/Thread.hpp"
|
||||
#include "vm/ACSVM/Tracer.hpp"
|
||||
#include "vm/ACSVM/Types.hpp"
|
||||
#include "vm/ACSVM/Vector.hpp"
|
||||
|
||||
#include <Util/Floats.hpp>
|
||||
#include "vm/Util/Floats.hpp"
|
||||
|
||||
#endif //__SRB2_ACSVM_HPP__
|
||||
|
|
|
@ -626,7 +626,7 @@ bool CallFunc_Random(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word
|
|||
no tid means search thru all thinkers.
|
||||
--------------------------------------------------*/
|
||||
static mobjtype_t filter_for_mobjtype = MT_NULL; // annoying but I don't wanna mess with other code
|
||||
bool ACS_ThingTypeFilter(mobj_t *mo)
|
||||
static bool ACS_ThingTypeFilter(mobj_t *mo)
|
||||
{
|
||||
return (ACS_CountThing(mo, filter_for_mobjtype));
|
||||
}
|
||||
|
@ -1590,7 +1590,7 @@ bool CallFunc_strcasecmp(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::
|
|||
|
||||
Returns the number of enemies in the tagged sectors.
|
||||
--------------------------------------------------*/
|
||||
bool ACS_EnemyFilter(mobj_t *mo)
|
||||
static bool ACS_EnemyFilter(mobj_t *mo)
|
||||
{
|
||||
return ((mo->flags & (MF_ENEMY|MF_BOSS)) && mo->health > 0);
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ bool CallFunc_CountEnemies(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM
|
|||
|
||||
Returns the number of pushables in the tagged sectors.
|
||||
--------------------------------------------------*/
|
||||
bool ACS_PushableFilter(mobj_t *mo)
|
||||
static bool ACS_PushableFilter(mobj_t *mo)
|
||||
{
|
||||
return ((mo->flags & MF_PUSHABLE)
|
||||
|| ((mo->info->flags & MF_PUSHABLE) && mo->fuse));
|
||||
|
|
|
@ -471,13 +471,13 @@ void Environment::printKill(ACSVM::Thread *thread, ACSVM::Word type, ACSVM::Word
|
|||
}
|
||||
else if (killType == ACSVM::KillType::OutOfBounds)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Jumped to out of bounds location %lu in script %s\n",
|
||||
(thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str());
|
||||
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Jumped to out of bounds location %s in script %s\n",
|
||||
sizeu1((thread->codePtr - thread->module->codeV.data() - 1)), scriptName.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Kill %u:%d at %lu in script %s\n",
|
||||
type, data, (thread->codePtr - thread->module->codeV.data() - 1), scriptName.c_str());
|
||||
CONS_Alert(CONS_ERROR, "ACSVM ERROR: Kill %u:%d at %s in script %s\n",
|
||||
type, data, sizeu1((thread->codePtr - thread->module->codeV.data() - 1)), scriptName.c_str());
|
||||
}
|
||||
|
||||
CONS_Printf("Script terminated.\n");
|
||||
|
|
|
@ -139,6 +139,7 @@ target_compile_options(SRB2SDL2 PRIVATE
|
|||
-Wno-unused-function
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-unused-private-field
|
||||
-Wno-error=inline
|
||||
>
|
||||
|
||||
# C++, MSVC
|
||||
|
|
Loading…
Reference in a new issue