How to use/install tar in a prefix ?

Questions about Wine on Linux
Locked
Koenraad
Newbie
Newbie
Posts: 4
Joined: Wed Jun 14, 2023 5:47 am

How to use/install tar in a prefix ?

Post by Koenraad »

Hi,
I have an application that works OK (not 100%), but to backup it's projects, it uses tar.
Tar is included in recent versions of windows.
Obviously, tar is installed on my kubuntu machine, but that's the linux-version.
I searched for a tar-application under windows, but all I can find are applications like 7zip, winrar, winzip, etc. They don't have a specific tar.exe.

Any help ?
Thanks.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to use/install tar in a prefix ?

Post by jkfloris »

Maybe you can use the Linux version inside the application.
Create symbolic links to the tar command:

Code: Select all

ln -s /usr/bin/tar ~/.wine/drive_c/windows/system32/tar.exe
ln -s /usr/bin/tar ~/.wine/drive_c/windows/syswow64/tar.exe
Now the tar command is available in Wine:

Code: Select all

wine tar --version   # or wine tar.exe , or wine64 tar

tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
Koenraad
Newbie
Newbie
Posts: 4
Joined: Wed Jun 14, 2023 5:47 am

Re: How to use/install tar in a prefix ?

Post by Koenraad »

Thanks, but it does not work.
I did this :

Code: Select all

~$ ln -s /usr/bin/tar ~/.wine/drive_c/windows/system32/tar.exe
~$ ln -s /usr/bin/tar ~/.wine/drive_c/windows/syswow64/tar.exe
I get this :

Code: Select all

~$ wine tar --version
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
When I try this with the prefix of my application (with symlinks to tar in it !) using tar on it's own, using q4wine, I get the same output.
So works partially, but when I tried the application it tells me it found no tar.exe.
Unfortunately, I seem unable to get it running with wine on the command-line with the prefix. But that's me.
FWIW, i'm using wine 8.0.1 on kubuntu 22.04lts.
watermelonfries
Newbie
Newbie
Posts: 2
Joined: Sun Jun 11, 2023 5:28 am

Re: How to use/install tar in a prefix ?

Post by watermelonfries »

Perhaps installing MSYS2 (https://www.msys2.org/) inside the prefix? It comes with tar and other common UNIX tools in form of Windows executables.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to use/install tar in a prefix ?

Post by jkfloris »

Does the program recognize tar if you use the libarchive program?
Copy the files from the bin directory to the windows/system32 directory and rename bsdtar.exe to tar.exe

Which program needs the tar command?
Koenraad
Newbie
Newbie
Posts: 4
Joined: Wed Jun 14, 2023 5:47 am

Re: How to use/install tar in a prefix ?

Post by Koenraad »

Unfortunately, using tar itself this gives the same output :

Code: Select all

007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
And the application still does not find tar.
Well, I'll have to live with it. I can create backups manually.
Thanks anyway.
Last edited by Koenraad on Fri Jun 16, 2023 2:08 am, edited 1 time in total.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to use/install tar in a prefix ?

Post by jkfloris »

I would like to continue trying to solve this, but it would be helpful to know the name of the program.
Koenraad
Newbie
Newbie
Posts: 4
Joined: Wed Jun 14, 2023 5:47 am

Re: How to use/install tar in a prefix ?

Post by Koenraad »

FWIW, here you van download the software :
https://www.automaticals.com/download-schematicals.html
It's an application to draw electrical schematics for buildings, to comply with the Belgian electrical code.
You can install it and select English as language.
I'll contact the company to ask how they use the tar-command. They seem friendly enough.
Koenraad
Newbie
Newbie
Posts: 4
Joined: Wed Jun 14, 2023 5:47 am

Re: How to use/install tar in a prefix ?

Post by Koenraad »

watermelonfries wrote: Thu Jun 15, 2023 9:59 am Perhaps installing MSYS2 (https://www.msys2.org/) inside the prefix? It comes with tar and other common UNIX tools in form of Windows executables.
I didn't see this post until now. So I tried to install msys2. Unfortunately, it's not possible to do that.
From q4wine, running the exe, the first message appears, but when clicking next, the "finish" screen appears, while the folder selection should appear. After finishing, msys2 seems to stay running according to taskmgr.
When running with the "uninstaller" there is an error :

Code: Select all

Unhandled exception: page fault on read access to 0xffffffffffffffff in 64-bit code (0x0000014101d053).
Register dump:....
invisible kid
Level 5
Level 5
Posts: 368
Joined: Tue Dec 24, 2019 3:23 pm

Re: How to use/install tar in a prefix ?

Post by invisible kid »

Don't give up yet! Or at least keep checking back, I bet someone figures it out.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to use/install tar in a prefix ?

Post by jkfloris »

This will work:
(Remove the files we created before)

1. Download libarchive-2.4.12-1-bin.zip and libarchive-2.4.12-1-dep.zip
from: https://sourceforge.net/projects/gnuwin ... /2.4.12-1/

2. Extract from both files, the files [1] in the bin directory to: ~/.wine/drive_c/windows/syswow64
[1]
From libarchive-2.4.12-1-bin.zip:
bsdcpio.exe
bsdtar.exe
libarchive2.dll
From libarchive-2.4.12-1-dep.zip:
bzip2.dll
zlib1.dll


3. Rename ~/.wine/drive_c/windows/syswow64/bsdtar.exe to ~/.wine/drive_c/windows/syswow64/tar.exe
Locked