<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puzzles/cmake/platforms/unix.cmake, branch master</title>
<subtitle>My sgt-puzzles tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/'/>
<entry>
<title>Windows: leave puzzles.rc out of auxiliary GUI tools.</title>
<updated>2023-11-19T15:04:50+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-11-19T15:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=595338fa43d40f356f04b8704f72f060651669e8'/>
<id>595338fa43d40f356f04b8704f72f060651669e8</id>
<content type='text'>
There's no reason to put the .rc file into developer tools like
galaxieseditor at all. Its current job is to add an icon, and those
tools don't have any. I'm about to add version information, and they
won't have that either (in particular, no description string like the
games do).

The CLI developer tools already don't include puzzles.rc, and GUI dev
tools are more like those than they are like puzzles.

puzzles.rc was being added to an aux GUI tool's source file list by
get_platform_puzzle_extra_source_files(), which is called for aux GUI
tools as well as for puzzles proper. However, it's not as simple as
just eliminating that call, because on Unix, we _do_ need to add the
same extra source files to GUI dev tools that we do for puzzles,
because gtk.c contains external references to either an array of the
puzzle's icons or an empty array indicating that there aren't any, so
_something_ has to provide that.

So instead, get_platform_puzzle_extra_source_files now takes an extra
argument saying whether the program is a real puzzle or an aux tool;
windows.cmake leaves out puzzles.rc in the latter case, but unix.cmake
puts the icon array in unconditionally.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason to put the .rc file into developer tools like
galaxieseditor at all. Its current job is to add an icon, and those
tools don't have any. I'm about to add version information, and they
won't have that either (in particular, no description string like the
games do).

The CLI developer tools already don't include puzzles.rc, and GUI dev
tools are more like those than they are like puzzles.

puzzles.rc was being added to an aux GUI tool's source file list by
get_platform_puzzle_extra_source_files(), which is called for aux GUI
tools as well as for puzzles proper. However, it's not as simple as
just eliminating that call, because on Unix, we _do_ need to add the
same extra source files to GUI dev tools that we do for puzzles,
because gtk.c contains external references to either an array of the
puzzle's icons or an empty array indicating that there aren't any, so
_something_ has to provide that.

So instead, get_platform_puzzle_extra_source_files now takes an extra
argument saying whether the program is a real puzzle or an aux tool;
windows.cmake leaves out puzzles.rc in the latter case, but unix.cmake
puts the icon array in unconditionally.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor the new icon installation code.</title>
<updated>2023-07-14T07:40:06+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-07-14T07:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=6de17a7511bf67e999c450851d5bc9e4892367bb'/>
<id>6de17a7511bf67e999c450851d5bc9e4892367bb</id>
<content type='text'>
It's horribly repetitive, and we had a list of all the icons' pixel
sizes anyway!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's horribly repetitive, and we had a list of all the icons' pixel
sizes anyway!
</pre>
</div>
</content>
</entry>
<entry>
<title>Install the icons to the right location on Linux</title>
<updated>2023-07-14T07:31:44+00:00</updated>
<author>
<name>Emmanuel Gil Peyrot</name>
<email>linkmauve@linkmauve.fr</email>
</author>
<published>2023-07-13T17:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=c99fbed8c9d957de5b2094b54c7ec7e38979d770'/>
<id>c99fbed8c9d957de5b2094b54c7ec7e38979d770</id>
<content type='text'>
That way, any application displaying the .desktop with its icon will
pick the icon size it deems the best one for the current rendering.

See the Icon Theme Specification:
https://specifications.freedesktop.org/icon-theme-spec/latest/ar01s07.html

Signed-off-by: Emmanuel Gil Peyrot &lt;linkmauve@linkmauve.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That way, any application displaying the .desktop with its icon will
pick the icon size it deems the best one for the current rendering.

See the Icon Theme Specification:
https://specifications.freedesktop.org/icon-theme-spec/latest/ar01s07.html

Signed-off-by: Emmanuel Gil Peyrot &lt;linkmauve@linkmauve.fr&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use -Wmissing-prototypes with GCC as well</title>
<updated>2023-02-18T13:52:18+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-02-18T13:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119'/>
<id>b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119</id>
<content type='text'>
-Wmissing-prototypes was what I wanted all along, but somehow I'd
mis-read the documentation and thought it wasn't.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-Wmissing-prototypes was what I wanted all along, but somehow I'd
mis-read the documentation and thought it wasn't.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix missing statics and #includes on variables.</title>
<updated>2023-02-18T08:55:13+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-02-18T07:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=873d613dd597f550b1b64946c4577b012d61d1c9'/>
<id>873d613dd597f550b1b64946c4577b012d61d1c9</id>
<content type='text'>
After Ben fixed all the unwanted global functions by using gcc's
-Wmissing-declarations to spot any that were not predeclared, I
remembered that clang has -Wmissing-variable-declarations, which does
the same job for global objects. Enabled it in -DSTRICT=ON, and made
the code clean under it.

Mostly this was just a matter of sticking 'static' on the front of
things. One variable was outright removed ('verbose' in signpost.c)
because after I made it static clang was then able to spot that it was
also unused.

