Commit graph

100 commits

Author SHA1 Message Date
Jim Derry ed3ba3f48f - Improve package naming for macOS installer to eliminate semicolon from filename if multiple arches.
- Fix gitignore to ensure we don't add binary packages by mistake.
- Use better README files for macOS packages.
2021-07-16 16:39:45 -04:00
Jim Derry 7961be11ed Improve macOS and Linux package naming. 2021-07-16 15:44:53 -04:00
Jim Derry b22e301226 Fixes #743. 2021-07-10 13:26:25 -04:00
Jim Derry 92414e8b68 Fixes #952 on non-WIN32 platforms. Modify WIN32 static library to tidy_static instead of tidys. 2021-07-09 20:40:17 -04:00
Jim Derry cfcf6b7667 Add support for the required Info.plist to the Tidy console application, thus enabling
notarization support that's now required on macOS.

Unlike the similar pull request on the master branch, this one ensures that the proper
version is always used, via the same mechanism that CMakeLists uses to set the version.
2021-04-28 14:47:50 -04:00
Geoff McLane 7cda3aba38 Minor win build changes 2020-11-21 16:39:52 +01:00
Sven Paschukat 74a7b2ee9d COMPILE_FLAGS property only once per target, avoid overwriting. 2020-06-29 09:02:37 +02:00
Jim Derry 2957cb135b Moved orphans from attrapi.c to tidy.c; eliminate attrapi.c. This only affects internal binary representation, but there's not API change, so no version bump. 2017-11-17 21:39:30 -05:00
Geoff McLane 08dfa3db84 Issue #646 - Correct 'INCLUDE_INSTALL_DIR' per 'master' 2017-11-09 15:00:08 +01:00
Geoff McLane 1b20d4b764 Default ENABLE_DEBUG_LOG to 'OFF' 2017-10-09 01:25:42 +02:00
Jim Derry 16aa474f6a Updated CMakeLists to require -DENABLE_DEBUG_LOG on all platforms, until a
better "automatic" strategy is decided.
Although this doesn't change Tidy binary, I bumped the version because the
default build settings _could_ result in a binary difference.
2017-10-08 11:06:41 -04:00
Jim Derry 0977aa6077 Removed dependency on NDEBUG, and introduced ENABLE_DEBUG_LOG in CMakeLists.txt.
By default Windows will continue to show SPRTF output, and other platforms will
require the -DENABLE_DEBUG_LOG to be set in default (debug) configurations.

Debug and Release builds on macOS, Windows 10, and Ubuntu 16.04 confirmed
working as most people expect.
2017-10-07 14:56:01 -04:00
Jim Derry f26b198213 Hot-fix the NDEBUG, which affected default builds that users might not expect
if they follow the build instructions.
2017-10-07 14:07:12 -04:00
Jim Derry dedcb7bb4d SPRTF is now compatible with macOS and Linux, and most likely all supported
platforms.
2017-10-03 22:31:55 -04:00
Jim Derry e41229749c TIDY_WIN32_MLANG_SUPPORT has been dead code for ages. Not tested, not maintained. 2017-10-03 14:24:01 -04:00
Jim Derry 238b8f0a66 Wipe out dead code. We use git for a reason, so it's never really deleted. 2017-10-03 13:56:31 -04:00
Jim Derry 67f7b77e1f Added a flag to CMakeLists.txt simply to point out that one can build without
support for ISO2022 natively. Of course, we've been doing this by default for
years with no ill effect, and all modern operating systems seem to support this
natively. It's probably best to keep this in here, unlike the other deletions.
2017-10-03 13:04:37 -04:00
Jim Derry a1e4dcc066 Removed option for SUPPORT_ACCESSIBILITY_CHECKS, regen'd strings. 2017-10-03 12:45:34 -04:00
Jim Derry dfa2501928 Removed option for SUPPORT_ASIAN_ENCODINGS, and regen'd strings. 2017-10-03 12:37:23 -04:00
Jim Derry 2758939406 Removed SUPPORT_UTF16_ENCODINGS, and regen'd strings. 2017-10-03 12:26:38 -04:00
Jim Derry 7a4a544a5d Squelch Mac OS X warning during build. No version bump. 2017-10-03 08:57:11 -04:00
Jim Derry b1e7bba512 Update the man page to show the actual RC paths, and only if RC's are enabled. 2017-10-02 12:54:03 -04:00
Jim Derry 8d6ae76993 Heavily comment CMakeLists.txt as part of documentation effort. 2017-10-02 12:17:16 -04:00
Jim Derry 9ef66151af Ensure that runtime config files are available (non-default) for non-Unix. 2017-10-02 10:42:25 -04:00
Jim Derry a4e0409323 Address #584
Modify the build system to assume config files by default. Modify tidyplatform
to accomodate these changes. Reformat tidyplatform for friendliness to new
developers.
2017-10-01 10:37:49 -04:00
Geoff McLane 98eb7b20ba Issue #597 - Add some memory diagnostics options in CMakeLists.txt 2017-09-17 16:25:05 +02:00
Jim Derry 14f5980117 macOS fixes. 2017-05-04 09:50:36 -04:00
Laurent Arnoud 3333ca7d69
Fix pkgconfig install path on package 2017-05-02 20:28:48 +02:00
Laurent Arnoud 4066171ea2
Generate pkgconfig file for tidy 2017-04-18 00:43:43 +02:00
Geoff McLane 03e96e36d4 Since CPack can miss some system DLLs, make option ADD_SYSTEM_RUNTIMES, def OFF 2017-03-23 15:18:19 +01:00
Geoff McLane 29f106b483 Use one compatible license file for all 2017-03-23 15:18:19 +01:00
Geoff McLane 525fe9c134 Issue #515 - Add option to use MSVC statis runtime /MT 2017-03-23 15:18:19 +01:00
Geoff McLane ba073a2882 Issue #515 - Add system DLLs to installers 2017-03-23 15:18:19 +01:00
Geoff McLane 61692401ce Issue #119 - be able to set RC number during lib build 2017-03-15 19:57:47 +01:00
Jim Derry 11178d775b Massive Revamp of the Messaging System
This is a rather large refactoring of Tidy's messaging system. This was done
mostly to allow non-C libraries that cannot adequately take advantage of
arg_lists a chance to query report filter information for information related
to arguments used in constructing an error message.

