Linux self-extracting file? (Solved) TEST-App. DnLd.

Using applications, configuring, problems
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#16 Post by sunburnt »

I found an interesting very simple self-extracting setup.
Cat adds a script to the start of a .gz file that extracts the .gz file.
I made a GUI to make the self-extracting files, but I keep getting errors.
The "tail" line pipes the rest of the file below "### END" to gunzip.
Error is: gunzip: unexpected end of file.

Code: Select all

#!/bin/sh
lastLINE=`cat $0 |grep -n '### END' |tail -n 1 |sed 's/:.*$//'`
stLINE=`expr $lastLINE + 1`
tail -n +$stLINE $0 |gunzip
exit 0
### END

muggins; I looked, but it seems to be an image file setup, not sure about it.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#17 Post by muggins »

i was also looking at self-extrating archives awhile ago. see this one too:

http://linux.org.mt/article/selfextract

unfortunately i could never get them to work...luckily i stumbled upon makeself which does everything i need.

one question though...even if you get that script working on puppy, aren't you after something cross-platform?

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#18 Post by muggins »

hey! i'm stuck in a loop.

i just went to www.google.com/linux , typed in "self-extracting" , and this thread is number 13...is this some sort of omen?

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#19 Post by muggins »

i don't think this is exactly what you had in mind, (one file that would self-extract on either windows or linux), but freewrap might allow you to have the same internal file structure, and just slightly alter the external wrapper.

http://freewrap.sourceforge.net/

(the writer of this post is indemnified from any legal action arising from negative outcomes)

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#20 Post by sunburnt »

muggins; FreeWrap looks to be only for tcl/tk scripts.
The first link is where I developed this scrap of code from.
I just wish I knew why the commands don't work as advertized.

Hopefully someone will see what's wrong, the script's values are all good.
And the size of the final sfx file is exactly the size of the script file + .tgz file.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#21 Post by sunburnt »

I figured it out & got it working, finally... It seems to work good.
GUI or console, it makes self-extracting files that any Linux distro can run.
It makes 2 types of SFX files:
Archive ( extracts to: current directory )
Install ( extracts to: / )

The files are named like this: "(FileName).tar.gz" becomes: "(FileName)_sfx"
Because there's no file extention, then the files are executable in ROX, etc.

This is a "test" version, so try it out before you use it for something critical.
It's the perfect app. to make into a Full compressed file manager.
Attachments
xmksfx_TEST.gz
Post any errors, comments, or grips.
(1.76 KiB) Downloaded 180 times

Post Reply