Commit Graph

767 Commits

Author SHA1 Message Date
Diomendius
6a13e44dae Add Tools CMake build target
All the individual executables are marked EXCLUDE_FROM_ALL, but the
added Tools custom target is marked ALL. The only visible effect of this
is that ConvertColorCursors does not get built by default, since all the
other tools are dependencies for the Resources or Tools targets, which
are both built by default. Otherwise, the benefit is simply to keep the
dependency tree clean. Only three targets are built by default:
Aerofoil, its resources and the conversion tools. Everything else is
built to satisfy dependencies.
2024-08-06 16:03:16 +12:00
Diomendius
68db3cd83e Add Executable build target
This is meant as an alias to the name of the main executable, for
consistency with the Executable install component.
2024-08-06 16:03:16 +12:00
Diomendius
13f0874757 Enable CMake Release build type and LTO by default 2024-08-06 16:03:16 +12:00
Diomendius
660d79980a Add add_data_file() to CMakeLists.txt
This automatically cleans up artifacts specified as BYPRODUCTS after
running the commands.
2024-08-06 16:03:16 +12:00
Diomendius
f65d550300 Add houses to CMake 2024-08-06 16:03:16 +12:00
Diomendius
d9049f3c8a Add icons to CMake (commented-out)
These are only used on Windows and the converted files have been
committed to the repo, but this might be useful to someone.
2024-08-06 16:03:16 +12:00
Diomendius
8a5b50d98d Add Fonts.gpf to CMake 2024-08-06 16:03:13 +12:00
Diomendius
91e2f3b25f Add ApplicationResources.gpf to CMake 2024-08-06 01:34:53 +12:00
Diomendius
0ebdabc12f Add ConvertColorCursors to CMake, port to *nix
- Includes WindowsUnicodeToolShim.h.
- Replaces sprintf_s() with std::ostringstream.
- Replaces fopen_s() with fopen_utf8().
- Switches to the toolMain() wrapper, which is a no-op on except on
  Windows, where it should improve Unicode support, though I can't test
  that on my end.
- Replaces \ with / in paths, which should still be Windows-compatible.
2024-08-06 01:34:53 +12:00
Diomendius
8b916867d5 Add GenerateFonts to CMake, port to *nix
Removes unused Windows-specific headers and adds arguments to specify
source and output directories, which is necessary for out-of-tree
builds, which are necessary to avoid name collisions on platforms where
executables have no file extension (so, basically everything except
Windows).
2024-08-06 01:34:53 +12:00
Diomendius
a7f5b653fa Add GpFontHandler_FreeType2 to CMake
Also add stddef.h include to GpRenderedGlyphMetrics.h to make size_t
visible. Does MSVC provide size_t by default, or via stdint.h? This
prevents compilation and I can't see how this would have compiled on
Windows otherwise.
2024-08-06 01:34:53 +12:00
Diomendius
5c74c96771 Add unpacktool to CMake, port to *nix
- Adds missing includes, removes some unused ones.
- Removes unused Windows.h and shellapi.h includes.
- Uses / as path separator. This is portable and should still work fine
  on Windows.
2024-08-06 01:28:44 +12:00
Diomendius
e78d93437a Add HouseTool to CMake 2024-08-06 00:50:29 +12:00
Diomendius
c2753ec679 Add MiniRez to CMake
Also includes <algorithm> to provide std::find(). Evidently something in
Windows implicitly provides find(), but it was broken on Linux.
2024-08-06 00:50:09 +12:00
Diomendius
f27860776b Add MergeGPF to CMake 2024-08-06 00:32:23 +12:00
Diomendius
77fcc35726 Add FTagData to CMake, port to *nix 2024-08-06 00:32:23 +12:00
Diomendius
e2bb19709d Add MakeTimestamp to CMake, port to *nix 2024-08-06 00:32:22 +12:00
Diomendius
8b2db1b142 Fix equality test in gpr2gpa.cpp
I don't think this actually gets hit when converting the base Glider PRO
resources, but it's an obvious error that makes the condition always
true.
2024-08-06 00:32:22 +12:00
Diomendius
77009b08ca Avoid Clang c++11-narrowing error
Downgrades c++11-narrowing to a warning when compiling with Clang. A
better solution would be to fix the error, but this at least brings
Clang in line with the more permissive GCC, which treats this as a
warning by default.
2024-08-06 00:32:10 +12:00
Diomendius
7a81b2b396 Add gpr2gpa to CMake, port to *nix 2024-08-06 00:16:22 +12:00
Diomendius
e2da9bb7c5 Add hqx2gp to CMake 2024-08-06 00:16:22 +12:00
Diomendius
796b2880cf Add hqx2bin to CMake 2024-08-06 00:16:22 +12:00
Diomendius
c372fcb92d Add bin2gp to CMake 2024-08-06 00:16:22 +12:00
Diomendius
1e4ee9335e Add flattenmov to CMake 2024-08-06 00:16:22 +12:00
Diomendius
e2fcd7851d Add UnixUnicodeToolShim.cpp
This is the counterpart to WindowsUnicodeToolShim.cpp for *nix systems.
2024-08-06 00:16:22 +12:00
Diomendius
9aa82066f1 Refactor CMakeLists.txt
The BUILD_INTERFACE generator expression isn't actually useful as we
don't use export(). CMAKE_CURRENT_SOURCE_DIR is also unnecessary as
CMake treats relative paths as relative to the current source directory
(or the current binary directory for outputs).
2024-08-04 12:57:13 +12:00
Diomendius
de3fdeb7b1 Fix double-use of va_list in AppendFmt
AppendFmt calls vsnprintf twice, first to check the size of the
formatted string, then to write it for real, but it used the same
va_list for both calls, so the second call got an invalid va_list after
the first call had already consumed all its arguments.

