![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools
|
Display Modes
|
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Jan 2008
Location: Espoo, Finland
Beans: 41
Ubuntu 9.04 Jaunty Jackalope
|
The problem
A few days back I had to create a Win32 compatible self-extracting ZIP file for a friend. Sounds easy, right. The problem was that I didn't have a Windows machine nearby and I didn't want to install any archiving programs under Wine. NOTE: A freeware ZIP program such as IZArc under Wine can be used to create a Win32 self-extracting ZIP file too. That will not be covered by this howto, sorry. The "research" Googling around I found this forum post dated August 2003. Reading it I found out that self-extracting ZIP files are nothing more but a suitable unzip binary followed by a normal ZIP file. I used the unzipsfx.exe included in Info-ZIP UnZip 5.52. The link on that post worked a few days ago so I got my hands on the unzipsfx.exe that I was looking for. Today, 2nd July 2008 I found the link dead. After some googling I didn't find a working link anywhere. I read the licence a few times and understood that I can redistribute the original unzipsfx.exe with a license included. Please note that the unzipsfx-552_win32.tar.gz (80 kB) is not an official Info-ZIP package and it includes copyrighted software that I take no credit for. More info in the Info-ZIP license that is also included in the tarball. The source code for the binaries included can be found here. The solution Step one, getting the unzipsfx.exe and zip package: * open the Terminal (in Ubuntu press alt+f2 and type gnome-terminal) * type in the following commands Code:
wget http://kolmoskone.homelinux.org/~kaja/kamaa/unzipsfx-552_win32.tar.gz tar zxf unzipsfx-552_win32.tar.gz sudo apt-get install zip * open the file manager (nautilus) and select the files you want to have zipped * right click and select Create an archive (or similar). Select a location for the ZIP file, using your home directory is the easiest. Select type .zip. See man zip for information on how to create a ZIP file in command line. Step three, making the ZIP file self-extracting * type in the following commands mysfxfile.exe can now be opened in any Win32 compatible system (including for example Windows XP/2000/Vista and even Wine in Linux) or ANY ZIP COMPATIBLE archive program such as file-roller in Ubuntu.
__________________
Kaja Last edited by Kajaste; November 26th, 2008 at 09:22 PM.. Reason: new url for the win32 binary |
|
|
|
|
|
#2 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2008
Beans: 1
|
Hi Kajaste,
I have the same problem, I'm searching for the solution from 4 days ago.. before I used Zip2exe.exe to self extract from .zip to .exe, but this one is no longer supported by x64, so I'm searching for a alternative. I'd like to know where I can find unzipsfx.exe ? and can I call it from my C++ program ? Thanks |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Jan 2008
Location: Espoo, Finland
Beans: 41
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: create a Windows compatible (.exe) self-extracting ZIP file in Ubuntu
ftp://ftp.info-zip.org/pub/infozip/win32/ seems to be up again and unzipsfx.exe can be found in ftp://ftp.info-zip.org/pub/infozip/win32/unz552xn.exe (which in fact is a self-extracting zip file).
__________________
Kaja Last edited by Kajaste; July 27th, 2008 at 02:57 PM.. |
|
|
|
|
|
#4 |
|
Dark Roasted Ubuntu
![]() Join Date: Feb 2007
Location: Nowhere important
Beans: 1,154
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: create a Windows compatible (.exe) self-extracting ZIP file in Ubuntu
Thanks for this, really helpful!
|
|
|
|
|
|
#5 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2007
Location: Fairbanks, AK
Beans: 5
Ubuntu 8.04 Hardy Heron
|
Re: Howto: create a Windows compatible (.exe) self-extracting ZIP file in Ubuntu
Hi! I have a similar need, to create a Windows self-extracting ZIP file from a Linux server. However, as these are intended to be used for an automated/unattended update process, I have two additional requirements that I'm hoping somebody can help me with:
1) I need to specify a default directory to extract to. As the server this is being built on is Linux and the target will be Windows, simply telling zip to use the full path won't work - I need to be able to prepend an arbitrary path to the relative paths stored in the archive. 2) I need to be able to set the option to extract automatically, i.e. when executed this archive must immediately extract its files instead of simply presenting the prompt asking if the default location is acceptable. Any help on these two issues would be much appreciated! Edit: I've solved question 2 - using unzipsfx.exe as the stub instead of SFXwiz32.exe provides an automatically self-extracting ZIP, but now I have the problem of needing it to replace existing files without asking. Last edited by Kromey; November 26th, 2008 at 09:48 PM.. |
|
|
|
|
|
#6 |
|
Fresh Brewed Ubuntu
![]() Join Date: Oct 2005
Location: Peru, South America
Beans: 1,391
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: create a Windows compatible (.exe) self-extracting ZIP file in Ubuntu
I too would be very interested in this and googling for the answer. I often make a windows installer to install a data file in a specific directory. I have been using IZArc under wine because I can't find any Linux native way of doing this.
Shane Ok in a quick search I dug up this: http://manpages.ubuntu.com/manpages/...nzipsfx.1.html This package is no longer active/existent and seems to have been incorporated into: unzip or zipinfo http://manpages.ubuntu.com/manpages/...1/unzip.1.html http://manpages.ubuntu.com/manpages/...zipinfo.1.html If someone was real good with man files they could probably figure out how to accomplish this with this info.
__________________
www.rices2peru.com Last edited by shane2peru; May 13th, 2009 at 07:12 PM.. |
|
|
|
| Bookmarks |
| Tags |
| self-extracting, sfx, win32, windows, zip |
|
|