1
0
Commit Graph

78 Commits

Author SHA1 Message Date
peterbell10
a9031b6bae
Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)
* Fix cmake not adding Werror on clang, and _lots_ of warnings

* WIP: Build fixes

* Cannot make intermediate blockhandler instance

* Tiger's changes

* Fix BitIndex check

* Handle invalid NextState values in cMultiVersionProtocol

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-05 10:27:14 +00:00
Tiger Wang
29808c61c9 Reformat messages in NonCtrlHandler 2020-09-05 13:41:42 +01:00
Tiger Wang
1bc12ba2b3 Streamline startup sequence
* Clean up cRoot & main
* Move some OS-specifics into OSSupport
2020-09-05 13:16:52 +01:00
Mattes D
46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
Mat
e053f72db8
Android build cleanup (#4734)
* Android build cleanup

* Remove unnecessary workaround

* Remove more unnecessities

* Bump cmake version
2020-05-10 16:18:28 +00:00
peterbell10
57952505e5
Update fmt to 6.2.0 (#4718)
* Update fmt to 6.2.0
2020-05-05 22:52:14 +01:00
Mattes D
208313dba1 main: Terminate if an exception is thrown. 2020-01-07 06:53:17 +01:00
peterbell10
757231cc6e
Add the fmt library (#4065)
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
2018-01-03 17:41:16 +00:00
peterbell10
832b394715 Fix Travis build (#4101)
Stop using gdb on osx - was breaking the build
Add clang 3.5 build as travis now defaults to 5.0
Fix unknown-warning-option errors on AppleClang
ProtoProxy: Use nullptr
UrlClientTest: add override to callback destructor
Update jsoncpp to use nullptr
2017-12-22 18:25:46 +00:00
bibo38
532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* Fixed Clang 5.0 compile errors

* Fixed wrong comment

* Only disable warnings in Clang 5 or higher

* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning

* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00
Mattes D
7ac3b0fa0b Removed the LeakFinder for Windows. (#3777) 2017-06-19 11:05:19 +02:00
worktycho
832298e7aa Add command line argument for disabling the logfile 2017-06-03 21:40:35 +02:00
Gareth Nelson
1c31cb7eec Add support for alternate config file locations (#3578) 2017-02-22 14:10:32 +01:00
Tiger Wang
8c6d0b51c7 Use CMake's Android generators to crosscompile 2016-12-12 14:32:32 +00:00
Alexander Harkness
62702cab48 Fixed port command line argument. (#3287) 2016-07-30 12:21:11 +01:00
LogicParrot
df145ca0f3 Revert "Issue3136" 2016-04-14 12:40:46 +03:00
Alexander Harkness
8658d4ddd6 Fixed port override code. 2016-04-12 21:40:09 +01:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Anthony Birkett
d75168ca03 Fix running as a service.
Two problems identified, both traced to commit 4315a11

(main.cpp) ParseArguments() was no longer being called before checking cRoot::m_RunAsService.
This led to m_RunAsService never being set (we use -d on the command line to instigate a service start).

(Root.cpp) Terminate events were being ignored when running as a service.
We only need to ignore the cin.good() call, not terminate events as a whole.
2016-01-21 16:38:13 +00:00
Mattes D
491dbda7d3 Fixed Clang warnings. 2016-01-06 16:20:12 +01:00
Tiger Wang
803c0c6965 Added the _UNICODE flag on Windows 2015-09-26 22:19:29 +01:00
Lukas Pioch
e56aa4032d Maked it compileable for clang-3.7 2015-09-25 17:09:19 +02:00
Mattes D
82d9ac1e1c Namechange to Cuberite 2015-09-25 10:14:17 +02:00
tycho
3c5ba56aba Ignore Sigpipe 2015-09-19 21:37:07 +02:00
tycho
3187dbf0aa Increase robustness of the logging subsystem 2015-09-15 16:19:49 +01:00
Tiger Wang
4315a11393 Fixed and improved restarting
Restarts are now an actual, close-as-possible to application
exit+reopen.
2015-08-20 16:15:23 +01:00
Mattes D
92ac33e923 Checked LeakFinder in MSVC2015, enabled support for it. 2015-08-10 13:54:19 +02:00
Anthony Birkett
9dac390247 Daemon support on Linux.
Added null console log listener, avoid printf() when stdout is closed.
2015-06-05 15:47:47 +01:00
Mattes D
a0a8e78c0d Added cmdline params for crashdump detailness.
Win32-only, also fixed the call scripts.
Fixes #2184.
2015-06-02 15:19:13 +02:00
Anthony Birkett
65a62601dc Use the new style command line parameters for Windows Service support.
Ignore invalid or malformed command line parameters, prevent unhandled exceptions.
NOTE: Users will need to reinstall the service, now uses "-d" instead of "/service" in the start parameters.
2015-06-01 14:41:06 +01:00
tycho
d9d4adc2a5 Moved no buffering command line argument to tclap 2015-05-20 01:50:04 +01:00
tycho
7c196ffde6 Move commlog arguments over to TCLAP 2015-05-20 01:50:04 +01:00
tycho
2e98bfc4e9 Add support for setting ports through command line 2015-05-18 17:26:12 +01:00
tycho
c2303ac4cf Fix max slots logic to only override if acctually present. 2015-05-18 15:43:26 +01:00
worktycho
0da8c7392e Fix service Main 2015-05-16 10:47:04 +01:00
tycho
c96849f431 Move make_unique into a namespace to avoid ADL issues
this prevents VS finding std::make_unique for constructors that take types from std
2015-05-16 10:47:04 +01:00
tycho
b9efa02c80 Initial implementation of IniFile overloading 2015-05-16 10:46:51 +01:00
worktycho
6df0e877e8 Print Build info as part of the crash information 2015-05-04 09:07:03 +01:00
Mattes D
4836d07bfa Fixed MSVC warnings, improved comments. 2015-04-06 22:01:25 +02:00
Mattes D
31953b19b8 Fixed crash on exit introduced with Windows Service capability.
Ref.: #1845
2015-04-05 17:07:29 +02:00
Anthony Birkett
51891b766c Working as a Windows service. Starts and stops correctly.
Added "/service" switch, to prompt the binary to attempt starting as a service.
Added service* methods, to control service startup.
Split up main() into universalMain(), which contains the startup code for both service and normal start.
Added cRoot::m_RunningAsService bool,
Added cRoot::SetStopping(bool) to allow a stop request to be sent by the service controller.
Added cBlockIDMap::init() to avoid loading items.ini before the working directory has been set.
2015-04-01 00:03:37 +01:00
Mattes D
5f660f7677 Added cNetwork initialization to program start.
Otherwise the server could crash because MSVC doesn't implement magic statics yet.
2015-03-18 22:07:57 +01:00
Mattes D
053362e604 Added network termination called at app exit.
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2015-01-27 14:53:37 +01:00
Mattes D
c014f5624c Merged branch 'origin/master' into c++11. 2014-12-04 22:04:16 +01:00
Mattes D
e0a846d805 Removed unneeded include. 2014-11-29 23:55:15 +01:00
Mattes D
201313a9f8 Added a basic stacktracing for assert and signal failures. 2014-11-29 23:06:10 +01:00
Mattes D
413e5c20fe Windows: Fixed builds with LeakFinder enabled. 2014-11-26 11:00:21 +01:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tiger Wang
014ebb7fe6 Windows close handlers handles more closes 2014-10-21 13:41:08 +01:00
Tiger Wang
987f79afdd En masse NULL -> nullptr replace 2014-10-20 21:55:07 +01:00