The more interesting cases were the ones where declarations had to be
_added_ to header files. In particular, in COMBINED builds, puzzles.h
now arranges to have predeclared each 'game' structure defined by a
puzzle backend. Also there's a new tiny header file gtk.h, containing
the declarations of xpm_icons and n_xpm_icons which are exported by
each puzzle's autogenerated icon source file and by no-icon.c. Happily
even the real XPM icon files were generated by our own Perl script
rather than being raw xpm output from ImageMagick, so there was no
difficulty adding the corresponding #include in there.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After Ben fixed all the unwanted global functions by using gcc's
-Wmissing-declarations to spot any that were not predeclared, I
remembered that clang has -Wmissing-variable-declarations, which does
the same job for global objects. Enabled it in -DSTRICT=ON, and made
the code clean under it.

Mostly this was just a matter of sticking 'static' on the front of
things. One variable was outright removed ('verbose' in signpost.c)
because after I made it static clang was then able to spot that it was
also unused.

The more interesting cases were the ones where declarations had to be
_added_ to header files. In particular, in COMBINED builds, puzzles.h
now arranges to have predeclared each 'game' structure defined by a
puzzle backend. Also there's a new tiny header file gtk.h, containing
the declarations of xpm_icons and n_xpm_icons which are exported by
each puzzle's autogenerated icon source file and by no-icon.c. Happily
even the real XPM icon files were generated by our own Perl script
rather than being raw xpm output from ImageMagick, so there was no
difficulty adding the corresponding #include in there.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add -Wmissing-prototypes to STRICT clang builds.</title>
<updated>2023-02-18T08:55:02+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-02-18T07:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c'/>
<id>615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c</id>
<content type='text'>
Ben added -Wmissing-declarations in commit 3a3e491a8bc624e for gcc
builds, and observed that clang's option of the same name doesn't do
the same job. But clang does _have_ an option to do the same job: it's
just spelled differently. Added -Wmissing-prototypes in clang builds,
so that those will check the same thing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ben added -Wmissing-declarations in commit 3a3e491a8bc624e for gcc
builds, and observed that clang's option of the same name doesn't do
the same job. But clang does _have_ an option to do the same job: it's
just spelled differently. Added -Wmissing-prototypes in clang builds,
so that those will check the same thing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable -Wmissing-declarations in STRICT mode on GCC</title>
<updated>2023-02-18T00:13:15+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-02-16T21:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=3a3e491a8bc624eb1c3b34e54ebee8d33942add2'/>
<id>3a3e491a8bc624eb1c3b34e54ebee8d33942add2</id>
<content type='text'>
Clang's -Wmissing-declarations means something quite different, so we
only enable it on GCC.  This is slightly silly since Clang's
-Wmissing-declarations is enabled by default, but it makes it clear that
we know they're different.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clang's -Wmissing-declarations means something quite different, so we
only enable it on GCC.  This is slightly silly since Clang's
-Wmissing-declarations is enabled by default, but it makes it clear that
we know they're different.
</pre>
</div>
</content>
</entry>
<entry>
<title>unix, gtk: Install and use HTML help</title>
<updated>2022-08-01T17:41:10+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>benh@debian.org</email>
</author>
<published>2022-07-31T02:11:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=9c13279938cfdd3f85a83c3f9ab1714a5a9164ae'/>
<id>9c13279938cfdd3f85a83c3f9ab1714a5a9164ae</id>
<content type='text'>
- Generate HTML pages from the manual, and install them
- Add "Contents" and "Help on &lt;name&gt;" menu items that will open the
  appropriate page in a web browser
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Generate HTML pages from the manual, and install them
- Add "Contents" and "Help on &lt;name&gt;" menu items that will open the
  appropriate page in a web browser
</pre>
</div>
</content>
</entry>
<entry>
<title>Permit building GUI helper tools.</title>
<updated>2021-05-25T09:45:40+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2021-05-23T09:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=d5b53853aad6c3bbfe255c063c045e7986de33ad'/>
<id>d5b53853aad6c3bbfe255c063c045e7986de33ad</id>
<content type='text'>
These look like puzzles, in that they link against a frontend and
provide the usual 'struct game', but they don't count as a puzzle for
purposes of shipping, or even having to have descriptions and icons.

There's one of these buried in the code already under an ifdef, which
I'll re-enable in the next commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These look like puzzles, in that they link against a frontend and
provide the usual 'struct game', but they don't count as a puzzle for
purposes of shipping, or even having to have descriptions and icons.

There's one of these buried in the code already under an ifdef, which
I'll re-enable in the next commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop advertising GTK 1 as an option!</title>
<updated>2021-04-05T10:00:05+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2021-04-05T10:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=8c97ef434f2003768a509f9a76a2b019a08966cb'/>
<id>8c97ef434f2003768a509f9a76a2b019a08966cb</id>
<content type='text'>
When I wrote yesterday's commit c0c64dc1051bcbd I momentarily forgot
which of my projects still support GTK 1 and which don't. Puzzles
doesn't.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When I wrote yesterday's commit c0c64dc1051bcbd I momentarily forgot
which of my projects still support GTK 1 and which don't. Puzzles
doesn't.
</pre>
</div>
</content>
</entry>
</feed>
