aboutsummaryrefslogtreecommitdiff
path: root/Buildscr (unfollow)
Commit message (Collapse)Author
2024-08-01Fix invalid integer literals in VERSIONINFO_BINARY_VERSION.HEADmasterSimon Tatham
Last November in commit 08365fb260ae6e3 I added a VERSIONINFO resource to the Windows puzzle binaries, with three of the four integer components of the binary version number taken from the year, month and day of the build date. The header file #define of those integers was made by a Perl one-liner which just split up $(!builddate) into the right groups of digits. But it didn't trim leading zeroes. So the build failed today because the month component of the version number was '08', which isn't a valid C integer literal (the leading 0 means octal, but 8 isn't an octal digit), and presumably therefore not valid according to llvm-rc either. I have to assume that the previous months have all worked because 01, ..., 07 _are_ valid octal integer literals and still mean the right things. I'm not 100% satisfied with this explanation, because surely the same argument applied to the day field should have meant my builds failed on the 8th and 9th of every month since I added this code last November! But I don't have any evidence left over to show why it _didn't_ fail. Perhaps I've upgraded llvm-rc past a relevant bug fix in the last month, or something.
2024-03-01Stop code-signing Windows binaries we aren't shipping.Simon Tatham
The foosolver.exe binaries aren't delivered out of the end of Buildscr, so there's no point wasting time on signing them. Signing is slow in wall-clock time (you have to wait for a timestamp server), so this should significantly reduce overall build time.
2023-11-19Windows: add a VERSIONINFO resource to the puzzle binaries.Simon Tatham
This includes the textual version number in its existing form (yyyymmdd followed by an abbreviated git hash). The four-part binary version is set to 1 followed by year, month and day; if I ever want to change that, I can increment the initial 1. FileDescription is taken from the existing DESCRIPTION string provided to each puzzle() statement in CMakeLists.txt. This means that puzzles.rc now always defines at least one resource, so we can remove the workaround for MinGW's windres not being able to cope with an empty .rc file, which added a dummy resource in the absence of an icon.
2023-04-06KaiOS: include extra copyright notices in manualBen Harris
The KaiOS build includes compiled versions of various Emscripten library files. These are generally under the MIT licence like Puzzles itself. The MIT licence requires that the licence, and the copyright notice, be "included in all copies or substantial portions of the Software." Since each KaiOS package includes the full manual, which already contains the licence for Puzzles itself, adding the copyright notices there seems like the best approach. I've done this by providing an additional input file that contains the licences for source files used by a current Emscripten build. More automation might be nice, but the set of copyright notices is unlikely to change very much. There are basically one for Emscripten, one for musl, and a few for odd bits of third-party code embedded in musl.
2023-02-18Buildscr: include a test build with clang + STRICT.Simon Tatham
I've just enabled a warning that only fires in that mode, so we need to keep running the build in that configuration to ensure further instances of the warning aren't introduced.
2023-01-19Use the main Web site version of the docs for KaiOS appsBen Harris
Simon's build infrastructure doesn't have Halibut available on the same system as Emscripten, which means that the normal KaiOS build can't build the documentation. At present, though, the version of the documentation that's built for the Web page is perfectly acceptable for KaiOS as well, so we may as well seed the KaiOS build directory with that. This is slightly unfortunate because it means that it's difficult to make changes only to the KaiOS documentation, and I'd like to be able to do that eventually. We can cross that bridge once Halibut has the features I want.
2023-01-19Deliver banner images from build scriptBen Harris
2023-01-19Buildscr bits for making KaiOS buildsBen Harris
These are currently treated as just another JavaScript build, so they don't have their own variable to turn them off.
2022-12-02js: Improve comment explaining same-origin policy for file:Ben Harris
Also a way around it, at least in Firefox.
2021-04-03WASM: add the correct MIME type to .htaccess.Simon Tatham
Only just remembered that this was generated by my build scripts.
2021-04-03Update web puzzles to current WASM-based Emscripten.Simon Tatham
I presume this will improve performance. Also, if I've understood correctly, WASM-based compiled web code is capable of automatically growing its memory, which the previous asm.js build of the puzzles could not do, and occasionally caused people to complain that if they tried to play a _really big_ game in their browser, the JS would eventually freeze because the emulated memory ran out. I've been putting off doing this for ages because my previous Emscripten build setup was so finicky that I didn't like to meddle with it. But now that the new cmake system in this source tree makes things generally easier, and particularly since I've just found out that the up-to-date Emscripten is available as a Docker image (namely "emscripten/emsdk"), this seemed like a good moment to give it a try. The source and build changes required for this update weren't too onerous. I was half expecting a huge API upheaval, and indeed there was _some_ change, but very little: - in the JS initPuzzle function, move the call to Module.callMain() into Module.onRuntimeInitialized instead of doing it at the top level, because New Emscripten's .js output likes to load the accompanying .wasm file asynchronously, so you can't call the WASM main() until it actually exists. - in the JS-side library code, replace all uses of Emscripten's Pointer_stringify() function with the new name UTF8ToString(). (The new version also has an ASCIIToString(), so I guess the reason for the name change is that now you get to choose which character set you meant. I need to use UTF-8, so that the × and ÷ signs in Keen will work.) - set EXTRA_EXPORTED_RUNTIME_METHODS=[cwrap,callMain] on the emcc link command line, otherwise they aren't available for my JS setup code to call. - (removed -s ASM_JS=1 from the link options, though I'm not actually sure it made any difference one way or the other in the new WASM world) - be prepared for a set of .wasm files to show up as build products alongside the .js ones. - stop building with -DCMAKE_BUILD_TYPE=Release! I'm not sure why that was needed, but if I leave that flag on my cmake command line, the output .js file fails to embed my emccpre.js, so the initial call to initPuzzle() fails from the HTML wrapper page, meaning nothing at all happens.
2021-03-31Stop automatically adding warning flags and -Werror.Simon Tatham
It's better to be lax for normal users trying to build the puzzles from source to actually run them. That way, warning changes in some particular compiler I haven't seen yet won't break the build. Instead, I've invented a cmake setting -DSTRICT=ON which turns on all those flags. So I can build with them myself, to ensure the code is as portable as possible. And that flag is set in Buildscr, so that my official builds won't complete until that warning mode is satisfied.
2021-03-31Provide pre-built icons in the source tarball.Simon Tatham
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.)
2021-03-29Migrate to a CMake-based build system.Simon Tatham
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.
2018-11-23Don't initialise GTK in --screenshot mode.Simon Tatham
I had this idea today and immediately wondered why I'd never had it before! To generate the puzzle screenshots used on the website and as program icons, we run the GTK front end with the --screenshot option, which sets up GTK, insists on connecting to an X server (or other display), draws the state of a puzzle on a Cairo surface, writes that surface out to a .png file, and exits. But there's no reason we actually need the GTK setup during that process, especially because the surface we do the drawing on is our _own_ surface, not even one provided to us by GTK. We could just set up a Cairo surface by itself, draw on it, and save it to a file. Calling gtk_init is not only pointless, but actively inconvenient, because it means the build script depends on having an X server available for the sole purpose of making gtk_init not complain. So now I've simplified things, by adding a 'headless' flag in new_window and the frontend structure, which suppresses all uses of actual GTK, leaving only the Cairo surface setup and enough supporting stuff (like colours) to generate the puzzle image. One awkward build dependency removed. This means that --screenshot no longer works in GTK 2, which I don't care about, because it only needs to run on _one_ platform.
2018-06-01Parallelise the build script.Simon Tatham
Using the new feature I added to bob where it defines the variable 'nproc' to give you a sensible value to use with make -j.
2018-04-28Buildscr: make long parts of the build conditionalisable.Simon Tatham
If I want to rebuild just the Javascript puzzles (for example) in circumstances where I don't expect to need a great many edit-compile-link cycles, it's easier to get bob to do it for me than to remember how to set up the development tools on my path. But it takes ages to run the whole build script if I also have to wait for the Windows, Mac and Java puzzles to be built, not to mention the initial Unix build that runs for no purpose other than generating the icon images. So now I can run the build with various time-consuming parts conditioned out, for development purposes. Of course, the default is still to build absolutely everything.
2017-11-29Mark the 32-bit Windows build as runnable on XP.Simon Tatham
By the same method I do it in PuTTY: manually set the Windows subsystem version id to an earlier one than the default.
2017-11-26Reinstate 32-bit Windows builds of Puzzles.Simon Tatham
I've built a set of 32-bit binaries, a 32-bit zip file and a 32-bit MSI, all delivered into a 'w32' output directory.
2017-10-01Make the code base clean under -Wwrite-strings.Simon Tatham
I've also added that warning option and -Werror to the build script, so that I'll find out if I break this property in future.
2017-09-20Build test HTML wrapper pages for the Javascript puzzles.Simon Tatham
This should make it less annoying for me to do local testing of the JS output of a build, before I push a change. There's a new build.out/jstest directory containing .html files suitable for loading in a local browser, which refer to the JS files via an appropriate relative path to the existing build.out/js directory.
2017-08-24Switch the Windows builds over to clang-cl.Simon Tatham
This also switches them to being 64-bit, which I think is probably acceptable in this modern age, especially for such a non-essential piece of software. If anyone complains I can always reinstate a parallel 32-bit build. To support the switch to 64-bit, this commit also changes the default install directory in the MSI to 'Program Files' rather than 'Program Files (x86)'.
2017-08-24Discontinue the Inno Setup Puzzles installer.Simon Tatham
I'm getting rid of these installers in general, and also I'm about to switch the Windows builds over to my new-look non-Windows non-Wine system, which can't run the Inno Setup builder anyway.
2017-05-13Switch to using Halibut's new direct .CHM generation.Simon Tatham
This allows me to remove HTML Help Workshop completely from my build dependencies, and good riddance!
2017-05-07Switch chiark URLs to https.Simon Tatham
2016-04-09Update build script for Inno Setup 5.5.9.Simon Tatham
Between 5.5.6 and 5.5.9 the default output file name changed. To defend against that potentially happening again, I'm now explicitly specifying the output file name in the .iss source file (or rather, in winiss.pl, which constructs it).
2016-03-11Add a .htaccess redirection for the new .msi file.Simon Tatham
Ahem. Left this out of yesterday's commit.
2016-03-10Use WiX to generate an MSI-based Puzzles installer.Simon Tatham
I've reused most of the install script I wrote for PuTTY recently, minus the selectable-features dialog, and plus some preliminary Mason templating to automatically build the right set of puzzle binaries into the installer. Stable GUIDs are autogenerated by the same technique I use in PuTTY's Visual Studio project file generation: hash a fixed pile of randomly generated bits (that is, randomly generated _once_ and used forever) with each filename or other identifier and use those as your random number source.
2016-03-01Update Buildscr to use the new 'with' mechanism.Simon Tatham
2015-12-12Code-sign the Windows puzzle binaries and installer.Simon Tatham
Where facilities exist, that is. Like the approach I took with PuTTY yesterday, Buildscr will now run a code-signing script over the binary if you specify one in the bob config, and otherwise should fall back to just leaving that step out.
2015-11-17Convert Buildscr to use the new "do/win" mechanism.Simon Tatham
2015-01-13Couple of fixes to the new web-page mechanism.Simon Tatham
I missed some spaces in the autogenerated <span>s, and I generated the web page components including unfinished puzzles by mistake.
2015-01-13Script to autogenerate pieces of the web page.Simon Tatham
This should simplify the process of adding a new puzzle, by automating the part where I have to manually edit index.html separately from the main build step.
2015-01-09Add OS X metadata to make Puzzles.app searchable in Spotlight.Simon Tatham
Thanks to Stephen Norman for most of the work, particularly working out what all the metadata had to be in the first place. This patch is mostly his work, and all I've done is fiddle with the plumbing that gets the right version number into the right places.
2014-09-24Remove the MD5-based manifest file system.Simon Tatham
A long time ago, it seemed like a good idea to arrange that binaries of my puzzles would automatically cease to identify themselves as a particular upstream version number if any changes were made to the source code, so that if someone made a local tweak and distributed the result then I wouldn't get blamed for the results. Since then I've decided the whole idea is more trouble than it's worth, so I'm retiring it completely. [originally from svn r10264]
2014-09-24Remove dependencies on Subversion.Simon Tatham
I'm going through all my projects and reworking them to avoid depending on the monotonic integer-valued source control revision identifier provided by Subversion, so I can migrate everything to git without my builds and versioning breaking. Puzzles's version number is now of the form YYYYMMDD.vvvvvv, where vvvvvv is some string of source control information (currently still the SVN-style "rNNNNN", but free to change in future). The date provides monotonicity between my official automated builds, and the second component is the one I'll be most interested in when people send bug reports. [originally from svn r10263]
2014-03-30Reinstate the Mac OS build step.Simon Tatham
Now I've got a working Mac, I can build it again. [originally from svn r10167]
2013-06-30Support building via autoconf and automake. mkfiles.pl now outputs aSimon Tatham
Makefile.am, and there's a new mkauto.sh which builds a corresponding configure script. The old makefile has been renamed from 'Makefile' to 'Makefile.gtk', indicating that the intended new _default_ approach is to use the autoconf world. Makefile.gtk is provided as an emergency fallback in case anything fails with the new stuff that used to work with it. The new configure script does not support the same $(BINPREFIX) system as the old Makefile did. However, as I understand it, it should be possible to configure using --program-prefix="sgt-" (for example) and then the binaries should all be renamed appropriately at install time. The Makefile.am is quite painful. The Puzzles codebase relies heavily on compiling individual object files multiple times with different the cpp flags per build deliverable (program or library) and not per source file. Solution: anything built with non-default compile options has to go in its own little library. But that doesn't work either in the general case, because as soon as you have more than one such library linked into an application, Unix ld semantics bite you if the objects in the libraries both refer to each other. So I ended up building all those little libraries but not _using_ them - instead the link commands for the programs needing those objects refer to the objects directly, under the silly names that automake gives them. (That's less fragile than it sounds, because it does _document_ the names of the intermediate object files. But still, yuck.) [originally from svn r9886]
2013-06-27Adjust the build script to turn the NestedVM build into a delegation,Simon Tatham
so that not every machine on which I want to run the full Puzzles build will have to have a local NestedVM installation. [originally from svn r9882]
2013-06-08Rename wingames.lst to gamedesc.txt, and add a couple of extra fieldsSimon Tatham
to it giving each game's "internal" name (as seen in the source file, .R etc) and also a brief description of the game. The idea of the latter is that it should be usable as a comment field in .desktop files and similar. [originally from svn r9858]
2013-03-30New front end! To complement the webification of my puzzles via JavaSimon Tatham
applets, here's an alternative webification in Javascript, using Emscripten in asm.js mode (so that as browsers incorporate asm.js optimisation, the game generation should run really fast). [originally from svn r9781]
2013-03-30Introduce a mechanism in this source tree for building the containerSimon Tatham
web pages for the Java applets. Previously, those have all been maintained by hand in my website's svn area, which is a bit silly. Now we have a file per puzzle in the 'html' subdirectory which contains the puzzle's name, one or two attributes, and the instructions snippet to go below the puzzle applet; and then there's a Perl script that builds all the real web pages out of that by adding in the parts common across all files: the header, footer, and middle fragment with the <applet> tag and resizing bits and pieces. One piece _not_ checked in here is the footer text specific to my hosting at chiark, which I think does still belong in the www area. So Buildscr doesn't actually build the web pages; it just delivers the bits and pieces by which my nightly snapshot script will be able to run the program that _does_ build them, passing that footer as an extra argument. [originally from svn r9780]
2012-04-03Comment the Mac build out of Buildscr, since I no longer have aSimon Tatham
working Mac and hence can't build it any more. [originally from svn r9442]
2011-01-06Introduce a mechanism in Buildscr for optionally building some of theSimon Tatham
(more finished) puzzles in 'unfinished', as Java applets only. (The rationale being: puzzles in 'unfinished' can be played locally by people who go to the extra effort of downloading and building the source, but to play them in Java is particularly inconvenient unless I build the Java version myself. I just won't link it from the front page.) [originally from svn r9073]
2009-08-28Add execute permission to the .exe files inside the zip file.Simon Tatham
[originally from svn r8634]
2008-07-05Add a build version designation to the NestedVM build, after JacobSimon Tatham
pointed out that Help > About in the Java applets on my website currently reports "Unidentified build". [originally from svn r8105]
2008-06-27Build the Java versions of the puzzles automatically as part of theSimon Tatham
build process. Also update the new-puzzle checklist to make sure I set up and test the Java applet for any new game I add. [originally from svn r8096]
2008-03-20Hmm. Telling xvfb to default to a TrueColor visual did help, in thatSimon Tatham
it got rid of the bogus backgrounds on all the text; but on the other hand it mysteriously caused all the images to become black and white! Serves me right for testing with Bridges which was B&W to start with. Instead, we'll just tell xvfb to use a 24-bit display and let it sort out the visuals for itself; that seems to work better. [originally from svn r7932]
2008-03-20I _think_, after some fairly random experimentation, that this oughtSimon Tatham
to fix the weird blacked-out text in the xvfb-built screenshots. [originally from svn r7931]
2007-05-06I still haven't managed to get the WinCE port building via bob, butSimon Tatham
I should at least check in what I've got. [originally from svn r7542]