Commit graph

366 commits

Author SHA1 Message Date
Bill Kendrick
06fafcb6d6 "test-png" tool to find PNGs that cause warnings
New tool, "test-png", which exercises libpng library on
a set of PNG image files, allowing us to find those which
cause Tux Paint (via SDL_image, in turn via libpng) to
report back warnings to STDERR.

h/t Tim Dickson, per https://sourceforge.net/p/tuxpaint/bugs/252/
2022-07-03 17:18:58 -07:00
Will Thompson
38bc3b27d8 Fix detection of xdg-icon-resource
If given more than one argument, 'which' prints the path to each one (if
found). Previously, which was passed two arguments: 'xdg-icon-resource',
and 'install'. But in the contained block of statements, 'install' is
an argument passed to 'xdg-icon-resource'. Pass only 'xdg-icon-resource'
to which.
2022-06-29 13:05:59 +01:00
Will Thompson
4120af3b5f Rename metainfo file to appdata
gettext 0.19.7 gained support for translating appdata files, whereas
support for metainfo files was added in 0.20. These file formats are
effectively the same: as documented in the AppStream specification,
desktop applications can install files with the suffix .appdata.xml
rather than .metainfo.xml and these will still be handled correctly.

It is desirable for this project to support RHEL 7, which has gettext
0.19.8.1, so let's use the older filename.

As noted in the same section of the specification, appdata files were
previously installed to /usr/share/appdata rather than
/usr/share/metainfo, but the spec asserts that the newer metainfo path
works all the way back to RHEL 7, so we keep the newer installation
path.

Thanks to Shin-ichi TOYAMA for flagging this issue.

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
2022-06-29 13:05:40 +01:00
Will Thompson
c03b688e98 Create metainfo directory with 'install'
The -D argument to install, together with -t DEST, means "ensure DEST
exists".
2022-06-29 12:40:44 +01:00
Bill Kendrick
73d5e9b8c6 Make sure METAINFO dir exists 2022-06-29 00:33:06 -07:00
Bill Kendrick
a7151c7b43 Merge commit '21bdf7de11' 2022-06-14 00:49:25 -07:00
Bill Kendrick
fbfd609665 Bumping version to 0.9.29; doc'ing recent additions
Some things snuck in to 0.9.28 binary builds, or were added
recently; making sure they're doc'd in CHANGES.txt
2022-06-14 00:15:58 -07:00
Will Thompson
74506214e7 Add appstream metainfo file
This is used by software centres such as GNOME Software to display
information about the app, both before and after it is installed.

The <id> used here follows the recommendations in the Appstream
specification, with the exception of violating the spec's strong
encouragement to use only lowercase characters. This is because the
version that is already published by Flathub uses an uppercase T in the
final component of the ID.[0] The file shipped by Fedora followed an older
convention of using the desktop file name as the ID. This is
acknowledged by the <provides> section near the bottom of the file,
which will allow software centres to associate the reverse-domain-name
ID with the older ID.[1]

Many fields in this file are translatable.  This was the motivation for
the preceeding two changes:

- By using xgettext rather than intltool, the untranslated template may
  be written using the normal appstream XML tags, rather than needing to
  use (for example) <_name>Tux Paint</_name> to mark that field for
  translation, which renders the template not valid for tools like
  'appstreamcli validate'.
- Merging translations at build time, rather than committing the
  translated XML to the repo as well, avoids another potentially
  error-prone manual step when updating the source file or translations.

The release notes are taken from the press releases on the Tuxpaint
website. They will be extracted for translation. Another option is to
replace the <description> with <url type="details">...</url>, but AFAIK
no software centres currently show these URLs.[2]

[0]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic
[1]: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-id-desktopapp
[2]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases

TODO:

- align comment

Fixes: https://sourceforge.net/p/tuxpaint/feature-requests/172/
2022-06-10 21:45:44 +01:00
Will Thompson
b4aa697474 Merge desktop file at build time
Previously, both the .desktop.in template and the final .desktop file
were checked into source control.

While in some ways convenient, the manual step of updating it may be
forgotten after updating a translation or adjusting the template. It
also potentially introduces confusion as to which file to modify.

