1252 Commits

Autor SHA1 Nachricht Datum
Filippo Gentile
4277285591 Fix GCC warning -Werror=uninitialized
std::array has no explicit constructors but GCC 12.2.0 doesn't like it
so add brace initialization.
2023-01-22 01:19:32 +01:00
Reinder Feenstra
6ad267f333
Merge pull request #13 from gfgit/work/signal_handler
server: handle SIGINT, SIGTERM, SIGBREAK (all platforms)
2023-01-21 22:23:59 +01:00
Reinder Feenstra
d5ace6999b
some changes for code style 2023-01-21 22:22:17 +01:00
Reinder Feenstra
7ee8a6aad7
corrected spelling, some changes for code style 2023-01-21 22:20:17 +01:00
Filippo Gentile
280d3ae2c4 server: log signal handler
New static function for signal handling
2023-01-21 21:35:30 +01:00
Filippo Gentile
45fd09e071 server: removed Unix specific signal handlers
Now it uses Boost.Asio
2023-01-21 21:34:17 +01:00
Reinder Feenstra
efc32a340b Merge branch 'master' of github.com:traintastic/traintastic 2023-01-20 21:54:42 +01:00
Reinder Feenstra
e490c656bc bugfix: Infinite recursion in SignalPath, closes #7 2023-01-20 21:54:36 +01:00
github-actions[bot]
7f6c7865c6
docs(contributor): contrib-readme-action has updated readme 2023-01-20 20:20:14 +00:00
Reinder Feenstra
833f755db0 readme: added contributers list (updated via CI 2023-01-20 21:19:40 +01:00
Reinder Feenstra
4f20ec4360 test: disabled some tests for arm64 / macOS 2023-01-20 17:15:27 +01:00
Filippo Gentile
e2b6c149d4 server: handle SIGINT, SIGTERM, SIGBREAK
Register signal handlers to shutdown gracefully
2023-01-19 23:31:15 +01:00
Reinder Feenstra
11d407b5af bugfix: if an interface failed to go online and exception caused the event processing
closes #9
2023-01-18 19:48:53 +01:00
Reinder Feenstra
a440d3968d fix: assigning another interface to an input didn't work 2023-01-18 19:17:42 +01:00
Reinder Feenstra
61b3db241a bugfix: assert() triggered on invalid data on world close
closes #8
2023-01-17 23:43:39 +01:00
Reinder Feenstra
27e14f4bd1 eventloop: threadId writable during tests
some test require a working eventloop
2023-01-15 22:50:52 +01:00
Reinder Feenstra
b5c6d37e0c test: set define TRAINTASTIC_TEST
useful for making some stuff available during testing
2023-01-15 22:49:46 +01:00
Reinder Feenstra
bf1cf30cae test: moved hardware related test to seperate directory 2023-01-15 22:48:45 +01:00
Reinder Feenstra
722b9650fa innosetup: added placeholders for german translation 2023-01-14 16:17:22 +01:00
Reinder Feenstra
0aa4f1998b innosetup: added dutch translation 2023-01-14 16:16:49 +01:00
Reinder Feenstra
c068e0703b innosetup: added custom component selction page 2023-01-14 16:16:20 +01:00
Reinder Feenstra
319f115305
Merge pull request #6 from gfgit/work/mingw_missing_include
fix: missing include in tilelocation.hpp
2023-01-14 13:26:51 +01:00
Filippo Gentile
dc9d29f49e fix: missing include in tilelocation.hpp
It compiles even without it because <cstdint> is included in tileid.hpp
But seems to me more correct to have it on both files.
2023-01-14 11:54:00 +01:00
Reinder Feenstra
18247835c7
CI: disabled server mingw test(seems DLL load issue) 2023-01-13 23:56:12 +01:00
Reinder Feenstra
0c3dcc605e
CI: add mingw to PATH, for DLLs needed for tests 2023-01-13 23:18:56 +01:00
Reinder Feenstra
1839233687
Merge pull request #5 from gfgit/work/diy_input_sim_fix
input: fix TraintasticDIY input simulation
2023-01-13 23:11:23 +01:00
Filippo Gentile
794b0a4dcc input: fix TraintasticDIY input simulation
Toggling a disabled input caused crash.
Prevent iterator derefencing when invalid.

Other interfaces, like z21, allow toggling disabled inputs so the
behaviour is still correct.
2023-01-13 23:05:18 +01:00
Reinder Feenstra
c8a70eaed3
CI: add mingw to PATH, for DLLs needed for tests 2023-01-13 22:19:20 +01:00
Reinder Feenstra
3f046005df
CI: add mingw to PATH, for DLLs needed for tests 2023-01-13 18:57:44 +01:00
Reinder Feenstra
37fc7bfcdb fix: use memcpy, size is always known
(MinGW complained)
2023-01-13 00:14:08 +01:00
Reinder Feenstra
b22e011ded
fix: missing include for mingw 2023-01-11 23:55:45 +01:00
Reinder Feenstra
11c6ae08fd
CI: server: added mingw build, try 2 2023-01-11 23:29:12 +01:00
Reinder Feenstra
f5450e103f CI: server: added mingw build, try 1 2023-01-11 19:43:28 +01:00
Reinder Feenstra
c0d4566925 CI: server: added macos-12 2023-01-11 19:36:41 +01:00
Reinder Feenstra
c08f281f24 PropertyTextEdit now derives from QPlainTextEdit
It is only used for plain text, see #4
2023-01-11 00:11:45 +01:00
Reinder Feenstra
b94bd9cb66 fix #4: PropertyTextEdit: cursor is reset to start 2023-01-11 00:06:03 +01:00
Reinder Feenstra
08e4b45268
Merge pull request #3 from gfgit/work/fix_mingw
Fix compilation on Windows with MinGW
2023-01-10 23:41:57 +01:00
Reinder Feenstra
db87ed9cc1
fix: m_socket -> m_socketTCP 2023-01-10 08:33:08 +01:00
Reinder Feenstra
e738a162bf minor optimalizations 2023-01-09 23:01:39 +01:00
Filippo Gentile
8c12a50078 threading: fix MinGW thread name
SetThreadDescription() is not currently supported by MinGW compiler.
It was added in Windows 10 so it's relatively new function.

But MinGW comes with a Windows implementation of pthread library.
This means we can just use the same code as for linux which
calls 'pthread_setname_np()' and skip windows specific call.
2023-01-09 21:52:43 +01:00
Filippo Gentile
0bd6148a1e TrayIcon: fix string literal conversion.
The member function menuAddItem() is called passing constant string
literals for "text" argument which is a pointer to non constant string.

MinGW refuses to compile so change the type to constant LPCSTR.
The variable is later passed inside explicit const_cast<LPSTR>(text).
2023-01-09 21:49:51 +01:00
Filippo Gentile
fc8ce2a891 endianess: fix MinGW on Windows
MinGW has _byteswap_ushort and the other functions like MSVC but
needs additional <cstdlib> header.
2023-01-09 21:46:31 +01:00
Filippo Gentile
09b9ed3de6 SerialPortListImplWin32: fix includes with MinGW on Windows
MinGW needs additional <ntdef.h> header to define PHYSICAL_ADDRESS.
The type is then used inside <ntddser.h>
2023-01-09 21:45:02 +01:00
Filippo Gentile
811536370e CMake: fix linking with MinGW compiler
First commit of a series to fix issues when building with MinGW

Boost.Asio uses Windows Socket library version 2.
MinGW needs explicit linking to ws2_32.dll for socket functions.
Also mswsock.dll is needed for AcceptEx() function.

MinGW can link directly .dll files, without import libraries.
So keep the generation of import library only on MSVC builds.
The path to the library needs adjusmets as it is no longer generated
inside build directory.
2023-01-09 21:41:48 +01:00
Reinder Feenstra
f3e47be740 set MSVC warning level to 4 2023-01-09 17:09:28 +01:00
Reinder Feenstra
6fe5b5d62f Revert "server: set MSVC warning level to 4"
This reverts commit ae56c71e58b18d1b13b969b1015e909a076ddc1d.
2023-01-08 23:38:39 +01:00
Reinder Feenstra
ae56c71e58 server: set MSVC warning level to 4 2023-01-08 23:35:26 +01:00
Reinder Feenstra
ff9b524593 fix: use localtime_s or localtime_r instead of localtime 2023-01-08 23:34:38 +01:00
Reinder Feenstra
59a7f22ab9 fix: assigning a new interface to an output failed 2023-01-06 01:04:29 +01:00
Reinder Feenstra
9425c30cfd fix: assert caused crash 2023-01-06 01:03:16 +01:00