Three main goals were in mind for this project:

- Don't change the contents of Tidy's existing output sinks. This will ensure
  that changes do no affect console Tidy users, or LibTidy users who use the
  output sinks directly. This was accomplished 100% other than some improved
  cosmetics in the output. See tidy-html5-tests repository, the `refactor` and
  `more_messages_changes` branches for these minor diffs.
- Provide an API that is simple and also extensible without having to write new
  error filters all the time. This was accomplished by adding the new message
  callback `TidyMessageCallback` that provides callback functions an opaque
  object representing the message, and an API to query the message for wanted
  details. With this, we should never have to add a new callback routine again,
  as additional API can simply be written against the opaque object.
- The API should work the same as the rest of LibTidy's API in that it's
  consistent and only uses simple types with wide interoperability with other
  languages. Thanks to @gagern who suggested the model for the API in #409.
  Although the API uses the "Tidy" way off accessing data via an iterator
  rather than an index, this can be easily abstracted in the target language.

There are two *major* API breaking changes:

- Removed TidyReportFilter2
  - This was only used by one application in the entire world, and was a hacky
    kludge that served its purpose. TidyReportCallback (né TidyReportFilter3)
    is much better. If, for some reason, this affects you, I recommend using
    TidyReportCallback instead. It's a minor change for your application.
- Renamed TidyReportFilter3 to TidyReportCallback
  - This name is much more semantic, and much more sensible in light of
    improved callback system. As the name implies, it remains capable of
    *only* receiving callbacks for Tidy "reports."

Introducing TidyMessageCallback, and a new message interrogation API.

- As its name implies, it is able to capture (and optionally suppress) *all*
  of Tidy's output, including the dialogue messages that never make it to
  the existing report filters.
- Provides an opaque `TidyMessage` and an API that can be used to query against
  it to find the juicy goodness inside.
  - For example, `tidyGetMessageOutput( tmessage )` will return the complete,
    localized message.
  - Another example, `tidyGetMessageLine( tmessage )` will return the line the
    message applies to.
- You can also get information about the individual arguments that make up a
  message. By using the `tidyGetMessageArguments( tmessage )` itorator and
  `tidyGetNextMessageArgument` you will obtain an opaque `TidyMessageArgument`
  which has its own interrogation API. For example:
    - tidyGetArgType( tmessage, &iterator );
    - tidyGetArgFormat( tmessage, &iterator );
    - tidyGetArgValueString( tmessage, &iterator );
    - …and so on.

Other major changes include refactoring `messages.c` to use the new message
"object" directly when emitting messages to the console or output sinks. This
allowed replacement of a lot of specialized functions with generalized ones.

