Add docker-build workarounds and container script
This commit is contained in:
parent
4a2c218f11
commit
1bb0c90741
8
Makefile
8
Makefile
|
@ -50,6 +50,8 @@ TEXTSAVES ?= 0
|
|||
EXTERNAL_DATA ?= 0
|
||||
# Enable Discord Rich Presence
|
||||
DISCORDRPC ?= 0
|
||||
# Enable docker build workarounds
|
||||
DOCKERBUILD ?= 0
|
||||
|
||||
# Various workarounds for weird toolchains
|
||||
|
||||
|
@ -578,6 +580,12 @@ ifeq ($(IMMEDIATELOAD),1)
|
|||
CFLAGS += -DIMMEDIATELOAD
|
||||
endif
|
||||
|
||||
# Check for docker build workaround option
|
||||
ifeq ($(DOCKERBUILD),1)
|
||||
CC_CHECK += -DDOCKERBUILD
|
||||
CFLAGS += -DDOCKERBUILD
|
||||
endif
|
||||
|
||||
# Check for Puppycam option
|
||||
ifeq ($(BETTERCAMERA),1)
|
||||
CC_CHECK += -DBETTERCAMERA
|
||||
|
|
|
@ -399,7 +399,7 @@ BAD_RETURN(s32) save_file_copy(s32 srcFileIndex, s32 destFileIndex) {
|
|||
|
||||
#ifdef TEXTSAVES
|
||||
static void save_file_load_textsaves(void) {
|
||||
for (file = 0; file < NUM_SAVE_FILES; file++) {
|
||||
for (int file = 0; file < NUM_SAVE_FILES; file++) {
|
||||
read_text_save(file);
|
||||
}
|
||||
gSaveFileModified = TRUE;
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef DOCKERBUILD
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
|
@ -389,6 +391,9 @@ bool fs_sys_dir_exists(const char *name) {
|
|||
}
|
||||
|
||||
bool fs_sys_walk(const char *base, walk_fn_t walk, void *user, const bool recur) {
|
||||
#ifdef DOCKERBUILD
|
||||
return false;
|
||||
#else
|
||||
char fullpath[SYS_MAX_PATH];
|
||||
DIR *dir;
|
||||
struct dirent *ent;
|
||||
|
@ -420,6 +425,7 @@ bool fs_sys_walk(const char *base, walk_fn_t walk, void *user, const bool recur)
|
|||
|
||||
closedir(dir);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
fs_pathlist_t fs_sys_enumerate(const char *base, const bool recur) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define SOCKET_WINDOWS_H
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#define SOCKET_LAST_ERROR WSAGetLastError()
|
||||
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
||||
|
|
Loading…
Reference in New Issue