Archiver 0.1 - IRIX/IMD GUI for tar.

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Mon Oct 09, 2017 7:47 pm

Dear all,

Since forever I've felt that IMD could do a better job of dealing with tarballs and other compressed files. Just dumping a filelist to a winterm is a little underwhelming. So, please find attached my first stab at a ViewKit/Motif/IMD/fm GUI for tar called 'Archiver'.

Archiver 0.1 doesn't do much more than list the contents of an archive and then offer you the option of extracting the tarball into directory X. Directory X can be specified with the sgFinder/droppocket widget at the top of the UI. For 'fm' integration of the GUI, look into the ./filetype directory in these sources. Add desktop.otr to your hidden ~/.desktop-*/filetype/ directory. Once it's put there, fm will launch archiver when you double-click on a tarball.

Tested on my O2. Compiles cleanly with MIPSpro and GNU make. Needs GNU tar in your path (for -C switch). I suspect GNU tar needs compress/gzip/bzip2/xz in your $PATH, and the 'archiver' binary should be placed in your $PATH too.

As this is a WIP, you're a little on your own to get it to work on your system. No inst-able tardist yet. Any feedback about the code or bugreports will be much appreciated. If i get round to any next versions, I'll try and put in fn's for tarball creation and better progress dialogs.

J.
Attachments
archiver-0.1.tar.gz
(8.51 KiB) Downloaded 10 times
Last edited by jimmer on Thu Oct 12, 2017 1:33 pm, edited 4 times in total.
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Wed Oct 11, 2017 9:43 pm

Looking at the source code now, I see you fall firmly into the "tabs" camp in the "tabs vs. spaces" religious war, gotta say I'm a spaces guy (which is probably why all the patches I've submitted to the Linux kernel have been rejected)... ;)

I'm OOO ATM but I'll fire up my Tezro and give this a try as soon as I get back, thanks for the effort and double congrats for using Viewkit! Now kindly join me in haranguing SGI and ICS to open source Viewkit, cause y'know, like, they might actually do that... :lol:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Thu Oct 12, 2017 7:06 am

1 tab = 4 spaces FTW! :D

Meanwhile, I've moved along quite nicely into 0.2. Unfortunately, there's a horrible bug in the outputCallback/exitCallback eventhandlers when extracting a large tarball which causes the UI to never get populated and hanging archiver. 'killall -9 archiver' is the solution for the moment :(

Like I said, it's a WIP.

I'll try and post Archiver 0.2 later today.

j
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Thu Oct 12, 2017 1:32 pm

More WIP: Archiver 0.2.

The sources compile cleanly but there's a bunch of UI bugs and other issues. Most importantly, large tarballs still wreak havoc. That said, Archiver 0.2 allows you to create fresh tarballs. Sometimes. Yay!

Just drag a directory from fm to the 'source' droppocket on Archiver's 'create archive' dialog and the rest should be self-explanatory.

J
Attachments
archiver-0.2.tar.gz
(11.95 KiB) Downloaded 7 times
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
foetz
Moderator
Moderator
Posts: 6542
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby foetz » Thu Oct 12, 2017 2:40 pm

nice one jimmer thanks :D
i grabbed both and i'm afraid i have to say that i'm from the tab-club as well :P

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Thu Oct 12, 2017 6:34 pm

What compiler are you guys using? I'm getting The namespace "std" has no member "tolower" in line 46 in Utils.C with MIPSPro 7.4. Just by way of a brute force hack I changed the call from std::tolower to just tolower and included the headers c_locale.h, locale and stl_ctype.h and it compiled.

Completely unrelated but on my system VkApp.h is in /usr/Motif-2.1/include/Vk, I suppose that's because I never ran the right symlink creator for the version of Motif you want to use (Motif 1.2 or Motif 2.1).
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Thu Oct 12, 2017 8:40 pm

i'm using mipspro 7.4.3. like i said above, it all works just fine for me.
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Thu Oct 12, 2017 9:02 pm

jimmer wrote:i'm using mipspro 7.4.3. like i said above, it all works just fine for me.

Well like the Unix Haters Manual says, "It's just different sometimes." :lol:

When I start the program, I get this on the standard output:

Archiver: settings loaded

Warning: DropPocket dropPocket cannot load ""
Warning: Representation size 4 must match superclass's to override disarmCallback


Then if I use the file -> open pulldown, it crashes thus:

Warning: Representation size 4 must match superclass's to override directory
Warning: Representation size 4 must match superclass's to override fileListLabelString
Bus error


This is on IRIX 6.5.30, which is an upgrade from the 6.5.21 that was on the system when I bought it 10 years ago, which I think had something wrong with it, for example before I upgraded it used to take forever to open a winterm window from the toolchest. So, what's crashing your program could be my system not your code...
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Fri Oct 13, 2017 5:07 am

Hey Vishnu, Sorry to hear my code blows up on you. V strange.

I tried it on 6.5.30 on both the Fuel and the O2 where it's being written. The O2 was reinstalled about 6 months ago. Started with 6.5.7 and then upgraded it to 6.5.30 with all the patches I could lay my hands on. Took the better part of a day to get done. I installed MIPSpro 7.4.3 rather than 7.4.4 and I have no problems with it at all, other than that the O2 only has a measly 256Mb RAM installed.

But that 'Representation size 4' error sounds fishy... are you sure you're using the right number of spaces???

:twisted:

Anyhow, I'll try to make the code a little less crap over the weekend. I'm still debating wether to rip out the VkProgram-based guts and replace it with a popen()-based setup, but hopefully I'll get out a better-on-all-fronts version 0.3 by Sunday.

J
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Fri Oct 13, 2017 3:09 pm

I've had it on my to-do list to scrub the disk on this thing and start over fresh ever since I bought it 10 years ago. :roll:

I'll have to do some searching on that representation size error, I've never seen that before. And I did not convert your tabs into spaces! (Yet). Kidding! I only kid. No seriously... ;)
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Fri Oct 13, 2017 10:14 pm