Some of this generalizing involved modifications to the `language_xx.h` header
files, and these are all positive improvements even without the above changes.
2017-03-13 13:28:57 -04:00
Jim Derry cbb8354f74 Combined leftover attribute API stuff into single, new file. 2017-02-18 16:57:11 -05:00
Jim Derry 165acc4f3e Several foundational changes preparing for release of 5.4 and future 5.5:
- Consolidated all output string definitions enums into `tidyenum.h`, which
    is where they belong, and where they have proper visibility.
  - Re-arranged `messages.c/h` with several comments useful to developers.
  - Properly added the key lookup functions and the language localization
    functions into tidy.h/tidylib.c with proper name-spacing.
  - Previous point restored a *lot* of sanity to the #include pollution that's
    been introduced in light of these.
  - Note that opaque types have been (properly) introduced. Look at the updated
    headers for `language.h`. In particular only an opaque structure is passed
    outside of LibTidy, and so use TidyLangWindowsName and TidyLangPosixName
    to poll these objects.
  - Console application updated as a result of this.
  - Removed dead code:
    - void TY_(UnknownOption)( TidyDocImpl* doc, char c );
    - void TY_(UnknownFile)( TidyDocImpl* doc, ctmbstr program, ctmbstr file );
  - Redundant strings were removed with the removal of this dead code.
  - Several enums were given fixed starting values. YOUR PROGRAMS SHOULD NEVER
    depend on enum values. `TidyReportLevel` is an example of such.
  - Some enums were removed as a result of this. `TidyReportLevel` now has
    matching strings, so the redundant `TidyReportLevelStrings` was removed.
  - All of the PO's and language header files were regenerated as a result of
    the string cleanup and header cleanup.
  - Made the interface to the library version and release date consistent.
  - CMakeLists.txt now supports SUPPORT_CONSOLE_APP. The intention is to
    be able to remove console-only code from LibTidy (for LibTidy users).
  - Updated README/MESSAGES.md, which is *vastly* more simple now.
2017-02-17 15:29:26 -05:00
Geoff McLane b26271e3f8 Adjust for removal of LICENSE.txt 2016-07-11 20:40:20 +02:00
Adam Majer 30cc376f7b Add compatibility headers
In older versions of tidy, these headers were defined. Now, they are
renamed to tidybuffio.h and tidyplatform.h. This may be more of a
consistent naming scheme, but it breaks current software.

Re-add these headers and add compile time warning when such a header
is used.
2016-06-28 10:27:51 +02:00
Jim Derry cf1adc6d9d Merge pull request #366 from hguemar/master
Fix RPM generation
2016-02-16 10:16:46 +08:00
Jim Derry fbde392af3 - Removed documentation generation from this repository.
- Removed documentation generation from CMake.
- These functions are now available in the api repository.
- Changed documentation directory to man to better illustrate its purpose.
2016-02-05 14:59:12 +08:00
Haikel Guemar 593e1df6ec Fix RPM generation
CPack generated RPM failed to install due to the RPM
owning directories owned by filesystem packages.
Exclude mandir directories from CPack.

Resolves https://github.com/htacg/tidy-html5/issues/364
2016-02-04 08:40:49 +01:00
Geoff McLane 6abb8b7a3c Add new primary language_en.h to sources.
Add the ever present language_en.h to the sources. This does nothing
really, but is important in MSVC IDE project source searches.

Also added win32tc.h even though it is not presently used.
2016-02-01 19:30:56 +01:00
Jim Derry 53f2a2da2a msgunfmt works properly with escaped hex. 2016-01-30 15:51:53 +08:00
Jim Derry d505869910 Localization Support added to HTML Tidy
- Languages can now be added to Tidy using standard toolchains.
- Tidy's help output is improved with new options and some reorganization.
2016-01-30 15:51:53 +08:00
Geoff McLane 0005841cfe Drop back to 2.8.7 for Travis CI use 2015-12-23 00:51:01 +01:00
Geoff McLane e5038f0bc9 Issue #326 - Allow linkage choice TIDY_CONSOLE_SHARED 2015-12-04 18:31:24 +01:00
Geoff McLane 1c6069ae99 Remove MinGW compile rc (#311) 2015-12-03 19:36:24 +01:00
Geoff McLane 77e053d582 Issue #311 - Add MinGW to the version 2015-11-28 15:25:24 +01:00
Rex Dieter d0abe84cb3 support INCLUDE_INSTALL_DIR too 2015-11-13 13:19:10 -06:00