Instead, generate the .desktop file at build time. Since this is now
done using msgfmt rather than intltool, there is no additional
dependency beyond gettext, which is already used at build time to
compile .po files to .mo files.
2022-06-10 10:36:56 +01:00
dolphin6k
ff4352d575 Corrected suffix of the system-wide config file 2022-06-10 10:57:06 +09:00
Bill Kendrick
a4c894ac08 Release builds tarballs that denote branch
(SDL1.2 vs SDL2.0)
2022-06-04 00:22:32 -07:00
dolphin6k
b71955c150 Use "<dynamic full path of current dir>\\locale" to bindtextdomain() only for the target "bdist-win32" 2022-02-09 23:12:12 +09:00
dolphin6k
f1519a2a39 Better way to install dll files and .mo files for tpconf only for the target "bdist-win32" 2022-02-07 22:26:54 +09:00
Mark Kim
c2ab6d461c merge macos.c and macos.m, update ios.*
* Merged macos.c into macos.m.
* Updated ios.h and ios.c to be compatible with the macos.* changes.
* Renamed ios.c to ios.m.
2022-02-06 11:29:19 -05:00
Mark Kim
7aa000b68a Tux Paint for macOS can localize menus (feature request #183)
Tux Paint for macOS can now localize the macOS menubar.  Translation
files (*.po) will be required for the actual translations to show.
2022-02-05 18:40:36 -05:00
dolphin6k
c0bac21beb Target directory for install-dlls and install-tpconf-i18n were missing. 2022-01-28 23:35:14 +09:00
dolphin6k
10dc17d434 Install dlls and tpconf only for the target "bdist-win32" 2022-01-28 11:15:13 +09:00
Mark Kim
0175773efc macOS build tweaks
1. Building the DMG file now requires explicitly calling the 'make
   TuxPaint.dmg' target.

2. Messages output after completing a Makefile target has been
   customized on macOS.

The motivation here is Apple Silicon.  With the instruction of Apple
Silicon, the porting developer may need to sign the app bundle and/or
create the app bundle as universal before creating the DMG file, so the
Makefile no longer auto-creates the DMG file.  Instead, macOS-specific
messages have been added so the developer knows what to do next.
2022-01-22 14:46:34 -05:00
Mark Kim
e8bb5c80a6 Remove install stages not needed on macOS 2022-01-17 21:44:04 -05:00
Bill Kendrick
d6792e97c1 Bump to 0.9.28 in Makefile! 2021-12-01 22:49:12 -08:00
dolphin6k
fbf206d17c Makefile: Defined platform specific install target like as other platforms.
tuxpaint.spec: Specified install target except for install-xdg.
2021-11-07 17:10:52 +09:00
dolphin6k
c217f62470 Added clean target 2021-11-05 20:09:16 +09:00
dolphin6k
bad22db0ce Removed man, importscript and bash-completion from install target for windows. 2021-11-05 13:06:15 +09:00
dolphin6k
61ce0798d9 Initial implimentation of win32_trash() 2021-10-28 22:47:32 +09:00
Bill Kendrick
b8317f74e0 extern char*[] from sounds.h to new sounds.c
Move the list of Tux Paint's internal sound effect filenames
from "sounds.h" to a new "sounds.c" (that compiles to "sounds.o").
2021-10-24 01:20:07 -07:00
dolphin6k
f0bffa6202 Deleted support for Windows XP and 2000 2021-10-15 18:37:04 +09:00
Bill Kendrick
79437733f2 Add Magic tool doc translations; install them
Adding snapshot of (basically untranslated) Magic tool docs
in the other locales currently supported by 'tuxpaint-docs'.

Update Makefile to install them.
2021-09-28 21:25:37 -07:00
Bill Kendrick
0ed588521f Add missing Fretwork magic tool docs 2021-09-20 22:55:41 -07:00
Bill Kendrick
8f17edc10e Clean up installed docs
All old, outdated, manually-generated translations of docs now
go into an "outdated" subdirectory.  The "tuxpaint-docs"/gettext-based
ones are the "first-class citizens".

Don't install the docs directory's "Makefile", or the instructions
for how to release Tux Paint, as those are not necessary to end users.
2021-09-17 00:11:33 -07:00
Shin-ichi TOYAMAA
5e5eb6d62a Tell linker to build GUI application. 2021-09-16 13:40:07 +09:00
Shin-ichi TOYAMAA
78da292624 Added SDL_gfx support for build on Windows XP/2000 2021-09-11 14:19:14 +09:00
Bill Kendrick
a3080eef18 WIP Rotational brushes now supported
Unlike "directional" brushes, in which a 3x3 grid representing the
8 cardinal directions (45 degree steps) is used, only a single brush
image is required, and Tux Paint will rotate it between 0 and 360 degrees,
depending on the direction the mouse is going.

The brush's ".dat" file should contain a line consisting of the word
"rotate".

Note: This adds a dependency on "SDL_gfx" library (Homepage:
https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/
SourceForge project page: https://sourceforge.net/projects/sdlgfx/)
as this feature use it's "rotozoom" functionality.

WIP -- Doesn't handle animated brushes correctly yet!

Closes https://sourceforge.net/p/tuxpaint/feature-requests/122/
2021-09-06 23:45:35 -07:00
Mark Kim
6adf0fa723 Fix compilation error on Linux with HOST environment variable set
The Makefile variable "HOST" was introduced to cross-compile Tux Paint
for iOS.  Unfortunately this variable is often set at the environment
variable level on many Linux distributions so it can cause the Makefile
to think it is attempting to be cross-compiled when that is not the
intention.

This change modifies the Makefile so it attempts to cross compile only
when both HOST and HOSTROOT environment variable (which are both
required for cross compilation) are set.
2021-09-06 17:36:40 -04:00
Bill Kendrick
9a02e730e8 Makefile can install various localized manpages 2021-08-14 22:37:05 -07:00
Bill Kendrick
4b0394fd96 Move src/manpage/ to man/ 2021-08-14 22:15:14 -07:00
Bill Kendrick
856ca6dc49 Remove Polish translation of Tux Paint's man page
Remove the very outdated Polish translation of Tux Paint's man page.
2021-08-14 21:44:12 -07:00
Bill Kendrick
cf99582672 Bump version to 0.9.27 2021-08-07 23:38:50 -07:00
Bill Kendrick
69ccac5650 Dropping -rc1 from version 2021-06-28 16:47:13 -07:00
Mark Kim
a8177635cb Fix Haiku compilation bug
Luc Schrijvers reported on the Tux Paint Maintainers mailing list an
failure to build magic tools for Tux Paint 0.9.26 rc1 (see the mailing
list for the details).  The issue appears to stem from an interesting
interaction between my commit from March
(39cc096ece) and the quotes around
beos_PLUGIN_LIBS on line 1361:

  beos_PLUGIN_LIBS:="$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS) $(MAGIC_SDL_CPPFLAGS)"

My commit had removed a leading argument from $(MAGIC_SDL_LIBS) (whose
value is irrelevant but it was "-L/usr/local/lib"), and the second
argument resolves to nothing on Haiku, so beos_PLUGIN_LIBS now resolves
to a string with a leading space, and it appears `cc` treats a string
argument with a leading space as a single token as opposed to a list of
arguments as it was apparently doing previously.  Pere confirms removing
the second argument that resolves to nothing allows binary to compile.

I suppose removing the quotes around beos_PLUGIN_LIBS is another (and
cleaner) possible solution, but the quotes appear to be intentional and
without a Haiku build environment to test the exact behavior this will
be the safer commit to make.
2021-06-17 22:18:15 -04:00
Bill Kendrick
cffbd44f1f Rolling 0.9.26-rc1 2021-06-13 21:01:20 -07:00
Mark Kim
5e8ccbb19e simplify ios compilation
- Merge iphoneos and iphonesimulator compilation.
- Install to package root.
2021-03-22 22:23:01 -04:00
Mark Kim
b73fb9dcdb Lazy resolution of iphone*_ARCH_LINKS
Early resolution of iphone*_ARCH_LINKS calls pkg-config even when compiling for
non-ios platforms, slowing down compilation unnecessarily and possibly raise
errors about nonexisting libraries that are not used.

This change modifies the iphone*_ARCH_LINKS to resolve lazily upon use so
pkg-config is not called unless the variables are used.
2021-03-22 22:15:09 -04:00
Mark Kim
39cc096ece iOS port initial commit
Known Issues
------------
- No printing support.
- No typing support using the OS virtual keyboard.  iOS needs to be signalled
  to bring up the virtual keyboard when the text tool is active.  We also may
  need to do some finagling to make IM work with the virtual keyboard.
- OS language detection doesn't work yet.
- Quitting doesn't close the app.  It just displays a black screen until it is
  force-closed.
- Need to include cross-compilation instructions.

Possible Issues
---------------
- No text display.  This is likely an issue with how pango and related
  libraries were cross-compiled rather than an issue with Tux Paint code.  From
  the error output it appears to be a font rendering issue.
- SVG integration couldn't be tested because RSVG library has not yet be
  cross-compiled successfully.
- Only tested under the iOS Simulator (and not on an actual iOS device yet.)
2021-03-21 23:01:49 -04:00
Bill Kendrick
058191bd04 Radial gradient fill tool added
Note: Need to add to docs.
2021-02-20 18:08:06 -08:00
Bill Kendrick
7cd547e746 "xorpixel()" function added to Magic Tools API 2021-02-20 15:19:40 -08:00
Mark Kim
3c059ffe36 Move custom/macos* files to macos/*
Move all macOS build scripts and resources into the same directory instead of
just having the scripts in one directory and the resources in another.
2021-01-11 18:16:22 -05:00
Mark Kim
4019f8b963 Create Resources directory dynamically at compile time
The 'Resources' directory is used in macOS development to test the binary
without building TuxPaint.app bundle, which is helpful for rapid application
development since creating the app bundle takes a long time.

It's been reported that the symlink in the Resources directory was causing the
'release' target to copy the files in the 'data' directory twice into the
source release tarball.

This change removes the static Resources directory but creates it dynamically
when the 'tuxpaint' target is built and removes it via 'clean' target so the
'release' target does not copy the files in the 'data' directory into the
source release tarball twice.
2020-12-27 23:12:46 -05:00
Bill Kendrick
bcc233b542 Bump ver to 0.9.26; Expanded release steps
Expanded the steps for making and posting releases
(docs/RELEASE.txt).

Bumped version to 0.9.26.
2020-12-27 17:45:13 -08:00
Mark Kim
60e064b34f Change osx_ prefix to macos_ in Makefile
Apple has changed the name of their OS from OS X to macOS a loooong time ago.
It's about time to update it in the Makefile.
2020-12-10 17:40:34 -05:00
Mark Kim
c7ed85cd88 Change "echo -n" to "printf" in Makefile
The `echo` command built into the default macOS shell doesn't understand -n.
This commit changes it to use "printf" instead which should be fairly portable
across other OS's.  Feel free to change it back if it breaks anything.
2020-12-10 16:47:05 -05:00