Okay, in line 180 of App.C, delete app->output this is deleting an object of a polymorphic class (VkNameList) which has a non-virtual destructor, that's an oops:

https://www.securecoding.cert.org/confluence/display/cplusplus/OOP52-CPP.+Do+not+delete+a+polymorphic+object+without+a+virtual+destructor
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Sat Oct 14, 2017 12:39 pm

Hey Vishnu - nice of you to look into the sources, much appreciated :)

Please find attached a tarball with my cleaned-up sources.

I've done some more experiments into the tarball bug. It seems that the outputCallback isn't not returning quick enough because it needs to tokenise the incoming output buffer and populate the VkNameList. However, when I tried dumping the incoming program output to cout instead of VkNameList it works just fine even with huge tarballs. I recon setting the VkInput to line buffering will solve the problem by making the outputCallback fire at EOL of the external program's stdout, so there wont be any need for a lot of parsing/tokenising for line breaks in the outputCallback. To do that we're back to trying to understand VkSubProcess. I was working on new (failed) experiments with VkSubProcess and even posted a question about VkSubProcess on stackoverflow.com. I don't expect much of a response, but who knows.

Anyhow - thats my update for today.
Attachments
archiver-0.3.tar.gz
(11.44 KiB) Downloaded 6 times
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Sat Oct 14, 2017 3:06 pm

Ah crap, I found where it's crashing on mine, unfortunately it's in libXm, specifically in XmStringCopy() on line 6644 of XmString.c, what version of Motif are you using? On mine it's 2.1.32, line 97 in Xm.h: #define XmVERSION_STRING "@(#)Motif Version 2.1.32" :shock:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
jimmer
Donor
Donor
Posts: 464
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby jimmer » Sat Oct 14, 2017 4:25 pm

Just to make sure we don't get lost in the IRIX motif 1.x/2.x toggle script thing, I checked this way:

Code: Select all

#include <iostream>
using namespace std;

#include <Xm/Xm.h>

int main(int argc, char *argv[]) {

   cout << XmVERSION_STRING << endl;
}

Gives me:

@(#)OSF/Motif Version 1.2.4
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
vishnu
Donor
Donor
Posts: 3174
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Archiver 0.1 - IRIX/IMD GUI for tar.

Unread postby vishnu » Sat Oct 14, 2017 5:40 pm

I actually don't have a /usr/include/Xm symlink on my system, so I had to add -I/usr/Motif-2.1/include to the Makefile, but compiling it to link against Motif-1.2 I'm getting the same result:

Code: Select all

Process 1550: Stopped on signal SIGBUS: Bus error (default) XmStringCopy(<stripped>) ["XmString.c":6644, 0x0673efd4]


Could be time to scrub the disk and do a fresh install... :shock:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 3 guests