26 Commits

Author SHA1 Message Date
Tamás Bálint Misius
ea160ff701 Unhardcode APPVENDOR here and there
This should have been done in a674498a96.
2025-08-19 17:55:17 +02:00
Tamás Bálint Misius
0096d27d25 Add run-target serve-locally to emscripten builds
Invoke with:

	ninja serve-locally

Also fix emscripten builds on some systems where emscripten suddenly needs USE_PTHREADS (?????). Also fix JS-unsafe app_exe values breaking builds.
2025-05-10 16:15:17 +02:00
JJ Marr
7394a1c081 Add clang-tidy support and fix modernize-use-nullptr (#966)
C++11 standardizes the "nullptr" keyword, which replaces the
implementation-defined macro null pointer "NULL" or a hardcoded 0.

---------

Co-authored-by: Tamás Bálint Misius <lbphacker@gmail.com>
2024-12-18 18:11:06 +00:00
Tamás Bálint Misius
1ef78c019a Migrate embedded files to custom targets
Meson generators seem to be a dying feature, evidenced by the fact that they have been in a state of isolation from the rest of the language for several years at this point:

 - very few things accept generator outputs as inputs, not even generators themselves do
 - unlike configured files, their outputs aren't guaranteed to be always synthesized, and yet they can't be passed as dependencies to other targets
 - they accept strictly one input and can't depend on other files

This makes them really hard to work with in a context that would require either a project resource or a target. Custom targets don't have any of these shortcomings, so this commit migrates embedded files over to those. A real shame, considering that generators can be used anywhere and are generally less messy than custom targets.
2024-12-17 16:15:27 +01:00
jacob1
57593fb212 Add credits UI
Lists all GitHub contributors and moderators, alongside the original credits (which were moved from the intro text to here)

The UI itself is controlled with credits.json. This can be regenerated with resources/gencredits.py.
2024-12-16 22:42:41 -05:00
Tamás Bálint Misius
9a785dc389 Fix assumption that python is called python
The assumption was introduced by 7e674a887d, where find_program('python') was used instead of Meson's built-in python discovery services. This turned out to be a bad idea because of course there are systems in 2024 where python is not python 3.
2024-04-29 17:50:45 +02:00
Tamás Bálint Misius
7e674a887d Replace resource tools with python scripts
May fix pipeline failures on ghactions where makeico or toarray just exit with a non-zero status for no reason.

Also makes it easier (possible, rather) to build TPT using a cross-compiling msvc toolchain on windows; you can't have two different msvc toolchains in PATH on windows because of course you can't.

toarray had been python before, maybe I converted it to cpp to avoid pulling in python as a dependency, I'm not sure. With android vanilla development (hopefully) gaining traction soon, we'll be relying anyway on helper scripts I've written in python, so python will be a dependency sooner or later. Meson implicitly makes python a dependency, but there could be Meson implementations out there that don't rely on python, who knows.
2024-04-26 11:55:50 +02:00
jacob1
e55fc8703a The squirrel infestation problem is mostly resolved
This reverts commits 5e8a28b946, e8c24e7e23, e8c24e7e23
2024-04-01 19:45:14 -04:00
jacob1
a53595ce68 coolcats.patch (patch courtesy of Simon) 2024-03-31 11:20:08 -04:00
catsoften
e8c24e7e23 Add squir... sound. Add sound 2024-03-30 22:33:13 -04:00
Tamás Bálint Misius
3f503bcb1c Disable custom executable manifest in vs ghactions workflows
See 1ff6a2d0ae for the original problem. The fix in that commit was a bad idea, the patch got stale and broke the previous commit.
2024-01-21 14:17:32 +01:00
Tamás Bálint Misius
a637a619c9 Disable exe icons in mingw ghactions builds
So 1ef0c1a3e0 didn't help at all, great. Either I'm terrible enough at C++ to get the same thing wrong twice, or this is a mingw bug, in which case I'm not willing to waste time trying to figure it out.
2024-01-21 13:49:26 +01:00
Tamás Bálint Misius
7fc3fb4c15 Sort out version info
The idea is to have the following version information included:

 - 1-component save version
   - 2-component under the hood but the minor component shouldn't ever change again
   - see currentVersionMajor in GameSave.cpp
 - 1-component website API version
   - again, currently 2-component because that's what the website code expects
   - see apiVersion in requestmanager/Common.cpp
 - 2-component display version, entirely cosmetic
   - exposed as meson options display_version_major and display_version_minor
   - see APP_VERSION in Config.template.h
 - 1-component business logic version aka build number
   - exposed as meson option build_num
   - see APP_VERSION in Config.template.h
 - variant id aka mod id, tightly coupled with the build number
   - exposed as meson option mod_id
   - see MOD_ID in Config.template.h
 - display and business logic versions repeated for the upstream
   - exposed as meson options upstream_version_major, upstream_version_minor, and upstream_build_num
   - we'll have to update these alongside display_version_major, display_version_minor, and build_num, but mod owners can just merge our changes
   - see UPSTREAM_VERSION in Config.template.h
 - update channel, makes sense in the context of the variant (and yes, this would later enable mod snapshots)
   - currently not exposed as a meson option but derived from meson options snapshot and mod_id
   - see IDENT_RELTYPE in Config.template.h
 - vcs tag aka git commit hash
   - set by build.sh in ghactions workflows
   - see VCS_TAG in VcsTag.tempalte.h

Rather importantly, the save and website API versions are now allowed to change independently of the display version.

These changes also allowed me to remove the ugly sed hacks in build.sh used to provision some manifest files; they are now provisioned by meson.

Also add version info for windows and android.
2023-10-19 12:51:03 +02:00
Tamás Bálint Misius
18084d5aa0 Request UTF-8 code page at startup on windows
This makes the *A Win32 API variants work correctly with UTF-8 parameters, which is nice because standard C/C++ facilities use those (because microsoft's libc is a steaming pile of microsoft code). OF COURSE this only works on win10 1903 and above. See https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
2023-05-13 14:54:50 +02:00
Tamás Bálint Misius
d3ab2e231e Merge data/ into resources/ 2022-12-25 11:13:46 +01:00
Tamás Bálint Misius
bb6c371aa8 Convert images.cpp to actual images
Also remove some dead code.
2022-12-25 11:09:06 +01:00
Tamás Bálint Misius
3be884513d Do macos packaging on ghactions 2022-12-20 08:25:48 +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
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
3cda085bac Build x86_64 AppImage 2022-10-22 22:01:04 +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
ee22c3e631 Fix Windows registry values broken by d155b0f
Also remove unused resource IDs from the resource script.
2021-03-24 22:42:56 +01:00
Tamás Bálint Misius
be7ea2578b Correctly decide whether we provide prebuilt libs 2021-01-21 19:20:16 +01:00
Tamás Bálint Misius
360297c338 Mesonification 2020-12-14 20:16:52 +01:00