Strip dead Windows-only code paths, add LTO/march build flags, seed default GM account
Removes now-unreachable #ifdef _WIN32 branches across Common/ and the three server binaries (all builds are Linux-only), deletes the entirely unused SEH exception-handling shim and an orphaned vendored MySQL client header. Enables LTO and -march=x86-64-v2 in Release builds for a small free perf win. Also seeds a default GM account (gmadmin/changeme) via database sql files/gm_account.sql so a fresh deploy has something to log into the web admin panel with, switches the MariaDB data directory from a Docker named volume to a host bind mount for visibility/backup, and expands the README with a fuller Docker deployment walkthrough. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e47731d7a
commit
1998bf4273
27 files changed
+101
-1178
No files matched your search
@@ -13,11 +13,7 @@ public:
|
||||
unsigned dataoffset = 0;
|
||||
unsigned short fieldlen = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
if ( (fh = fopen( filename, "rb" )) == 0 ) {
|
||||
#else
|
||||
if ( (fh = rose_fopen( filename, "rb" )) == 0 ) {
|
||||
#endif
|
||||
Log( MSG_ERROR, "Could not load STB '%s'", filename );
|
||||
return 1;
|
||||
}else{
|
||||
|
||||
@@ -215,17 +215,8 @@ class CRoseFile
|
||||
{
|
||||
ftype = FT_BINARY;
|
||||
}
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
if( fopen_s( &fh, fname, fasciimode ) == 0 )
|
||||
if( ( fh = rose_fopen( fname, fasciimode ) ) != NULL )
|
||||
{
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
if( ( fh = fopen( fname, fasciimode ) ) != NULL )
|
||||
#else
|
||||
if( ( fh = rose_fopen( fname, fasciimode ) ) != NULL )
|
||||
#endif
|
||||
{
|
||||
#endif
|
||||
delete[] fasciimode;
|
||||
//Check if unicode or ascii
|
||||
if( ftype != FT_BINARY )
|
||||
@@ -244,13 +235,7 @@ class CRoseFile
|
||||
DoError( FE_INTERNALERROR );
|
||||
return false;
|
||||
}
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
fopen_s( &fh, fname, fasciimode );
|
||||
#elif defined(_WIN32)
|
||||
fh = fopen( fname, fasciimode );
|
||||
#else
|
||||
fh = rose_fopen( fname, fasciimode );
|
||||
#endif
|
||||
fh = rose_fopen( fname, fasciimode );
|
||||
SetAbsPos( 2 );
|
||||
ftype = FT_UNICODE;
|
||||
#else
|
||||
@@ -561,12 +546,7 @@ class CRoseFile
|
||||
CFILE_CHAR buf;
|
||||
wchar_t buffer;
|
||||
buffer = fgetwc( fh );
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
size_t tmp;
|
||||
wcstombs_s( &tmp, &buf, (size_t)(sizeof(buf)), &buffer, 1 );
|
||||
#else
|
||||
wcstombs( &buf, &buffer, 1 );
|
||||
#endif
|
||||
wcstombs( &buf, &buffer, 1 );
|
||||
return (CFILE_CHAR)buf;
|
||||
#else
|
||||
DoError( FE_UNICODENOTALLOWED );
|
||||
@@ -610,12 +590,7 @@ class CRoseFile
|
||||
#ifndef CFILE_NOUNICODE
|
||||
wchar_t* buffer = new wchar_t[max_count];
|
||||
fgetws( buffer, max_count, fh );
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
size_t tmp;
|
||||
wcstombs_s( &tmp, buf->arr, (size_t)(buf->absSize()), buffer, max_count );
|
||||
#else
|
||||
wcstombs( buf->arr, buffer, max_count );
|
||||
#endif
|
||||
wcstombs( buf->arr, buffer, max_count );
|
||||
return NULL;
|
||||
#else
|
||||
DoError( FE_UNICODENOTALLOWED );
|
||||
@@ -861,12 +836,7 @@ class CRoseFile
|
||||
{
|
||||
#ifndef CFILE_NOUNICODE
|
||||
wchar_t buffer;
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
size_t tmp;
|
||||
mbstowcs_s( &tmp, &buffer, 1, (CFILE_CHAR*)(&chr), 1 );
|
||||
#else
|
||||
mbstowcs( &buffer, (CFILE_CHAR*)(&chr), 1 );
|
||||
#endif
|
||||
mbstowcs( &buffer, (CFILE_CHAR*)(&chr), 1 );
|
||||
return (CFILE_SCHAR)(fputwc( buffer, fh ));
|
||||
#else
|
||||
DoError( FE_UNICODENOTALLOWED );
|
||||
@@ -904,12 +874,7 @@ class CRoseFile
|
||||
{
|
||||
#ifndef CFILE_NOUNICODE
|
||||
wchar_t* buffer = new wchar_t[ (size_t)(str->size()) ];
|
||||
#ifndef CFILE_NODEPRECATE
|
||||
size_t tmp;
|
||||
mbstowcs_s( &tmp, buffer, (size_t)(str->size()), str->arr, (size_t)(str->size()) );
|
||||
#else
|
||||
mbstowcs( buffer, str->arr, str->size() );
|
||||
#endif
|
||||
mbstowcs( buffer, str->arr, str->size() );
|
||||
return (fputws( buffer, fh )!=EOF)?(true):(false);
|
||||
#else
|
||||
DoError( FE_UNICODENOTALLOWED );
|
||||
|
||||
Reference in new issue
Block a user