Page 1 of 2

[implemented] TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-10, 23:34 UTC
by petermad
If I use 7zG.exe as 7zip packer TC apparently automaticallly uses the -stl parameter to set the dat of the archive to taht of the newest file in the archive - at least if I manually put -stl in the Extra parameters field, the I get the error: "Multiple instances for switch: -stl".

But if I choose to use the "Internal 7ZIP packer", then the archice date is set to the current date, and the -stl parameter is ignored.

The help also says:
Help wrote:Extra parameters Allows to pass extra parameters both to the internal 7zip packer and external 7zip. The internal packer only supports extra parameters starting with -m.
So either allow use of the -stl parameter, or make it default like when using 7zG.exe.

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-11, 08:03 UTC
by wanderer
petermad wrote: 2024-10-10, 23:34 UTCSo either allow use of the -stl parameter, or make it default like when using 7zG.exe.
Please don't make it default. It would be better to allow the use of it in the "Extra Parameters" field if it's not a big problem.

Checking out the 7zip available parameters (https://7ziphelp.com/7zip-command-line), i can understand not wanting to allow certain params in that field, they would mess things up because TC is probably handling them internally. It may be possible to allow a few of them though, which could be useful to some people: -sni, -sns, -snr and of course -stl.

To be honest, the latter is just a thought, i don't use any of them anyway but i also don't like the idea of using -stl as default...

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-11, 08:58 UTC
by ghisler(Author)
-stl is added when the option "Set ZIP date to newest file date" is checked on the "ZIP packer" page. The reason is that I use the same code to call 7zip when packing zip files (external zip packer, 7z option checked) and when packing 7-zip files. Since this option is on the ZIP packer page, I should probably remove the switch when creating 7z files...

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-11, 10:37 UTC
by wanderer
Ok, this sounds logical.

Thanks for the explanation.

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-11, 12:16 UTC
by petermad
2ghisler(Author)
-stl is added when the option "Set ZIP date to newest file date" is checked on the "ZIP packer" page.
That is OK, but then I can say, that it does no work when using the "Internal 7ZIP packer" - it only works when using 7zG.exe as packer - Please try it!

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-11, 13:15 UTC
by Horst.Epp
petermad wrote: 2024-10-11, 12:16 UTC 2ghisler(Author)
-stl is added when the option "Set ZIP date to newest file date" is checked on the "ZIP packer" page.
That is OK, but then I can say, that it does no work when using the "Internal 7ZIP packer" - it only works when using 7zG.exe as packer - Please try it!
Confirmed, I was on the way to report the same problem.

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-12, 21:28 UTC
by petermad
It would also be hice if thea parameters ta=on and tc=on would be allowed (or made default)

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-13, 07:54 UTC
by ghisler(Author)
That is OK, but then I can say, that it does no work when using the "Internal 7ZIP packer" - it only works when using 7zG.exe as packer - Please try it!
OK, I need to make this consistent, but how? Either use the option from the ZIP packer page, or ignore it, so the user has to add a flag?

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-13, 08:00 UTC
by Horst.Epp
ghisler(Author) wrote: 2024-10-13, 07:54 UTC
That is OK, but then I can say, that it does no work when using the "Internal 7ZIP packer" - it only works when using 7zG.exe as packer - Please try it!
OK, I need to make this consistent, but how? Either use the option from the ZIP packer page, or ignore it, so the user has to add a flag?
I vote for ignoring it and let the user set the options.
An entry in the help for the parameters field may show a few, like -stl

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-13, 12:46 UTC
by petermad
How about making it an option for all packers (that support it) with an item on the "Packers" configuration dialog:

"Set archive date to newest file date, if supported"

The option could be placed in top of the Packer Conf. dialog next to "Treat Archives like directories"

And then remove the separate option in the ZIP Packer configuration dialog

Then the user doesn't have to add switches for each packer himself, like -tl for RAR.exe, WINRAR.exe, Ace.exe, ACE32.exe and /t for LHA.exe, LHA32.exe.

I guess that if the user wants the archive date set to newest file date, then he wants it for all kinds of archives...

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-13, 18:29 UTC
by wanderer
petermad wrote: 2024-10-13, 12:46 UTCHow about making it an option for all packers (that support it) with an item on the "Packers" configuration dialog
IMO that's a great idea. When Christian said about this option that it exists in the zip packer options but it's also used in 7zip, it didn't sound right to me. Since it's a common option, it would be better to exist in a place that is common for all packers.

The only suggestion would be to keep the existing INI setting in order for TC to "remember" this option.

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-14, 07:21 UTC
by Horst.Epp
petermad wrote: 2024-10-13, 12:46 UTC How about making it an option for all packers (that support it) with an item on the "Packers" configuration dialog:
Christion would have to follow changes in all supported packers.
Changes would only be made in the next TC version.
I find it simple and straight forward to leave the desired settings to the user.

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-14, 08:00 UTC
by wanderer
2Horst.Epp

You have a point there, but isn't he already doing this with the existing settings (like the "additional settings" section in the zip packer)? In addition to that, these settings are rarely changed, so it should be relatively safe to proceed as petermad suggested.

Following your suggestion, the proper thing to do would probably be to remove the existing settings from Options, to "force" users to add them as "extra parameters" in each packer. Personally i like petermad's suggestion but i wouldn't disagree with what you propose either, i guess though that if it leads to removing options, it would not be well-received by some users (which is understandable).

An idea could perhaps be an additional INI (or section in the existing INI) which would contain all the packer "common" functions supported by TC (i.e. "set zip date to newest file date") and a line for each packer containing the associated command-line parameter to achieve that function. That way, no one would have to wait for a new TC version, he would just edit the INI himself and add it. There could be challenges to that, but it's an idea...

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-14, 14:01 UTC
by petermad
Christion would have to follow changes in all supported packers.
I think that the parameter for this option has been the same for decades in all the old packers, and are not likely to be changed in still developed packers like 7-Zip and RAR.

All the option should do, if enabled, is to feed the parameter to the packer - like:
7ZIP: -stl
WINRAR -tl
RAR -tl
ACE: -tl
PKZIP: -o
LHA: -t

Re: TC 11.50 Add support for the -stl parameter for internal 7-Zip packer

Posted: 2024-10-14, 15:37 UTC
by ghisler(Author)
How about making it an option for all packers (that support it) with an item on the "Packers" configuration dialog:
I think that this is the best solution - the internal GZ and TAR packers already support it, and adding it for the external packers would be easy. But there is currently no parameter for packer plugins.