Commit graph

28 commits

Author SHA1 Message Date
Kevin Eady
55e9830a7b
add SQLiteCpp library 2024-07-19 11:27:58 +02:00
turleypol
e7fdfdf795
CMake target cleanup, removed configure options (#614)
* every 3rd party lib is now excluded from "all" build, meaning it gets
only build when actually used.
removed the cmake option to partially build, due to the above changes
this is no more needed, just build the target
streamlined 3rdparty target names, they all start with lib now

* renamed escriptgrammar target to escriptgrammar_codegen for
clarification
fixed dependency name

* corrected sources name

* readded missing include
2024-02-01 08:07:37 +01:00
Kevin Eady
686090d950
Introduce DAP Debugger (#608)
* Add cppdap debugger library and simple server (#508)

* Add cppdap library

* Add cppdap server

* fixup cmake scripts for windows

* Enable caching of cppdap on GitHub actions

* Fix CMake for cppdap target

* Wait 1s for session close before thread ends

* Address review comments
- Remove unnecessary use of wait_for
- Fix wait_for method

* Do not use SocketClientThread for cppdap clients

* Address review comments
- Cleanup object ownership

* Add authorization and event handling (#510)

* Add authorization and event handling [WIP]

* Use std::weak_ptr; Only allow one debugger conn

* Only attach debugger if dbg file exists

* Cleanup weak_ptr; Fix listeners; Add handler stubs

* Address review comments
- PolLock on uoexec and weakptr access
- Use make_shared when creating client thread

* Add ExecutorDebugListener on_destroy callback

* Use cppdap sockets instead of clib sockets

* Update cppdap repository to 2703cf4

* Implement server address binding

* Update cppdap repository to eeca5ce

* Fix warnings

* Use weak_from_this

* Fix stalled executors on disconnect

* Fix stalled executors on re-attach

* Clear uoexec weakptr on all debugger detaches

* Move server to gamestate

* move DapDebugServer into Network namespace

* move DapDebugServer into GameState for storage

* Move DapDebugServer into NetworkManager

* Fix missing memory include

* Add more events (#513)

* Add more events

* Implement dbg_step_out

* Fix breakpoint clearing

* Add even more events (#515)

* add launch request

* Add custom `processes` command

* fixup loop

* Refactoring to move handlers to member functions

* Add VariablesRequest and ScopesRequest

* use std::varaint for Handles

* add pollocks

* refactor Handles to new file

* move custom messages to proto.h

* move clientthread

* some formatting / cleanup

* Add missing PolLock

* move dap variables creation to Handles

* appobj members

* rename ClientThread to DebugClientThread

* rename LaunchRequest args to arg

* Fix compiler error on size_t

* Add support for EvaluateRequest and SetVariableRequest (#519)

* Update grammar for evaluateUnit

* Cleanup various compiler code

* Add support for EvaluateRequest
Only supports values, variables, element access, member access

* Add report clearing to reinitialize state

* Add support for SetVariableRequest

* Fix CI build errors

* Move ExpressionEvaluator to Bscript

* Fix formatting

* Fix include

* Refactor global and frame variable references

* Encapsulate Executor debugging environment; Fix step over (#524)

* Fix step over

* Some cleanup of executor
- Remove unused debug states
- Rename members for consistency

* move debugging environment to new class

* Move instruction inspection to class

* Cleanup slashes on Windows; Add Executor state to processes response (#527)

* Fix backspaces in script names on Windows

* Fix compilation warnings with data loss

* Use boost::icontains for string comparison

* Add Executor state to processes response

* Updates for libfmt

* Fix tests; Fix cppdap build for Mac universal binary (#607)

* fix tests

* fix cppdap build for mac universal binary

* Update cppdap to 2a4c7cf

* Add tests; Modify launch behavior to not stop at entry (redo) (#609)

* Remove unused setExceptionBreakpoints handler

* Add debugger tests

* Launching a script should not set attaching state

* Add launch tests

* Do not check for connection in debugger tests

* Rename `program` to `script` in protocol structs

* Fix launch stopAtEntry; quote string var values

* Fix compilation error on Windows

* Add configfiles doc entry

* Various fixes for finishing touches; Add core-changes (#610)

* switch cmake projects

* simple docs

* cmake move make_directory

* Fix launch request with relative, absolute, package paths

* make relative paths as absolute in source request

* Add true, false, uninit to ExpressionEvaluator

* Re-add setExceptionBreakpoints to avoid unhandled message errors

* Better debug thread logging with instance numbers

* launched scripts should terminate on disconnect (according to DAP spec)

* Properly handle exited event in client thread

* Add core-changes

* Address Discord comments
- Mention vscode-escript in core-changes
- Re-add "cppdap already built" in cmake

* change cmake escriptgrammarlib visibility to public
2024-01-28 09:49:55 +01:00
turleypol
271a1105ba
added explicit targets for every 3rd party lib (#612)
* added explicit targets for every 3rd party lib
these contain include dirs/libs/compiler defs

* moved each 3rd party lib into a version folder, to give each target a
dedicated include directory.
Now noone should add lib root folder as include dir
Used private linking where possible
disabled building of boost, wasnt used at all

* regnerate boost cache
adapted targets for coverity
2024-01-27 09:06:23 +01:00
turleypol
08bd3c7ce5
Savefile rewrite (#601)
* rewrite of saving, replaced operator way with a generic add method, thus
not everywhere the formating of the savefiles is hardcoded.
since its the last spot which uses the old formating lib, remobed the
lib

* removed cmake of old format lib

* testscripts for load/save of UObject,Item,Armor,Weapon

* fixed: member faster_cast_recovery and faster_cast_recovery_mod getter returned
a wrong value

* wrong/missing docs

* test containers, lockable, map, spellbooks
fixed save bug in map and spellbook
removed ancient savestrategy experiments

* added corpse test
splitted testfiles

* fixed loading (ancient bug) and saving (PR bug) of Reportables
added tests for houses, boats, accounts and chars

* fixed include

* fix shutdown leak

* added npc tests
upload complete coretest folder also on failure

* do not write and load RegisteredHouse for NPCs two times
readded extra newline between accounts

* tests for guild, party, realm
added resource cfgs, but a test is not really possible since nothing of
interest is stored

* added datafile, storage test

* activated resource loading, 25year old bug, but since the stored values
are senseless it makes no real difference.
added a few wtf comments
catch all exceptions during formatting of log lines

* replaced .write with explixit .begin, .end and .comment.
for leftovers.txt the StreamSaver was also used, since the format is
different use directly ofstream

* added corechanges
2024-01-24 18:49:06 +01:00
Kevin Eady
7a4faf1786
Add support for building universal binaries for macOS (#572)
* universal binaries for src and prebuilt deps

* Rebuild antlr from cache?

* Recache everything

* universalize libssh2

* Pin brew-universalize versions

* Better handling of cxxflags for boost

* Correctly handle cmake message

* Store brew-universalize in bin-build

* Standardize cache keys

* No clue on this compiler flag

* Lets try this boost cxxflag
2023-12-06 22:36:42 +01:00
turleypol
aa5ef40356
use nondeprecated openssl api (#555)
cleanup refptr
added test for md5_encrypt
2023-10-23 19:38:39 +02:00
turleypol
cccf84dfc8
Fewer compile warnings (#413)
* added escriptgrammar as external lib where it belongs. Silenced warnings.

* bscript compiler warning fixes

* special include file to get rid of gcc warnings about antlr4

* misc windows warnings

* time specifc warnings

* buildfix + apple warnings

* never trust apple

* windows debug build warnings

* some windows clang warnings

* last warning fix
2021-08-28 22:26:15 +02:00
Eric Swanson
2cae8137f3
Enable building on OSX (clion) (#318)
* Build on OSX

* Add macos-latest to build matrix

* Fix case sensitivity checks/tests

* On osx builds, cope with unpacking a double that might be followed by either an exponent or an error (as part of an array).

Also, remove static unpack(const char*) forms that were never called.

Co-authored-by: turleypol <turley@polserver.com>
2020-09-26 06:57:10 -07:00
Eric Swanson
4834aee9d9 escript_grammar.cmake from Turley
Incorporate cmake/escript_grammar.cmake

Adjust generated EscriptParser.cpp: Need namespace for TokenStream in constructor
2020-07-26 23:42:33 -07:00
Eric Swanson
26aa8a01fa Incorporate ANTLR into the cmake build.
Adjust ANTLR runtime source code: Replace ERROR with ANTLR_ERROR because it clashes with a longstanding windows header #define.
2020-07-17 20:52:40 -07:00
turleypol
6ef50f50dd Compilation/execution on ARM is now possible 2020-01-06 22:19:51 +01:00
turleypol
c9ff484cf9 building without mysql on linux should work again 2019-12-12 22:32:17 +01:00
turleypol
c0c1561236 use generator unspecific clean cmd in build_tools.sh
always generate compile_commands.json
force color diagnostic (to work with ninja)
2019-04-14 22:05:01 +02:00
turleypol
59cf194c19 renamed all CMake helper files to .cmake 2018-06-23 23:02:37 +02:00
turleypol
7f9219afbd Curl should now build correctly on windows
Removed more visual studio prj files and removed some deprecated files
2018-06-23 19:19:27 +02:00
turleypol
c71c4965c8 git revision fetch is now part of the build process instead of
configure step
2018-06-18 10:27:01 +02:00
turleypol
15d1ff2623 OpenSSL is now mandatory for linux, did not work for years anyway. 2018-05-26 21:14:03 +02:00
turleypol
6870172597 Fixed zlib define for kaitai, added kaitai cmake file to vs project 2018-03-18 17:18:58 +01:00
turleypol
a57b5e629c Support of Ninja builds on linux/windows
Fixed windows builds (conflicting flags eg in Debug target)
CMake 3.2 is now needed
Travis now builds via Ninja
AppVeyor still msbuild, but it cannot build in parallel and I dont want
to double the buildtimes..
2018-03-01 20:21:55 +01:00
turley
b781f1ee92 Better grouping in VS, added pdb zip target. 2018-02-25 20:30:30 +01:00
turley
92c41f2bd5 Curl unpacks into a version folder
fixed source_group for VS in the case of absolute pathes
2018-02-25 14:45:04 +01:00
turleypol
3afc41241b
CMake on windows (#48)
CMake can now also be used for windows
2018-02-24 22:34:55 +01:00
turleypol
de485e7c11 extra Format target instead of the current hack ;)
tried to be more clear what cmake does
2018-02-20 21:38:21 +01:00
turley
8962ea3b7e Show folders in Visual Studio with cmake project, fixed curl build. 2018-02-19 21:19:14 +01:00
turleypol
c102b58135 curl is somehow able to build via cmake on win.
Added CMakeSources to sources to be shown up in IDE
2018-02-11 21:57:38 +01:00
turleypol
44931ef67f cleanup cmake variables
protect for in-source builds
2018-02-04 21:59:53 +01:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00