# Notes on packaging GNOME Crosswords

This doc aims to provide hints to those packaging Crosswords for other
platforms.

## master

* We optionally install the _Caveat_ font into `${DATADIR}/fonts/` so
  that the default puzzle set can use it. It is triggered by the
  `install_font` meson option, and defaults to `false`. Packagers
  should provide this font on their own, or enable this setting.

* Require libadwaita-1.7. We dropped the fallback to workaround the
  lack of AdwWrapbox.

## Version 0.3.16

* We install a helper utility called ipuz2pdf in bindir. It can be
  used to convert an ipuz file to a pdf for printing, and can be
  packaged independently from crossword player or editor (similar to
  the thumbnailer).

* We install a helper utility called gen-word-list-resource in
  libexecdir. This is used to build the word-lists, and is not
  generically useful. Packagers can safely delete this file.

* crosswords now requires `blueprint-compiler` at build time.


## Version 0.3.15

* cargo and python requirements were updated

* The requirement to include `org.gnome.Crosswords.Editor.gschema` and
  `broda.gresource` with the Crosswords game has been dropped. That
  means, the following split of files should be used when packaging.

  **Crosswords**
    * `org.gnome.Crosswords.gschema`
    * `player.gresource`

  **Crosswords Editor**
    * `org.gnome.Crosswords.Editor.gschema`
    * `broda.gresource`
    * `wordnik.gresource`

## Version 0.3.14

* **UPDATE:** Due to bug #259, we need to ship the gschema file for
  the editor with the game as well as the broda resource. Those files
  are `org.gnome.Crosswords.Editor.gschema` and `broda.gresource`
  respectively, and should be packaged with the game.

* The editor has an optional dependency on libadwaita-1.7beta. It will
  compile with and without that version. If the newer library is
  present, a substantially fuller clue details section will
  appear. Future versions will just require 1.7 once it's shipped in
  GNOME.

* We now install three word list resources:
    * player.gresource — 20M
    * broda.gresource — 66M
    * wordnik.gresource — 42M

  The `player` dict should be included with the player, while `broda`
  and `wordnik` should be shipped with the editor. The difference in
  size is because the editors have definitions included now which
  expands them considerably. It's possible to shrink the player
  substantially down the line if the size is a problem.

* It is no longer practical for packagers to generate the word list
  resources from scratch. The definition files take a couple hours to
  build, and require downloading a 20Gb intermediate dump of
  wiktionary's database. That intermediate dump takes over a day to
  generate from scratch, so we use a pre-generated version. I build
  the word lists on my computer and check them in to git.

    * The scripts to reproduce the word lists are in
      `scripts/build-wordlist-defs.sh` and
      `scripts/build-wordlist-index.sh`. Instructions on how to use
      the scripts are in `docs/word-entry.md`. In practice, if someone
      wants to double check them with the pregenerated definitions,
      running those scripts on another computer (of the same
      endianness) will produce byte-for-byte identical word lists.

* A consequence of the intermediate files being generated and shipped
  in advance is that we **no longer run on big endian
  machines**. There's open work needed to do to byteswap when parsing
  the word list. I don't know of any practical shippments on those
  machines, so haven't prioritized it.

  Builds will have to exclude ppc and ppc64.

