[Gambas-user] UnCompress question

Bruce Steers bsteers4 at gmail.com
Mon Sep 12 11:37:03 CEST 2022


On Sun, 11 Sept 2022 at 15:35, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
>
> On Sat, 10 Sept 2022 at 15:12, Benoit Minisini <
> benoit.minisini at gambas-basic.org> wrote:
>
>> Le 10/09/2022 à 14:25, Bruce Steers a écrit :
>> >     Yes. 'gb.compress' is for compressing, not archiving.
>> >
>> >     If you want to create compressed archives, use the command-line
>> tools.
>> >
>> >     Regards,
>> >
>> >     --
>> >     Benoît Minisini.
>> >
>> >
>> > Ahh , very well
>> > I see there's /main/gbc/gbc_archive.c but it looks internal/private is
>> > there too much to do to update Uncompress to support listing and
>> > extracting items or can gbc_archive be modified to extract items and
>> > work publicly?
>> >
>> > I assume gambas itself (gbc) can unarchive because a gambas exe is an
>> > archive (or am i wrong about that and it works differently?)
>> >
>> > Note: not interested in adding/making archives just extracting.
>> >
>> > Reason: I'm adding an update class to my progs that uses gitlab,
>> > It checks version in .project file and downloads the archive if newer,
>> > then extracts contents to update/compile source.
>> >
>> > Respects
>> > BruceS
>> >
>>
>> I really don't see the problem with using SHELL or EXEC with 'zip',
>> 'tar', and so on.
>>
>
> aah fair enough.  Shell or Exec it is then :)
> Respects
> BruceS
>


Maybe we (i could have a go) could expand Shell in gb.util a bit to be more
than MkDir, RmDir, Move?
(btw. i am considering Shell.class to be where we would put some functions
that are just for Shell/Exec use)

Things i think (have previously thought) would be useful Shell commands for
everyone to have in gambas...

Shell.ArchiveList(ArchivePath) As String[] '  could auto-handle various
filetypes.
Shell.ArchiveExtract(ArchivePath, DestFolder, Optional FileList As String[])
Shell.ArchiveAdd(ArchivePath, FileList As String[])

Shell.PackageInstall(PkgName) ' basic installer that will handle most
installers and be fine for simple package names, returning error code if
any.
Eg.  Shell.PackageInstall("git")

Some multi-platform compatible functions like this

just some food for thought :)
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220912/90d456d9/attachment.htm>


More information about the User mailing list