Click here to go to the forum index Click here for the home page
 
Author Message

<  MyStuff  ~  MyStuff.mei - ZIP and Path?

Page 1 of 1
bugbear
Posted: Tue May 31, 2016 4:05 pm Reply with quote
Frequent contributor Joined: 28 Sep 2007 Posts: 227
While doing some more testing on my installer, I hit an issue with MyStuffMei.zip.

All the other zip files unzip quite happily into the current directory when they're unzipped; this is because the paths of the files inside are relative, not absolute.

Checking with unzip -l:


Code:

 unzip -l dat_logos.zip
Archive:  dat_logos.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
  1067581  2016-05-16 00:49   logo.dat
  1067581  2016-05-16 00:49   smlogo.dat
---------                     -------
  2135162                     2 files



The only exception is MyStuffMei.zip.

Code:
unzip -l MyStuffMei.zip
Archive:  MyStuffMei.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
  3374641  2016-04-04 22:02   /tmp/MyStuff.mei
---------                     -------
  3374641                     1 file


Who do I need to beg to get this absolute path changed to a relative path in the zip?

BugBear

_________________
I think the hard thing about all these tools is that it takes a fair amount of effort to become proficient.

Bill Joy
TF5800, F/W: MS6 Recommended F/W 12/9/2009 -Sy
TAPs: EPG2MEI v0.96; MyStuff 6.6; MyInfo B5.6; Font Manager 1.0d; Extend v1.7; SecCache (UK) v0.4; EIT Sub (Game) v0.6; MHEG On/Off A3; PruneEPG 1.0;
Sig generated by MyInfo on 28/5/16
View user's profile Send private message Visit poster's website
Geoff Bacon
Posted: Tue May 31, 2016 5:18 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4384
EMJB creates/manages this file.

I don't think that it is the path that is the problem; it is the special format that he uses for the file. Trying to unzip this file using standard utilities on a Windows system doesn't work - it needs a program like the setup.exe file in the MyStuff installer to extract the data.

In the offline installer, I just comment out the commands for this file ; the user can generate it by running EPG2MEI after the ms installation

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
TopTapper
Posted: Tue May 31, 2016 7:36 pm Reply with quote
Frequent contributor Joined: 29 Jan 2006 Posts: 228
Is the junk paths modifier available?

Code:
unzip -j MyStuffMei.zip
Archive:  MyStuffMei.zip
warning:  stripped absolute path spec from /tmp/MyStuff.mei
  inflating: MyStuff.mei


(Under windows 7-Zip's 7z.exe seems to ignore the path by default)
View user's profile Send private message
bugbear
Posted: Wed Jun 01, 2016 11:20 am Reply with quote
Frequent contributor Joined: 28 Sep 2007 Posts: 227
In the end, I went down a level, and used the amazing infrastructure support of Perl;

I wrote a short routine using Archive::Zip that will extract all the files in an arbitrary Zip into a dest directory..

Code:

use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use File::Basename;

sub extract_zip {
    my ($zip, $destdir) = @_;
    # Read a Zip file
    my $somezip = Archive::Zip->new();
    unless ($somezip->read($zip) == AZ_OK) {
        confess "read error on $zip";
    }
    foreach my $member ($somezip->members()) {
        my $dst = basename($member->{fileName});
        $somezip->extractMember($member, "${destdir}/$dst");
    }
}


BugBear

_________________
I think the hard thing about all these tools is that it takes a fair amount of effort to become proficient.

Bill Joy
TF5800, F/W: MS6 Recommended F/W 12/9/2009 -Sy
TAPs: EPG2MEI v0.96; MyStuff 6.6; MyInfo B5.6; Font Manager 1.0d; Extend v1.7; SecCache (UK) v0.4; EIT Sub (Game) v0.6; MHEG On/Off A3; PruneEPG 1.0;
Sig generated by MyInfo on 28/5/16
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum