tbx_generate_pofile() fails when the module has a lot of files (with long absolute paths) to process
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
tbx_generate_pofile() silently fails when the module has a lot of files (with long absolute paths) to process.
Indeed, the host(cmd) command line running xgettext can quite easily have more than 8191 characters
-- that is the Windows limit for cmd.exe --.
Currently, the list of all files to process is explicitly included in the command line cmd sent to host().
The Windows limit is easily reached and overflown. Then the cmd and tbx_generate_pofile silently fail.
Fix: The list of files should be recorded in a temporary file and then provided to xgettext through its
--files-from=<srcFiles_file> option.
ERROR LOG:
----------
None. That's a part of the issue.
HOW TO REPRODUCE THE BUG:
-------------------------
// Run from the root directory of an external module having a lot of files
tbx_make . localization
// => no ./locales directory and en_US.po file is produced.
edit tbx_generate_pofile 90
// replace host(cmd) with
status = host(cmd)
pause
// and then under the pause, do
disp(status)
length(cmd)
Edited by Samuel GOUGEON