This is UB and at least on Linux makes the second call print garbage. I
presume Windows implements va_list differently such that this somehow
worked correctly, because on Linux, all of the dialog items get parsed
into invalid JSON due to this bug, with lines like this (note the
missing second array element and closing bracket):
    "pos" : [ -55947262,
2024-08-04 12:57:13 +12:00
elasota
0e1af575ca Fix missing return in error case 2024-08-03 15:51:46 -04:00
Eric Lasota
7a7cc8b0dc Merge pull request #20 from Diomendius/normalize_line_endings
Normalize line endings
2024-08-03 11:38:20 -04:00
Diomendius
1b18a87495 Normalize line endings
This commit contains only the result of `git add --renormalize .`

`git show --ignore-space-change` can verify that this commit only
changes whitespace.
2024-07-31 20:21:47 +12:00
Diomendius
bb7b663daf Add .gitattributes
The line endings of text files in this repo are not consistent and some
files even have mixed line endings, presumably from being edited with an
editor that neither respects a file's existing EOL format nor converts
existing line endings on save.

This commit adds a .gitattributes file to mark most text files as text
in Git, which will cause Git to normalize the line endings in these
files to LF internally and to the format specified by the core.eol
setting for files in the working tree.

This commit only adds .gitattributes and does not change line endings.
The following commit normalizes all line endings for files given the
`text` attribute by this commit.
2024-07-31 20:18:00 +12:00
elasota
ea19e36e7f Bump version to 1.1.6 2024-07-19 19:10:19 -04:00
elasota
9613299717 Update to SDL 2.30.5 2024-07-19 19:10:06 -04:00
elasota
812ef5d377 Update to SDK 34 2024-07-14 00:27:39 -04:00
elasota
02058eba73 Fix incorrect RIFF tag size check on 32-bit systems 2024-02-07 19:08:43 -05:00
elasota
65a6e06ce1 Update Android to API 33, version 1.1.4, add build instructions 2023-09-09 11:17:12 -04:00
elasota
a6d93f8daa Update to VS2022 2023-08-26 14:06:14 -04:00
Eric Lasota
549e1ec3e6 Merge pull request #17 from WickedSmoke/master
Fix Linux build
2023-05-24 22:43:03 -04:00
Karl Robillard
141b176574 AerofoilX: Print missing files to stderr. 2023-05-24 07:40:51 -04:00
Karl Robillard
18a0d3a42a Fix Linux compile errors. 2023-05-24 07:40:45 -04:00
elasota
af6d18829e Fix compile failure on systems where pthread_t isn't a pointer, and possibly also systems where it isn't pointer-sized either 2023-05-21 21:53:18 -04:00
elasota
4182a1a107 Bump version to 1.1.3 2022-06-22 21:31:46 -04:00
elasota
5643f464cc Discard security exception on getSerialNumber, fixes Android USB gamepad crash. 2022-06-22 21:29:55 -04:00
elasota
a04c5f10df Reject zip archives with non-zero file count but empty central directory 2022-06-22 21:28:28 -04:00
Eric Lasota
3e13877788 Merge pull request #11 from ryandesign/stdlib
Include stdlib.h where its functions are used
2022-03-17 13:10:33 -04:00
Ryan Schmidt
53ff18d337 Include stdlib.h where its functions are used
Fixes build failure on OS X 10.10 and 10.11:

error: use of undeclared identifier 'free'
error: use of undeclared identifier 'malloc'
error: use of undeclared identifier 'qsort'
2022-03-17 02:54:37 -05:00
elasota
e33c01cc40 Change line endings to UNIX 2022-03-17 02:00:06 -04:00
Eric Lasota
0c891d3117 Merge pull request #10 from ryandesign/mac
Improve CMake macOS build
2022-03-17 01:58:13 -04:00
elasota
e4d2d9f9a4 Fix bad null compares 2022-03-17 01:50:19 -04:00
elasota
41c0312921 Add more nullptr_t operators 2022-03-17 01:48:16 -04:00