aboutsummaryrefslogtreecommitdiff
path: root/icons/icons.cmake (follow)
Commit message (Collapse)AuthorAge
* Generate more common icon sizesEmmanuel Gil Peyrot2023-07-14
| | | | | | | | | | | | This adds sizes 24×24 (common on Linux desktop, for instance in application bars), as well as 64×64 and 128×128 (common on Linux mobile). I kept the existing border sizes, but using the same one from 44×44 to 96×96 sounds a bit weird, it’d probably be best to revisit them at some point. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
* Isolate icons build from the running user's preferences.Simon Tatham2023-05-05
| | | | | | | Preferences that adjust the display, such as Pearl graphics style or Light Up lit-blobs toggling, shouldn't affect the official icons, even if a ~/.config/sgt-puzzles exists in the account that builds the puzzles.
* Turn off Leak Sanitiser in the icons build.Simon Tatham2023-04-20
| | | | | | | | | | | | | | | | | | | | | If you configure a Linux build of Puzzles with -fsanitize=address, it will fail during the icons build, because the icon-maker programs leak memory when they're run, and by default, this causes ASan to report all the memory leaks at the end of the program *and then exit 1*. I don't think 'just fix the memory leaks' is a viable answer. _Some_ of the leaks come from the Puzzles code, and could be fixed by being more punctilious about freeing everything before exiting (although that is not necessary for any actually sensible purpose and would _only_ serve to stop Leak Sanitiser complaining). But some are outside the Puzzles code completely, apparently from fontconfig. So even if we fixed all the leaks we could find, we wouldn't prevent the failure status. When I want to build with ASan, I've been working around this by setting ASAN_OPTIONS=detect_leaks=0 in the environment before running the build command. Easier all round if we just do that _inside_ the cmake setup.
* Generate a possibly suitable marketing banner for the KaiStoreBen Harris2023-01-19
| | | | | | | | It wants a 240x130 pixel JPEG. I've gone for rotating the screenshot a bit because the store overlays text on the picture and I don't want horizontal lines in the picture confusing the text. I think the store handles dimming the image, so the picture we produce is at full brightness.
* Properly-styled icons for KaiOSBen Harris2023-01-19
| | | | | | | These are built alongside other icons as part of the GTK build. It builds new icon sizes of 44 and 88 pixels and then uses ImageMagick to round off the corners and add a shadow in accordance with the KaiOS design guide.
* Mid-move icon for CubeBen Harris2022-11-23
|
* Add missing dependency of screenshots on their save filesBen Harris2022-11-23
|
* Fix mid-move iconsBen Harris2022-11-22
| | | | | They've been broken since the move to CMake, which had an incorrect variable substitution in the --redo argument.
* New puzzle: 'Mosaic'.Simon Tatham2021-04-25
| | | | | | | | | | | | | | | | | | This is similar in concept to Minesweeper, in that each clue tells you the number of things (in this case, just 'black squares') in the surrounding 3x3 grid section. But unlike Minesweeper, there's no separation between squares that can contain clues, and squares that can contain the things you're looking for - a clue square may or may not itself be coloured black, and if so, its clue counts itself. So there's also no hidden information: the clues can all be shown up front, and the difficulty arises from the game generator choosing which squares to provide clues for at all. Contributed by a new author, Didi Kohen. Currently only has one difficulty level, but harder ones would be possible to add later.
* icons.cmake: explicitly search for Perl.Simon Tatham2021-04-13
| | | | | | | | This allows the icons build to automatically disable itself if Perl can't be found at all (and print a warning explaining that that's why). It also means that if Perl exists on the system but is somewhere other than /usr/bin (where our #! lines expect it), the icons build can still run.
* Provide pre-built icons in the source tarball.Simon Tatham2021-03-31
| | | | | | | | | | | | | | | | | This reinstates the feature of the previous build system, that the C icon files for the GTK puzzles were included in the source tarball, so that users building from that instead of from the raw git repo would not need to run the fiddly piece of build that regenerates them. Running that fiddly piece of build is much easier in the CMake world (because it's integrated with the main makefile), but it has a build dependency on ImageMagick which is easily avoided. The makefile will still build the icons if it _can_. But in the case where it can't, it will use pre-built icon source files if they're available, and only fall back to no-icon.c if it can't even do that. (So a user checking out from git and building without ImageMagick present will still be able to build _something_ playable.)
* Make the icons build step optional.Simon Tatham2021-03-31
| | | | | | | | | | | This way, ImageMagick is no longer a hard build dependency. For developers or users, building puzzles without nice icons is preferable to not building them at all. (Also, thanks to Michael Quevillon for pointing out very promptly that my use of 'REQUIRED' in the find_program command was implicitly depending on a version of CMake in advance of my minimum_required specification. This change fixes that too, in passing.)
* Migrate to a CMake-based build system.Simon Tatham2021-03-29
This completely removes the old system of mkfiles.pl + Recipe + .R files that I used to manage the various per-platform makefiles and other build scripts in this code base. In its place is a CMakeLists.txt setup, which is still able to compile for Linux, Windows, MacOS, NestedVM and Emscripten. The main reason for doing this is because mkfiles.pl was a horrible pile of unmaintainable cruft. It was hard to keep up to date (e.g. didn't reliably support the latest Visual Studio project files); it was so specific to me that nobody else could maintain it (or was even interested in trying, and who can blame them?), and it wasn't even easy to _use_ if you weren't me. And it didn't even produce very good makefiles. In fact I've been wanting to hurl mkfiles.pl in the bin for years, but was blocked by CMake not quite being able to support my clang-cl based system for cross-compiling for Windows on Linux. But CMake 3.20 was released this month and fixes the last bug in that area (it had to do with preprocessing of .rc files), so now I'm unblocked! CMake is not perfect, but it's better at mkfiles.pl's job than mkfiles.pl was, and it has the great advantage that lots of other people already know about it. Other advantages of the CMake system: - Easier to build with. At least for the big three platforms, it's possible to write down a list of build commands that's actually the same everywhere ("cmake ." followed by "cmake --build ."). There's endless scope for making your end-user cmake commands more fancy than that, for various advantages, but very few people _have_ to. - Less effort required to add a new puzzle. You just add a puzzle() statement to the top-level CMakeLists.txt, instead of needing to remember eight separate fiddly things to put in the .R file. (Look at the reduction in CHECKLST.txt!) - The 'unfinished' subdirectory is now _built_ unconditionally, even if the things in it don't go into the 'make install' target. So they won't bit-rot in future. - Unix build: unified the old icons makefile with the main build, so that each puzzle builds without an icon, runs to build its icon, then relinks with it. - Windows build: far easier to switch back and forth between debug and release than with the old makefiles. - MacOS build: CMake has its own .dmg generator, which is surely better thought out than my ten-line bodge. - net reduction in the number of lines of code in the code base. In fact, that's still true _even_ if you don't count the deletion of mkfiles.pl itself - that script didn't even have the virtue of allowing everything else to be done exceptionally concisely.