Commit Graph

78 Commits

Author SHA1 Message Date
Tamás Bálint Misius
28b5b6dc97
Fix some LTO-related emscripten link-time error
I have absolutely no idea. The error in question is the following:

	wasm-ld: error: /home/lbphacker/.emscripten_cache/sysroot/lib/wasm32-emscripten/lto/libhtml5.a(callback.o): attempt to add bitcode file after LTO (_emscripten_run_callback_on_thread)

I have no idea where we use _emscripten_run_callback_on_thread, and I have no idea why LTO would think it's not required when it's obviously required. This commit fixes it by holding the linker's hand even more than it already had.
2023-12-09 16:51:42 +01:00
Tamás Bálint Misius
374209eebe
Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
Tamás Bálint Misius
b89d29b744
Enable libcurl on android 2023-10-03 18:25:34 +02:00
Tamás Bálint Misius
f94b436cbc
Use mbedtls on windows 2023-10-03 18:25:34 +02:00
Tamás Bálint Misius
baf484653a
Update tpt-libs 2023-10-03 18:25:32 +02:00
Tamás Bálint Misius
e09b125981
Bump required meson version to 0.64
Needed by configure_file(..., copy: true).
2023-08-31 16:46:33 +02:00
Tamás Bálint Misius
7cb0ac96c9
Emscripten: Enable modularity
This allows multiple instances of the game to be loaded in a single page.

Also stop emitting htmls as a build artifact and require presence of #PowderSessionInfo.
2023-08-22 00:26:34 +02:00
Tamás Bálint Misius
58229f49b2
Emscripten: Support persistent storage 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
67e41b6705
Emscripten: Add target, update tpt-libs
The code itself is nowhere near being usable in a browser though.
2023-08-22 00:26:31 +02:00
Tamás Bálint Misius
b6c6cf00d0
Enable installation in the meson config 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
6756c27274
Have ghactions check if dynamic windows builds have all their dependencies
Also update tpt-libs to properly fix the bug I fixed very temporarily earlier.
2023-02-05 15:59:31 +01:00
Tamás Bálint Misius
ef8764e6ab
Temporarily fix mingw builds on windows missing bz2.dll
This will need to be addressed in tpt-libs at some point.
2023-02-05 08:34:08 +01:00
Tamás Bálint Misius
b9c8817386
Group gravity files into their own directory
Also replace non-FFT gravity with "no gravity"; fine for render.
2023-01-27 23:04:27 +01:00
Tamás Bálint Misius
2566506e4b
Provide three levels of install support
Namely: no, yes, and yes and ask at startup.

The install_check option is thus replaced by the can_install option. -Dinstall_check=true maps to -Dcan_install=yes_check, while -Dinstall_check=false maps to -Dcan_install=yes. -Dcan_install=no is new and is recommended for downstream packaging, where -Dinstall_check=false was historically used.

Also improve error messages about bad configuration here and there and scatter configuration code in subdirectories, where they can be closer to their areas of effect.
2023-01-27 09:27:33 +01:00
Tamás Bálint Misius
8680f0d4a7
Remove PATH_SEP, set PATH_SEP_CHAR in meson.build 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
36d6f1d67e
Preprocessor purge round 18: difficult parts of WIN, LIN, MACOSX, AND 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
163203b321
Preprocessor purge round 17: easy parts of WIN, LIN, MACOSX, AND 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
f7478422a4
Preprocessor purge round 16: DEBUG 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
f0ffa2eeb1
Preprocessor purge round 15: FONTEDITOR, RENDERER 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
a2a079356a
Preprocessor purge round 14: NOHTTP 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
29d4d4e91c
Preprocessor purge round 13: X86 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
b16cbf86fc
Preprocessor purge round 12: BETA, SNAPSHOT, MOD 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
9068920de3
Preprocessor purge round 11: GRAVFFT
By splitting gravity implementations into separate translation units.
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
dc8d63fb15
Preprocessor purge round 10: LUACONSOLE 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
1efafb8d30
Preprocessor purge round 8: trivial binary macros 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
9542f98b82
Preprocessor purge round 7: Config.template.h 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
fcc259e9b9
Update tpt-libs
Also make it easier to test tpt-libs builds locally by making it possible to point build.sh at a local tpt-libs repo and move installation of build dependencies to build.sh.
2023-01-01 19:00:05 +01:00
Tamás Bálint Misius
d3ab2e231e
Merge data/ into resources/ 2022-12-25 11:13:46 +01:00
Tamás Bálint Misius
762208356a
Bump macos minimum version to 10.13, update tpt-libs
The version bump was made necessary by 7173650df9.
2022-12-23 19:43:07 +01:00
Tamás Bálint Misius
e5c88f154a
Unify icons 2022-12-18 15:00:08 +01:00
Tamás Bálint Misius
59f89f9a46
Let mods customize app constants
Mainly via meson_options.txt.
2022-12-17 19:45:01 +01:00
Tamás Bálint Misius
630db0ef6b
Update tpt-libs
Comes with a new SDL2 version that fixes some obscure bug on Linux with nvidia drivers installed which makes TPT unable to start.
2022-11-08 21:16:13 +01:00
Tamás Bálint Misius
d120529492
Update tpt-libs
Hopefully fixes 601 errors on win11.
2022-11-06 17:18:08 +01:00
Tamás Bálint Misius
059b3a8e38
Add verb parameter to http.get/post
Also make ENFORCE_HTTPS optional, but default to enabled, so unencrypted HTTP is disabled by default, and require it to be enabled for release binaries.
2022-11-01 19:25:17 +01:00
Tamás Bálint Misius
a57bb09d02
Target v141 toolset with msvc, update tpt-libs
Also reduce per-host connection count to 1, now that we support HTTP/2.
2022-10-29 08:42:39 +02:00
Tamás Bálint Misius
59354731df
Remove all PTI code, use libpng to load avatars and thumbnails
Also write PNGs with libpng, and BMPs with SDL, and have the renderer only generate a large PNG thumbnail, and disable HTTP/2 multiplexing for now so we don't get banned when loading avatars.

