Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
swdev:zip:self-extracting_zip_files [2018/06/12 11:44]
smayr created
swdev:zip:self-extracting_zip_files [2018/06/13 15:55] (current)
smayr [Create the archive]
Line 8: Line 8:
   # Compress files using 7z format, including the ''setup.exe'' file you want to autorun.   # Compress files using 7z format, including the ''setup.exe'' file you want to autorun.
   # Copy this new .7z file to ''C:\Install'' directory.   # Copy this new .7z file to ''C:\Install'' directory.
-  +
 == Get the 7z-Extra SFX extension module == == Get the 7z-Extra SFX extension module ==
 You need to download the 7z-Extra. You need to download the 7z-Extra.
  
-  # [[https://www.7-zip.org/a/7z1805-extra.7z|Download 7-Zip Extra package]] (18.05 version, as @ June 2018, or above) from [[http://www.7-zip.org/download.html|7-Zip download]].+  # [[http://downloads.sourceforge.net/sevenzip/7z920_extra.7z|Download 7-Zip Extra package]] (9.20 version) from [[http://www.7-zip.org/download.html|7-Zip download]].
   # Extract the 7z-Extra files.   # Extract the 7z-Extra files.
   # Copy the file ''7zS.sfx'' to ''C:\Install''.   # Copy the file ''7zS.sfx'' to ''C:\Install''.
  
-== Setup your config.txt ==+== Setup config.txt ==
 Created file ''C:\Install\config.txt'' with UTF-8 encoding. Created file ''C:\Install\config.txt'' with UTF-8 encoding.
 <code bash> <code bash>
Line 22: Line 22:
 Title="MYAPP v1.0.0.0" Title="MYAPP v1.0.0.0"
 BeginPrompt="Do you want to install MYAPP v1.0.0.0?" BeginPrompt="Do you want to install MYAPP v1.0.0.0?"
-RunProgram="setup.exe"+RunProgram=".\\myappdir\\setup.exe"
 ;!@InstallEnd@! ;!@InstallEnd@!
 </code> </code>
Line 28: Line 28:
 Replace [MYAPP v1.0.0.0] with your product name. Replace [MYAPP v1.0.0.0] with your product name.
  
-See SFX parameters and options for the setup file: [[http://sevenzip.osdn.jp/chm/cmdline/switches/sfx.htm|-sfx (Create SFX archive) switch]]+See SFX parameters and options for the setup file: [[http://sevenzip.osdn.jp/chm/cmdline/switches/sfx.htm|-sfx (Create SFX archive) switch]] and [[http://tools.oszone.ru/7zsfx/en/|SFX parameters and examples]].
  
-== CheckPoint == 
-You should now have a folder ''C:\Install'' with the following 3 files: 
- 
-  # Installer.7z 
-  # 7zS.sfx 
-  # config.txt 
  
 == Create the archive == == Create the archive ==
 +You should now have a folder ''C:\Install'' with the following 3 files:
 +  * ''Installer.7z''
 +  * ''7zS.sfx''
 +  * ''config.txt''
 +
 Run in command line to create the target file ''MyInstaller.exe'': Run in command line to create the target file ''MyInstaller.exe'':
 <code bash> <code bash>
-C:\> CD +C:\> CD C:\Install 
-C:\> CD Install +C:\Install\> COPY /B 7zS.sfx + config.txt + Installer.7z MyInstaller.exe
-C:\INSTALL\> COPY /B 7zS.sfx + config.txt + Installer.7z MyInstaller.exe+
 </code> </code>
  
 In ''C:\Install'', there should be a file ''MyInstaller.exe'' now.  You are done. In ''C:\Install'', there should be a file ''MyInstaller.exe'' now.  You are done.
 +
 +== References ==
 +  * [[https://sourceforge.net/projects/s-zipsfxbuilder/?source=typ_redirect|7-zip SFX Builder]]
 +  * [[http://tools.oszone.ru/7zsfx/en/|SFX Configuration File]]
 +  * [[https://sevenzip.osdn.jp/chm/cmdline/switches/sfx.htm|-sfx (Create SFX archive) switch]]