XMB format is bumped to 4, invalidating all cached files. The
differences are:
- element/attribute names are stored after the elements themselves, and
not before. This allows writing XMB data in one pass instead of two.
- names themselves becomes offsets (instead of arbitrary integers),
making getting the string from the int name much more efficient.
XMBFile is renamed to XMBData to clarify that it does not, in fact,
refer to a file on disk.
XMBData::GetElementString is also changed to return a const char*, thus
not creating an std::string. A string_view version is added where
convenient.
The XML->XMB and JS->XMB conversion functions and the corresponding
storage are moved to `ps/XMB`, since that format doesn't particularly
relate to XML. CXeromyces becomes lighter and more focused as a result.
The XML->XMB conversion also benefits from the above streamlining.
Note that in a few cases, string_view gets printed to CLogger via
data(), which is generally not legal, but we know that the strings are
null-terminated here. Our libfmt (version 4) doesn't support
string_view, that would be v5.
Differential Revision: https://code.wildfiregames.com/D3909
This was SVN commit r25375.
The CPPCheck linter outputs 'char: null', which trips the
phabricator-jenkins-plugin, and fails to lint on CI.
To avoid this, filter out null values, since e.g. char is optional
anyways. We do want to fail if non-optional values are missing.
Differential Revision: https://code.wildfiregames.com/D3730
This was SVN commit r25112.
The CI wasn't properly reporting linting, as it turns out the output of
`arc lint --output json` is not what the Jenkins plugin expects.
This adds a custom lint printer that is compatible with the plugin
expectations.
Also delete the coala/ folder forgotten in the original diff.
Differential Revision: https://code.wildfiregames.com/D3709
This was SVN commit r25082.
This runs linting using the "arc lint" command of arcanist, which
notably gets run automatically as part of the arc diff workflow.
Changes:
- The major change is that arc lint reports, by default, only issues on
changed lines instead of changed files (--lintall changes that).
- JSHint is largely redundant with eslint and does not support some of
the new Javascript functionality that we are able to use in 0 A.D., such
as conditional chaining, thus it is removed (of course, users can still
run it manually).
- Eslint 7 is supported out of the box and updated to ES 2020
- cppcheck and eslint are optional - if the executable is not found
(e.g. in PATH), it will fallback to a 'dummy' PHP script that does
nothing. This has been tested on windows, mac and Debian (CI).
- The licence year linter now suggests replacement, and has been
rewritten as an arcanist linter.
- Add a JSON error linter.
The intention is to have non-intrusive external linting, and largely the
same text linting.
Coala has largely gone unmaintained in the past few years (more so than
arcanist anyways) and installing it on modern Python is convoluted.
Differential Revision: https://code.wildfiregames.com/D3639
This was SVN commit r25056.
Should hopefully resolve an issue raised on IRC by @spcman and @Xavi92
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3610
This was SVN commit r24998.
Also incorporate retry improvements by Stan
Reported by: madPilot
Differential Revision: https://code.wildfiregames.com/D3585
This was SVN commit r24944.
- The MacOs script was not exporting the SVN revision properly.
- Rename the DMG to match the other's conventions.
- Clean up windows installer files ( Fixes#5955 )
Differential Revision: https://code.wildfiregames.com/D3370
This was SVN commit r24763.
Current issue with the lobby, is that we make ips of hosts public for
anyone to read. This patch consists of 3 parts.
1.) Removing ips and ports from lobby javascript
2.) Removing need of script on the server to attach public ips to game
stanza by asking the host using xmppclient as proxy.
3.) Implementing password protected matches, to deny this information to
not trusted players.
Further description:
Do not send ports and stunip to the bots.
Removed from stanza.
Do not send ip to the lobby.
Removed from mapping gamelist from backend to gui (still on the backend
side, because it is done by script on 0ad server).
Get ip and ports on request when trying to connect.
On the host side, ask stun server what is host's public ip and remember
it.
On the client side, send iq through xmppclient to the hosting player and
ask for ip, port and if Stun is used, then if answer is success,
continue
with connecting, else fail.
Add optional password for matches.
Add password required identifier to the stanza.
Allow host to setup password for the match. Hash it on the host side and
store inside Netserver. If no password is given, matches will behave
as it is not required.
On the client side, if password for the match is required, show
additional window before trying to connect and ask for password, then
hash it
and send with iq request for ip, port and stun.
Server will answer with ip, port and stun only if passwords matches,
else will asnwer with error string.
Some security:
Passwords are hashed before sending, so it is not easy to guess what
users typed. (per wraitii)
Hashes are using different salt as lobby hashing and not using usernames
as salt (as that is not doable), so they are different even typing the
same password as for the lobby account.
Client remembers which user was asked for connection data and iq's id of
request. If answer doesn't match these things, it is ignored. (thnx
user1)
Every request for connection data is logged with hostname of the
requester to the mainlog file (no ips).
If user gets iq to send connection data and is not hosting the match,
will respond with error string "not_server".
If server gets iq::result with connection data, request is ignored.
Differential revision: D3184
Reviewed by: @wraitii
Comments by: @Stan, @bb, @Imarok, @vladislavbelov
Tested in lobby
This was SVN commit r24728.
- Fix compiler warning with Clang
- Fix usage of libiconv
- Fix an incorrect SSE macro in NVTT for SSE
Patch by: @madpilot and Stan
Fixes: #5255
Differential Revision: https://code.wildfiregames.com/D3421
This was SVN commit r24704.
This threads the netclient session, which avoids timeouts when the
main-thread is not polling (map creation, very long simulation frames).
Unlike the NetServer, which should be as independent as possible from
the main thread, the NetClient is fundamentally tied to the game thread.
Therefore, this only threads the session object.
To ensure good performance and ease-of-use, lock-free queues for
in/out-going messages are used.
This fixes artificial timeouts, while also improving actual ping reports
(since frame-time is no longer a factor).
It effectively reverts D1513/eda236522c and 2e7e1c0b2b, all hacks around
lag-timeouts (and bits of 1a3fb29ff3).
Based on a patch by: Stan
Comments by: Vladislavbelov
Fixes#3700, refs #3373
Differential Revision: https://code.wildfiregames.com/D2848
This was SVN commit r24518.
- Rename macros to be more explicit
- Move detection code to a separate file
- Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
- Make explicit the SSE2 dependency for Windows
Comments by: @vladislavbelov@wraitii@OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
Update build shell scripts to use premake5 `gmake2.*` directories.
(The old `gmake.*` directories have been removed from premake5.)
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24388.
See `CHANGES.txt` below for the upstream-composed list of changes.
`premake5.exe` built by Stan
Accepted By: Stan (for Windows)
Trac Tickets: #5869
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24387.
These files contain instructions to build premake and its bundled
dependancies
on versions of Visual Studio we no longer support.
Refs: D3219
This was SVN commit r24386.
- Add a 'dev' option to the mac bundle that's much faster, intended to
quickly test bundle-like behaviour.
- Add an option to only archive the 'mod' folder, intended to speed up
the CI weekly builds and avoid taking too much disk
space.
- Tweak the windows installer, add an option to create a shortcut to the
desktop (Fixes#1637). This uses the readme 'hack'
which appears to be a relatively standard way of doing that.
- Make the scripts executable.
- Update jenkinsfile.
Follows d95550248b
Differential Revision: https://code.wildfiregames.com/D3191
This was SVN commit r24353.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.
Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.
Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
SM78 drops usage of Python 2 in favour of Python 3.
SM78 is the first ESR to actually use rust, which means a new static
library is bundled.
This means LLVM-objdump is now a dependency of Spidermonkey, and also 0
A.D.
SM78 also removes the need for NSPR on Windows (Bug 1556646).
Tested by: Stan, Freagarach, mammadori
Refs #5694
Refs #5861
Differential Revision: https://code.wildfiregames.com/D3167
This was SVN commit r24332.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3
Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.
Closes#5862
Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
No noteworthy build system changes, however rust is now necessary for
Spidermonkey compilation.
On windows, clang-cl is now necessary.
Tested by: Freagarach, Stan, Subitaneo
Refs #5860
Differential Revision: https://code.wildfiregames.com/D3143
This was SVN commit r24296.
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
Update the lib used to handle plists, as dmgbuild changed things for
Python3.
Refs #5694
Differential Revision: https://code.wildfiregames.com/D3157
This was SVN commit r24282.
We now support the most recent released version of `fmt` available (at
the time
of committing).
As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).
If you are a user of...
Linux/BSD: You will now need to have `fmt` installed from your
distribution's
package repository. The minimum supported version of `fmt` is
`4.0`.
OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
then included and linked automatically.
Windows: The relevant header files are retained and, along with a
pre-built
library, are the only things still bundled.
Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)
Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
All are updated except:
- WxWidgets (not sure about compatibility)
- libogg (doesn't compile)
- zlib/libsodimum which have no update.
This drops supports for 10.11 and earlier, meaning we can now assume
SSE4.1 is present.
Updates the build system to account for this.
Closes#5777 (by virtue of upgrading to SDL 2.12)
Refs #4362
Differential Revision: https://code.wildfiregames.com/D3111
This was SVN commit r24257.
This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.
Tested by: SubitaNeo, Stan
Refs #5859
Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
This:
- Generates a VS solution for VS17
- Explicits the boost toolset chosen, leveraging ABI compatibility to
avoid recompiling the library (for now).
- Likewise, reuses the Spidermonkey libraries. The SM60 upgrades does
away with putting the toolset in the library name entirely.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3130
This was SVN commit r24240.
Spidermonkey 60 can only be compiled with C++14. This conflicts with
building 0 A.D. with C++11, so upgrade to C++14 first.
This in itself should not drop compiler support on any platform.
Tested on Windows by: Stan
Tested on Linux by: Freagarach
Refs #5859
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3124
This was SVN commit r24235.
D2768 inherits from a Spidermonkey class, and SM is built without rtti.
This won't compile unless we also compile without RTTI, and that diff is
required for SM60.
Further, windows was already compiling without RTTI and our coding
conventions say to not use it, so this is more of a regularization.
AtlasUI is left unaffected as WXWidgets uses it (and it's a dynamic
library so separate enough to do that).
Differential Revision: https://code.wildfiregames.com/D3104
This was SVN commit r24214.
This reverts static linking on linux from 6bb08fb424, it appears to fail
to link and/or crash, depending.
- Commit the tarball.
- Update update-workspaces.sh
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3114
This was SVN commit r24205.
Of note is the change to static linking on *nix (MacOS already used it).
The logic is that we can only use one single version of SM, so that
advantage of dynamic linking is lost regardless. We might also see
performance gains in the future with LTO enabled. It is also slightly
easier to distribute the program as a result. Expect a negligible size
increase in the binary size (offset somewhat by no longer needing to
distribute .so files). Finally, it streamlines the build script.
Also noteworthy in this commit:
- The MacOS build script is folded back into the general build script.
- the perl/sed command is replaced by patching the configuration file,
which at least warns if it starts failing in the future.
Binaries for windows provided by @Itms
The bulk of the patching was also done by @Itms.
Tested by: Stan, Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3094
This was SVN commit r24202.
- Custom fixes to coala: support python3.8 and recent versions of
cppcheck
- Adapt .coafile to current coala
- Adapt LicenseYearBear to current `svn` python package
- Move the linter configuration to the coala directory
- Remove the now unused lint-patch script
- Update Jenkins pipelines to report build stderr as a comment on Unix
(including warnings when the build succeeds), and to report lint issues
inline
Tested on Jenkins during the past week.
Differential Revision: https://code.wildfiregames.com/D2931
This was SVN commit r23971.
Implement a simple HTTP server to start games, receive the gamestate and
pass commands to the simulation.
This is mainly intended for training reinforcement learning agents in 0
AD. As such, a python client and a small example are included.
This option can be enabled using the -rl-interface flag.
Patch by: irishninja
Reviewed By: wraitii, Itms
Fixes#5548
Differential Revision: https://code.wildfiregames.com/D2199
This was SVN commit r23917.
This includes:
- some build fixes
- Jenkins pipelines, in use since January
- a revamped DMG build script, including dmgbuild configuration by Tobbi
and a tweak by norsnor (D2650)
Differential Revision: https://code.wildfiregames.com/D2523
This was SVN commit r23676.
Use the opportunity to rename the lib from cppformat to fmt, refs #4148.
Patch By: adrian
Rebased By: s0600204
Differential Revision: https://code.wildfiregames.com/D2613
This was SVN commit r23562.