simon pls reply to the stupid emails already.
2022-10-23 20:21:05 +02:00
Tamás Bálint Misius
8161c1d71c
Fix font not being given the json dependency
Also make it and render get built as dynamic executables on ghactions, and disable dynamic+LTO, as it seems to be buggy in certain cases and isn't an important case.
2022-10-21 14:52:02 +02:00
Tamás Bálint Misius
ebb87a17c6
Unbundle bzip2 and jsoncpp, update tpt-libs
Also Disallow linking against non-C++ system Lua, unless configuring with -Dworkaround_noncpp_lua=true, add -Dworkaround_elusive_bzip2 and friends, and get rid of the -image_base hack for macos.
2022-10-20 23:15:49 +02:00
Tamás Bálint Misius
f18bd6553f
Remove long defunct OpenGL code paths 2022-10-11 20:11:14 +02:00
Tamás Bálint Misius
a8d2b269b1
Move tricky compiler options over to build.sh
All of these are options that are specific to our ghactions builds and not something we want downstream and package maintainers to be locked into using.
2022-10-06 11:50:46 +02:00
Tamás Bálint Misius
0f9b1a58b1
Add notification for missing or bad SSL certificates
Also add mbedtls to and document new certificate config options in README.md.
2022-09-25 07:22:23 +02:00
Tamás Bálint Misius
09c2704928
Add CAFile and CAPath config options, use mbedtls in static builds
This is how we'll handle systems where the cert bundle and cert directory is stored where mbedtls doesn't expect it.

Also update tpt-libs to get new curl and mbedtls.
2022-09-25 06:13:35 +02:00
Tamás Bálint Misius
fefafa3b3d
Display link command line when building for windows
Command line is limited in length on windows so meson/ninja puts it in a response file and passes that to the linker instead. Only problem is, ninja -v displays only the part of the command line where it tells link.exe where the response file is, not what's in the response file. So I just had the script print it. Care must also be taken for the script to properly fail if ninja fails, but not before the command line is printed.

Also add /GL and /LCTG to msvc command lines because they can't hurt. Right?
2022-09-11 14:15:34 +02:00
Tamás Bálint Misius
a674498a96
Clean up Client::DoInstallation
Also Factor out app constants that mods might change into Meson options and clean up format::URLEncode in the process, convert app and document icon data in arrays to actual images, actualize AppStream data for possible future packaging, add alternative command line format for opening filesystem saves and ptsave URLs, fix a memory leak in Platform::GetCwd, and add format::URLDecode.
2022-09-08 06:54:35 +02:00
Tamás Bálint Misius
513d2cae3e
Update tpt-libs
Also restructure meson.build and the ghactions workflow a bit, and enable -ffunction-sections and -fdata-sections.

Note that starcatcher uploads have not been tested and most likely don't work.
2022-09-03 07:01:21 +02:00
Tamás Bálint Misius
f7527b46e6
Update tpt-libs, add support for android 2022-04-14 21:18:21 +02:00
Tamás Bálint Misius
6fe82d7221
Update tpt-libs, use SDL2main the way it's meant to be
Also fix the first mouse click not being detected on windows with sdl 2.0.20. Apparenlty, we need SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH set to 1 for it to be detected.
2022-04-10 10:39:23 +02:00
Tamás Bálint Misius
b963010187
New ghactions reltype to ease tpt-libs development 2022-04-09 20:29:17 +02:00
Andre LaBranche
827bb568de
Fixes: ld: warning: -no_pie ignored for arm64 (#829)
Fixes: ld: warning: -no_pie ignored for arm64
2022-02-26 13:40:01 +01:00
Tamás Bálint Misius
bfe94618c6
Include slightly more future-proof target type in user agent string 2022-02-22 08:10:18 +01:00